From f8a13b6fb56d266abd45376ef0d6941668646c15 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 1 Apr 2026 08:09:04 +0000 Subject: [PATCH 1/2] docs: update SelectiveGapicGeneration usage doc PiperOrigin-RevId: 892649773 Source-Link: https://github.com/googleapis/googleapis/commit/06a20b286850ebcb792cd2085ae6d0556a7c5498 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d9ae66451f81c9df99dbdc9b23bd75d007380f4e Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwaWdlZV9jb25uZWN0LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwaWdlZV9yZWdpc3RyeS12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwcF9lbmdpbmUtdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFwcF9odWItdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFydGlmYWN0X3JlZ2lzdHJ5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFydGlmYWN0X3JlZ2lzdHJ5LXYxYmV0YTIvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc2V0LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc3VyZWRfd29ya2xvYWRzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFzc3VyZWRfd29ya2xvYWRzLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1dG9tbC12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWF1dG9tbC12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhcmVfbWV0YWxfc29sdXRpb24tdjIvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhdGNoLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9jb25uZWN0aW9ucy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9jb25uZWN0b3JzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWFwcF9nYXRld2F5cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJleW9uZF9jb3JwLWNsaWVudF9nYXRld2F5cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWFuYWx5dGljc19odWItdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWNvbm5lY3Rpb24tdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== --- .../google-cloud-apigee_connect-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-apigee_connect-v1/.toys.rb | 28 + .../google-cloud-apigee_connect-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-apigee_connect-v1/Gemfile | 14 + .../google-cloud-apigee_connect-v1/LICENSE.md | 201 + .../google-cloud-apigee_connect-v1/README.md | 154 + .../google-cloud-apigee_connect-v1/Rakefile | 169 + .../gapic_metadata.json | 37 + .../google-cloud-apigee_connect-v1.gemspec | 28 + .../lib/google-cloud-apigee_connect-v1.rb | 21 + .../lib/google/cloud/apigee_connect/v1.rb | 46 + .../apigee_connect/v1/connection_service.rb | 55 + .../v1/connection_service/client.rb | 497 ++ .../v1/connection_service/credentials.rb | 51 + .../v1/connection_service/paths.rb | 50 + .../v1/connection_service/rest.rb | 52 + .../v1/connection_service/rest/client.rb | 447 ++ .../connection_service/rest/service_stub.rb | 142 + .../google/cloud/apigee_connect/v1/rest.rb | 37 + .../google/cloud/apigee_connect/v1/tether.rb | 50 + .../cloud/apigee_connect/v1/tether/client.rb | 473 ++ .../apigee_connect/v1/tether/credentials.rb | 51 + .../google/cloud/apigee_connect/v1/version.rb | 28 + .../cloud/apigeeconnect/v1/connection_pb.rb | 29 + .../v1/connection_services_pb.rb | 46 + .../cloud/apigeeconnect/v1/tether_pb.rb | 35 + .../apigeeconnect/v1/tether_services_pb.rb | 53 + .../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/apigeeconnect/v1/connection.rb | 88 + .../google/cloud/apigeeconnect/v1/tether.rb | 221 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../connection_service/list_connections.rb | 51 + ...etadata_google.cloud.apigeeconnect.v1.json | 95 + .../snippets/tether/egress.rb | 56 + .../v1/connection_service_paths_test.rb | 55 + .../v1/connection_service_rest_test.rb | 155 + .../v1/connection_service_test.rb | 171 + .../cloud/apigee_connect/v1/tether_test.rb | 204 + .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-apigee_registry-v1/.toys.rb | 28 + .../google-cloud-apigee_registry-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-apigee_registry-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../google-cloud-apigee_registry-v1/README.md | 154 + .../google-cloud-apigee_registry-v1/Rakefile | 169 + .../gapic_metadata.json | 217 + .../google-cloud-apigee_registry-v1.gemspec | 30 + .../lib/google-cloud-apigee_registry-v1.rb | 21 + .../lib/google/cloud/apigee_registry/v1.rb | 46 + .../apigee_registry/v1/bindings_override.rb | 324 + .../cloud/apigee_registry/v1/provisioning.rb | 57 + .../apigee_registry/v1/provisioning/client.rb | 730 +++ .../v1/provisioning/credentials.rb | 47 + .../v1/provisioning/operations.rb | 841 +++ .../apigee_registry/v1/provisioning/paths.rb | 69 + .../apigee_registry/v1/provisioning/rest.rb | 55 + .../v1/provisioning/rest/client.rb | 675 ++ .../v1/provisioning/rest/operations.rb | 925 +++ .../v1/provisioning/rest/service_stub.rb | 265 + .../cloud/apigee_registry/v1/registry.rb | 55 + .../apigee_registry/v1/registry/client.rb | 4095 ++++++++++++ .../v1/registry/credentials.rb | 47 + .../apigee_registry/v1/registry/paths.rb | 238 + .../cloud/apigee_registry/v1/registry/rest.rb | 53 + .../v1/registry/rest/client.rb | 3816 +++++++++++ .../v1/registry/rest/service_stub.rb | 2406 +++++++ .../google/cloud/apigee_registry/v1/rest.rb | 39 + .../cloud/apigee_registry/v1/version.rb | 28 + .../v1/provisioning_service_pb.rb | 34 + .../v1/provisioning_service_services_pb.rb | 50 + .../apigeeregistry/v1/registry_models_pb.rb | 29 + .../apigeeregistry/v1/registry_service_pb.rb | 71 + .../v1/registry_service_services_pb.rb | 128 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/httpbody.rb | 80 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../apigeeregistry/v1/provisioning_service.rb | 157 + .../apigeeregistry/v1/registry_models.rb | 407 ++ .../apigeeregistry/v1/registry_service.rb | 712 +++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../snippets/provisioning/create_instance.rb | 54 + .../snippets/provisioning/delete_instance.rb | 54 + .../snippets/provisioning/get_instance.rb | 47 + .../snippets/registry/create_api.rb | 47 + .../registry/create_api_deployment.rb | 47 + .../snippets/registry/create_api_spec.rb | 47 + .../snippets/registry/create_api_version.rb | 47 + .../snippets/registry/create_artifact.rb | 47 + .../snippets/registry/delete_api.rb | 47 + .../registry/delete_api_deployment.rb | 47 + .../delete_api_deployment_revision.rb | 47 + .../snippets/registry/delete_api_spec.rb | 47 + .../registry/delete_api_spec_revision.rb | 47 + .../snippets/registry/delete_api_version.rb | 47 + .../snippets/registry/delete_artifact.rb | 47 + .../snippets/registry/get_api.rb | 47 + .../snippets/registry/get_api_deployment.rb | 47 + .../snippets/registry/get_api_spec.rb | 47 + .../registry/get_api_spec_contents.rb | 47 + .../snippets/registry/get_api_version.rb | 47 + .../snippets/registry/get_artifact.rb | 47 + .../registry/get_artifact_contents.rb | 47 + .../registry/list_api_deployment_revisions.rb | 51 + .../snippets/registry/list_api_deployments.rb | 51 + .../registry/list_api_spec_revisions.rb | 51 + .../snippets/registry/list_api_specs.rb | 51 + .../snippets/registry/list_api_versions.rb | 51 + .../snippets/registry/list_apis.rb | 51 + .../snippets/registry/list_artifacts.rb | 51 + .../snippets/registry/replace_artifact.rb | 47 + .../registry/rollback_api_deployment.rb | 47 + .../snippets/registry/rollback_api_spec.rb | 47 + .../registry/tag_api_deployment_revision.rb | 47 + .../registry/tag_api_spec_revision.rb | 47 + .../snippets/registry/update_api.rb | 47 + .../registry/update_api_deployment.rb | 47 + .../snippets/registry/update_api_spec.rb | 47 + .../snippets/registry/update_api_version.rb | 47 + ...tadata_google.cloud.apigeeregistry.v1.json | 1535 +++++ .../v1/provisioning_operations_test.rb | 400 ++ .../v1/provisioning_paths_test.rb | 67 + .../v1/provisioning_rest_test.rb | 263 + .../apigee_registry/v1/provisioning_test.rb | 306 + .../apigee_registry/v1/registry_paths_test.rb | 127 + .../apigee_registry/v1/registry_rest_test.rb | 2034 ++++++ .../cloud/apigee_registry/v1/registry_test.rb | 2259 +++++++ .../test/helper.rb | 26 + .../google-cloud-app_engine-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-app_engine-v1/.rubocop.yml | 33 + .../google-cloud-app_engine-v1/.toys.rb | 28 + .../google-cloud-app_engine-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-app_engine-v1/CHANGELOG.md | 2 + .../google-cloud-app_engine-v1/Gemfile | 14 + .../google-cloud-app_engine-v1/LICENSE.md | 201 + .../google-cloud-app_engine-v1/README.md | 154 + .../google-cloud-app_engine-v1/Rakefile | 169 + .../gapic_metadata.json | 251 + .../google-cloud-app_engine-v1.gemspec | 28 + .../lib/google-cloud-app_engine-v1.rb | 21 + .../lib/google/appengine/v1/app_yaml_pb.rb | 37 + .../lib/google/appengine/v1/appengine_pb.rb | 79 + .../appengine/v1/appengine_services_pb.rb | 314 + .../lib/google/appengine/v1/application_pb.rb | 28 + .../lib/google/appengine/v1/audit_data_pb.rb | 25 + .../lib/google/appengine/v1/certificate_pb.rb | 26 + .../lib/google/appengine/v1/deploy_pb.rb | 27 + .../google/appengine/v1/deployed_files_pb.rb | 20 + .../google/appengine/v1/domain_mapping_pb.rb | 25 + .../lib/google/appengine/v1/domain_pb.rb | 21 + .../lib/google/appengine/v1/firewall_pb.rb | 22 + .../lib/google/appengine/v1/instance_pb.rb | 28 + .../lib/google/appengine/v1/location_pb.rb | 23 + .../appengine/v1/network_settings_pb.rb | 22 + .../lib/google/appengine/v1/operation_pb.rb | 24 + .../lib/google/appengine/v1/service_pb.rb | 25 + .../lib/google/appengine/v1/version_pb.rb | 44 + .../lib/google/cloud/app_engine/v1.rb | 52 + .../cloud/app_engine/v1/applications.rb | 55 + .../app_engine/v1/applications/client.rb | 805 +++ .../app_engine/v1/applications/credentials.rb | 53 + .../app_engine/v1/applications/operations.rb | 841 +++ .../cloud/app_engine/v1/applications/rest.rb | 52 + .../app_engine/v1/applications/rest/client.rb | 742 +++ .../v1/applications/rest/operations.rb | 925 +++ .../v1/applications/rest/service_stub.rb | 326 + .../app_engine/v1/authorized_certificates.rb | 55 + .../v1/authorized_certificates/client.rb | 870 +++ .../v1/authorized_certificates/credentials.rb | 53 + .../v1/authorized_certificates/rest.rb | 52 + .../v1/authorized_certificates/rest/client.rb | 792 +++ .../rest/service_stub.rb | 388 ++ .../cloud/app_engine/v1/authorized_domains.rb | 56 + .../v1/authorized_domains/client.rb | 484 ++ .../v1/authorized_domains/credentials.rb | 53 + .../app_engine/v1/authorized_domains/rest.rb | 53 + .../v1/authorized_domains/rest/client.rb | 434 ++ .../authorized_domains/rest/service_stub.rb | 142 + .../cloud/app_engine/v1/domain_mappings.rb | 55 + .../app_engine/v1/domain_mappings/client.rb | 911 +++ .../v1/domain_mappings/credentials.rb | 53 + .../v1/domain_mappings/operations.rb | 841 +++ .../app_engine/v1/domain_mappings/rest.rb | 52 + .../v1/domain_mappings/rest/client.rb | 833 +++ .../v1/domain_mappings/rest/operations.rb | 925 +++ .../v1/domain_mappings/rest/service_stub.rb | 388 ++ .../google/cloud/app_engine/v1/firewall.rb | 63 + .../cloud/app_engine/v1/firewall/client.rb | 982 +++ .../app_engine/v1/firewall/credentials.rb | 53 + .../cloud/app_engine/v1/firewall/rest.rb | 60 + .../app_engine/v1/firewall/rest/client.rb | 897 +++ .../v1/firewall/rest/service_stub.rb | 450 ++ .../google/cloud/app_engine/v1/instances.rb | 55 + .../cloud/app_engine/v1/instances/client.rb | 823 +++ .../app_engine/v1/instances/credentials.rb | 53 + .../app_engine/v1/instances/operations.rb | 841 +++ .../cloud/app_engine/v1/instances/rest.rb | 52 + .../app_engine/v1/instances/rest/client.rb | 752 +++ .../v1/instances/rest/operations.rb | 925 +++ .../v1/instances/rest/service_stub.rb | 326 + .../lib/google/cloud/app_engine/v1/rest.rb | 44 + .../google/cloud/app_engine/v1/services.rb | 55 + .../cloud/app_engine/v1/services/client.rb | 808 +++ .../app_engine/v1/services/credentials.rb | 53 + .../app_engine/v1/services/operations.rb | 841 +++ .../cloud/app_engine/v1/services/rest.rb | 52 + .../app_engine/v1/services/rest/client.rb | 737 +++ .../app_engine/v1/services/rest/operations.rb | 925 +++ .../v1/services/rest/service_stub.rb | 326 + .../lib/google/cloud/app_engine/v1/version.rb | 28 + .../google/cloud/app_engine/v1/versions.rb | 55 + .../cloud/app_engine/v1/versions/client.rb | 944 +++ .../app_engine/v1/versions/credentials.rb | 53 + .../app_engine/v1/versions/operations.rb | 841 +++ .../cloud/app_engine/v1/versions/rest.rb | 52 + .../app_engine/v1/versions/rest/client.rb | 866 +++ .../app_engine/v1/versions/rest/operations.rb | 925 +++ .../v1/versions/rest/service_stub.rb | 388 ++ .../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/appengine/v1/app_yaml.rb | 385 ++ .../google/appengine/v1/appengine.rb | 639 ++ .../google/appengine/v1/application.rb | 197 + .../google/appengine/v1/audit_data.rb | 60 + .../google/appengine/v1/certificate.rb | 161 + .../proto_docs/google/appengine/v1/deploy.rb | 130 + .../proto_docs/google/appengine/v1/domain.rb | 42 + .../google/appengine/v1/domain_mapping.rb | 127 + .../google/appengine/v1/firewall.rb | 72 + .../google/appengine/v1/instance.rb | 137 + .../google/appengine/v1/location.rb | 42 + .../google/appengine/v1/network_settings.rb | 51 + .../google/appengine/v1/operation.rb | 67 + .../proto_docs/google/appengine/v1/service.rb | 125 + .../proto_docs/google/appengine/v1/version.rb | 650 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../applications/create_application.rb | 54 + .../snippets/applications/get_application.rb | 47 + .../applications/repair_application.rb | 54 + .../applications/update_application.rb | 54 + .../create_authorized_certificate.rb | 47 + .../delete_authorized_certificate.rb | 47 + .../get_authorized_certificate.rb | 47 + .../list_authorized_certificates.rb | 51 + .../update_authorized_certificate.rb | 47 + .../list_authorized_domains.rb | 51 + .../domain_mappings/create_domain_mapping.rb | 54 + .../domain_mappings/delete_domain_mapping.rb | 54 + .../domain_mappings/get_domain_mapping.rb | 47 + .../domain_mappings/list_domain_mappings.rb | 51 + .../domain_mappings/update_domain_mapping.rb | 54 + .../firewall/batch_update_ingress_rules.rb | 47 + .../snippets/firewall/create_ingress_rule.rb | 47 + .../snippets/firewall/delete_ingress_rule.rb | 47 + .../snippets/firewall/get_ingress_rule.rb | 47 + .../snippets/firewall/list_ingress_rules.rb | 51 + .../snippets/firewall/update_ingress_rule.rb | 47 + .../snippets/instances/debug_instance.rb | 54 + .../snippets/instances/delete_instance.rb | 54 + .../snippets/instances/get_instance.rb | 47 + .../snippets/instances/list_instances.rb | 51 + .../snippets/services/delete_service.rb | 54 + .../snippets/services/get_service.rb | 47 + .../snippets/services/list_services.rb | 51 + .../snippets/services/update_service.rb | 54 + .../snippet_metadata_google.appengine.v1.json | 1375 ++++ .../snippets/versions/create_version.rb | 54 + .../snippets/versions/delete_version.rb | 54 + .../snippets/versions/get_version.rb | 47 + .../snippets/versions/list_versions.rb | 51 + .../snippets/versions/update_version.rb | 54 + .../v1/applications_operations_test.rb | 400 ++ .../app_engine/v1/applications_rest_test.rb | 317 + .../cloud/app_engine/v1/applications_test.rb | 369 ++ .../v1/authorized_certificates_rest_test.rb | 376 ++ .../v1/authorized_certificates_test.rb | 413 ++ .../v1/authorized_domains_rest_test.rb | 155 + .../app_engine/v1/authorized_domains_test.rb | 171 + .../v1/domain_mappings_operations_test.rb | 400 ++ .../v1/domain_mappings_rest_test.rb | 375 ++ .../app_engine/v1/domain_mappings_test.rb | 440 ++ .../cloud/app_engine/v1/firewall_rest_test.rb | 430 ++ .../cloud/app_engine/v1/firewall_test.rb | 471 ++ .../v1/instances_operations_test.rb | 400 ++ .../app_engine/v1/instances_rest_test.rb | 318 + .../cloud/app_engine/v1/instances_test.rb | 371 ++ .../app_engine/v1/services_operations_test.rb | 400 ++ .../cloud/app_engine/v1/services_rest_test.rb | 320 + .../cloud/app_engine/v1/services_test.rb | 375 ++ .../app_engine/v1/versions_operations_test.rb | 400 ++ .../cloud/app_engine/v1/versions_rest_test.rb | 376 ++ .../cloud/app_engine/v1/versions_test.rb | 442 ++ .../google-cloud-app_engine-v1/test/helper.rb | 26 + .../google-cloud-app_hub-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-app_hub-v1/.rubocop.yml | 33 + .../google-cloud-app_hub-v1/.toys.rb | 28 + .../google-cloud-app_hub-v1/.yardopts | 12 + .../google-cloud-app_hub-v1/AUTHENTICATION.md | 122 + .../google-cloud-app_hub-v1/CHANGELOG.md | 2 + .../google-cloud-app_hub-v1/Gemfile | 14 + .../google-cloud-app_hub-v1/LICENSE.md | 201 + .../google-cloud-app_hub-v1/README.md | 154 + .../google-cloud-app_hub-v1/Rakefile | 169 + .../gapic_metadata.json | 153 + .../google-cloud-app_hub-v1.gemspec | 30 + .../lib/google-cloud-app_hub-v1.rb | 21 + .../lib/google/cloud/app_hub/v1.rb | 45 + .../lib/google/cloud/app_hub/v1/app_hub.rb | 56 + .../google/cloud/app_hub/v1/app_hub/client.rb | 3468 ++++++++++ .../cloud/app_hub/v1/app_hub/credentials.rb | 47 + .../cloud/app_hub/v1/app_hub/operations.rb | 841 +++ .../google/cloud/app_hub/v1/app_hub/paths.rb | 182 + .../google/cloud/app_hub/v1/app_hub/rest.rb | 54 + .../cloud/app_hub/v1/app_hub/rest/client.rb | 3245 ++++++++++ .../app_hub/v1/app_hub/rest/operations.rb | 925 +++ .../app_hub/v1/app_hub/rest/service_stub.rb | 1736 +++++ .../cloud/app_hub/v1/bindings_override.rb | 108 + .../lib/google/cloud/app_hub/v1/rest.rb | 38 + .../lib/google/cloud/app_hub/v1/version.rb | 28 + .../cloud/apphub/v1/apphub_service_pb.rb | 71 + .../apphub/v1/apphub_service_services_pb.rb | 104 + .../google/cloud/apphub/v1/application_pb.rb | 30 + .../google/cloud/apphub/v1/attributes_pb.rb | 28 + .../lib/google/cloud/apphub/v1/service_pb.rb | 31 + .../v1/service_project_attachment_pb.rb | 27 + .../lib/google/cloud/apphub/v1/workload_pb.rb | 31 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/apphub/v1/apphub_service.rb | 787 +++ .../google/cloud/apphub/v1/application.rb | 103 + .../google/cloud/apphub/v1/attributes.rb | 115 + .../google/cloud/apphub/v1/service.rb | 139 + .../apphub/v1/service_project_attachment.rb | 72 + .../google/cloud/apphub/v1/workload.rb | 140 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-app_hub-v1/snippets/Gemfile | 32 + .../snippets/app_hub/create_application.rb | 54 + .../snippets/app_hub/create_service.rb | 54 + .../create_service_project_attachment.rb | 54 + .../snippets/app_hub/create_workload.rb | 54 + .../snippets/app_hub/delete_application.rb | 54 + .../snippets/app_hub/delete_service.rb | 54 + .../delete_service_project_attachment.rb | 54 + .../snippets/app_hub/delete_workload.rb | 54 + .../detach_service_project_attachment.rb | 47 + .../snippets/app_hub/get_application.rb | 47 + .../app_hub/get_discovered_service.rb | 47 + .../app_hub/get_discovered_workload.rb | 47 + .../snippets/app_hub/get_service.rb | 47 + .../app_hub/get_service_project_attachment.rb | 47 + .../snippets/app_hub/get_workload.rb | 47 + .../snippets/app_hub/list_applications.rb | 51 + .../app_hub/list_discovered_services.rb | 51 + .../app_hub/list_discovered_workloads.rb | 51 + .../list_service_project_attachments.rb | 51 + .../snippets/app_hub/list_services.rb | 51 + .../snippets/app_hub/list_workloads.rb | 51 + .../app_hub/lookup_discovered_service.rb | 47 + .../app_hub/lookup_discovered_workload.rb | 47 + .../lookup_service_project_attachment.rb | 47 + .../snippets/app_hub/update_application.rb | 54 + .../snippets/app_hub/update_service.rb | 54 + .../snippets/app_hub/update_workload.rb | 54 + ...ippet_metadata_google.cloud.apphub.v1.json | 1095 ++++ .../app_hub/v1/app_hub_operations_test.rb | 400 ++ .../cloud/app_hub/v1/app_hub_paths_test.rb | 139 + .../cloud/app_hub/v1/app_hub_rest_test.rb | 1605 +++++ .../google/cloud/app_hub/v1/app_hub_test.rb | 1865 ++++++ .../google-cloud-app_hub-v1/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-artifact_registry-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 268 + .../google-cloud-artifact_registry-v1.gemspec | 30 + .../lib/google-cloud-artifact_registry-v1.rb | 21 + .../lib/google/cloud/artifact_registry/v1.rb | 45 + .../artifact_registry/v1/artifact_registry.rb | 68 + .../v1/artifact_registry/client.rb | 5572 +++++++++++++++++ .../v1/artifact_registry/credentials.rb | 52 + .../v1/artifact_registry/operations.rb | 841 +++ .../v1/artifact_registry/paths.rb | 333 + .../v1/artifact_registry/rest.rb | 66 + .../v1/artifact_registry/rest/client.rb | 5187 +++++++++++++++ .../v1/artifact_registry/rest/operations.rb | 925 +++ .../v1/artifact_registry/rest/service_stub.rb | 3149 ++++++++++ .../artifact_registry/v1/bindings_override.rb | 75 + .../google/cloud/artifact_registry/v1/rest.rb | 38 + .../cloud/artifact_registry/v1/version.rb | 28 + .../artifactregistry/v1/apt_artifact_pb.rb | 31 + .../artifactregistry/v1/artifact_pb.rb | 41 + .../artifactregistry/v1/attachment_pb.rb | 30 + .../devtools/artifactregistry/v1/export_pb.rb | 29 + .../devtools/artifactregistry/v1/file_pb.rb | 33 + .../artifactregistry/v1/generic_pb.rb | 25 + .../devtools/artifactregistry/v1/go_pb.rb | 25 + .../artifactregistry/v1/kfp_artifact_pb.rb | 24 + .../artifactregistry/v1/package_pb.rb | 31 + .../artifactregistry/v1/repository_pb.rb | 72 + .../devtools/artifactregistry/v1/rule_pb.rb | 34 + .../artifactregistry/v1/service_pb.rb | 41 + .../v1/service_services_pb.rb | 172 + .../artifactregistry/v1/settings_pb.rb | 28 + .../devtools/artifactregistry/v1/tag_pb.rb | 30 + .../artifactregistry/v1/version_pb.rb | 37 + .../artifactregistry/v1/vpcsc_config_pb.rb | 28 + .../artifactregistry/v1/yum_artifact_pb.rb | 31 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../artifactregistry/v1/apt_artifact.rb | 118 + .../devtools/artifactregistry/v1/artifact.rb | 384 ++ .../artifactregistry/v1/attachment.rb | 152 + .../devtools/artifactregistry/v1/export.rb | 91 + .../devtools/artifactregistry/v1/file.rb | 211 + .../devtools/artifactregistry/v1/generic.rb | 48 + .../google/devtools/artifactregistry/v1/go.rb | 45 + .../artifactregistry/v1/kfp_artifact.rb | 42 + .../devtools/artifactregistry/v1/package.rb | 169 + .../artifactregistry/v1/repository.rb | 848 +++ .../devtools/artifactregistry/v1/rule.rb | 149 + .../devtools/artifactregistry/v1/service.rb | 32 + .../devtools/artifactregistry/v1/settings.rb | 90 + .../devtools/artifactregistry/v1/tag.rb | 152 + .../devtools/artifactregistry/v1/version.rb | 237 + .../artifactregistry/v1/vpcsc_config.rb | 82 + .../artifactregistry/v1/yum_artifact.rb | 110 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../batch_delete_versions.rb | 54 + .../artifact_registry/create_attachment.rb | 54 + .../artifact_registry/create_repository.rb | 54 + .../snippets/artifact_registry/create_rule.rb | 47 + .../snippets/artifact_registry/create_tag.rb | 47 + .../artifact_registry/delete_attachment.rb | 54 + .../snippets/artifact_registry/delete_file.rb | 54 + .../artifact_registry/delete_package.rb | 54 + .../artifact_registry/delete_repository.rb | 54 + .../snippets/artifact_registry/delete_rule.rb | 47 + .../snippets/artifact_registry/delete_tag.rb | 47 + .../artifact_registry/delete_version.rb | 54 + .../artifact_registry/export_artifact.rb | 54 + .../artifact_registry/get_attachment.rb | 47 + .../artifact_registry/get_docker_image.rb | 47 + .../snippets/artifact_registry/get_file.rb | 47 + .../artifact_registry/get_iam_policy.rb | 47 + .../artifact_registry/get_maven_artifact.rb | 47 + .../artifact_registry/get_npm_package.rb | 47 + .../snippets/artifact_registry/get_package.rb | 47 + .../artifact_registry/get_project_settings.rb | 47 + .../artifact_registry/get_python_package.rb | 47 + .../artifact_registry/get_repository.rb | 47 + .../snippets/artifact_registry/get_rule.rb | 47 + .../snippets/artifact_registry/get_tag.rb | 47 + .../snippets/artifact_registry/get_version.rb | 47 + .../artifact_registry/get_vpcsc_config.rb | 47 + .../artifact_registry/import_apt_artifacts.rb | 54 + .../artifact_registry/import_yum_artifacts.rb | 54 + .../artifact_registry/list_attachments.rb | 51 + .../artifact_registry/list_docker_images.rb | 51 + .../snippets/artifact_registry/list_files.rb | 51 + .../artifact_registry/list_maven_artifacts.rb | 51 + .../artifact_registry/list_npm_packages.rb | 51 + .../artifact_registry/list_packages.rb | 51 + .../artifact_registry/list_python_packages.rb | 51 + .../artifact_registry/list_repositories.rb | 51 + .../snippets/artifact_registry/list_rules.rb | 51 + .../snippets/artifact_registry/list_tags.rb | 51 + .../artifact_registry/list_versions.rb | 51 + .../artifact_registry/set_iam_policy.rb | 47 + .../artifact_registry/test_iam_permissions.rb | 47 + .../snippets/artifact_registry/update_file.rb | 47 + .../artifact_registry/update_package.rb | 47 + .../update_project_settings.rb | 47 + .../artifact_registry/update_repository.rb | 47 + .../snippets/artifact_registry/update_rule.rb | 47 + .../snippets/artifact_registry/update_tag.rb | 47 + .../artifact_registry/update_version.rb | 47 + .../artifact_registry/update_vpcsc_config.rb | 47 + ...a_google.devtools.artifactregistry.v1.json | 2015 ++++++ .../v1/artifact_registry_operations_test.rb | 400 ++ .../v1/artifact_registry_paths_test.rb | 223 + .../v1/artifact_registry_rest_test.rb | 2861 +++++++++ .../v1/artifact_registry_test.rb | 3256 ++++++++++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 143 + ...le-cloud-artifact_registry-v1beta2.gemspec | 30 + .../google-cloud-artifact_registry-v1beta2.rb | 21 + .../google/cloud/artifact_registry/v1beta2.rb | 45 + .../v1beta2/artifact_registry.rb | 68 + .../v1beta2/artifact_registry/client.rb | 3002 +++++++++ .../v1beta2/artifact_registry/credentials.rb | 52 + .../v1beta2/artifact_registry/operations.rb | 841 +++ .../v1beta2/artifact_registry/paths.rb | 106 + .../v1beta2/artifact_registry/rest.rb | 66 + .../v1beta2/artifact_registry/rest/client.rb | 2792 +++++++++ .../artifact_registry/rest/operations.rb | 925 +++ .../artifact_registry/rest/service_stub.rb | 1615 +++++ .../v1beta2/bindings_override.rb | 75 + .../cloud/artifact_registry/v1beta2/rest.rb | 38 + .../artifact_registry/v1beta2/version.rb | 28 + .../v1beta2/apt_artifact_pb.rb | 31 + .../artifactregistry/v1beta2/file_pb.rb | 29 + .../artifactregistry/v1beta2/package_pb.rb | 27 + .../artifactregistry/v1beta2/repository_pb.rb | 35 + .../artifactregistry/v1beta2/service_pb.rb | 36 + .../v1beta2/service_services_pb.rb | 116 + .../artifactregistry/v1beta2/settings_pb.rb | 28 + .../artifactregistry/v1beta2/tag_pb.rb | 30 + .../artifactregistry/v1beta2/version_pb.rb | 32 + .../v1beta2/yum_artifact_pb.rb | 31 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../artifactregistry/v1beta2/apt_artifact.rb | 118 + .../devtools/artifactregistry/v1beta2/file.rb | 128 + .../artifactregistry/v1beta2/package.rb | 93 + .../artifactregistry/v1beta2/repository.rb | 202 + .../artifactregistry/v1beta2/service.rb | 32 + .../artifactregistry/v1beta2/settings.rb | 80 + .../devtools/artifactregistry/v1beta2/tag.rb | 132 + .../artifactregistry/v1beta2/version.rb | 132 + .../artifactregistry/v1beta2/yum_artifact.rb | 110 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../artifact_registry/create_repository.rb | 54 + .../snippets/artifact_registry/create_tag.rb | 47 + .../artifact_registry/delete_package.rb | 54 + .../artifact_registry/delete_repository.rb | 54 + .../snippets/artifact_registry/delete_tag.rb | 47 + .../artifact_registry/delete_version.rb | 54 + .../snippets/artifact_registry/get_file.rb | 47 + .../artifact_registry/get_iam_policy.rb | 47 + .../snippets/artifact_registry/get_package.rb | 47 + .../artifact_registry/get_project_settings.rb | 47 + .../artifact_registry/get_repository.rb | 47 + .../snippets/artifact_registry/get_tag.rb | 47 + .../snippets/artifact_registry/get_version.rb | 47 + .../artifact_registry/import_apt_artifacts.rb | 54 + .../artifact_registry/import_yum_artifacts.rb | 54 + .../snippets/artifact_registry/list_files.rb | 51 + .../artifact_registry/list_packages.rb | 51 + .../artifact_registry/list_repositories.rb | 51 + .../snippets/artifact_registry/list_tags.rb | 51 + .../artifact_registry/list_versions.rb | 51 + .../artifact_registry/set_iam_policy.rb | 47 + .../artifact_registry/test_iam_permissions.rb | 47 + .../update_project_settings.rb | 47 + .../artifact_registry/update_repository.rb | 47 + .../snippets/artifact_registry/update_tag.rb | 47 + ...gle.devtools.artifactregistry.v1beta2.json | 1015 +++ .../artifact_registry_operations_test.rb | 400 ++ .../v1beta2/artifact_registry_paths_test.rb | 91 + .../v1beta2/artifact_registry_rest_test.rb | 1478 +++++ .../v1beta2/artifact_registry_test.rb | 1683 +++++ .../test/helper.rb | 26 + .../google-cloud-asset-v1/.gitignore | 22 + .../google-cloud-asset-v1/.repo-metadata.json | 18 + .../google-cloud-asset-v1/.rubocop.yml | 33 + .../google-cloud-asset-v1/.toys.rb | 28 + .../google-cloud-asset-v1/.yardopts | 12 + .../google-cloud-asset-v1/AUTHENTICATION.md | 122 + .../google-cloud-asset-v1/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-asset-v1/Gemfile | 14 + .../google-cloud-asset-v1/LICENSE.md | 201 + .../google-cloud-asset-v1/README.md | 154 + .../google-cloud-asset-v1/Rakefile | 169 + .../google-cloud-asset-v1/gapic_metadata.json | 133 + .../google-cloud-asset-v1.gemspec | 31 + .../lib/google-cloud-asset-v1.rb | 21 + .../lib/google/cloud/asset/v1.rb | 45 + .../v1/asset_enrichment_resourceowners_pb.rb | 21 + .../google/cloud/asset/v1/asset_service.rb | 56 + .../cloud/asset/v1/asset_service/client.rb | 3484 +++++++++++ .../asset/v1/asset_service/credentials.rb | 51 + .../asset/v1/asset_service/operations.rb | 841 +++ .../cloud/asset/v1/asset_service/paths.rb | 179 + .../cloud/asset/v1/asset_service/rest.rb | 53 + .../asset/v1/asset_service/rest/client.rb | 3280 ++++++++++ .../asset/v1/asset_service/rest/operations.rb | 925 +++ .../v1/asset_service/rest/service_stub.rb | 1491 +++++ .../google/cloud/asset/v1/asset_service_pb.rb | 125 + .../asset/v1/asset_service_services_pb.rb | 187 + .../lib/google/cloud/asset/v1/assets_pb.rb | 61 + .../lib/google/cloud/asset/v1/rest.rb | 37 + .../lib/google/cloud/asset/v1/version.rb | 28 + .../google/cloud/orgpolicy/v1/orgpolicy_pb.rb | 27 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1/asset_enrichment_resourceowners.rb | 35 + .../google/cloud/asset/v1/asset_service.rb | 2646 ++++++++ .../google/cloud/asset/v1/assets.rb | 1173 ++++ .../google/cloud/orgpolicy/v1/orgpolicy.rb | 313 + .../google/cloud/osconfig/v1/inventory.rb | 425 ++ .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../type/device_resources.rb | 84 + .../accesscontextmanager/v1/access_level.rb | 201 + .../accesscontextmanager/v1/access_policy.rb | 76 + .../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/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/code.rb | 185 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 56 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-asset-v1/snippets/Gemfile | 32 + .../asset_service/analyze_iam_policy.rb | 47 + .../analyze_iam_policy_longrunning.rb | 54 + .../snippets/asset_service/analyze_move.rb | 47 + .../asset_service/analyze_org_policies.rb | 51 + .../analyze_org_policy_governed_assets.rb | 51 + .../analyze_org_policy_governed_containers.rb | 51 + .../asset_service/batch_get_assets_history.rb | 47 + .../batch_get_effective_iam_policies.rb | 47 + .../snippets/asset_service/create_feed.rb | 47 + .../asset_service/create_saved_query.rb | 47 + .../snippets/asset_service/delete_feed.rb | 47 + .../asset_service/delete_saved_query.rb | 47 + .../snippets/asset_service/export_assets.rb | 54 + .../snippets/asset_service/get_feed.rb | 47 + .../snippets/asset_service/get_saved_query.rb | 47 + .../snippets/asset_service/list_assets.rb | 51 + .../snippets/asset_service/list_feeds.rb | 47 + .../asset_service/list_saved_queries.rb | 51 + .../snippets/asset_service/query_assets.rb | 47 + .../asset_service/search_all_iam_policies.rb | 51 + .../asset_service/search_all_resources.rb | 51 + .../snippets/asset_service/update_feed.rb | 47 + .../asset_service/update_saved_query.rb | 47 + ...nippet_metadata_google.cloud.asset.v1.json | 935 +++ .../asset/v1/asset_service_operations_test.rb | 400 ++ .../asset/v1/asset_service_paths_test.rb | 115 + .../cloud/asset/v1/asset_service_rest_test.rb | 1401 +++++ .../cloud/asset/v1/asset_service_test.rb | 1622 +++++ .../google-cloud-asset-v1/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-assured_workloads-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 63 + .../google-cloud-assured_workloads-v1.gemspec | 28 + .../lib/google-cloud-assured_workloads-v1.rb | 21 + .../lib/google/cloud/assured_workloads/v1.rb | 45 + .../v1/assured_workloads_service.rb | 56 + .../v1/assured_workloads_service/client.rb | 1303 ++++ .../assured_workloads_service/credentials.rb | 51 + .../assured_workloads_service/operations.rb | 841 +++ .../v1/assured_workloads_service/paths.rb | 90 + .../v1/assured_workloads_service/rest.rb | 53 + .../assured_workloads_service/rest/client.rb | 928 +++ .../rest/operations.rb | 925 +++ .../rest/service_stub.rb | 450 ++ .../google/cloud/assured_workloads/v1/rest.rb | 37 + .../cloud/assured_workloads/v1/version.rb | 28 + .../v1/assuredworkloads_pb.rb | 64 + .../v1/assuredworkloads_services_pb.rb | 78 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../assuredworkloads/v1/assuredworkloads.rb | 720 +++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../acknowledge_violation.rb | 47 + .../create_workload.rb | 54 + .../delete_workload.rb | 47 + .../get_violation.rb | 47 + .../assured_workloads_service/get_workload.rb | 47 + .../list_violations.rb | 51 + .../list_workloads.rb | 51 + .../restrict_allowed_resources.rb | 47 + .../update_workload.rb | 47 + ...data_google.cloud.assuredworkloads.v1.json | 375 ++ ...sured_workloads_service_operations_test.rb | 400 ++ .../assured_workloads_service_paths_test.rb | 79 + .../v1/assured_workloads_service_rest_test.rb | 431 ++ .../v1/assured_workloads_service_test.rb | 683 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 53 + ...le-cloud-assured_workloads-v1beta1.gemspec | 28 + .../google-cloud-assured_workloads-v1beta1.rb | 21 + .../google/cloud/assured_workloads/v1beta1.rb | 45 + .../v1beta1/assured_workloads_service.rb | 56 + .../assured_workloads_service/client.rb | 1121 ++++ .../assured_workloads_service/credentials.rb | 51 + .../assured_workloads_service/operations.rb | 841 +++ .../assured_workloads_service/paths.rb | 69 + .../v1beta1/assured_workloads_service/rest.rb | 53 + .../assured_workloads_service/rest/client.rb | 653 ++ .../rest/operations.rb | 925 +++ .../rest/service_stub.rb | 266 + .../cloud/assured_workloads/v1beta1/rest.rb | 37 + .../assured_workloads/v1beta1/version.rb | 28 + .../v1beta1/assuredworkloads_pb.rb | 52 + .../v1beta1/assuredworkloads_service_pb.rb | 26 + .../assuredworkloads_service_services_pb.rb | 71 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1beta1/assuredworkloads.rb | 557 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../analyze_workload_move.rb | 47 + .../create_workload.rb | 54 + .../delete_workload.rb | 47 + .../assured_workloads_service/get_workload.rb | 47 + .../list_workloads.rb | 51 + .../restrict_allowed_resources.rb | 47 + .../update_workload.rb | 47 + ...google.cloud.assuredworkloads.v1beta1.json | 295 + ...sured_workloads_service_operations_test.rb | 400 ++ .../assured_workloads_service_paths_test.rb | 67 + .../assured_workloads_service_rest_test.rb | 265 + .../v1beta1/assured_workloads_service_test.rb | 553 ++ .../test/helper.rb | 26 + .../google-cloud-automl-v1/.gitignore | 22 + .../.repo-metadata.json | 20 + .../google-cloud-automl-v1/.rubocop.yml | 33 + .../google-cloud-automl-v1/.toys.rb | 28 + .../google-cloud-automl-v1/.yardopts | 12 + .../google-cloud-automl-v1/AUTHENTICATION.md | 122 + .../google-cloud-automl-v1/CHANGELOG.md | 2 + .../google-cloud-automl-v1/Gemfile | 14 + .../google-cloud-automl-v1/LICENSE.md | 201 + .../google-cloud-automl-v1/README.md | 154 + .../google-cloud-automl-v1/Rakefile | 168 + .../gapic_metadata.json | 127 + .../google-cloud-automl-v1.gemspec | 28 + .../lib/google-cloud-automl-v1.rb | 21 + .../lib/google/cloud/automl/v1.rb | 46 + .../cloud/automl/v1/annotation_payload_pb.rb | 27 + .../cloud/automl/v1/annotation_spec_pb.rb | 23 + .../lib/google/cloud/automl/v1/automl.rb | 69 + .../google/cloud/automl/v1/automl/client.rb | 2349 +++++++ .../cloud/automl/v1/automl/credentials.rb | 51 + .../cloud/automl/v1/automl/operations.rb | 849 +++ .../google/cloud/automl/v1/automl/paths.rb | 130 + .../lib/google/cloud/automl/v1/automl/rest.rb | 66 + .../cloud/automl/v1/automl/rest/client.rb | 2180 +++++++ .../cloud/automl/v1/automl/rest/operations.rb | 1093 ++++ .../automl/v1/automl/rest/service_stub.rb | 1188 ++++ .../cloud/automl/v1/classification_pb.rb | 26 + .../google/cloud/automl/v1/data_items_pb.rb | 32 + .../lib/google/cloud/automl/v1/dataset_pb.rb | 27 + .../google/cloud/automl/v1/detection_pb.rb | 26 + .../lib/google/cloud/automl/v1/geometry_pb.rb | 22 + .../lib/google/cloud/automl/v1/image_pb.rb | 29 + .../lib/google/cloud/automl/v1/io_pb.rb | 30 + .../cloud/automl/v1/model_evaluation_pb.rb | 29 + .../lib/google/cloud/automl/v1/model_pb.rb | 28 + .../google/cloud/automl/v1/operations_pb.rb | 37 + .../cloud/automl/v1/prediction_service.rb | 59 + .../automl/v1/prediction_service/client.rb | 768 +++ .../v1/prediction_service/credentials.rb | 51 + .../v1/prediction_service/operations.rb | 849 +++ .../automl/v1/prediction_service/paths.rb | 52 + .../automl/v1/prediction_service/rest.rb | 56 + .../v1/prediction_service/rest/client.rb | 711 +++ .../v1/prediction_service/rest/operations.rb | 1093 ++++ .../prediction_service/rest/service_stub.rb | 205 + .../cloud/automl/v1/prediction_service_pb.rb | 33 + .../v1/prediction_service_services_pb.rb | 99 + .../lib/google/cloud/automl/v1/rest.rb | 38 + .../lib/google/cloud/automl/v1/service_pb.rb | 55 + .../cloud/automl/v1/service_services_pb.rb | 136 + .../cloud/automl/v1/text_extraction_pb.rb | 25 + .../lib/google/cloud/automl/v1/text_pb.rb | 28 + .../google/cloud/automl/v1/text_segment_pb.rb | 21 + .../cloud/automl/v1/text_sentiment_pb.rb | 24 + .../google/cloud/automl/v1/translation_pb.rb | 27 + .../lib/google/cloud/automl/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/automl/v1/annotation_payload.rb | 70 + .../google/cloud/automl/v1/annotation_spec.rb | 45 + .../google/cloud/automl/v1/classification.rb | 189 + .../google/cloud/automl/v1/data_items.rb | 202 + .../google/cloud/automl/v1/dataset.rb | 106 + .../google/cloud/automl/v1/detection.rb | 97 + .../google/cloud/automl/v1/geometry.rb | 53 + .../google/cloud/automl/v1/image.rb | 215 + .../proto_docs/google/cloud/automl/v1/io.rb | 1345 ++++ .../google/cloud/automl/v1/model.rb | 121 + .../cloud/automl/v1/model_evaluation.rb | 100 + .../google/cloud/automl/v1/operations.rb | 197 + .../cloud/automl/v1/prediction_service.rb | 270 + .../google/cloud/automl/v1/service.rb | 326 + .../proto_docs/google/cloud/automl/v1/text.rb | 76 + .../google/cloud/automl/v1/text_extraction.rb | 73 + .../google/cloud/automl/v1/text_segment.rb | 44 + .../google/cloud/automl/v1/text_sentiment.rb | 82 + .../google/cloud/automl/v1/translation.rb | 79 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../google-cloud-automl-v1/snippets/Gemfile | 32 + .../snippets/automl/create_dataset.rb | 54 + .../snippets/automl/create_model.rb | 54 + .../snippets/automl/delete_dataset.rb | 54 + .../snippets/automl/delete_model.rb | 54 + .../snippets/automl/deploy_model.rb | 54 + .../snippets/automl/export_data.rb | 54 + .../snippets/automl/export_model.rb | 54 + .../snippets/automl/get_annotation_spec.rb | 47 + .../snippets/automl/get_dataset.rb | 47 + .../snippets/automl/get_model.rb | 47 + .../snippets/automl/get_model_evaluation.rb | 47 + .../snippets/automl/import_data.rb | 54 + .../snippets/automl/list_datasets.rb | 51 + .../snippets/automl/list_model_evaluations.rb | 51 + .../snippets/automl/list_models.rb | 51 + .../snippets/automl/undeploy_model.rb | 54 + .../snippets/automl/update_dataset.rb | 47 + .../snippets/automl/update_model.rb | 47 + .../prediction_service/batch_predict.rb | 54 + .../snippets/prediction_service/predict.rb | 47 + ...ippet_metadata_google.cloud.automl.v1.json | 815 +++ .../cloud/automl/v1/automl_operations_test.rb | 400 ++ .../cloud/automl/v1/automl_paths_test.rb | 103 + .../cloud/automl/v1/automl_rest_test.rb | 1088 ++++ .../google/cloud/automl/v1/automl_test.rb | 1257 ++++ .../v1/prediction_service_operations_test.rb | 400 ++ .../v1/prediction_service_paths_test.rb | 55 + .../automl/v1/prediction_service_rest_test.rb | 212 + .../automl/v1/prediction_service_test.rb | 249 + .../google-cloud-automl-v1/test/helper.rb | 26 + .../google-cloud-automl-v1beta1/.gitignore | 22 + .../.repo-metadata.json | 20 + .../google-cloud-automl-v1beta1/.rubocop.yml | 33 + .../google-cloud-automl-v1beta1/.toys.rb | 28 + .../google-cloud-automl-v1beta1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-automl-v1beta1/CHANGELOG.md | 2 + .../google-cloud-automl-v1beta1/Gemfile | 14 + .../google-cloud-automl-v1beta1/LICENSE.md | 201 + .../google-cloud-automl-v1beta1/README.md | 154 + .../google-cloud-automl-v1beta1/Rakefile | 169 + .../gapic_metadata.json | 157 + .../google-cloud-automl-v1beta1.gemspec | 28 + .../lib/google-cloud-automl-v1beta1.rb | 21 + .../lib/google/cloud/automl/v1beta1.rb | 46 + .../automl/v1beta1/annotation_payload_pb.rb | 28 + .../automl/v1beta1/annotation_spec_pb.rb | 23 + .../lib/google/cloud/automl/v1beta1/automl.rb | 69 + .../cloud/automl/v1beta1/automl/client.rb | 2983 +++++++++ .../automl/v1beta1/automl/credentials.rb | 51 + .../cloud/automl/v1beta1/automl/operations.rb | 849 +++ .../cloud/automl/v1beta1/automl/paths.rb | 174 + .../cloud/automl/v1beta1/automl/rest.rb | 66 + .../automl/v1beta1/automl/rest/client.rb | 2772 ++++++++ .../automl/v1beta1/automl/rest/operations.rb | 1093 ++++ .../v1beta1/automl/rest/service_stub.rb | 1556 +++++ .../cloud/automl/v1beta1/classification_pb.rb | 29 + .../cloud/automl/v1beta1/column_spec_pb.rb | 26 + .../cloud/automl/v1beta1/data_items_pb.rb | 35 + .../cloud/automl/v1beta1/data_stats_pb.rb | 32 + .../cloud/automl/v1beta1/data_types_pb.rb | 23 + .../google/cloud/automl/v1beta1/dataset_pb.rb | 29 + .../cloud/automl/v1beta1/detection_pb.rb | 29 + .../cloud/automl/v1beta1/geometry_pb.rb | 22 + .../google/cloud/automl/v1beta1/image_pb.rb | 29 + .../lib/google/cloud/automl/v1beta1/io_pb.rb | 32 + .../automl/v1beta1/model_evaluation_pb.rb | 31 + .../google/cloud/automl/v1beta1/model_pb.rb | 30 + .../cloud/automl/v1beta1/operations_pb.rb | 40 + .../automl/v1beta1/prediction_service.rb | 59 + .../v1beta1/prediction_service/client.rb | 725 +++ .../v1beta1/prediction_service/credentials.rb | 51 + .../v1beta1/prediction_service/operations.rb | 849 +++ .../v1beta1/prediction_service/paths.rb | 52 + .../automl/v1beta1/prediction_service/rest.rb | 56 + .../v1beta1/prediction_service/rest/client.rb | 668 ++ .../prediction_service/rest/operations.rb | 1093 ++++ .../prediction_service/rest/service_stub.rb | 205 + .../automl/v1beta1/prediction_service_pb.rb | 34 + .../v1beta1/prediction_service_services_pb.rb | 79 + .../google/cloud/automl/v1beta1/ranges_pb.rb | 21 + .../cloud/automl/v1beta1/regression_pb.rb | 21 + .../lib/google/cloud/automl/v1beta1/rest.rb | 38 + .../google/cloud/automl/v1beta1/service_pb.rb | 66 + .../automl/v1beta1/service_services_pb.rb | 163 + .../cloud/automl/v1beta1/table_spec_pb.rb | 24 + .../google/cloud/automl/v1beta1/tables_pb.rb | 34 + .../cloud/automl/v1beta1/temporal_pb.rb | 23 + .../automl/v1beta1/text_extraction_pb.rb | 25 + .../google/cloud/automl/v1beta1/text_pb.rb | 28 + .../cloud/automl/v1beta1/text_segment_pb.rb | 21 + .../cloud/automl/v1beta1/text_sentiment_pb.rb | 24 + .../cloud/automl/v1beta1/translation_pb.rb | 27 + .../google/cloud/automl/v1beta1/version.rb | 28 + .../google/cloud/automl/v1beta1/video_pb.rb | 26 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../automl/v1beta1/annotation_payload.rb | 86 + .../cloud/automl/v1beta1/annotation_spec.rb | 46 + .../cloud/automl/v1beta1/classification.rb | 235 + .../cloud/automl/v1beta1/column_spec.rb | 77 + .../google/cloud/automl/v1beta1/data_items.rb | 239 + .../google/cloud/automl/v1beta1/data_stats.rb | 239 + .../google/cloud/automl/v1beta1/data_types.rb | 124 + .../google/cloud/automl/v1beta1/dataset.rb | 102 + .../google/cloud/automl/v1beta1/detection.rb | 152 + .../google/cloud/automl/v1beta1/geometry.rb | 53 + .../google/cloud/automl/v1beta1/image.rb | 205 + .../google/cloud/automl/v1beta1/io.rb | 1214 ++++ .../google/cloud/automl/v1beta1/model.rb | 113 + .../cloud/automl/v1beta1/model_evaluation.rb | 117 + .../google/cloud/automl/v1beta1/operations.rb | 232 + .../automl/v1beta1/prediction_service.rb | 238 + .../google/cloud/automl/v1beta1/ranges.rb | 38 + .../google/cloud/automl/v1beta1/regression.rb | 48 + .../google/cloud/automl/v1beta1/service.rb | 452 ++ .../google/cloud/automl/v1beta1/table_spec.rb | 75 + .../google/cloud/automl/v1beta1/tables.rb | 304 + .../google/cloud/automl/v1beta1/temporal.rb | 40 + .../google/cloud/automl/v1beta1/text.rb | 84 + .../cloud/automl/v1beta1/text_extraction.rb | 73 + .../cloud/automl/v1beta1/text_segment.rb | 44 + .../cloud/automl/v1beta1/text_sentiment.rb | 87 + .../cloud/automl/v1beta1/translation.rb | 79 + .../google/cloud/automl/v1beta1/video.rb | 51 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../snippets/automl/create_dataset.rb | 47 + .../snippets/automl/create_model.rb | 54 + .../snippets/automl/delete_dataset.rb | 54 + .../snippets/automl/delete_model.rb | 54 + .../snippets/automl/deploy_model.rb | 54 + .../snippets/automl/export_data.rb | 54 + .../automl/export_evaluated_examples.rb | 54 + .../snippets/automl/export_model.rb | 54 + .../snippets/automl/get_annotation_spec.rb | 47 + .../snippets/automl/get_column_spec.rb | 47 + .../snippets/automl/get_dataset.rb | 47 + .../snippets/automl/get_model.rb | 47 + .../snippets/automl/get_model_evaluation.rb | 47 + .../snippets/automl/get_table_spec.rb | 47 + .../snippets/automl/import_data.rb | 54 + .../snippets/automl/list_column_specs.rb | 51 + .../snippets/automl/list_datasets.rb | 51 + .../snippets/automl/list_model_evaluations.rb | 51 + .../snippets/automl/list_models.rb | 51 + .../snippets/automl/list_table_specs.rb | 51 + .../snippets/automl/undeploy_model.rb | 54 + .../snippets/automl/update_column_spec.rb | 47 + .../snippets/automl/update_dataset.rb | 47 + .../snippets/automl/update_table_spec.rb | 47 + .../prediction_service/batch_predict.rb | 54 + .../snippets/prediction_service/predict.rb | 47 + ..._metadata_google.cloud.automl.v1beta1.json | 1055 ++++ .../automl/v1beta1/automl_operations_test.rb | 400 ++ .../cloud/automl/v1beta1/automl_paths_test.rb | 127 + .../cloud/automl/v1beta1/automl_rest_test.rb | 1424 +++++ .../cloud/automl/v1beta1/automl_test.rb | 1639 +++++ .../prediction_service_operations_test.rb | 400 ++ .../v1beta1/prediction_service_paths_test.rb | 55 + .../v1beta1/prediction_service_rest_test.rb | 212 + .../automl/v1beta1/prediction_service_test.rb | 249 + .../test/helper.rb | 26 + .../google-cloud-backupdr-v1/.gitignore | 22 + .../.repo-metadata.json | 19 + .../google-cloud-backupdr-v1/.rubocop.yml | 33 + .../google-cloud-backupdr-v1/.toys.rb | 28 + .../google-cloud-backupdr-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-backupdr-v1/CHANGELOG.md | 2 + .../google-cloud-backupdr-v1/Gemfile | 14 + .../google-cloud-backupdr-v1/LICENSE.md | 201 + .../google-cloud-backupdr-v1/README.md | 154 + .../google-cloud-backupdr-v1/Rakefile | 169 + .../gapic_metadata.json | 217 + .../google-cloud-backupdr-v1.gemspec | 30 + .../lib/google-cloud-backupdr-v1.rb | 21 + .../lib/google/cloud/backupdr/v1.rb | 46 + .../v1/backup_dr_protection_summary.rb | 55 + .../v1/backup_dr_protection_summary/client.rb | 530 ++ .../credentials.rb | 47 + .../v1/backup_dr_protection_summary/paths.rb | 50 + .../v1/backup_dr_protection_summary/rest.rb | 53 + .../rest/client.rb | 489 ++ .../rest/service_stub.rb | 142 + .../lib/google/cloud/backupdr/v1/backupdr.rb | 56 + .../cloud/backupdr/v1/backupdr/client.rb | 4786 ++++++++++++++ .../cloud/backupdr/v1/backupdr/credentials.rb | 47 + .../cloud/backupdr/v1/backupdr/operations.rb | 841 +++ .../cloud/backupdr/v1/backupdr/paths.rb | 309 + .../google/cloud/backupdr/v1/backupdr/rest.rb | 54 + .../cloud/backupdr/v1/backupdr/rest/client.rb | 4493 +++++++++++++ .../backupdr/v1/backupdr/rest/operations.rb | 925 +++ .../backupdr/v1/backupdr/rest/service_stub.rb | 2350 +++++++ .../google/cloud/backupdr/v1/backupdr_pb.rb | 51 + .../cloud/backupdr/v1/backupdr_services_pb.rb | 119 + .../google/cloud/backupdr/v1/backupplan_pb.rb | 47 + .../backupdr/v1/backupplanassociation_pb.rb | 42 + .../backupdr/v1/backupvault_alloydb_pb.rb | 27 + .../cloud/backupdr/v1/backupvault_ba_pb.rb | 24 + .../backupdr/v1/backupvault_cloudsql_pb.rb | 30 + .../cloud/backupdr/v1/backupvault_disk_pb.rb | 32 + .../cloud/backupdr/v1/backupvault_gce_pb.rb | 66 + .../cloud/backupdr/v1/backupvault_pb.rb | 80 + .../cloud/backupdr/v1/bindings_override.rb | 108 + .../backupdr/v1/datasourcereference_pb.rb | 34 + .../backupdr/v1/protection_summary_pb.rb | 40 + .../v1/protection_summary_services_pb.rb | 45 + .../lib/google/cloud/backupdr/v1/rest.rb | 39 + .../lib/google/cloud/backupdr/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/backupdr/v1/backupdr.rb | 415 ++ .../google/cloud/backupdr/v1/backupplan.rb | 588 ++ .../backupdr/v1/backupplanassociation.rb | 388 ++ .../google/cloud/backupdr/v1/backupvault.rb | 1366 ++++ .../cloud/backupdr/v1/backupvault_alloydb.rb | 69 + .../cloud/backupdr/v1/backupvault_ba.rb | 47 + .../cloud/backupdr/v1/backupvault_cloudsql.rb | 131 + .../cloud/backupdr/v1/backupvault_disk.rb | 241 + .../cloud/backupdr/v1/backupvault_gce.rb | 1001 +++ .../cloud/backupdr/v1/datasourcereference.rb | 228 + .../cloud/backupdr/v1/protection_summary.rb | 309 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/expr.rb | 75 + .../proto_docs/google/type/month.rb | 64 + .../google-cloud-backupdr-v1/snippets/Gemfile | 32 + .../list_resource_backup_configs.rb | 51 + .../snippets/backupdr/create_backup_plan.rb | 54 + .../create_backup_plan_association.rb | 54 + .../snippets/backupdr/create_backup_vault.rb | 54 + .../backupdr/create_management_server.rb | 54 + .../snippets/backupdr/delete_backup.rb | 54 + .../snippets/backupdr/delete_backup_plan.rb | 54 + .../delete_backup_plan_association.rb | 54 + .../snippets/backupdr/delete_backup_vault.rb | 54 + .../backupdr/delete_management_server.rb | 54 + ...kup_plan_associations_for_resource_type.rb | 51 + .../fetch_backups_for_resource_type.rb | 51 + ...ata_source_references_for_resource_type.rb | 51 + .../backupdr/fetch_usable_backup_vaults.rb | 51 + .../snippets/backupdr/get_backup.rb | 47 + .../snippets/backupdr/get_backup_plan.rb | 47 + .../backupdr/get_backup_plan_association.rb | 47 + .../backupdr/get_backup_plan_revision.rb | 47 + .../snippets/backupdr/get_backup_vault.rb | 47 + .../snippets/backupdr/get_data_source.rb | 47 + .../backupdr/get_data_source_reference.rb | 47 + .../backupdr/get_management_server.rb | 47 + .../snippets/backupdr/initialize_service.rb | 54 + .../backupdr/list_backup_plan_associations.rb | 51 + .../backupdr/list_backup_plan_revisions.rb | 51 + .../snippets/backupdr/list_backup_plans.rb | 51 + .../snippets/backupdr/list_backup_vaults.rb | 51 + .../snippets/backupdr/list_backups.rb | 51 + .../backupdr/list_data_source_references.rb | 51 + .../snippets/backupdr/list_data_sources.rb | 51 + .../backupdr/list_management_servers.rb | 51 + .../snippets/backupdr/restore_backup.rb | 54 + .../snippets/backupdr/trigger_backup.rb | 54 + .../snippets/backupdr/update_backup.rb | 54 + .../snippets/backupdr/update_backup_plan.rb | 54 + .../update_backup_plan_association.rb | 54 + .../snippets/backupdr/update_backup_vault.rb | 54 + .../snippets/backupdr/update_data_source.rb | 54 + ...pet_metadata_google.cloud.backupdr.v1.json | 1535 +++++ ...backup_dr_protection_summary_paths_test.rb | 55 + .../backup_dr_protection_summary_rest_test.rb | 157 + .../v1/backup_dr_protection_summary_test.rb | 175 + .../backupdr/v1/backupdr_operations_test.rb | 400 ++ .../cloud/backupdr/v1/backupdr_paths_test.rb | 211 + .../cloud/backupdr/v1/backupdr_rest_test.rb | 2196 +++++++ .../google/cloud/backupdr/v1/backupdr_test.rb | 2613 ++++++++ .../google-cloud-backupdr-v1/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 238 + ...oogle-cloud-bare_metal_solution-v2.gemspec | 30 + .../google-cloud-bare_metal_solution-v2.rb | 21 + .../google/cloud/bare_metal_solution/v2.rb | 45 + .../v2/bare_metal_solution.rb | 63 + .../v2/bare_metal_solution/client.rb | 4836 ++++++++++++++ .../v2/bare_metal_solution/credentials.rb | 47 + .../v2/bare_metal_solution/operations.rb | 841 +++ .../v2/bare_metal_solution/paths.rb | 301 + .../v2/bare_metal_solution/rest.rb | 61 + .../v2/bare_metal_solution/rest/client.rb | 4493 +++++++++++++ .../v2/bare_metal_solution/rest/operations.rb | 925 +++ .../bare_metal_solution/rest/service_stub.rb | 2789 +++++++++ .../v2/bindings_override.rb | 75 + .../cloud/bare_metal_solution/v2/rest.rb | 38 + .../cloud/bare_metal_solution/v2/version.rb | 28 + .../v2/baremetalsolution_pb.rb | 38 + .../v2/baremetalsolution_services_pb.rb | 154 + .../cloud/baremetalsolution/v2/common_pb.rb | 22 + .../cloud/baremetalsolution/v2/instance_pb.rb | 49 + .../cloud/baremetalsolution/v2/lun_pb.rb | 32 + .../cloud/baremetalsolution/v2/network_pb.rb | 43 + .../baremetalsolution/v2/nfs_share_pb.rb | 36 + .../cloud/baremetalsolution/v2/osimage_pb.rb | 26 + .../baremetalsolution/v2/provisioning_pb.rb | 53 + .../cloud/baremetalsolution/v2/ssh_key_pb.rb | 28 + .../cloud/baremetalsolution/v2/volume_pb.rb | 40 + .../v2/volume_snapshot_pb.rb | 32 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../baremetalsolution/v2/baremetalsolution.rb | 63 + .../cloud/baremetalsolution/v2/common.rb | 53 + .../cloud/baremetalsolution/v2/instance.rb | 354 ++ .../google/cloud/baremetalsolution/v2/lun.rb | 161 + .../cloud/baremetalsolution/v2/network.rb | 379 ++ .../cloud/baremetalsolution/v2/nfs_share.rb | 243 + .../cloud/baremetalsolution/v2/osimage.rb | 80 + .../baremetalsolution/v2/provisioning.rb | 603 ++ .../cloud/baremetalsolution/v2/ssh_key.rb | 97 + .../cloud/baremetalsolution/v2/volume.rb | 325 + .../baremetalsolution/v2/volume_snapshot.rb | 134 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../bare_metal_solution/create_nfs_share.rb | 54 + .../create_provisioning_config.rb | 47 + .../bare_metal_solution/create_ssh_key.rb | 47 + .../create_volume_snapshot.rb | 47 + .../bare_metal_solution/delete_nfs_share.rb | 54 + .../bare_metal_solution/delete_ssh_key.rb | 47 + .../delete_volume_snapshot.rb | 47 + .../bare_metal_solution/detach_lun.rb | 54 + .../disable_interactive_serial_console.rb | 54 + .../enable_interactive_serial_console.rb | 54 + .../snippets/bare_metal_solution/evict_lun.rb | 54 + .../bare_metal_solution/evict_volume.rb | 54 + .../bare_metal_solution/get_instance.rb | 47 + .../snippets/bare_metal_solution/get_lun.rb | 47 + .../bare_metal_solution/get_network.rb | 47 + .../bare_metal_solution/get_nfs_share.rb | 47 + .../get_provisioning_config.rb | 47 + .../bare_metal_solution/get_volume.rb | 47 + .../get_volume_snapshot.rb | 47 + .../bare_metal_solution/list_instances.rb | 51 + .../snippets/bare_metal_solution/list_luns.rb | 51 + .../bare_metal_solution/list_network_usage.rb | 47 + .../bare_metal_solution/list_networks.rb | 51 + .../bare_metal_solution/list_nfs_shares.rb | 51 + .../bare_metal_solution/list_os_images.rb | 51 + .../list_provisioning_quotas.rb | 51 + .../bare_metal_solution/list_ssh_keys.rb | 51 + .../list_volume_snapshots.rb | 51 + .../bare_metal_solution/list_volumes.rb | 51 + .../bare_metal_solution/rename_instance.rb | 47 + .../bare_metal_solution/rename_network.rb | 47 + .../bare_metal_solution/rename_nfs_share.rb | 47 + .../bare_metal_solution/rename_volume.rb | 47 + .../bare_metal_solution/reset_instance.rb | 54 + .../bare_metal_solution/resize_volume.rb | 54 + .../restore_volume_snapshot.rb | 54 + .../bare_metal_solution/start_instance.rb | 54 + .../bare_metal_solution/stop_instance.rb | 54 + .../submit_provisioning_config.rb | 47 + .../bare_metal_solution/update_instance.rb | 54 + .../bare_metal_solution/update_network.rb | 54 + .../bare_metal_solution/update_nfs_share.rb | 54 + .../update_provisioning_config.rb | 47 + .../bare_metal_solution/update_volume.rb | 54 + ...ata_google.cloud.baremetalsolution.v2.json | 1775 ++++++ .../v2/bare_metal_solution_operations_test.rb | 400 ++ .../v2/bare_metal_solution_paths_test.rb | 211 + .../v2/bare_metal_solution_rest_test.rb | 2518 ++++++++ .../v2/bare_metal_solution_test.rb | 2881 +++++++++ .../test/helper.rb | 26 + .../google-cloud-batch-v1/.gitignore | 22 + .../google-cloud-batch-v1/.repo-metadata.json | 15 + .../google-cloud-batch-v1/.rubocop.yml | 33 + .../google-cloud-batch-v1/.toys.rb | 28 + .../google-cloud-batch-v1/.yardopts | 12 + .../google-cloud-batch-v1/AUTHENTICATION.md | 122 + .../google-cloud-batch-v1/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-batch-v1/Gemfile | 14 + .../google-cloud-batch-v1/LICENSE.md | 201 + .../google-cloud-batch-v1/README.md | 151 + .../google-cloud-batch-v1/Rakefile | 169 + .../google-cloud-batch-v1/gapic_metadata.json | 53 + .../google-cloud-batch-v1.gemspec | 30 + .../lib/google-cloud-batch-v1.rb | 22 + .../lib/google/cloud/batch/v1.rb | 45 + .../lib/google/cloud/batch/v1/batch_pb.rb | 42 + .../google/cloud/batch/v1/batch_service.rb | 58 + .../cloud/batch/v1/batch_service/client.rb | 1190 ++++ .../batch/v1/batch_service/credentials.rb | 47 + .../batch/v1/batch_service/operations.rb | 841 +++ .../cloud/batch/v1/batch_service/paths.rb | 113 + .../cloud/batch/v1/batch_service/rest.rb | 56 + .../batch/v1/batch_service/rest/client.rb | 1106 ++++ .../batch/v1/batch_service/rest/operations.rb | 925 +++ .../v1/batch_service/rest/service_stub.rb | 510 ++ .../cloud/batch/v1/batch_services_pb.rb | 59 + .../cloud/batch/v1/bindings_override.rb | 75 + .../lib/google/cloud/batch/v1/job_pb.rb | 51 + .../lib/google/cloud/batch/v1/rest.rb | 38 + .../lib/google/cloud/batch/v1/task_pb.rb | 42 + .../lib/google/cloud/batch/v1/version.rb | 28 + .../lib/google/cloud/batch/v1/volume_pb.rb | 23 + .../lib/google/iam/v1.rb | 43 + .../lib/google/iam/v1/bindings_override.rb | 73 + .../lib/google/iam/v1/iam_policy.rb | 76 + .../lib/google/iam/v1/iam_policy/client.rb | 727 +++ .../google/iam/v1/iam_policy/credentials.rb | 42 + .../lib/google/iam/v1/iam_policy/rest.rb | 74 + .../google/iam/v1/iam_policy/rest/client.rb | 671 ++ .../iam/v1/iam_policy/rest/service_stub.rb | 265 + .../lib/google/iam/v1/rest.rb | 36 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/cloud/batch/v1/batch.rb | 246 + .../proto_docs/google/cloud/batch/v1/job.rb | 789 +++ .../proto_docs/google/cloud/batch/v1/task.rb | 547 ++ .../google/cloud/batch/v1/volume.rb | 92 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-batch-v1/snippets/Gemfile | 32 + .../snippets/batch_service/cancel_job.rb | 54 + .../snippets/batch_service/create_job.rb | 47 + .../snippets/batch_service/delete_job.rb | 54 + .../snippets/batch_service/get_job.rb | 47 + .../snippets/batch_service/get_task.rb | 47 + .../snippets/batch_service/list_jobs.rb | 51 + .../snippets/batch_service/list_tasks.rb | 51 + .../snippets/iam_policy/get_iam_policy.rb | 47 + .../snippets/iam_policy/set_iam_policy.rb | 47 + .../iam_policy/test_iam_permissions.rb | 47 + ...nippet_metadata_google.cloud.batch.v1.json | 295 + .../snippet_metadata_google.iam.v1.json | 135 + .../batch/v1/batch_service_operations_test.rb | 400 ++ .../batch/v1/batch_service_paths_test.rb | 91 + .../cloud/batch/v1/batch_service_rest_test.rb | 490 ++ .../cloud/batch/v1/batch_service_test.rb | 570 ++ .../google/iam/v1/iam_policy_rest_test.rb | 265 + .../test/google/iam/v1/iam_policy_test.rb | 286 + .../google-cloud-batch-v1/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 48 + ...oud-beyond_corp-app_connections-v1.gemspec | 30 + ...le-cloud-beyond_corp-app_connections-v1.rb | 21 + .../cloud/beyond_corp/app_connections/v1.rb | 42 + .../v1/app_connections_service.rb | 65 + .../v1/app_connections_service/client.rb | 1141 ++++ .../v1/app_connections_service/credentials.rb | 49 + .../v1/app_connections_service/operations.rb | 843 +++ .../v1/app_connections_service/paths.rb | 109 + .../beyond_corp/app_connections/v1/version.rb | 30 + .../v1/app_connections_service_pb.rb | 46 + .../v1/app_connections_service_services_pb.rb | 72 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1/app_connections_service.rb | 411 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../create_app_connection.rb | 54 + .../delete_app_connection.rb | 54 + .../get_app_connection.rb | 47 + .../list_app_connections.rb | 51 + .../resolve_app_connections.rb | 51 + .../update_app_connection.rb | 54 + ...le.cloud.beyondcorp.appconnections.v1.json | 255 + ...app_connections_service_operations_test.rb | 400 ++ .../v1/app_connections_service_paths_test.rb | 91 + .../v1/app_connections_service_test.rb | 525 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 48 + ...loud-beyond_corp-app_connectors-v1.gemspec | 30 + ...gle-cloud-beyond_corp-app_connectors-v1.rb | 21 + .../cloud/beyond_corp/app_connectors/v1.rb | 42 + .../v1/app_connectors_service.rb | 65 + .../v1/app_connectors_service/client.rb | 1144 ++++ .../v1/app_connectors_service/credentials.rb | 49 + .../v1/app_connectors_service/operations.rb | 843 +++ .../v1/app_connectors_service/paths.rb | 71 + .../beyond_corp/app_connectors/v1/version.rb | 30 + .../v1/app_connector_instance_config_pb.rb | 29 + .../v1/app_connectors_service_pb.rb | 44 + .../v1/app_connectors_service_services_pb.rb | 70 + .../appconnectors/v1/resource_info_pb.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1/app_connector_instance_config.rb | 82 + .../v1/app_connectors_service.rb | 341 + .../appconnectors/v1/resource_info.rb | 78 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../create_app_connector.rb | 54 + .../delete_app_connector.rb | 54 + .../get_app_connector.rb | 47 + .../list_app_connectors.rb | 51 + .../app_connectors_service/report_status.rb | 54 + .../update_app_connector.rb | 54 + ...gle.cloud.beyondcorp.appconnectors.v1.json | 255 + .../app_connectors_service_operations_test.rb | 400 ++ .../v1/app_connectors_service_paths_test.rb | 67 + .../v1/app_connectors_service_test.rb | 523 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 38 + ...-cloud-beyond_corp-app_gateways-v1.gemspec | 30 + ...oogle-cloud-beyond_corp-app_gateways-v1.rb | 21 + .../cloud/beyond_corp/app_gateways/v1.rb | 42 + .../app_gateways/v1/app_gateways_service.rb | 65 + .../v1/app_gateways_service/client.rb | 897 +++ .../v1/app_gateways_service/credentials.rb | 49 + .../v1/app_gateways_service/operations.rb | 843 +++ .../v1/app_gateways_service/paths.rb | 71 + .../beyond_corp/app_gateways/v1/version.rb | 30 + .../appgateways/v1/app_gateways_service_pb.rb | 40 + .../v1/app_gateways_service_services_pb.rb | 66 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../appgateways/v1/app_gateways_service.rb | 291 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../create_app_gateway.rb | 54 + .../delete_app_gateway.rb | 54 + .../app_gateways_service/get_app_gateway.rb | 47 + .../app_gateways_service/list_app_gateways.rb | 51 + ...oogle.cloud.beyondcorp.appgateways.v1.json | 175 + .../app_gateways_service_operations_test.rb | 400 ++ .../v1/app_gateways_service_paths_test.rb | 67 + .../v1/app_gateways_service_test.rb | 385 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 38 + ...oud-beyond_corp-client_gateways-v1.gemspec | 30 + ...le-cloud-beyond_corp-client_gateways-v1.rb | 21 + .../cloud/beyond_corp/client_gateways/v1.rb | 42 + .../v1/client_gateways_service.rb | 62 + .../v1/client_gateways_service/client.rb | 882 +++ .../v1/client_gateways_service/credentials.rb | 49 + .../v1/client_gateways_service/operations.rb | 843 +++ .../v1/client_gateways_service/paths.rb | 71 + .../beyond_corp/client_gateways/v1/version.rb | 30 + .../v1/client_gateways_service_pb.rb | 37 + .../v1/client_gateways_service_services_pb.rb | 63 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1/client_gateways_service.rb | 221 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../create_client_gateway.rb | 54 + .../delete_client_gateway.rb | 54 + .../get_client_gateway.rb | 47 + .../list_client_gateways.rb | 51 + ...le.cloud.beyondcorp.clientgateways.v1.json | 175 + ...client_gateways_service_operations_test.rb | 400 ++ .../v1/client_gateways_service_paths_test.rb | 67 + .../v1/client_gateways_service_test.rb | 385 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 163 + ...le-cloud-bigquery-analytics_hub-v1.gemspec | 29 + .../google-cloud-bigquery-analytics_hub-v1.rb | 21 + .../google/cloud/bigquery/analytics_hub/v1.rb | 47 + .../analytics_hub/v1/analytics_hub_service.rb | 63 + .../v1/analytics_hub_service/client.rb | 3310 ++++++++++ .../v1/analytics_hub_service/credentials.rb | 50 + .../v1/analytics_hub_service/operations.rb | 843 +++ .../v1/analytics_hub_service/paths.rb | 218 + .../v1/analytics_hub_service/rest.rb | 60 + .../v1/analytics_hub_service/rest/client.rb | 3064 +++++++++ .../analytics_hub_service/rest/operations.rb | 927 +++ .../rest/service_stub.rb | 1914 ++++++ .../cloud/bigquery/analytics_hub/v1/rest.rb | 39 + .../bigquery/analytics_hub/v1/version.rb | 30 + .../analyticshub/v1/analyticshub_pb.rb | 108 + .../v1/analyticshub_services_pb.rb | 119 + .../bigquery/analyticshub/v1/pubsub_pb.rb | 40 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../bigquery/analyticshub/v1/analyticshub.rb | 1364 ++++ .../cloud/bigquery/analyticshub/v1/pubsub.rb | 559 ++ .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../approve_query_template.rb | 47 + .../create_data_exchange.rb | 47 + .../analytics_hub_service/create_listing.rb | 47 + .../create_query_template.rb | 47 + .../delete_data_exchange.rb | 47 + .../analytics_hub_service/delete_listing.rb | 47 + .../delete_query_template.rb | 47 + .../delete_subscription.rb | 54 + .../get_data_exchange.rb | 47 + .../analytics_hub_service/get_iam_policy.rb | 47 + .../analytics_hub_service/get_listing.rb | 47 + .../get_query_template.rb | 47 + .../analytics_hub_service/get_subscription.rb | 47 + .../list_data_exchanges.rb | 51 + .../analytics_hub_service/list_listings.rb | 51 + .../list_org_data_exchanges.rb | 51 + .../list_query_templates.rb | 51 + .../list_shared_resource_subscriptions.rb | 51 + .../list_subscriptions.rb | 51 + .../refresh_subscription.rb | 54 + .../revoke_subscription.rb | 47 + .../analytics_hub_service/set_iam_policy.rb | 47 + .../submit_query_template.rb | 47 + .../subscribe_data_exchange.rb | 54 + .../subscribe_listing.rb | 47 + .../test_iam_permissions.rb | 47 + .../update_data_exchange.rb | 47 + .../analytics_hub_service/update_listing.rb | 47 + .../update_query_template.rb | 47 + ...google.cloud.bigquery.analyticshub.v1.json | 1175 ++++ .../analytics_hub_service_operations_test.rb | 400 ++ .../v1/analytics_hub_service_paths_test.rb | 163 + .../v1/analytics_hub_service_rest_test.rb | 1699 +++++ .../v1/analytics_hub_service_test.rb | 1914 ++++++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 58 + ...oogle-cloud-bigquery-connection-v1.gemspec | 29 + .../google-cloud-bigquery-connection-v1.rb | 21 + .../google/cloud/bigquery/connection/v1.rb | 47 + .../bigquery/connection/v1/connection_pb.rb | 51 + .../connection/v1/connection_service.rb | 57 + .../v1/connection_service/client.rb | 1202 ++++ .../v1/connection_service/credentials.rb | 54 + .../connection/v1/connection_service/paths.rb | 109 + .../connection/v1/connection_service/rest.rb | 54 + .../v1/connection_service/rest/client.rb | 1103 ++++ .../connection_service/rest/service_stub.rb | 576 ++ .../connection/v1/connection_services_pb.rb | 73 + .../cloud/bigquery/connection/v1/rest.rb | 39 + .../cloud/bigquery/connection/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../bigquery/connection/v1/connection.rb | 449 ++ .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../connection_service/create_connection.rb | 47 + .../connection_service/delete_connection.rb | 47 + .../connection_service/get_connection.rb | 47 + .../connection_service/get_iam_policy.rb | 47 + .../connection_service/list_connections.rb | 51 + .../connection_service/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../connection_service/update_connection.rb | 47 + ...a_google.cloud.bigquery.connection.v1.json | 335 + .../v1/connection_service_paths_test.rb | 91 + .../v1/connection_service_rest_test.rb | 541 ++ .../connection/v1/connection_service_test.rb | 593 ++ .../test/helper.rb | 26 + 1763 files changed, 393722 insertions(+) create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/README.md create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google-cloud-apigee_connect-v1.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/credentials.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/connection.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/tether.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/snippets/connection_service/list_connections.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/snippets/snippet_metadata_google.cloud.apigeeconnect.v1.json create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/snippets/tether/egress.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/README.md create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_models_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb create mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/README.md create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google-cloud-app_engine-v1.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/app_yaml_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/application_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/audit_data_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/certificate_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deploy_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deployed_files_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_mapping_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/firewall_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/instance_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/location_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/network_settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/operation_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/version_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/app_yaml.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/appengine.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/application.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/audit_data.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/certificate.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/deploy.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain_mapping.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/firewall.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/instance.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/location.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/network_settings.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/operation.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/create_application.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/get_application.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/repair_application.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/update_application.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/create_authorized_certificate.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/delete_authorized_certificate.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/get_authorized_certificate.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/list_authorized_certificates.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/update_authorized_certificate.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_domains/list_authorized_domains.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/create_domain_mapping.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/delete_domain_mapping.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/get_domain_mapping.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/list_domain_mappings.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/update_domain_mapping.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/batch_update_ingress_rules.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/create_ingress_rule.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/delete_ingress_rule.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/get_ingress_rule.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/list_ingress_rules.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/update_ingress_rule.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/debug_instance.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/delete_instance.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/list_instances.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/services/delete_service.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/services/get_service.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/services/list_services.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/services/update_service.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/snippet_metadata_google.appengine.v1.json create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/create_version.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/delete_version.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/get_version.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/list_versions.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/update_version.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb create mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/README.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/application_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/attributes_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/service_project_attachment_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/workload_pb.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb create mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/README.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb create mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-asset-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-asset-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-asset-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-asset-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-asset-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-asset-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-asset-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-asset-v1/README.md create mode 100644 owl-bot-staging/google-cloud-asset-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-asset-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-asset-v1/google-cloud-asset-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google-cloud-asset-v1.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_enrichment_resourceowners_pb.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/assets_pb.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_enrichment_resourceowners.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_service.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/assets.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/osconfig/v1/inventory.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/code.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy_longrunning.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_move.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policies.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_assets.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_containers.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_assets_history.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_effective_iam_policies.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_feed.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_saved_query.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_feed.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_saved_query.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/export_assets.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_feed.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_saved_query.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_assets.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_feeds.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_saved_queries.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/query_assets.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_iam_policies.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_resources.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_feed.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_saved_query.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json create mode 100644 owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb create mode 100644 owl-bot-staging/google-cloud-asset-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/README.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb create mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-automl-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-automl-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-automl-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/README.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/ranges_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/regression_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb create mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/README.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb create mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-batch-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-batch-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-batch-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/README.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json create mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb create mode 100644 owl-bot-staging/google-cloud-batch-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb create mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google-cloud-bigquery-connection-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/cloud/bigquery/connection/v1/connection.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/create_connection.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/delete_connection.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_connection.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/list_connections.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/update_connection.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/snippet_metadata_google.cloud.bigquery.connection.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/.gitignore b/owl-bot-staging/google-cloud-apigee_connect-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-apigee_connect-v1/.repo-metadata.json new file mode 100644 index 000000000000..91826efe92e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "apigeeconnect.googleapis.com", + "api_shortname": "apigeeconnect", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_connect-v1/latest", + "distribution_name": "google-cloud-apigee_connect-v1", + "is_cloud": true, + "language": "ruby", + "name": "apigeeconnect", + "name_pretty": "Apigee Connect V1 API", + "product_documentation": "https://cloud.google.com/apigee/docs/hybrid/v1.4/apigee-connect", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Apigee Connect allows the Apigee hybrid management plane to connect securely to the MART service in the runtime plane without requiring you to expose the MART endpoint on the internet. If you use Apigee Connect, you do not need to configure the MART ingress gateway with a host alias and an authorized DNS certificate. Note that google-cloud-apigee_connect-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_connect instead. See the readme for more details.", + "ruby-cloud-env-prefix": "APIGEE_CONNECT", + "ruby-cloud-product-url": "https://cloud.google.com/apigee/docs/hybrid/v1.4/apigee-connect", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/.rubocop.yml b/owl-bot-staging/google-cloud-apigee_connect-v1/.rubocop.yml new file mode 100644 index 000000000000..fc7c16a5d866 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-apigee_connect-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-apigee_connect-v1.rb" diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/.toys.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/.yardopts b/owl-bot-staging/google-cloud-apigee_connect-v1/.yardopts new file mode 100644 index 000000000000..dd003fbe55df --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Apigee Connect 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-apigee_connect-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-apigee_connect-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..9bc1a46ec1cd --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-apigee_connect-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-apigee_connect-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/apigee_connect/v1" + +client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/apigee_connect/v1" + +::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::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-apigee_connect-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/apigee_connect/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::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-apigee_connect-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-apigee_connect-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/Gemfile b/owl-bot-staging/google-cloud-apigee_connect-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/Gemfile @@ -0,0 +1,14 @@ +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-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-apigee_connect-v1/LICENSE.md b/owl-bot-staging/google-cloud-apigee_connect-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/README.md b/owl-bot-staging/google-cloud-apigee_connect-v1/README.md new file mode 100644 index 000000000000..025f0e36665d --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Apigee Connect V1 API + +API Client library for the Apigee Connect V1 API + +Apigee Connect allows the Apigee hybrid management plane to connect securely to the MART service in the runtime plane without requiring you to expose the MART endpoint on the internet. If you use Apigee Connect, you do not need to configure the MART ingress gateway with a host alias and an authorized DNS certificate. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Apigee Connect V1 API. Most users should consider using +the main client gem, +[google-cloud-apigee_connect](https://rubygems.org/gems/google-cloud-apigee_connect). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-apigee_connect-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/apigeeconnect.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/apigee_connect/v1" + +client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new +request = ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new # (request fields as keyword arguments...) +response = client.list_connections request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_connect-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/apigee/docs/hybrid/v1.4/apigee-connect) +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/apigee_connect/v1" +require "logger" + +client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-apigee_connect`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-apigee_connect-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-apigee_connect`. +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-apigee_connect-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-apigee_connect-v1/Rakefile b/owl-bot-staging/google-cloud-apigee_connect-v1/Rakefile new file mode 100644 index 000000000000..b7a281b5a147 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["APIGEE_CONNECT_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["APIGEE_CONNECT_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["APIGEE_CONNECT_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 APIGEE_CONNECT_TEST_PROJECT=test123 APIGEE_CONNECT_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/apigee_connect/v1/connection_service/credentials" + ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["APIGEE_CONNECT_PROJECT"] = project + ENV["APIGEE_CONNECT_TEST_PROJECT"] = project + ENV["APIGEE_CONNECT_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-apigee_connect-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-apigee_connect-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-apigee_connect-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-apigee_connect-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-apigee_connect-v1" + header "google-cloud-apigee_connect-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-apigee_connect-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-apigee_connect-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-apigee_connect-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-apigee_connect-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-apigee_connect-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-apigee_connect-v1/gapic_metadata.json new file mode 100644 index 000000000000..4940800bad0c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/gapic_metadata.json @@ -0,0 +1,37 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.apigeeconnect.v1", + "libraryPackage": "::Google::Cloud::ApigeeConnect::V1", + "services": { + "ConnectionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client", + "rpcs": { + "ListConnections": { + "methods": [ + "list_connections" + ] + } + } + } + } + }, + "Tether": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ApigeeConnect::V1::Tether::Client", + "rpcs": { + "Egress": { + "methods": [ + "egress" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec b/owl-bot-staging/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec new file mode 100644 index 000000000000..322f42b394a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/apigee_connect/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-apigee_connect-v1" + gem.version = Google::Cloud::ApigeeConnect::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Apigee Connect allows the Apigee hybrid management plane to connect securely to the MART service in the runtime plane without requiring you to expose the MART endpoint on the internet. If you use Apigee Connect, you do not need to configure the MART ingress gateway with a host alias and an authorized DNS certificate. Note that google-cloud-apigee_connect-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_connect instead. See the readme for more details." + gem.summary = "API Client library for the Apigee Connect V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google-cloud-apigee_connect-v1.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google-cloud-apigee_connect-v1.rb new file mode 100644 index 000000000000..1e52fc5c9c50 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google-cloud-apigee_connect-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/apigee_connect/v1" diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1.rb new file mode 100644 index 000000000000..1479077da696 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/apigee_connect/v1/connection_service" +require "google/cloud/apigee_connect/v1/tether" +require "google/cloud/apigee_connect/v1/version" + +module Google + module Cloud + module ApigeeConnect + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/apigee_connect/v1" + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/apigee_connect/v1" + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/apigee_connect/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service.rb new file mode 100644 index 000000000000..a415294e9587 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/apigee_connect/v1/version" + +require "google/cloud/apigee_connect/v1/connection_service/credentials" +require "google/cloud/apigee_connect/v1/connection_service/paths" +require "google/cloud/apigee_connect/v1/connection_service/client" +require "google/cloud/apigee_connect/v1/connection_service/rest" + +module Google + module Cloud + module ApigeeConnect + module V1 + ## + # Service Interface for the Apigee Connect connection management APIs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/apigee_connect/v1/connection_service" + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/apigee_connect/v1/connection_service/rest" + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new + # + module ConnectionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "connection_service", "helpers.rb" +require "google/cloud/apigee_connect/v1/connection_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/client.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/client.rb new file mode 100644 index 000000000000..1ae6da89b0c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/client.rb @@ -0,0 +1,497 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/apigeeconnect/v1/connection_pb" + +module Google + module Cloud + module ApigeeConnect + module V1 + module ConnectionService + ## + # Client for the ConnectionService service. + # + # Service Interface for the Apigee Connect connection management APIs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeconnect.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :connection_service_stub + + ## + # Configure the ConnectionService Client class. + # + # See {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConnectionService clients + # ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ApigeeConnect", "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_connections.timeout = 60.0 + default_config.rpcs.list_connections.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConnectionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @connection_service_stub.universe_domain + end + + ## + # Create a new ConnectionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConnectionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed 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/apigeeconnect/v1/connection_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @connection_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @connection_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 + @connection_service_stub.logger + end + + # Service calls + + ## + # Lists connections that are currently active for the given Apigee Connect + # endpoint. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_connections(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent name of the form: + # `projects/{project_number or project_id}/endpoints/{endpoint}`. + # @param page_size [::Integer] + # The maximum number of connections to return. The service may return fewer + # than this value. If unspecified, at most 100 connections 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 `ListConnections` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListConnections` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeConnect::V1::Connection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeConnect::V1::Connection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeConnect::V1::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.call_rpc :list_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @connection_service_stub, :list_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConnectionService API. + # + # This class represents the configuration for ConnectionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_connections to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_connections.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_connections.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConnectionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + + # @private + def initialize parent_rpcs = nil + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/credentials.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/credentials.rb new file mode 100644 index 000000000000..dc8578056d40 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ApigeeConnect + module V1 + module ConnectionService + # Credentials for the ConnectionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "APIGEE_CONNECT_CREDENTIALS", + "APIGEE_CONNECT_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APIGEE_CONNECT_CREDENTIALS_JSON", + "APIGEE_CONNECT_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-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/paths.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/paths.rb new file mode 100644 index 000000000000..1b0007f89dcf --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/paths.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ApigeeConnect + module V1 + module ConnectionService + # Path helper methods for the ConnectionService API. + module Paths + ## + # Create a fully-qualified Endpoint resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/endpoints/{endpoint}` + # + # @param project [String] + # @param endpoint [String] + # + # @return [::String] + def endpoint_path project:, endpoint: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/endpoints/#{endpoint}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest.rb new file mode 100644 index 000000000000..9ecb4dbed2ea --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/apigee_connect/v1/version" + +require "google/cloud/apigee_connect/v1/connection_service/credentials" +require "google/cloud/apigee_connect/v1/connection_service/paths" +require "google/cloud/apigee_connect/v1/connection_service/rest/client" + +module Google + module Cloud + module ApigeeConnect + module V1 + ## + # Service Interface for the Apigee Connect connection management APIs. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/apigee_connect/v1/connection_service/rest" + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new + # + module ConnectionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/apigee_connect/v1/connection_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/client.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/client.rb new file mode 100644 index 000000000000..79006b137a6b --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/client.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/apigeeconnect/v1/connection_pb" +require "google/cloud/apigee_connect/v1/connection_service/rest/service_stub" + +module Google + module Cloud + module ApigeeConnect + module V1 + module ConnectionService + module Rest + ## + # REST client for the ConnectionService service. + # + # Service Interface for the Apigee Connect connection management APIs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeconnect.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :connection_service_stub + + ## + # Configure the ConnectionService Client class. + # + # See {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConnectionService clients + # ::Google::Cloud::ApigeeConnect::V1::ConnectionService::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", "ApigeeConnect", "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_connections.timeout = 60.0 + default_config.rpcs.list_connections.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConnectionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ApigeeConnect::V1::ConnectionService::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 + @connection_service_stub.universe_domain + end + + ## + # Create a new ConnectionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConnectionService 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 + + @connection_service_stub = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @connection_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 + @connection_service_stub.logger + end + + # Service calls + + ## + # Lists connections that are currently active for the given Apigee Connect + # endpoint. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_connections(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent name of the form: + # `projects/{project_number or project_id}/endpoints/{endpoint}`. + # @param page_size [::Integer] + # The maximum number of connections to return. The service may return fewer + # than this value. If unspecified, at most 100 connections 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 `ListConnections` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListConnections` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeConnect::V1::Connection>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeConnect::V1::Connection>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeConnect::V1::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_connections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.list_connections request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @connection_service_stub, :list_connections, "connections", request, result, 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 ConnectionService REST API. + # + # This class represents the configuration for ConnectionService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_connections to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_connections.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_connections.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ConnectionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + + # @private + def initialize parent_rpcs = nil + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/service_stub.rb new file mode 100644 index 000000000000..a99183b5f225 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_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/cloud/apigeeconnect/v1/connection_pb" + +module Google + module Cloud + module ApigeeConnect + module V1 + module ConnectionService + module Rest + ## + # REST service stub for the ConnectionService 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_connections REST call + # + # @param request_pb [::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse] + # A result object deserialized from the server's reply + def list_connections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_connections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse.decode_json response.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_connections REST call + # + # @param request_pb [::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_connections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/connections", + matches: [ + ["parent", %r{^projects/[^/]+/endpoints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/rest.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/rest.rb new file mode 100644 index 000000000000..00949ed51688 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/apigee_connect/v1/connection_service/rest" +require "google/cloud/apigee_connect/v1/version" + +module Google + module Cloud + module ApigeeConnect + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/apigee_connect/v1/rest" + # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether.rb new file mode 100644 index 000000000000..01a4b181b163 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/apigee_connect/v1/version" + +require "google/cloud/apigee_connect/v1/tether/credentials" +require "google/cloud/apigee_connect/v1/tether/client" + +module Google + module Cloud + module ApigeeConnect + module V1 + ## + # Tether provides a way for the control plane to send HTTP API requests to + # services in data planes that runs in a remote datacenter without + # requiring customers to open firewalls on their runtime plane. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/apigee_connect/v1/tether" + # client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new + # + module Tether + end + end + end + end +end + +helper_path = ::File.join __dir__, "tether", "helpers.rb" +require "google/cloud/apigee_connect/v1/tether/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/client.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/client.rb new file mode 100644 index 000000000000..b29a2fbdc57c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/apigeeconnect/v1/tether_pb" + +module Google + module Cloud + module ApigeeConnect + module V1 + module Tether + ## + # Client for the Tether service. + # + # Tether provides a way for the control plane to send HTTP API requests to + # services in data planes that runs in a remote datacenter without + # requiring customers to open firewalls on their runtime plane. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeconnect.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :tether_stub + + ## + # Configure the Tether Client class. + # + # See {::Google::Cloud::ApigeeConnect::V1::Tether::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Tether clients + # ::Google::Cloud::ApigeeConnect::V1::Tether::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ApigeeConnect", "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 Tether Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ApigeeConnect::V1::Tether::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @tether_stub.universe_domain + end + + ## + # Create a new Tether client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Tether client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed 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/apigeeconnect/v1/tether_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @tether_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ApigeeConnect::V1::Tether::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @tether_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.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 + @tether_stub.logger + end + + # Service calls + + ## + # Egress streams egress requests and responses. Logically, this is not + # actually a streaming request, but uses streaming as a mechanism to flip + # the client-server relationship of gRPC so that the server can act as a + # client. + # The listener, the RPC server, accepts connections from the dialer, + # the RPC client. + # The listener streams http requests and the dialer streams http responses. + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::ApigeeConnect::V1::EgressResponse, ::Hash>] + # An enumerable of {::Google::Cloud::ApigeeConnect::V1::EgressResponse} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::ApigeeConnect::V1::EgressRequest>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::ApigeeConnect::V1::EgressRequest>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeConnect::V1::Tether::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the egress method to start streaming. + # output = client.egress input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::ApigeeConnect::V1::EgressResponse.new + # input << Google::Cloud::ApigeeConnect::V1::EgressResponse.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::ApigeeConnect::V1::EgressRequest + # output.each do |current_response| + # p current_response + # end + # + def egress request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::ApigeeConnect::V1::EgressResponse + end + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.egress.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeConnect::V1::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.egress.timeout, + metadata: metadata, + retry_policy: @config.rpcs.egress.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tether_stub.call_rpc :egress, request, 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 Tether API. + # + # This class represents the configuration for Tether, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ApigeeConnect::V1::Tether::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # egress to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ApigeeConnect::V1::Tether::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.egress.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.egress.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::ApigeeConnect::V1::Tether::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Tether API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `egress` + # @return [::Gapic::Config::Method] + # + attr_reader :egress + + # @private + def initialize parent_rpcs = nil + egress_config = parent_rpcs.egress if parent_rpcs.respond_to? :egress + @egress = ::Gapic::Config::Method.new egress_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/credentials.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/credentials.rb new file mode 100644 index 000000000000..60743841a893 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/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 ApigeeConnect + module V1 + module Tether + # Credentials for the Tether API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "APIGEE_CONNECT_CREDENTIALS", + "APIGEE_CONNECT_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APIGEE_CONNECT_CREDENTIALS_JSON", + "APIGEE_CONNECT_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-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/version.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/version.rb new file mode 100644 index 000000000000..637caa5512b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/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 ApigeeConnect + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_pb.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_pb.rb new file mode 100644 index 000000000000..9c3698701bf4 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/apigeeconnect/v1/connection.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/cloud/apigeeconnect/v1/connection.proto\x12\x1dgoogle.cloud.apigeeconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"~\n\x16ListConnectionsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeconnect.googleapis.com/Endpoint\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x17ListConnectionsResponse\x12>\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32).google.cloud.apigeeconnect.v1.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"m\n\nConnection\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x37\n\x07\x63luster\x18\x02 \x01(\x0b\x32&.google.cloud.apigeeconnect.v1.Cluster\x12\x14\n\x0cstream_count\x18\x03 \x01(\x05\"\'\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t2\xaa\x02\n\x11\x43onnectionService\x12\xc2\x01\n\x0fListConnections\x12\x35.google.cloud.apigeeconnect.v1.ListConnectionsRequest\x1a\x36.google.cloud.apigeeconnect.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/endpoints/*}/connections\x1aP\xca\x41\x1c\x61pigeeconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb5\x02\n!com.google.cloud.apigeeconnect.v1B\x0f\x43onnectionProtoP\x01ZGcloud.google.com/go/apigeeconnect/apiv1/apigeeconnectpb;apigeeconnectpb\xaa\x02\x1dGoogle.Cloud.ApigeeConnect.V1\xca\x02\x1dGoogle\\Cloud\\ApigeeConnect\\V1\xea\x02 Google::Cloud::ApigeeConnect::V1\xea\x41P\n%apigeeconnect.googleapis.com/Endpoint\x12\'projects/{project}/endpoints/{endpoint}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ApigeeConnect + module V1 + ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.ListConnectionsRequest").msgclass + ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.ListConnectionsResponse").msgclass + Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Connection").msgclass + Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Cluster").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_services_pb.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_services_pb.rb new file mode 100644 index 000000000000..9afb7c1bfa61 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_services_pb.rb @@ -0,0 +1,46 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/apigeeconnect/v1/connection.proto for package 'Google.Cloud.ApigeeConnect.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/apigeeconnect/v1/connection_pb' + +module Google + module Cloud + module ApigeeConnect + module V1 + module ConnectionService + # Service Interface for the Apigee Connect connection management APIs. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.apigeeconnect.v1.ConnectionService' + + # Lists connections that are currently active for the given Apigee Connect + # endpoint. + rpc :ListConnections, ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest, ::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_pb.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_pb.rb new file mode 100644 index 000000000000..57d9c1d67542 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/apigeeconnect/v1/tether.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/rpc/status_pb' +require 'google/api/client_pb' + + +descriptor_data = "\n*google/cloud/apigeeconnect/v1/tether.proto\x12\x1dgoogle.cloud.apigeeconnect.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\x1a\x17google/api/client.proto\"\xe4\x01\n\rEgressRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x37\n\x07payload\x18\x02 \x01(\x0b\x32&.google.cloud.apigeeconnect.v1.Payload\x12?\n\x08\x65ndpoint\x18\x03 \x01(\x0e\x32-.google.cloud.apigeeconnect.v1.TetherEndpoint\x12\x0f\n\x07project\x18\x04 \x01(\t\x12\x10\n\x08trace_id\x18\x05 \x01(\t\x12*\n\x07timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xd0\x01\n\x07Payload\x12\x42\n\x0chttp_request\x18\x01 \x01(\x0b\x32*.google.cloud.apigeeconnect.v1.HttpRequestH\x00\x12@\n\x0bstream_info\x18\x02 \x01(\x0b\x32).google.cloud.apigeeconnect.v1.StreamInfoH\x00\x12\x37\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32%.google.cloud.apigeeconnect.v1.ActionH\x00\x42\x06\n\x04kind\"\x18\n\nStreamInfo\x12\n\n\x02id\x18\x01 \x01(\t\"\xf6\x01\n\x0e\x45gressResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x42\n\rhttp_response\x18\x02 \x01(\x0b\x32+.google.cloud.apigeeconnect.v1.HttpResponse\x12\"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0f\n\x07project\x18\x04 \x01(\t\x12\x10\n\x08trace_id\x18\x05 \x01(\t\x12?\n\x08\x65ndpoint\x18\x06 \x01(\x0e\x32-.google.cloud.apigeeconnect.v1.TetherEndpoint\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xa0\x01\n\x0bHttpRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06method\x18\x02 \x01(\t\x12/\n\x03url\x18\x03 \x01(\x0b\x32\".google.cloud.apigeeconnect.v1.Url\x12\x36\n\x07headers\x18\x04 \x03(\x0b\x32%.google.cloud.apigeeconnect.v1.Header\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\"X\n\x03Url\x12\x35\n\x06scheme\x18\x01 \x01(\x0e\x32%.google.cloud.apigeeconnect.v1.Scheme\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04path\x18\x03 \x01(\t\"%\n\x06Header\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\t\"\x9d\x01\n\x0cHttpResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06status\x18\x02 \x01(\t\x12\x13\n\x0bstatus_code\x18\x03 \x01(\x05\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12\x36\n\x07headers\x18\x05 \x03(\x0b\x32%.google.cloud.apigeeconnect.v1.Header\x12\x16\n\x0e\x63ontent_length\x18\x06 \x01(\x03*5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x13\n\x0fOPEN_NEW_STREAM\x10\x01*n\n\x0eTetherEndpoint\x12\x1f\n\x1bTETHER_ENDPOINT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41PIGEE_MART\x10\x01\x12\x12\n\x0e\x41PIGEE_RUNTIME\x10\x02\x12\x16\n\x12\x41PIGEE_MINT_RATING\x10\x03*+\n\x06Scheme\x12\x16\n\x12SCHEME_UNSPECIFIED\x10\x00\x12\t\n\x05HTTPS\x10\x01\x32\xc7\x01\n\x06Tether\x12k\n\x06\x45gress\x12-.google.cloud.apigeeconnect.v1.EgressResponse\x1a,.google.cloud.apigeeconnect.v1.EgressRequest\"\x00(\x01\x30\x01\x1aP\xca\x41\x1c\x61pigeeconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xde\x01\n!com.google.cloud.apigeeconnect.v1B\x0bTetherProtoP\x01ZGcloud.google.com/go/apigeeconnect/apiv1/apigeeconnectpb;apigeeconnectpb\xaa\x02\x1dGoogle.Cloud.ApigeeConnect.V1\xca\x02\x1dGoogle\\Cloud\\ApigeeConnect\\V1\xea\x02 Google::Cloud::ApigeeConnect::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ApigeeConnect + module V1 + EgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.EgressRequest").msgclass + Payload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Payload").msgclass + StreamInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.StreamInfo").msgclass + EgressResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.EgressResponse").msgclass + HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.HttpRequest").msgclass + Url = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Url").msgclass + Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Header").msgclass + HttpResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.HttpResponse").msgclass + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Action").enummodule + TetherEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.TetherEndpoint").enummodule + Scheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Scheme").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_services_pb.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_services_pb.rb new file mode 100644 index 000000000000..93ccf9bb3a74 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/apigeeconnect/v1/tether.proto for package 'Google.Cloud.ApigeeConnect.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/apigeeconnect/v1/tether_pb' + +module Google + module Cloud + module ApigeeConnect + module V1 + module Tether + # Tether provides a way for the control plane to send HTTP API requests to + # services in data planes that runs in a remote datacenter without + # requiring customers to open firewalls on their runtime plane. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.apigeeconnect.v1.Tether' + + # Egress streams egress requests and responses. Logically, this is not + # actually a streaming request, but uses streaming as a mechanism to flip + # the client-server relationship of gRPC so that the server can act as a + # client. + # The listener, the RPC server, accepts connections from the dialer, + # the RPC client. + # The listener streams http requests and the dialer streams http responses. + rpc :Egress, stream(::Google::Cloud::ApigeeConnect::V1::EgressResponse), stream(::Google::Cloud::ApigeeConnect::V1::EgressRequest) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/README.md new file mode 100644 index 000000000000..7b1ef3536a41 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Apigee Connect 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-apigee_connect-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/connection.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/connection.rb new file mode 100644 index 000000000000..68e600e41f38 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/connection.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ApigeeConnect + module V1 + # The request for [ListConnections][Management.ListConnections]. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent name of the form: + # `projects/{project_number or project_id}/endpoints/{endpoint}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of connections to return. The service may return fewer + # than this value. If unspecified, at most 100 connections 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 `ListConnections` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListConnections` must + # match the call that provided the page token. + class ListConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # [ListConnections][Management.ListConnections]. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::ApigeeConnect::V1::Connection>] + # A list of clients. + # @!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 ListConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] endpoint + # @return [::String] + # The endpoint that the connection is made against. + # Format: `projects/{project_number}/endpoints/{endpoint}` + # @!attribute [rw] cluster + # @return [::Google::Cloud::ApigeeConnect::V1::Cluster] + # Cluster information. + # @!attribute [rw] stream_count + # @return [::Integer] + # The count of streams. + class Connection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # The name of the cluster. + # @!attribute [rw] region + # @return [::String] + # The region of the cluster. + class Cluster + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/tether.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/tether.rb new file mode 100644 index 000000000000..a9029adc4965 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/tether.rb @@ -0,0 +1,221 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ApigeeConnect + module V1 + # gRPC request payload for tether. + # @!attribute [rw] id + # @return [::String] + # Unique identifier for the request. + # @!attribute [rw] payload + # @return [::Google::Cloud::ApigeeConnect::V1::Payload] + # Actual payload to send to agent. + # @!attribute [rw] endpoint + # @return [::Google::Cloud::ApigeeConnect::V1::TetherEndpoint] + # Tether Endpoint. + # @!attribute [rw] project + # @return [::String] + # GCP Project. + # Format: `projects/{project_number}`. + # @!attribute [rw] trace_id + # @return [::String] + # Unique identifier for clients to trace their request/response. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Timeout for the HTTP request. + class EgressRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Payload for EgressRequest. + # @!attribute [rw] http_request + # @return [::Google::Cloud::ApigeeConnect::V1::HttpRequest] + # The HttpRequest proto. + # + # Note: The following fields are mutually exclusive: `http_request`, `stream_info`, `action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] stream_info + # @return [::Google::Cloud::ApigeeConnect::V1::StreamInfo] + # The information of stream. + # + # Note: The following fields are mutually exclusive: `stream_info`, `http_request`, `action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] action + # @return [::Google::Cloud::ApigeeConnect::V1::Action] + # The action taken by agent. + # + # Note: The following fields are mutually exclusive: `action`, `http_request`, `stream_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Payload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Information of bi-directional stream. + # @!attribute [rw] id + # @return [::String] + # Unique identifier for the stream. + class StreamInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # gRPC response payload for tether. + # @!attribute [rw] id + # @return [::String] + # Unique identifier for the response. Matches the EgressRequest's id. + # @!attribute [rw] http_response + # @return [::Google::Cloud::ApigeeConnect::V1::HttpResponse] + # HttpResponse. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Errors from application when handling the http request. + # @!attribute [rw] project + # @return [::String] + # GCP Project. + # Format: `projects/{project_number}`. + # @!attribute [rw] trace_id + # @return [::String] + # Unique identifier for clients to trace their request/response. Matches the + # EgressRequest's trace id + # @!attribute [rw] endpoint + # @return [::Google::Cloud::ApigeeConnect::V1::TetherEndpoint] + # Tether Endpoint. + # @!attribute [rw] name + # @return [::String] + # Name is the full resource path of endpoint. + # Format: `projects/{project_number or project_id}/endpoints/{endpoint}` + class EgressResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The proto definition of http request. + # @!attribute [rw] id + # @return [::String] + # A unique identifier for the request. + # @!attribute [rw] method + # @return [::String] + # The HTTP request method. + # Valid methods: "GET", "HEAD", "POST", "PUT", "PATCH","DELETE". + # @!attribute [rw] url + # @return [::Google::Cloud::ApigeeConnect::V1::Url] + # The HTTP request URL. + # @!attribute [rw] headers + # @return [::Array<::Google::Cloud::ApigeeConnect::V1::Header>] + # The HTTP request headers. + # @!attribute [rw] body + # @return [::String] + # HTTP request body. + class HttpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The proto definition of url. + # A url represents a URL and the general form represented is: + # + # `[scheme://][google.cloud.apigeeconnect.v1.Url.host][path]` + # @!attribute [rw] scheme + # @return [::Google::Cloud::ApigeeConnect::V1::Scheme] + # Scheme. + # @!attribute [rw] host + # @return [::String] + # Host or Host:Port. + # @!attribute [rw] path + # @return [::String] + # Path starts with `/`. + class Url + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The http headers. + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] values + # @return [::Array<::String>] + class Header + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The proto definition of http response. + # @!attribute [rw] id + # @return [::String] + # A unique identifier that matches the request ID. + # @!attribute [rw] status + # @return [::String] + # Status of http response, e.g. "200 OK". + # @!attribute [rw] status_code + # @return [::Integer] + # Status code of http response, e.g. 200. + # @!attribute [rw] body + # @return [::String] + # The HTTP 1.1 response body. + # @!attribute [rw] headers + # @return [::Array<::Google::Cloud::ApigeeConnect::V1::Header>] + # The HTTP response headers. + # @!attribute [rw] content_length + # @return [::Integer] + # Content length records the length of the associated content. The + # value -1 indicates that the length is unknown. Unless http method + # is "HEAD", values >= 0 indicate that the given number of bytes may + # be read from Body. + class HttpResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The action taken by agent. + module Action + # Unspecified Action. + ACTION_UNSPECIFIED = 0 + + # Indicates that agent should open a new stream. + OPEN_NEW_STREAM = 1 + end + + # Endpoint indicates where the messages will be delivered. + module TetherEndpoint + # Unspecified tether endpoint. + TETHER_ENDPOINT_UNSPECIFIED = 0 + + # Apigee MART endpoint. + APIGEE_MART = 1 + + # Apigee Runtime endpoint. + APIGEE_RUNTIME = 2 + + # Apigee Mint Rating endpoint. + APIGEE_MINT_RATING = 3 + end + + # HTTP Scheme. + module Scheme + # Unspecified scheme. + SCHEME_UNSPECIFIED = 0 + + # HTTPS protocol. + HTTPS = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/Gemfile new file mode 100644 index 000000000000..9c6ef5c138e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1", path: "../" +else + gem "google-cloud-apigee_connect-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-apigee_connect-v1/snippets/connection_service/list_connections.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/connection_service/list_connections.rb new file mode 100644 index 000000000000..3fd279efc801 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/connection_service/list_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeconnect_v1_generated_ConnectionService_ListConnections_sync] +require "google/cloud/apigee_connect/v1" + +## +# Snippet for the list_connections call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeConnect::V1::ConnectionService::Client#list_connections. +# +def list_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new + + # Call the list_connections method. + result = client.list_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ApigeeConnect::V1::Connection. + p item + end +end +# [END apigeeconnect_v1_generated_ConnectionService_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/snippet_metadata_google.cloud.apigeeconnect.v1.json b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/snippet_metadata_google.cloud.apigeeconnect.v1.json new file mode 100644 index 000000000000..645e9505766a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/snippet_metadata_google.cloud.apigeeconnect.v1.json @@ -0,0 +1,95 @@ +{ + "client_library": { + "name": "google-cloud-apigee_connect-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.apigeeconnect.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "apigeeconnect_v1_generated_ConnectionService_ListConnections_sync", + "title": "Snippet for the list_connections call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeConnect::V1::ConnectionService::Client#list_connections.", + "file": "connection_service/list_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_connections", + "full_name": "::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client#list_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client" + }, + "method": { + "short_name": "ListConnections", + "full_name": "google.cloud.apigeeconnect.v1.ConnectionService.ListConnections", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.apigeeconnect.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeconnect_v1_generated_Tether_Egress_sync", + "title": "Snippet for the egress call in the Tether service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeConnect::V1::Tether::Client#egress.", + "file": "tether/egress.rb", + "language": "RUBY", + "client_method": { + "short_name": "egress", + "full_name": "::Google::Cloud::ApigeeConnect::V1::Tether::Client#egress", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeConnect::V1::EgressResponse", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeConnect::V1::EgressRequest", + "client": { + "short_name": "Tether::Client", + "full_name": "::Google::Cloud::ApigeeConnect::V1::Tether::Client" + }, + "method": { + "short_name": "Egress", + "full_name": "google.cloud.apigeeconnect.v1.Tether.Egress", + "service": { + "short_name": "Tether", + "full_name": "google.cloud.apigeeconnect.v1.Tether" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/tether/egress.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/tether/egress.rb new file mode 100644 index 000000000000..aa39c28e0152 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/tether/egress.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeconnect_v1_generated_Tether_Egress_sync] +require "google/cloud/apigee_connect/v1" + +## +# Snippet for the egress call in the Tether service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeConnect::V1::Tether::Client#egress. +# +def egress + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeConnect::V1::Tether::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the egress method to start streaming. + output = client.egress input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::ApigeeConnect::V1::EgressResponse.new + input << Google::Cloud::ApigeeConnect::V1::EgressResponse.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::ApigeeConnect::V1::EgressRequest + output.each do |current_response| + p current_response + end +end +# [END apigeeconnect_v1_generated_Tether_Egress_sync] diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_paths_test.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_paths_test.rb new file mode 100644 index 000000000000..dd55407b3861 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/apigee_connect/v1/connection_service" + +class ::Google::Cloud::ApigeeConnect::V1::ConnectionService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_endpoint_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.endpoint_path project: "value0", endpoint: "value1" + assert_equal "projects/value0/endpoints/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_rest_test.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_rest_test.rb new file mode 100644 index 000000000000..a908f224ddcb --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/apigeeconnect/v1/connection_pb" +require "google/cloud/apigee_connect/v1/connection_service/rest" + + +class ::Google::Cloud::ApigeeConnect::V1::ConnectionService::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_connections + # Create test objects. + client_result = ::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse.new + http_response = OpenStruct.new 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_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::ServiceStub.stub :transcode_list_connections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_connections_client_stub do + # Create client + client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_connections parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_connections ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_connections(::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.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_connections_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::ApigeeConnect::V1::ConnectionService::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::ApigeeConnect::V1::ConnectionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb new file mode 100644 index 000000000000..b0cdc3db41d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_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/cloud/apigeeconnect/v1/connection_pb" +require "google/cloud/apigee_connect/v1/connection_service" + +class ::Google::Cloud::ApigeeConnect::V1::ConnectionService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_connections, name + assert_kind_of ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest, 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_connections_client_stub do + # Create client + client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_connections parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_connections ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_connections(::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.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_connections_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| + 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::ApigeeConnect::V1::ConnectionService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::ApigeeConnect::V1::ConnectionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb new file mode 100644 index 000000000000..ba15f710ca13 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb @@ -0,0 +1,204 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/apigeeconnect/v1/tether_pb" +require "google/cloud/apigee_connect/v1/tether" + +class ::Google::Cloud::ApigeeConnect::V1::Tether::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_egress + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeConnect::V1::EgressRequest.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a bidi streaming method. + id = "hello world" + http_response = {} + status = {} + project = "hello world" + trace_id = "hello world" + endpoint = :TETHER_ENDPOINT_UNSPECIFIED + name = "hello world" + + egress_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :egress, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, egress_client_stub do + # Create client + client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name } + request_proto = ::Google::Cloud::ApigeeConnect::V1::EgressResponse.new id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name + enum_input = [request_hash, request_proto].to_enum + client.egress enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressRequest, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name } + request_proto = ::Google::Cloud::ApigeeConnect::V1::EgressResponse.new id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name + stream_input = Gapic::StreamInput.new + client.egress stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressRequest, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name } + request_proto = ::Google::Cloud::ApigeeConnect::V1::EgressResponse.new id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name + enum_input = [request_hash, request_proto].to_enum + client.egress enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressRequest, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name } + request_proto = ::Google::Cloud::ApigeeConnect::V1::EgressResponse.new id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name + stream_input = Gapic::StreamInput.new + client.egress stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressRequest, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, egress_client_stub.call_rpc_count + egress_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressResponse, r + assert_equal "hello world", r["id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeConnect::V1::HttpResponse), r["http_response"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Rpc::Status), r["status"] + assert_equal "hello world", r["project"] + assert_equal "hello world", r["trace_id"] + assert_equal :TETHER_ENDPOINT_UNSPECIFIED, r["endpoint"] + assert_equal "hello world", r["name"] + end + end + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new do |config| + 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::ApigeeConnect::V1::Tether::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::ApigeeConnect::V1::Tether::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ApigeeConnect::V1::Tether::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/helper.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_connect-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.gitignore b/owl-bot-staging/google-cloud-apigee_registry-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-apigee_registry-v1/.repo-metadata.json new file mode 100644 index 000000000000..2dcd44a3f293 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "apigeeregistry.googleapis.com", + "api_shortname": "apigeeregistry", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_registry-v1/latest", + "distribution_name": "google-cloud-apigee_registry-v1", + "is_cloud": true, + "language": "ruby", + "name": "apigeeregistry", + "name_pretty": "Apigee Registry V1 API", + "product_documentation": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. Note that google-cloud-apigee_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_registry instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.rubocop.yml b/owl-bot-staging/google-cloud-apigee_registry-v1/.rubocop.yml new file mode 100644 index 000000000000..5d59c0e0425a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-apigee_registry-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-apigee_registry-v1.rb" diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.toys.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.yardopts b/owl-bot-staging/google-cloud-apigee_registry-v1/.yardopts new file mode 100644 index 000000000000..5e20653c53b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Apigee Registry V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-apigee_registry-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..8164d590dd10 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-apigee_registry-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-apigee_registry-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/apigee_registry/v1" + +client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/apigee_registry/v1" + +::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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-apigee_registry-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/apigee_registry/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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-apigee_registry-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-apigee_registry-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/Gemfile b/owl-bot-staging/google-cloud-apigee_registry-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/Gemfile @@ -0,0 +1,14 @@ +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-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-apigee_registry-v1/LICENSE.md b/owl-bot-staging/google-cloud-apigee_registry-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/README.md b/owl-bot-staging/google-cloud-apigee_registry-v1/README.md new file mode 100644 index 000000000000..3db625accdac --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Apigee Registry V1 API + +API Client library for the Apigee Registry V1 API + +The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Apigee Registry V1 API. Most users should consider using +the main client gem, +[google-cloud-apigee_registry](https://rubygems.org/gems/google-cloud-apigee_registry). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-apigee_registry-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/apigeeregistry.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/apigee_registry/v1" + +client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new +request = ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new # (request fields as keyword arguments...) +response = client.create_instance request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_registry-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/apigee/docs/api-hub/get-started-registry-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/cloud/apigee_registry/v1" +require "logger" + +client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-apigee_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-apigee_registry-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-apigee_registry`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-apigee_registry-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/Rakefile b/owl-bot-staging/google-cloud-apigee_registry-v1/Rakefile new file mode 100644 index 000000000000..dce0621adb61 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-apigee_registry-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/apigee_registry/v1/provisioning/credentials" + ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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-apigee_registry-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-apigee_registry-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-apigee_registry-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-apigee_registry-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-apigee_registry-v1" + header "google-cloud-apigee_registry-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-apigee_registry-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-apigee_registry-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-apigee_registry-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-apigee_registry-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-apigee_registry-v1/gapic_metadata.json new file mode 100644 index 000000000000..3d83788c1234 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/gapic_metadata.json @@ -0,0 +1,217 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.apigeeregistry.v1", + "libraryPackage": "::Google::Cloud::ApigeeRegistry::V1", + "services": { + "Provisioning": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client", + "rpcs": { + "CreateInstance": { + "methods": [ + "create_instance" + ] + }, + "DeleteInstance": { + "methods": [ + "delete_instance" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + } + } + } + } + }, + "Registry": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client", + "rpcs": { + "ListApis": { + "methods": [ + "list_apis" + ] + }, + "GetApi": { + "methods": [ + "get_api" + ] + }, + "CreateApi": { + "methods": [ + "create_api" + ] + }, + "UpdateApi": { + "methods": [ + "update_api" + ] + }, + "DeleteApi": { + "methods": [ + "delete_api" + ] + }, + "ListApiVersions": { + "methods": [ + "list_api_versions" + ] + }, + "GetApiVersion": { + "methods": [ + "get_api_version" + ] + }, + "CreateApiVersion": { + "methods": [ + "create_api_version" + ] + }, + "UpdateApiVersion": { + "methods": [ + "update_api_version" + ] + }, + "DeleteApiVersion": { + "methods": [ + "delete_api_version" + ] + }, + "ListApiSpecs": { + "methods": [ + "list_api_specs" + ] + }, + "GetApiSpec": { + "methods": [ + "get_api_spec" + ] + }, + "GetApiSpecContents": { + "methods": [ + "get_api_spec_contents" + ] + }, + "CreateApiSpec": { + "methods": [ + "create_api_spec" + ] + }, + "UpdateApiSpec": { + "methods": [ + "update_api_spec" + ] + }, + "DeleteApiSpec": { + "methods": [ + "delete_api_spec" + ] + }, + "TagApiSpecRevision": { + "methods": [ + "tag_api_spec_revision" + ] + }, + "ListApiSpecRevisions": { + "methods": [ + "list_api_spec_revisions" + ] + }, + "RollbackApiSpec": { + "methods": [ + "rollback_api_spec" + ] + }, + "DeleteApiSpecRevision": { + "methods": [ + "delete_api_spec_revision" + ] + }, + "ListApiDeployments": { + "methods": [ + "list_api_deployments" + ] + }, + "GetApiDeployment": { + "methods": [ + "get_api_deployment" + ] + }, + "CreateApiDeployment": { + "methods": [ + "create_api_deployment" + ] + }, + "UpdateApiDeployment": { + "methods": [ + "update_api_deployment" + ] + }, + "DeleteApiDeployment": { + "methods": [ + "delete_api_deployment" + ] + }, + "TagApiDeploymentRevision": { + "methods": [ + "tag_api_deployment_revision" + ] + }, + "ListApiDeploymentRevisions": { + "methods": [ + "list_api_deployment_revisions" + ] + }, + "RollbackApiDeployment": { + "methods": [ + "rollback_api_deployment" + ] + }, + "DeleteApiDeploymentRevision": { + "methods": [ + "delete_api_deployment_revision" + ] + }, + "ListArtifacts": { + "methods": [ + "list_artifacts" + ] + }, + "GetArtifact": { + "methods": [ + "get_artifact" + ] + }, + "GetArtifactContents": { + "methods": [ + "get_artifact_contents" + ] + }, + "CreateArtifact": { + "methods": [ + "create_artifact" + ] + }, + "ReplaceArtifact": { + "methods": [ + "replace_artifact" + ] + }, + "DeleteArtifact": { + "methods": [ + "delete_artifact" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec b/owl-bot-staging/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec new file mode 100644 index 000000000000..c74d733bcd54 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/apigee_registry/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-apigee_registry-v1" + gem.version = Google::Cloud::ApigeeRegistry::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. Note that google-cloud-apigee_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_registry instead. See the readme for more details." + gem.summary = "API Client library for the Apigee Registry V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb new file mode 100644 index 000000000000..f64e043fa173 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/apigee_registry/v1" diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb new file mode 100644 index 000000000000..f3b6f1a960ee --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/apigee_registry/v1/provisioning" +require "google/cloud/apigee_registry/v1/registry" +require "google/cloud/apigee_registry/v1/version" + +module Google + module Cloud + module ApigeeRegistry + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/apigee_registry/v1" + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/apigee_registry/v1" + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/apigee_registry/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb new file mode 100644 index 000000000000..eb77273af921 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb @@ -0,0 +1,324 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 ApigeeRegistry + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/apigee_registry/v1/rest" + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ApigeeRegistry"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, 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/[^/]+/apis/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, 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/[^/]+/apis/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb new file mode 100644 index 000000000000..200d82ffa656 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.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/apigee_registry/v1/version" + +require "google/cloud/apigee_registry/v1/provisioning/credentials" +require "google/cloud/apigee_registry/v1/provisioning/paths" +require "google/cloud/apigee_registry/v1/provisioning/operations" +require "google/cloud/apigee_registry/v1/provisioning/client" +require "google/cloud/apigee_registry/v1/provisioning/rest" + +module Google + module Cloud + module ApigeeRegistry + module V1 + ## + # The service that is used for managing the data plane provisioning of the + # Registry. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/apigee_registry/v1/provisioning" + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/apigee_registry/v1/provisioning/rest" + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + module Provisioning + end + end + end + end +end + +helper_path = ::File.join __dir__, "provisioning", "helpers.rb" +require "google/cloud/apigee_registry/v1/provisioning/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb new file mode 100644 index 000000000000..71fbfca7f71e --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb @@ -0,0 +1,730 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/apigeeregistry/v1/provisioning_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Provisioning + ## + # Client for the Provisioning service. + # + # The service that is used for managing the data plane provisioning of the + # Registry. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :provisioning_stub + + ## + # Configure the Provisioning Client class. + # + # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Provisioning clients + # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ApigeeRegistry", "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 Provisioning Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @provisioning_stub.universe_domain + end + + ## + # Create a new Provisioning client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Provisioning client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed 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/apigeeregistry/v1/provisioning_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 + + @provisioning_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @provisioning_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @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 = @provisioning_stub.endpoint + config.universe_domain = @provisioning_stub.universe_domain + config.logger = @provisioning_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 = @provisioning_stub.endpoint + config.universe_domain = @provisioning_stub.universe_domain + config.logger = @provisioning_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Provisioning::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 + @provisioning_stub.logger + end + + # Service calls + + ## + # Provisions instance resources for the Registry. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_instance(parent: nil, instance_id: nil, instance: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` + # @param instance_id [::String] + # Required. Identifier to assign to the Instance. Must be unique within scope of the + # parent resource. + # @param instance [::Google::Cloud::ApigeeRegistry::V1::Instance, ::Hash] + # Required. The Instance. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @provisioning_stub.call_rpc :create_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the Registry instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_instance(name: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Instance to delete. + # Format: `projects/*/locations/*/instances/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @provisioning_stub.call_rpc :delete_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Instance to retrieve. + # Format: `projects/*/locations/*/instances/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @provisioning_stub.call_rpc :get_instance, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Provisioning API. + # + # This class represents the configuration for Provisioning, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_instance to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_instance.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_instance.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::ApigeeRegistry::V1::Provisioning::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Provisioning API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + + # @private + def initialize parent_rpcs = nil + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb new file mode 100644 index 000000000000..dc86b72153cd --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/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 ApigeeRegistry + module V1 + module Provisioning + # Credentials for the Provisioning 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-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb new file mode 100644 index 000000000000..2b1d010bf4dc --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Provisioning + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Provisioning 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 Provisioning 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::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb new file mode 100644 index 000000000000..9339b6d79e9a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/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 ApigeeRegistry + module V1 + module Provisioning + # Path helper methods for the Provisioning API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified 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-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb new file mode 100644 index 000000000000..034dfcf2b2a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/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/apigee_registry/v1/version" +require "google/cloud/apigee_registry/v1/bindings_override" + +require "google/cloud/apigee_registry/v1/provisioning/credentials" +require "google/cloud/apigee_registry/v1/provisioning/paths" +require "google/cloud/apigee_registry/v1/provisioning/rest/operations" +require "google/cloud/apigee_registry/v1/provisioning/rest/client" + +module Google + module Cloud + module ApigeeRegistry + module V1 + ## + # The service that is used for managing the data plane provisioning of the + # Registry. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/apigee_registry/v1/provisioning/rest" + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + module Provisioning + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/apigee_registry/v1/provisioning/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb new file mode 100644 index 000000000000..b58ff12afdac --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb @@ -0,0 +1,675 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/apigeeregistry/v1/provisioning_service_pb" +require "google/cloud/apigee_registry/v1/provisioning/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Provisioning + module Rest + ## + # REST client for the Provisioning service. + # + # The service that is used for managing the data plane provisioning of the + # Registry. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :provisioning_stub + + ## + # Configure the Provisioning Client class. + # + # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Provisioning clients + # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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", "ApigeeRegistry", "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 Provisioning Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::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 + @provisioning_stub.universe_domain + end + + ## + # Create a new Provisioning REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Provisioning 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::ApigeeRegistry::V1::Provisioning::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 + + @provisioning_stub = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @provisioning_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 = @provisioning_stub.endpoint + config.universe_domain = @provisioning_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @provisioning_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 = @provisioning_stub.endpoint + config.universe_domain = @provisioning_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @provisioning_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Provisioning::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 + @provisioning_stub.logger + end + + # Service calls + + ## + # Provisions instance resources for the Registry. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_instance(parent: nil, instance_id: nil, instance: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` + # @param instance_id [::String] + # Required. Identifier to assign to the Instance. Must be unique within scope of the + # parent resource. + # @param instance [::Google::Cloud::ApigeeRegistry::V1::Instance, ::Hash] + # Required. The Instance. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @provisioning_stub.create_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the Registry instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_instance(name: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Instance to delete. + # Format: `projects/*/locations/*/instances/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @provisioning_stub.delete_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Instance to retrieve. + # Format: `projects/*/locations/*/instances/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @provisioning_stub.get_instance request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Provisioning REST API. + # + # This class represents the configuration for Provisioning REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_instance to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_instance.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_instance.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::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 Provisioning API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + + # @private + def initialize parent_rpcs = nil + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb new file mode 100644 index 000000000000..49286aa839ae --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Provisioning + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Provisioning 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 Provisioning 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::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb new file mode 100644 index 000000000000..c7c68dda1528 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/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/cloud/apigeeregistry/v1/provisioning_service_pb" + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Provisioning + module Rest + ## + # REST service stub for the Provisioning 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_instance REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_instance REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::Instance.decode_json response.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_instance REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/instances", + body: "instance", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb new file mode 100644 index 000000000000..f323425b4428 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/apigee_registry/v1/version" + +require "google/cloud/apigee_registry/v1/registry/credentials" +require "google/cloud/apigee_registry/v1/registry/paths" +require "google/cloud/apigee_registry/v1/registry/client" +require "google/cloud/apigee_registry/v1/registry/rest" + +module Google + module Cloud + module ApigeeRegistry + module V1 + ## + # The Registry service allows teams to manage descriptions of APIs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/apigee_registry/v1/registry" + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/apigee_registry/v1/registry/rest" + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + module Registry + end + end + end + end +end + +helper_path = ::File.join __dir__, "registry", "helpers.rb" +require "google/cloud/apigee_registry/v1/registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb new file mode 100644 index 000000000000..4a3f6e137a79 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb @@ -0,0 +1,4095 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/apigeeregistry/v1/registry_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Registry + ## + # Client for the Registry service. + # + # The Registry service allows teams to manage descriptions of APIs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :registry_stub + + ## + # Configure the Registry Client class. + # + # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Registry clients + # ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ApigeeRegistry", "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_apis.timeout = 60.0 + default_config.rpcs.list_apis.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api.timeout = 60.0 + default_config.rpcs.get_api.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_api.timeout = 60.0 + default_config.rpcs.create_api.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.update_api.timeout = 60.0 + default_config.rpcs.update_api.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_api.timeout = 60.0 + default_config.rpcs.delete_api.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_versions.timeout = 60.0 + default_config.rpcs.list_api_versions.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api_version.timeout = 60.0 + default_config.rpcs.get_api_version.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_api_version.timeout = 60.0 + default_config.rpcs.create_api_version.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.update_api_version.timeout = 60.0 + default_config.rpcs.update_api_version.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_api_version.timeout = 60.0 + default_config.rpcs.delete_api_version.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_specs.timeout = 60.0 + default_config.rpcs.list_api_specs.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api_spec.timeout = 60.0 + default_config.rpcs.get_api_spec.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api_spec_contents.timeout = 60.0 + default_config.rpcs.get_api_spec_contents.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_api_spec.timeout = 60.0 + default_config.rpcs.create_api_spec.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.update_api_spec.timeout = 60.0 + default_config.rpcs.update_api_spec.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_api_spec.timeout = 60.0 + default_config.rpcs.delete_api_spec.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.tag_api_spec_revision.timeout = 60.0 + default_config.rpcs.tag_api_spec_revision.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_spec_revisions.timeout = 60.0 + default_config.rpcs.list_api_spec_revisions.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.rollback_api_spec.timeout = 60.0 + + default_config.rpcs.delete_api_spec_revision.timeout = 60.0 + default_config.rpcs.delete_api_spec_revision.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_deployments.timeout = 60.0 + default_config.rpcs.list_api_deployments.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api_deployment.timeout = 60.0 + default_config.rpcs.get_api_deployment.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_api_deployment.timeout = 60.0 + default_config.rpcs.create_api_deployment.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.update_api_deployment.timeout = 60.0 + default_config.rpcs.update_api_deployment.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_api_deployment.timeout = 60.0 + default_config.rpcs.delete_api_deployment.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.tag_api_deployment_revision.timeout = 60.0 + default_config.rpcs.tag_api_deployment_revision.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_deployment_revisions.timeout = 60.0 + default_config.rpcs.list_api_deployment_revisions.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.rollback_api_deployment.timeout = 60.0 + + default_config.rpcs.delete_api_deployment_revision.timeout = 60.0 + default_config.rpcs.delete_api_deployment_revision.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_artifacts.timeout = 60.0 + default_config.rpcs.list_artifacts.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_artifact.timeout = 60.0 + default_config.rpcs.get_artifact.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_artifact_contents.timeout = 60.0 + default_config.rpcs.get_artifact_contents.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_artifact.timeout = 60.0 + default_config.rpcs.create_artifact.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.replace_artifact.timeout = 60.0 + default_config.rpcs.replace_artifact.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_artifact.timeout = 60.0 + default_config.rpcs.delete_artifact.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Registry Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @registry_stub.universe_domain + end + + ## + # Create a new Registry client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Registry client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed 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/apigeeregistry/v1/registry_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 + + @registry_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ApigeeRegistry::V1::Registry::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @registry_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @registry_stub.endpoint + config.universe_domain = @registry_stub.universe_domain + config.logger = @registry_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 = @registry_stub.endpoint + config.universe_domain = @registry_stub.universe_domain + config.logger = @registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @registry_stub.logger + end + + # Service calls + + ## + # Returns matching APIs. + # + # @overload list_apis(request, options = nil) + # Pass arguments to `list_apis` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_apis` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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 APIs. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # The maximum number of APIs to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListApis` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApis` must match + # the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new + # + # # Call the list_apis method. + # result = client.list_apis request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. + # p item + # end + # + def list_apis request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_apis.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_apis.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_apis.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :list_apis, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registry_stub, :list_apis, request, response, 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 specified API. + # + # @overload get_api(request, options = nil) + # Pass arguments to `get_api` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_api(name: nil) + # Pass arguments to `get_api` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the API to retrieve. + # Format: `projects/*/locations/*/apis/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new + # + # # Call the get_api method. + # result = client.get_api request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + # p result + # + def get_api request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_api.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_api.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_api.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :get_api, request, 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 specified API. + # + # @overload create_api(request, options = nil) + # Pass arguments to `create_api` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_api(parent: nil, api: nil, api_id: nil) + # Pass arguments to `create_api` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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 APIs. + # Format: `projects/*/locations/*` + # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] + # Required. The API to create. + # @param api_id [::String] + # Required. The ID to use for the API, which will become the final component of + # the API's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new + # + # # Call the create_api method. + # result = client.create_api request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + # p result + # + def create_api request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_api.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_api.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_api.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :create_api, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to modify a specified API. + # + # @overload update_api(request, options = nil) + # Pass arguments to `update_api` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_api(api: nil, update_mask: nil, allow_missing: nil) + # Pass arguments to `update_api` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] + # Required. The API to update. + # + # The `name` field is used to identify the API to update. + # Format: `projects/*/locations/*/apis/*` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @param allow_missing [::Boolean] + # If set to true, and the API is not found, a new API will be created. + # In this situation, `update_mask` is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new + # + # # Call the update_api method. + # result = client.update_api request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + # p result + # + def update_api request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_api.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.api&.name + header_params["api.name"] = request.api.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_api.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_api.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :update_api, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified API and all of the resources that it + # owns. + # + # @overload delete_api(request, options = nil) + # Pass arguments to `delete_api` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_api(name: nil, force: nil) + # Pass arguments to `delete_api` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the API to delete. + # Format: `projects/*/locations/*/apis/*` + # @param force [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new + # + # # Call the delete_api method. + # result = client.delete_api request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_api request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_api.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_api.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_api.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :delete_api, request, 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 matching versions. + # + # @overload list_api_versions(request, options = nil) + # Pass arguments to `list_api_versions` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_api_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of versions. + # Format: `projects/*/locations/*/apis/*` + # @param page_size [::Integer] + # The maximum number of versions to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListApiVersions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiVersions` must + # match the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new + # + # # Call the list_api_versions method. + # result = client.list_api_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. + # p item + # end + # + def list_api_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_api_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_api_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_api_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :list_api_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_versions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a specified version. + # + # @overload get_api_version(request, options = nil) + # Pass arguments to `get_api_version` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_api_version(name: nil) + # Pass arguments to `get_api_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the version to retrieve. + # Format: `projects/*/locations/*/apis/*/versions/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new + # + # # Call the get_api_version method. + # result = client.get_api_version request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + # p result + # + def get_api_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_api_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_api_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_api_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :get_api_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a specified version. + # + # @overload create_api_version(request, options = nil) + # Pass arguments to `create_api_version` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_api_version(parent: nil, api_version: nil, api_version_id: nil) + # Pass arguments to `create_api_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of versions. + # Format: `projects/*/locations/*/apis/*` + # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] + # Required. The version to create. + # @param api_version_id [::String] + # Required. The ID to use for the version, which will become the final component of + # the version's resource name. + # + # This value should be 1-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new + # + # # Call the create_api_version method. + # result = client.create_api_version request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + # p result + # + def create_api_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_api_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_api_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_api_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :create_api_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to modify a specified version. + # + # @overload update_api_version(request, options = nil) + # Pass arguments to `update_api_version` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_api_version(api_version: nil, update_mask: nil, allow_missing: nil) + # Pass arguments to `update_api_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] + # Required. The version to update. + # + # The `name` field is used to identify the version to update. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @param allow_missing [::Boolean] + # If set to true, and the version is not found, a new version will be + # created. In this situation, `update_mask` is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new + # + # # Call the update_api_version method. + # result = client.update_api_version request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + # p result + # + def update_api_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_api_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.api_version&.name + header_params["api_version.name"] = request.api_version.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_api_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_api_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :update_api_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified version and all of the resources that + # it owns. + # + # @overload delete_api_version(request, options = nil) + # Pass arguments to `delete_api_version` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_api_version(name: nil, force: nil) + # Pass arguments to `delete_api_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the version to delete. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @param force [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new + # + # # Call the delete_api_version method. + # result = client.delete_api_version request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_api_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_api_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_api_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_api_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :delete_api_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns matching specs. + # + # @overload list_api_specs(request, options = nil) + # Pass arguments to `list_api_specs` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_api_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of specs. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @param page_size [::Integer] + # The maximum number of specs to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListApiSpecs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiSpecs` must match + # the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields except contents. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new + # + # # Call the list_api_specs method. + # result = client.list_api_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p item + # end + # + def list_api_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_api_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_api_specs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_api_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :list_api_specs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_specs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a specified spec. + # + # @overload get_api_spec(request, options = nil) + # Pass arguments to `get_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_api_spec(name: nil) + # Pass arguments to `get_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec to retrieve. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new + # + # # Call the get_api_spec method. + # result = client.get_api_spec request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def get_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_api_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :get_api_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the contents of a specified spec. + # If specs are stored with GZip compression, the default behavior + # is to return the spec uncompressed (the mime_type response field + # indicates the exact format returned). + # + # @overload get_api_spec_contents(request, options = nil) + # Pass arguments to `get_api_spec_contents` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_api_spec_contents(name: nil) + # Pass arguments to `get_api_spec_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec whose contents should be retrieved. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new + # + # # Call the get_api_spec_contents method. + # result = client.get_api_spec_contents request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def get_api_spec_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_api_spec_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_api_spec_contents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_api_spec_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :get_api_spec_contents, request, 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 specified spec. + # + # @overload create_api_spec(request, options = nil) + # Pass arguments to `create_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_api_spec(parent: nil, api_spec: nil, api_spec_id: nil) + # Pass arguments to `create_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of specs. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] + # Required. The spec to create. + # @param api_spec_id [::String] + # Required. The ID to use for the spec, which will become the final component of + # the spec's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new + # + # # Call the create_api_spec method. + # result = client.create_api_spec request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def create_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_api_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :create_api_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to modify a specified spec. + # + # @overload update_api_spec(request, options = nil) + # Pass arguments to `update_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil) + # Pass arguments to `update_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] + # Required. The spec to update. + # + # The `name` field is used to identify the spec to update. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @param allow_missing [::Boolean] + # If set to true, and the spec is not found, a new spec will be created. + # In this situation, `update_mask` is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new + # + # # Call the update_api_spec method. + # result = client.update_api_spec request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def update_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.api_spec&.name + header_params["api_spec.name"] = request.api_spec.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_api_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :update_api_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified spec, all revisions, and all child + # resources (e.g., artifacts). + # + # @overload delete_api_spec(request, options = nil) + # Pass arguments to `delete_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_api_spec(name: nil, force: nil) + # Pass arguments to `delete_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec to delete. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # @param force [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new + # + # # Call the delete_api_spec method. + # result = client.delete_api_spec request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_api_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :delete_api_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a tag to a specified revision of a spec. + # + # @overload tag_api_spec_revision(request, options = nil) + # Pass arguments to `tag_api_spec_revision` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload tag_api_spec_revision(name: nil, tag: nil) + # Pass arguments to `tag_api_spec_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec to be tagged, including the revision ID. + # @param tag [::String] + # Required. The tag to apply. + # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new + # + # # Call the tag_api_spec_revision method. + # result = client.tag_api_spec_revision request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def tag_api_spec_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.tag_api_spec_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.tag_api_spec_revision.timeout, + metadata: metadata, + retry_policy: @config.rpcs.tag_api_spec_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :tag_api_spec_revision, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all revisions of a spec. + # Revisions are returned in descending order of revision creation time. + # + # @overload list_api_spec_revisions(request, options = nil) + # Pass arguments to `list_api_spec_revisions` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_api_spec_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_api_spec_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. The name of the spec to list revisions for. + # @param page_size [::Integer] + # The maximum number of revisions to return per page. + # @param page_token [::String] + # The page token, received from a previous ListApiSpecRevisions 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::ApigeeRegistry::V1::ApiSpec>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new + # + # # Call the list_api_spec_revisions method. + # result = client.list_api_spec_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::ApigeeRegistry::V1::ApiSpec. + # p item + # end + # + def list_api_spec_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_api_spec_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::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_api_spec_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_api_spec_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :list_api_spec_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_spec_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 + + ## + # Sets the current revision to a specified prior revision. + # Note that this creates a new revision with a new revision ID. + # + # @overload rollback_api_spec(request, options = nil) + # Pass arguments to `rollback_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rollback_api_spec(name: nil, revision_id: nil) + # Pass arguments to `rollback_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The spec being rolled back. + # @param revision_id [::String] + # Required. The revision ID to roll back to. + # It must be a revision of the same spec. + # + # Example: `c7cfa2a8` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new + # + # # Call the rollback_api_spec method. + # result = client.rollback_api_spec request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def rollback_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rollback_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.rollback_api_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rollback_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :rollback_api_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a revision of a spec. + # + # @overload delete_api_spec_revision(request, options = nil) + # Pass arguments to `delete_api_spec_revision` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_api_spec_revision(name: nil) + # Pass arguments to `delete_api_spec_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec revision to be deleted, + # with a revision ID explicitly included. + # + # Example: + # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new + # + # # Call the delete_api_spec_revision method. + # result = client.delete_api_spec_revision request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def delete_api_spec_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_api_spec_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_api_spec_revision.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_api_spec_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :delete_api_spec_revision, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns matching deployments. + # + # @overload list_api_deployments(request, options = nil) + # Pass arguments to `list_api_deployments` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_api_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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 deployments. + # Format: `projects/*/locations/*/apis/*` + # @param page_size [::Integer] + # The maximum number of deployments to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListApiDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiDeployments` must + # match the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new + # + # # Call the list_api_deployments method. + # result = client.list_api_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p item + # end + # + def list_api_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_api_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_api_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_api_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :list_api_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_deployments, request, response, 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 specified deployment. + # + # @overload get_api_deployment(request, options = nil) + # Pass arguments to `get_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_api_deployment(name: nil) + # Pass arguments to `get_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment to retrieve. + # Format: `projects/*/locations/*/apis/*/deployments/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new + # + # # Call the get_api_deployment method. + # result = client.get_api_deployment request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def get_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_api_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :get_api_deployment, request, 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 specified deployment. + # + # @overload create_api_deployment(request, options = nil) + # Pass arguments to `create_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil) + # Pass arguments to `create_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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 deployments. + # Format: `projects/*/locations/*/apis/*` + # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] + # Required. The deployment to create. + # @param api_deployment_id [::String] + # Required. The ID to use for the deployment, which will become the final component of + # the deployment's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new + # + # # Call the create_api_deployment method. + # result = client.create_api_deployment request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def create_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_api_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :create_api_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to modify a specified deployment. + # + # @overload update_api_deployment(request, options = nil) + # Pass arguments to `update_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil) + # Pass arguments to `update_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] + # Required. The deployment to update. + # + # The `name` field is used to identify the deployment to update. + # Format: `projects/*/locations/*/apis/*/deployments/*` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @param allow_missing [::Boolean] + # If set to true, and the deployment is not found, a new deployment will be + # created. In this situation, `update_mask` is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new + # + # # Call the update_api_deployment method. + # result = client.update_api_deployment request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def update_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.api_deployment&.name + header_params["api_deployment.name"] = request.api_deployment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_api_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :update_api_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified deployment, all revisions, and all + # child resources (e.g., artifacts). + # + # @overload delete_api_deployment(request, options = nil) + # Pass arguments to `delete_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_api_deployment(name: nil, force: nil) + # Pass arguments to `delete_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment to delete. + # Format: `projects/*/locations/*/apis/*/deployments/*` + # @param force [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new + # + # # Call the delete_api_deployment method. + # result = client.delete_api_deployment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_api_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :delete_api_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a tag to a specified revision of a + # deployment. + # + # @overload tag_api_deployment_revision(request, options = nil) + # Pass arguments to `tag_api_deployment_revision` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload tag_api_deployment_revision(name: nil, tag: nil) + # Pass arguments to `tag_api_deployment_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment to be tagged, including the revision ID. + # @param tag [::String] + # Required. The tag to apply. + # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new + # + # # Call the tag_api_deployment_revision method. + # result = client.tag_api_deployment_revision request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def tag_api_deployment_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.tag_api_deployment_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.tag_api_deployment_revision.timeout, + metadata: metadata, + retry_policy: @config.rpcs.tag_api_deployment_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :tag_api_deployment_revision, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all revisions of a deployment. + # Revisions are returned in descending order of revision creation time. + # + # @overload list_api_deployment_revisions(request, options = nil) + # Pass arguments to `list_api_deployment_revisions` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_api_deployment_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_api_deployment_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. The name of the deployment to list revisions for. + # @param page_size [::Integer] + # The maximum number of revisions to return per page. + # @param page_token [::String] + # The page token, received from a previous ListApiDeploymentRevisions 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::ApigeeRegistry::V1::ApiDeployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new + # + # # Call the list_api_deployment_revisions method. + # result = client.list_api_deployment_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::ApigeeRegistry::V1::ApiDeployment. + # p item + # end + # + def list_api_deployment_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_api_deployment_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::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_api_deployment_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_api_deployment_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :list_api_deployment_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_deployment_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 + + ## + # Sets the current revision to a specified prior + # revision. Note that this creates a new revision with a new revision ID. + # + # @overload rollback_api_deployment(request, options = nil) + # Pass arguments to `rollback_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rollback_api_deployment(name: nil, revision_id: nil) + # Pass arguments to `rollback_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The deployment being rolled back. + # @param revision_id [::String] + # Required. The revision ID to roll back to. + # It must be a revision of the same deployment. + # + # Example: `c7cfa2a8` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new + # + # # Call the rollback_api_deployment method. + # result = client.rollback_api_deployment request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def rollback_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rollback_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.rollback_api_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rollback_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :rollback_api_deployment, request, 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 revision of a deployment. + # + # @overload delete_api_deployment_revision(request, options = nil) + # Pass arguments to `delete_api_deployment_revision` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_api_deployment_revision(name: nil) + # Pass arguments to `delete_api_deployment_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment revision to be deleted, + # with a revision ID explicitly included. + # + # Example: + # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new + # + # # Call the delete_api_deployment_revision method. + # result = client.delete_api_deployment_revision request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def delete_api_deployment_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_api_deployment_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_api_deployment_revision.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_api_deployment_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :delete_api_deployment_revision, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns matching artifacts. + # + # @overload list_artifacts(request, options = nil) + # Pass arguments to `list_artifacts` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of artifacts. + # Format: `{parent}` + # @param page_size [::Integer] + # The maximum number of artifacts to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListArtifacts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListArtifacts` must + # match the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields except contents. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new + # + # # Call the list_artifacts method. + # result = client.list_artifacts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. + # p item + # end + # + def list_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :list_artifacts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registry_stub, :list_artifacts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a specified artifact. + # + # @overload get_artifact(request, options = nil) + # Pass arguments to `get_artifact` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_artifact(name: nil) + # Pass arguments to `get_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the artifact to retrieve. + # Format: `{parent}/artifacts/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new + # + # # Call the get_artifact method. + # result = client.get_artifact request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + # p result + # + def get_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_artifact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :get_artifact, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the contents of a specified artifact. + # If artifacts are stored with GZip compression, the default behavior + # is to return the artifact uncompressed (the mime_type response field + # indicates the exact format returned). + # + # @overload get_artifact_contents(request, options = nil) + # Pass arguments to `get_artifact_contents` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_artifact_contents(name: nil) + # Pass arguments to `get_artifact_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the artifact whose contents should be retrieved. + # Format: `{parent}/artifacts/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::HttpBody] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new + # + # # Call the get_artifact_contents method. + # result = client.get_artifact_contents request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def get_artifact_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_artifact_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_artifact_contents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_artifact_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :get_artifact_contents, request, 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 specified artifact. + # + # @overload create_artifact(request, options = nil) + # Pass arguments to `create_artifact` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_artifact(parent: nil, artifact: nil, artifact_id: nil) + # Pass arguments to `create_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of artifacts. + # Format: `{parent}` + # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] + # Required. The artifact to create. + # @param artifact_id [::String] + # Required. The ID to use for the artifact, which will become the final component of + # the artifact's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new + # + # # Call the create_artifact method. + # result = client.create_artifact request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + # p result + # + def create_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_artifact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :create_artifact, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to replace a specified artifact. + # + # @overload replace_artifact(request, options = nil) + # Pass arguments to `replace_artifact` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_artifact(artifact: nil) + # Pass arguments to `replace_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] + # Required. The artifact to replace. + # + # The `name` field is used to identify the artifact to replace. + # Format: `{parent}/artifacts/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new + # + # # Call the replace_artifact method. + # result = client.replace_artifact request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + # p result + # + def replace_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest + + # Converts hash and nil to 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_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.artifact&.name + header_params["artifact.name"] = request.artifact.name + end + + request_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_artifact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.replace_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :replace_artifact, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified artifact. + # + # @overload delete_artifact(request, options = nil) + # Pass arguments to `delete_artifact` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_artifact(name: nil) + # Pass arguments to `delete_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the artifact to delete. + # Format: `{parent}/artifacts/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new + # + # # Call the delete_artifact method. + # result = client.delete_artifact request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_artifact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.call_rpc :delete_artifact, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Registry API. + # + # This class represents the configuration for Registry, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_apis to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_apis.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_apis.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::ApigeeRegistry::V1::Registry::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Registry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_apis` + # @return [::Gapic::Config::Method] + # + attr_reader :list_apis + ## + # RPC-specific configuration for `get_api` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api + ## + # RPC-specific configuration for `create_api` + # @return [::Gapic::Config::Method] + # + attr_reader :create_api + ## + # RPC-specific configuration for `update_api` + # @return [::Gapic::Config::Method] + # + attr_reader :update_api + ## + # RPC-specific configuration for `delete_api` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api + ## + # RPC-specific configuration for `list_api_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_versions + ## + # RPC-specific configuration for `get_api_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api_version + ## + # RPC-specific configuration for `create_api_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_api_version + ## + # RPC-specific configuration for `update_api_version` + # @return [::Gapic::Config::Method] + # + attr_reader :update_api_version + ## + # RPC-specific configuration for `delete_api_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_version + ## + # RPC-specific configuration for `list_api_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_specs + ## + # RPC-specific configuration for `get_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api_spec + ## + # RPC-specific configuration for `get_api_spec_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api_spec_contents + ## + # RPC-specific configuration for `create_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :create_api_spec + ## + # RPC-specific configuration for `update_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_api_spec + ## + # RPC-specific configuration for `delete_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_spec + ## + # RPC-specific configuration for `tag_api_spec_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :tag_api_spec_revision + ## + # RPC-specific configuration for `list_api_spec_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_spec_revisions + ## + # RPC-specific configuration for `rollback_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback_api_spec + ## + # RPC-specific configuration for `delete_api_spec_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_spec_revision + ## + # RPC-specific configuration for `list_api_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_deployments + ## + # RPC-specific configuration for `get_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api_deployment + ## + # RPC-specific configuration for `create_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_api_deployment + ## + # RPC-specific configuration for `update_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_api_deployment + ## + # RPC-specific configuration for `delete_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_deployment + ## + # RPC-specific configuration for `tag_api_deployment_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :tag_api_deployment_revision + ## + # RPC-specific configuration for `list_api_deployment_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_deployment_revisions + ## + # RPC-specific configuration for `rollback_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback_api_deployment + ## + # RPC-specific configuration for `delete_api_deployment_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_deployment_revision + ## + # RPC-specific configuration for `list_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_artifacts + ## + # RPC-specific configuration for `get_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :get_artifact + ## + # RPC-specific configuration for `get_artifact_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :get_artifact_contents + ## + # RPC-specific configuration for `create_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :create_artifact + ## + # RPC-specific configuration for `replace_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_artifact + ## + # RPC-specific configuration for `delete_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_artifact + + # @private + def initialize parent_rpcs = nil + list_apis_config = parent_rpcs.list_apis if parent_rpcs.respond_to? :list_apis + @list_apis = ::Gapic::Config::Method.new list_apis_config + get_api_config = parent_rpcs.get_api if parent_rpcs.respond_to? :get_api + @get_api = ::Gapic::Config::Method.new get_api_config + create_api_config = parent_rpcs.create_api if parent_rpcs.respond_to? :create_api + @create_api = ::Gapic::Config::Method.new create_api_config + update_api_config = parent_rpcs.update_api if parent_rpcs.respond_to? :update_api + @update_api = ::Gapic::Config::Method.new update_api_config + delete_api_config = parent_rpcs.delete_api if parent_rpcs.respond_to? :delete_api + @delete_api = ::Gapic::Config::Method.new delete_api_config + list_api_versions_config = parent_rpcs.list_api_versions if parent_rpcs.respond_to? :list_api_versions + @list_api_versions = ::Gapic::Config::Method.new list_api_versions_config + get_api_version_config = parent_rpcs.get_api_version if parent_rpcs.respond_to? :get_api_version + @get_api_version = ::Gapic::Config::Method.new get_api_version_config + create_api_version_config = parent_rpcs.create_api_version if parent_rpcs.respond_to? :create_api_version + @create_api_version = ::Gapic::Config::Method.new create_api_version_config + update_api_version_config = parent_rpcs.update_api_version if parent_rpcs.respond_to? :update_api_version + @update_api_version = ::Gapic::Config::Method.new update_api_version_config + delete_api_version_config = parent_rpcs.delete_api_version if parent_rpcs.respond_to? :delete_api_version + @delete_api_version = ::Gapic::Config::Method.new delete_api_version_config + list_api_specs_config = parent_rpcs.list_api_specs if parent_rpcs.respond_to? :list_api_specs + @list_api_specs = ::Gapic::Config::Method.new list_api_specs_config + get_api_spec_config = parent_rpcs.get_api_spec if parent_rpcs.respond_to? :get_api_spec + @get_api_spec = ::Gapic::Config::Method.new get_api_spec_config + get_api_spec_contents_config = parent_rpcs.get_api_spec_contents if parent_rpcs.respond_to? :get_api_spec_contents + @get_api_spec_contents = ::Gapic::Config::Method.new get_api_spec_contents_config + create_api_spec_config = parent_rpcs.create_api_spec if parent_rpcs.respond_to? :create_api_spec + @create_api_spec = ::Gapic::Config::Method.new create_api_spec_config + update_api_spec_config = parent_rpcs.update_api_spec if parent_rpcs.respond_to? :update_api_spec + @update_api_spec = ::Gapic::Config::Method.new update_api_spec_config + delete_api_spec_config = parent_rpcs.delete_api_spec if parent_rpcs.respond_to? :delete_api_spec + @delete_api_spec = ::Gapic::Config::Method.new delete_api_spec_config + tag_api_spec_revision_config = parent_rpcs.tag_api_spec_revision if parent_rpcs.respond_to? :tag_api_spec_revision + @tag_api_spec_revision = ::Gapic::Config::Method.new tag_api_spec_revision_config + list_api_spec_revisions_config = parent_rpcs.list_api_spec_revisions if parent_rpcs.respond_to? :list_api_spec_revisions + @list_api_spec_revisions = ::Gapic::Config::Method.new list_api_spec_revisions_config + rollback_api_spec_config = parent_rpcs.rollback_api_spec if parent_rpcs.respond_to? :rollback_api_spec + @rollback_api_spec = ::Gapic::Config::Method.new rollback_api_spec_config + delete_api_spec_revision_config = parent_rpcs.delete_api_spec_revision if parent_rpcs.respond_to? :delete_api_spec_revision + @delete_api_spec_revision = ::Gapic::Config::Method.new delete_api_spec_revision_config + list_api_deployments_config = parent_rpcs.list_api_deployments if parent_rpcs.respond_to? :list_api_deployments + @list_api_deployments = ::Gapic::Config::Method.new list_api_deployments_config + get_api_deployment_config = parent_rpcs.get_api_deployment if parent_rpcs.respond_to? :get_api_deployment + @get_api_deployment = ::Gapic::Config::Method.new get_api_deployment_config + create_api_deployment_config = parent_rpcs.create_api_deployment if parent_rpcs.respond_to? :create_api_deployment + @create_api_deployment = ::Gapic::Config::Method.new create_api_deployment_config + update_api_deployment_config = parent_rpcs.update_api_deployment if parent_rpcs.respond_to? :update_api_deployment + @update_api_deployment = ::Gapic::Config::Method.new update_api_deployment_config + delete_api_deployment_config = parent_rpcs.delete_api_deployment if parent_rpcs.respond_to? :delete_api_deployment + @delete_api_deployment = ::Gapic::Config::Method.new delete_api_deployment_config + tag_api_deployment_revision_config = parent_rpcs.tag_api_deployment_revision if parent_rpcs.respond_to? :tag_api_deployment_revision + @tag_api_deployment_revision = ::Gapic::Config::Method.new tag_api_deployment_revision_config + list_api_deployment_revisions_config = parent_rpcs.list_api_deployment_revisions if parent_rpcs.respond_to? :list_api_deployment_revisions + @list_api_deployment_revisions = ::Gapic::Config::Method.new list_api_deployment_revisions_config + rollback_api_deployment_config = parent_rpcs.rollback_api_deployment if parent_rpcs.respond_to? :rollback_api_deployment + @rollback_api_deployment = ::Gapic::Config::Method.new rollback_api_deployment_config + delete_api_deployment_revision_config = parent_rpcs.delete_api_deployment_revision if parent_rpcs.respond_to? :delete_api_deployment_revision + @delete_api_deployment_revision = ::Gapic::Config::Method.new delete_api_deployment_revision_config + list_artifacts_config = parent_rpcs.list_artifacts if parent_rpcs.respond_to? :list_artifacts + @list_artifacts = ::Gapic::Config::Method.new list_artifacts_config + get_artifact_config = parent_rpcs.get_artifact if parent_rpcs.respond_to? :get_artifact + @get_artifact = ::Gapic::Config::Method.new get_artifact_config + get_artifact_contents_config = parent_rpcs.get_artifact_contents if parent_rpcs.respond_to? :get_artifact_contents + @get_artifact_contents = ::Gapic::Config::Method.new get_artifact_contents_config + create_artifact_config = parent_rpcs.create_artifact if parent_rpcs.respond_to? :create_artifact + @create_artifact = ::Gapic::Config::Method.new create_artifact_config + replace_artifact_config = parent_rpcs.replace_artifact if parent_rpcs.respond_to? :replace_artifact + @replace_artifact = ::Gapic::Config::Method.new replace_artifact_config + delete_artifact_config = parent_rpcs.delete_artifact if parent_rpcs.respond_to? :delete_artifact + @delete_artifact = ::Gapic::Config::Method.new delete_artifact_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb new file mode 100644 index 000000000000..91849cf37779 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/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 ApigeeRegistry + module V1 + module Registry + # Credentials for the Registry 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-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb new file mode 100644 index 000000000000..73a8ff56638d --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb @@ -0,0 +1,238 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Registry + # Path helper methods for the Registry API. + module Paths + ## + # Create a fully-qualified Api resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apis/{api}` + # + # @param project [String] + # @param location [String] + # @param api [String] + # + # @return [::String] + def api_path project:, location:, api: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apis/#{api}" + end + + ## + # Create a fully-qualified ApiDeployment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}` + # + # @param project [String] + # @param location [String] + # @param api [String] + # @param deployment [String] + # + # @return [::String] + def api_deployment_path project:, location:, api:, deployment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apis/#{api}/deployments/#{deployment}" + end + + ## + # Create a fully-qualified ApiSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` + # + # @param project [String] + # @param location [String] + # @param api [String] + # @param version [String] + # @param spec [String] + # + # @return [::String] + def api_spec_path project:, location:, api:, version:, spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" + raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/specs/#{spec}" + end + + ## + # Create a fully-qualified ApiVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apis/{api}/versions/{version}` + # + # @param project [String] + # @param location [String] + # @param api [String] + # @param version [String] + # + # @return [::String] + def api_version_path project:, location:, api:, version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}" + end + + ## + # Create a fully-qualified Artifact resource string. + # + # @overload artifact_path(project:, location:, artifact:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/artifacts/{artifact}` + # + # @param project [String] + # @param location [String] + # @param artifact [String] + # + # @overload artifact_path(project:, location:, api:, artifact:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}` + # + # @param project [String] + # @param location [String] + # @param api [String] + # @param artifact [String] + # + # @overload artifact_path(project:, location:, api:, version:, artifact:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}` + # + # @param project [String] + # @param location [String] + # @param api [String] + # @param version [String] + # @param artifact [String] + # + # @overload artifact_path(project:, location:, api:, version:, spec:, artifact:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}` + # + # @param project [String] + # @param location [String] + # @param api [String] + # @param version [String] + # @param spec [String] + # @param artifact [String] + # + # @overload artifact_path(project:, location:, api:, deployment:, artifact:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}` + # + # @param project [String] + # @param location [String] + # @param api [String] + # @param deployment [String] + # @param artifact [String] + # + # @return [::String] + def artifact_path **args + resources = { + "artifact:location:project" => (proc do |project:, location:, artifact:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/artifacts/#{artifact}" + end), + "api:artifact:location:project" => (proc do |project:, location:, api:, artifact:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apis/#{api}/artifacts/#{artifact}" + end), + "api:artifact:location:project:version" => (proc do |project:, location:, api:, version:, artifact:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" + raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/artifacts/#{artifact}" + end), + "api:artifact:location:project:spec:version" => (proc do |project:, location:, api:, version:, spec:, artifact:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" + raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" + raise ::ArgumentError, "spec cannot contain /" if spec.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/specs/#{spec}/artifacts/#{artifact}" + end), + "api:artifact:deployment:location:project" => (proc do |project:, location:, api:, deployment:, artifact:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" + raise ::ArgumentError, "deployment cannot contain /" if deployment.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apis/#{api}/deployments/#{deployment}/artifacts/#{artifact}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb new file mode 100644 index 000000000000..947e953e032a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/apigee_registry/v1/version" +require "google/cloud/apigee_registry/v1/bindings_override" + +require "google/cloud/apigee_registry/v1/registry/credentials" +require "google/cloud/apigee_registry/v1/registry/paths" +require "google/cloud/apigee_registry/v1/registry/rest/client" + +module Google + module Cloud + module ApigeeRegistry + module V1 + ## + # The Registry service allows teams to manage descriptions of APIs. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/apigee_registry/v1/registry/rest" + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + module Registry + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/apigee_registry/v1/registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb new file mode 100644 index 000000000000..096fd3d615a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb @@ -0,0 +1,3816 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/apigeeregistry/v1/registry_service_pb" +require "google/cloud/apigee_registry/v1/registry/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Registry + module Rest + ## + # REST client for the Registry service. + # + # The Registry service allows teams to manage descriptions of APIs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :registry_stub + + ## + # Configure the Registry Client class. + # + # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Registry clients + # ::Google::Cloud::ApigeeRegistry::V1::Registry::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", "ApigeeRegistry", "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_apis.timeout = 60.0 + default_config.rpcs.list_apis.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api.timeout = 60.0 + default_config.rpcs.get_api.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_api.timeout = 60.0 + default_config.rpcs.create_api.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.update_api.timeout = 60.0 + default_config.rpcs.update_api.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_api.timeout = 60.0 + default_config.rpcs.delete_api.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_versions.timeout = 60.0 + default_config.rpcs.list_api_versions.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api_version.timeout = 60.0 + default_config.rpcs.get_api_version.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_api_version.timeout = 60.0 + default_config.rpcs.create_api_version.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.update_api_version.timeout = 60.0 + default_config.rpcs.update_api_version.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_api_version.timeout = 60.0 + default_config.rpcs.delete_api_version.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_specs.timeout = 60.0 + default_config.rpcs.list_api_specs.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api_spec.timeout = 60.0 + default_config.rpcs.get_api_spec.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api_spec_contents.timeout = 60.0 + default_config.rpcs.get_api_spec_contents.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_api_spec.timeout = 60.0 + default_config.rpcs.create_api_spec.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.update_api_spec.timeout = 60.0 + default_config.rpcs.update_api_spec.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_api_spec.timeout = 60.0 + default_config.rpcs.delete_api_spec.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.tag_api_spec_revision.timeout = 60.0 + default_config.rpcs.tag_api_spec_revision.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_spec_revisions.timeout = 60.0 + default_config.rpcs.list_api_spec_revisions.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.rollback_api_spec.timeout = 60.0 + + default_config.rpcs.delete_api_spec_revision.timeout = 60.0 + default_config.rpcs.delete_api_spec_revision.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_deployments.timeout = 60.0 + default_config.rpcs.list_api_deployments.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_api_deployment.timeout = 60.0 + default_config.rpcs.get_api_deployment.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_api_deployment.timeout = 60.0 + default_config.rpcs.create_api_deployment.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.update_api_deployment.timeout = 60.0 + default_config.rpcs.update_api_deployment.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_api_deployment.timeout = 60.0 + default_config.rpcs.delete_api_deployment.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.tag_api_deployment_revision.timeout = 60.0 + default_config.rpcs.tag_api_deployment_revision.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_api_deployment_revisions.timeout = 60.0 + default_config.rpcs.list_api_deployment_revisions.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.rollback_api_deployment.timeout = 60.0 + + default_config.rpcs.delete_api_deployment_revision.timeout = 60.0 + default_config.rpcs.delete_api_deployment_revision.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.list_artifacts.timeout = 60.0 + default_config.rpcs.list_artifacts.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_artifact.timeout = 60.0 + default_config.rpcs.get_artifact.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.get_artifact_contents.timeout = 60.0 + default_config.rpcs.get_artifact_contents.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.create_artifact.timeout = 60.0 + default_config.rpcs.create_artifact.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.replace_artifact.timeout = 60.0 + default_config.rpcs.replace_artifact.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config.rpcs.delete_artifact.timeout = 60.0 + default_config.rpcs.delete_artifact.retry_policy = { + initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Registry Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ApigeeRegistry::V1::Registry::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 + @registry_stub.universe_domain + end + + ## + # Create a new Registry REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Registry 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 + + @registry_stub = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @registry_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @registry_stub.endpoint + config.universe_domain = @registry_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @registry_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 = @registry_stub.endpoint + config.universe_domain = @registry_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @registry_stub.logger + end + + # Service calls + + ## + # Returns matching APIs. + # + # @overload list_apis(request, options = nil) + # Pass arguments to `list_apis` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_apis` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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 APIs. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # The maximum number of APIs to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListApis` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApis` must match + # the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new + # + # # Call the list_apis method. + # result = client.list_apis request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. + # p item + # end + # + def list_apis request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_apis.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_apis.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_apis.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.list_apis request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_apis, "apis", request, result, 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 specified API. + # + # @overload get_api(request, options = nil) + # Pass arguments to `get_api` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_api(name: nil) + # Pass arguments to `get_api` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the API to retrieve. + # Format: `projects/*/locations/*/apis/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new + # + # # Call the get_api method. + # result = client.get_api request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + # p result + # + def get_api request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_api.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_api.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_api.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.get_api request, 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 specified API. + # + # @overload create_api(request, options = nil) + # Pass arguments to `create_api` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_api(parent: nil, api: nil, api_id: nil) + # Pass arguments to `create_api` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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 APIs. + # Format: `projects/*/locations/*` + # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] + # Required. The API to create. + # @param api_id [::String] + # Required. The ID to use for the API, which will become the final component of + # the API's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new + # + # # Call the create_api method. + # result = client.create_api request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + # p result + # + def create_api request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_api.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_api.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_api.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.create_api request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to modify a specified API. + # + # @overload update_api(request, options = nil) + # Pass arguments to `update_api` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_api(api: nil, update_mask: nil, allow_missing: nil) + # Pass arguments to `update_api` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] + # Required. The API to update. + # + # The `name` field is used to identify the API to update. + # Format: `projects/*/locations/*/apis/*` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @param allow_missing [::Boolean] + # If set to true, and the API is not found, a new API will be created. + # In this situation, `update_mask` is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new + # + # # Call the update_api method. + # result = client.update_api request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + # p result + # + def update_api request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_api.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_api.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_api.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.update_api request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified API and all of the resources that it + # owns. + # + # @overload delete_api(request, options = nil) + # Pass arguments to `delete_api` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_api(name: nil, force: nil) + # Pass arguments to `delete_api` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the API to delete. + # Format: `projects/*/locations/*/apis/*` + # @param force [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new + # + # # Call the delete_api method. + # result = client.delete_api request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_api request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_api.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_api.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_api.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.delete_api request, 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 matching versions. + # + # @overload list_api_versions(request, options = nil) + # Pass arguments to `list_api_versions` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_api_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of versions. + # Format: `projects/*/locations/*/apis/*` + # @param page_size [::Integer] + # The maximum number of versions to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListApiVersions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiVersions` must + # match the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new + # + # # Call the list_api_versions method. + # result = client.list_api_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. + # p item + # end + # + def list_api_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_api_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_api_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_api_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.list_api_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_versions, "api_versions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a specified version. + # + # @overload get_api_version(request, options = nil) + # Pass arguments to `get_api_version` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_api_version(name: nil) + # Pass arguments to `get_api_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the version to retrieve. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new + # + # # Call the get_api_version method. + # result = client.get_api_version request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + # p result + # + def get_api_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_api_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_api_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_api_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.get_api_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a specified version. + # + # @overload create_api_version(request, options = nil) + # Pass arguments to `create_api_version` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_api_version(parent: nil, api_version: nil, api_version_id: nil) + # Pass arguments to `create_api_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of versions. + # Format: `projects/*/locations/*/apis/*` + # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] + # Required. The version to create. + # @param api_version_id [::String] + # Required. The ID to use for the version, which will become the final component of + # the version's resource name. + # + # This value should be 1-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new + # + # # Call the create_api_version method. + # result = client.create_api_version request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + # p result + # + def create_api_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_api_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_api_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_api_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.create_api_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to modify a specified version. + # + # @overload update_api_version(request, options = nil) + # Pass arguments to `update_api_version` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_api_version(api_version: nil, update_mask: nil, allow_missing: nil) + # Pass arguments to `update_api_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] + # Required. The version to update. + # + # The `name` field is used to identify the version to update. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @param allow_missing [::Boolean] + # If set to true, and the version is not found, a new version will be + # created. In this situation, `update_mask` is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new + # + # # Call the update_api_version method. + # result = client.update_api_version request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + # p result + # + def update_api_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_api_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_api_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_api_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.update_api_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified version and all of the resources that + # it owns. + # + # @overload delete_api_version(request, options = nil) + # Pass arguments to `delete_api_version` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_api_version(name: nil, force: nil) + # Pass arguments to `delete_api_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the version to delete. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @param force [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new + # + # # Call the delete_api_version method. + # result = client.delete_api_version request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_api_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_api_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_api_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_api_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.delete_api_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns matching specs. + # + # @overload list_api_specs(request, options = nil) + # Pass arguments to `list_api_specs` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_api_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of specs. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @param page_size [::Integer] + # The maximum number of specs to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListApiSpecs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiSpecs` must match + # the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields except contents. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new + # + # # Call the list_api_specs method. + # result = client.list_api_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p item + # end + # + def list_api_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_api_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_api_specs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_api_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.list_api_specs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_specs, "api_specs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a specified spec. + # + # @overload get_api_spec(request, options = nil) + # Pass arguments to `get_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_api_spec(name: nil) + # Pass arguments to `get_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec to retrieve. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new + # + # # Call the get_api_spec method. + # result = client.get_api_spec request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def get_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_api_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.get_api_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the contents of a specified spec. + # If specs are stored with GZip compression, the default behavior + # is to return the spec uncompressed (the mime_type response field + # indicates the exact format returned). + # + # @overload get_api_spec_contents(request, options = nil) + # Pass arguments to `get_api_spec_contents` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_api_spec_contents(name: nil) + # Pass arguments to `get_api_spec_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec whose contents should be retrieved. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new + # + # # Call the get_api_spec_contents method. + # result = client.get_api_spec_contents request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def get_api_spec_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_api_spec_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_api_spec_contents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_api_spec_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.get_api_spec_contents request, 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 specified spec. + # + # @overload create_api_spec(request, options = nil) + # Pass arguments to `create_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_api_spec(parent: nil, api_spec: nil, api_spec_id: nil) + # Pass arguments to `create_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of specs. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] + # Required. The spec to create. + # @param api_spec_id [::String] + # Required. The ID to use for the spec, which will become the final component of + # the spec's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new + # + # # Call the create_api_spec method. + # result = client.create_api_spec request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def create_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_api_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.create_api_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to modify a specified spec. + # + # @overload update_api_spec(request, options = nil) + # Pass arguments to `update_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil) + # Pass arguments to `update_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] + # Required. The spec to update. + # + # The `name` field is used to identify the spec to update. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @param allow_missing [::Boolean] + # If set to true, and the spec is not found, a new spec will be created. + # In this situation, `update_mask` is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new + # + # # Call the update_api_spec method. + # result = client.update_api_spec request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def update_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_api_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.update_api_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified spec, all revisions, and all child + # resources (e.g., artifacts). + # + # @overload delete_api_spec(request, options = nil) + # Pass arguments to `delete_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_api_spec(name: nil, force: nil) + # Pass arguments to `delete_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec to delete. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # @param force [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new + # + # # Call the delete_api_spec method. + # result = client.delete_api_spec request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_api_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.delete_api_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a tag to a specified revision of a spec. + # + # @overload tag_api_spec_revision(request, options = nil) + # Pass arguments to `tag_api_spec_revision` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload tag_api_spec_revision(name: nil, tag: nil) + # Pass arguments to `tag_api_spec_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec to be tagged, including the revision ID. + # @param tag [::String] + # Required. The tag to apply. + # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new + # + # # Call the tag_api_spec_revision method. + # result = client.tag_api_spec_revision request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def tag_api_spec_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.tag_api_spec_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.tag_api_spec_revision.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.tag_api_spec_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.tag_api_spec_revision request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all revisions of a spec. + # Revisions are returned in descending order of revision creation time. + # + # @overload list_api_spec_revisions(request, options = nil) + # Pass arguments to `list_api_spec_revisions` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_api_spec_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_api_spec_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. The name of the spec to list revisions for. + # @param page_size [::Integer] + # The maximum number of revisions to return per page. + # @param page_token [::String] + # The page token, received from a previous ListApiSpecRevisions 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::ApigeeRegistry::V1::ApiSpec>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new + # + # # Call the list_api_spec_revisions method. + # result = client.list_api_spec_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::ApigeeRegistry::V1::ApiSpec. + # p item + # end + # + def list_api_spec_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_api_spec_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::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_api_spec_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_api_spec_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.list_api_spec_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_spec_revisions, "api_specs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the current revision to a specified prior revision. + # Note that this creates a new revision with a new revision ID. + # + # @overload rollback_api_spec(request, options = nil) + # Pass arguments to `rollback_api_spec` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rollback_api_spec(name: nil, revision_id: nil) + # Pass arguments to `rollback_api_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The spec being rolled back. + # @param revision_id [::String] + # Required. The revision ID to roll back to. + # It must be a revision of the same spec. + # + # Example: `c7cfa2a8` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new + # + # # Call the rollback_api_spec method. + # result = client.rollback_api_spec request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def rollback_api_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rollback_api_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.rollback_api_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rollback_api_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.rollback_api_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a revision of a spec. + # + # @overload delete_api_spec_revision(request, options = nil) + # Pass arguments to `delete_api_spec_revision` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_api_spec_revision(name: nil) + # Pass arguments to `delete_api_spec_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the spec revision to be deleted, + # with a revision ID explicitly included. + # + # Example: + # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new + # + # # Call the delete_api_spec_revision method. + # result = client.delete_api_spec_revision request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + # p result + # + def delete_api_spec_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_api_spec_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_api_spec_revision.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_api_spec_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.delete_api_spec_revision request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns matching deployments. + # + # @overload list_api_deployments(request, options = nil) + # Pass arguments to `list_api_deployments` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_api_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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 deployments. + # Format: `projects/*/locations/*/apis/*` + # @param page_size [::Integer] + # The maximum number of deployments to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListApiDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiDeployments` must + # match the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new + # + # # Call the list_api_deployments method. + # result = client.list_api_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p item + # end + # + def list_api_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_api_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_api_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_api_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.list_api_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_deployments, "api_deployments", request, result, 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 specified deployment. + # + # @overload get_api_deployment(request, options = nil) + # Pass arguments to `get_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_api_deployment(name: nil) + # Pass arguments to `get_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment to retrieve. + # Format: `projects/*/locations/*/apis/*/deployments/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new + # + # # Call the get_api_deployment method. + # result = client.get_api_deployment request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def get_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_api_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.get_api_deployment request, 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 specified deployment. + # + # @overload create_api_deployment(request, options = nil) + # Pass arguments to `create_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil) + # Pass arguments to `create_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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 deployments. + # Format: `projects/*/locations/*/apis/*` + # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] + # Required. The deployment to create. + # @param api_deployment_id [::String] + # Required. The ID to use for the deployment, which will become the final component of + # the deployment's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new + # + # # Call the create_api_deployment method. + # result = client.create_api_deployment request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def create_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_api_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.create_api_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to modify a specified deployment. + # + # @overload update_api_deployment(request, options = nil) + # Pass arguments to `update_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil) + # Pass arguments to `update_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] + # Required. The deployment to update. + # + # The `name` field is used to identify the deployment to update. + # Format: `projects/*/locations/*/apis/*/deployments/*` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @param allow_missing [::Boolean] + # If set to true, and the deployment is not found, a new deployment will be + # created. In this situation, `update_mask` is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new + # + # # Call the update_api_deployment method. + # result = client.update_api_deployment request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def update_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_api_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.update_api_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified deployment, all revisions, and all + # child resources (e.g., artifacts). + # + # @overload delete_api_deployment(request, options = nil) + # Pass arguments to `delete_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_api_deployment(name: nil, force: nil) + # Pass arguments to `delete_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment to delete. + # Format: `projects/*/locations/*/apis/*/deployments/*` + # @param force [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new + # + # # Call the delete_api_deployment method. + # result = client.delete_api_deployment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_api_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.delete_api_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a tag to a specified revision of a + # deployment. + # + # @overload tag_api_deployment_revision(request, options = nil) + # Pass arguments to `tag_api_deployment_revision` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload tag_api_deployment_revision(name: nil, tag: nil) + # Pass arguments to `tag_api_deployment_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment to be tagged, including the revision ID. + # @param tag [::String] + # Required. The tag to apply. + # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new + # + # # Call the tag_api_deployment_revision method. + # result = client.tag_api_deployment_revision request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def tag_api_deployment_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.tag_api_deployment_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.tag_api_deployment_revision.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.tag_api_deployment_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.tag_api_deployment_revision request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all revisions of a deployment. + # Revisions are returned in descending order of revision creation time. + # + # @overload list_api_deployment_revisions(request, options = nil) + # Pass arguments to `list_api_deployment_revisions` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_api_deployment_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_api_deployment_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. The name of the deployment to list revisions for. + # @param page_size [::Integer] + # The maximum number of revisions to return per page. + # @param page_token [::String] + # The page token, received from a previous ListApiDeploymentRevisions 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::ApigeeRegistry::V1::ApiDeployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new + # + # # Call the list_api_deployment_revisions method. + # result = client.list_api_deployment_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::ApigeeRegistry::V1::ApiDeployment. + # p item + # end + # + def list_api_deployment_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_api_deployment_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::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_api_deployment_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_api_deployment_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.list_api_deployment_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_deployment_revisions, "api_deployments", request, result, 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 current revision to a specified prior + # revision. Note that this creates a new revision with a new revision ID. + # + # @overload rollback_api_deployment(request, options = nil) + # Pass arguments to `rollback_api_deployment` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rollback_api_deployment(name: nil, revision_id: nil) + # Pass arguments to `rollback_api_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The deployment being rolled back. + # @param revision_id [::String] + # Required. The revision ID to roll back to. + # It must be a revision of the same deployment. + # + # Example: `c7cfa2a8` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new + # + # # Call the rollback_api_deployment method. + # result = client.rollback_api_deployment request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def rollback_api_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rollback_api_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.rollback_api_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rollback_api_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.rollback_api_deployment request, 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 revision of a deployment. + # + # @overload delete_api_deployment_revision(request, options = nil) + # Pass arguments to `delete_api_deployment_revision` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_api_deployment_revision(name: nil) + # Pass arguments to `delete_api_deployment_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment revision to be deleted, + # with a revision ID explicitly included. + # + # Example: + # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new + # + # # Call the delete_api_deployment_revision method. + # result = client.delete_api_deployment_revision request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + # p result + # + def delete_api_deployment_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_api_deployment_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_api_deployment_revision.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_api_deployment_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.delete_api_deployment_revision request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns matching artifacts. + # + # @overload list_artifacts(request, options = nil) + # Pass arguments to `list_artifacts` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of artifacts. + # Format: `{parent}` + # @param page_size [::Integer] + # The maximum number of artifacts to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListArtifacts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListArtifacts` must + # match the call that provided the page token. + # @param filter [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields except contents. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new + # + # # Call the list_artifacts method. + # result = client.list_artifacts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. + # p item + # end + # + def list_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.list_artifacts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_artifacts, "artifacts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a specified artifact. + # + # @overload get_artifact(request, options = nil) + # Pass arguments to `get_artifact` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_artifact(name: nil) + # Pass arguments to `get_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the artifact to retrieve. + # Format: `{parent}/artifacts/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new + # + # # Call the get_artifact method. + # result = client.get_artifact request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + # p result + # + def get_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_artifact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.get_artifact request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the contents of a specified artifact. + # If artifacts are stored with GZip compression, the default behavior + # is to return the artifact uncompressed (the mime_type response field + # indicates the exact format returned). + # + # @overload get_artifact_contents(request, options = nil) + # Pass arguments to `get_artifact_contents` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_artifact_contents(name: nil) + # Pass arguments to `get_artifact_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the artifact whose contents should be retrieved. + # Format: `{parent}/artifacts/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new + # + # # Call the get_artifact_contents method. + # result = client.get_artifact_contents request + # + # # The returned object is of type Google::Api::HttpBody. + # p result + # + def get_artifact_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_artifact_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_artifact_contents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_artifact_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.get_artifact_contents request, 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 specified artifact. + # + # @overload create_artifact(request, options = nil) + # Pass arguments to `create_artifact` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_artifact(parent: nil, artifact: nil, artifact_id: nil) + # Pass arguments to `create_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of artifacts. + # Format: `{parent}` + # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] + # Required. The artifact to create. + # @param artifact_id [::String] + # Required. The ID to use for the artifact, which will become the final component of + # the artifact's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new + # + # # Call the create_artifact method. + # result = client.create_artifact request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + # p result + # + def create_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_artifact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.create_artifact request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Used to replace a specified artifact. + # + # @overload replace_artifact(request, options = nil) + # Pass arguments to `replace_artifact` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_artifact(artifact: nil) + # Pass arguments to `replace_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] + # Required. The artifact to replace. + # + # The `name` field is used to identify the artifact to replace. + # Format: `{parent}/artifacts/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new + # + # # Call the replace_artifact method. + # result = client.replace_artifact request + # + # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + # p result + # + def replace_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest + + # Converts hash and nil to an 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_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_artifact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.replace_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.replace_artifact request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a specified artifact. + # + # @overload delete_artifact(request, options = nil) + # Pass arguments to `delete_artifact` via a request object, either of type + # {::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_artifact(name: nil) + # Pass arguments to `delete_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the artifact to delete. + # Format: `{parent}/artifacts/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/apigee_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new + # + # # Call the delete_artifact method. + # result = client.delete_artifact request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_artifact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registry_stub.delete_artifact request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Registry REST API. + # + # This class represents the configuration for Registry REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_apis to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_apis.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_apis.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::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 Registry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_apis` + # @return [::Gapic::Config::Method] + # + attr_reader :list_apis + ## + # RPC-specific configuration for `get_api` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api + ## + # RPC-specific configuration for `create_api` + # @return [::Gapic::Config::Method] + # + attr_reader :create_api + ## + # RPC-specific configuration for `update_api` + # @return [::Gapic::Config::Method] + # + attr_reader :update_api + ## + # RPC-specific configuration for `delete_api` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api + ## + # RPC-specific configuration for `list_api_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_versions + ## + # RPC-specific configuration for `get_api_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api_version + ## + # RPC-specific configuration for `create_api_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_api_version + ## + # RPC-specific configuration for `update_api_version` + # @return [::Gapic::Config::Method] + # + attr_reader :update_api_version + ## + # RPC-specific configuration for `delete_api_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_version + ## + # RPC-specific configuration for `list_api_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_specs + ## + # RPC-specific configuration for `get_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api_spec + ## + # RPC-specific configuration for `get_api_spec_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api_spec_contents + ## + # RPC-specific configuration for `create_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :create_api_spec + ## + # RPC-specific configuration for `update_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_api_spec + ## + # RPC-specific configuration for `delete_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_spec + ## + # RPC-specific configuration for `tag_api_spec_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :tag_api_spec_revision + ## + # RPC-specific configuration for `list_api_spec_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_spec_revisions + ## + # RPC-specific configuration for `rollback_api_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback_api_spec + ## + # RPC-specific configuration for `delete_api_spec_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_spec_revision + ## + # RPC-specific configuration for `list_api_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_deployments + ## + # RPC-specific configuration for `get_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_api_deployment + ## + # RPC-specific configuration for `create_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_api_deployment + ## + # RPC-specific configuration for `update_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_api_deployment + ## + # RPC-specific configuration for `delete_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_deployment + ## + # RPC-specific configuration for `tag_api_deployment_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :tag_api_deployment_revision + ## + # RPC-specific configuration for `list_api_deployment_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_api_deployment_revisions + ## + # RPC-specific configuration for `rollback_api_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback_api_deployment + ## + # RPC-specific configuration for `delete_api_deployment_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_api_deployment_revision + ## + # RPC-specific configuration for `list_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_artifacts + ## + # RPC-specific configuration for `get_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :get_artifact + ## + # RPC-specific configuration for `get_artifact_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :get_artifact_contents + ## + # RPC-specific configuration for `create_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :create_artifact + ## + # RPC-specific configuration for `replace_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :replace_artifact + ## + # RPC-specific configuration for `delete_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_artifact + + # @private + def initialize parent_rpcs = nil + list_apis_config = parent_rpcs.list_apis if parent_rpcs.respond_to? :list_apis + @list_apis = ::Gapic::Config::Method.new list_apis_config + get_api_config = parent_rpcs.get_api if parent_rpcs.respond_to? :get_api + @get_api = ::Gapic::Config::Method.new get_api_config + create_api_config = parent_rpcs.create_api if parent_rpcs.respond_to? :create_api + @create_api = ::Gapic::Config::Method.new create_api_config + update_api_config = parent_rpcs.update_api if parent_rpcs.respond_to? :update_api + @update_api = ::Gapic::Config::Method.new update_api_config + delete_api_config = parent_rpcs.delete_api if parent_rpcs.respond_to? :delete_api + @delete_api = ::Gapic::Config::Method.new delete_api_config + list_api_versions_config = parent_rpcs.list_api_versions if parent_rpcs.respond_to? :list_api_versions + @list_api_versions = ::Gapic::Config::Method.new list_api_versions_config + get_api_version_config = parent_rpcs.get_api_version if parent_rpcs.respond_to? :get_api_version + @get_api_version = ::Gapic::Config::Method.new get_api_version_config + create_api_version_config = parent_rpcs.create_api_version if parent_rpcs.respond_to? :create_api_version + @create_api_version = ::Gapic::Config::Method.new create_api_version_config + update_api_version_config = parent_rpcs.update_api_version if parent_rpcs.respond_to? :update_api_version + @update_api_version = ::Gapic::Config::Method.new update_api_version_config + delete_api_version_config = parent_rpcs.delete_api_version if parent_rpcs.respond_to? :delete_api_version + @delete_api_version = ::Gapic::Config::Method.new delete_api_version_config + list_api_specs_config = parent_rpcs.list_api_specs if parent_rpcs.respond_to? :list_api_specs + @list_api_specs = ::Gapic::Config::Method.new list_api_specs_config + get_api_spec_config = parent_rpcs.get_api_spec if parent_rpcs.respond_to? :get_api_spec + @get_api_spec = ::Gapic::Config::Method.new get_api_spec_config + get_api_spec_contents_config = parent_rpcs.get_api_spec_contents if parent_rpcs.respond_to? :get_api_spec_contents + @get_api_spec_contents = ::Gapic::Config::Method.new get_api_spec_contents_config + create_api_spec_config = parent_rpcs.create_api_spec if parent_rpcs.respond_to? :create_api_spec + @create_api_spec = ::Gapic::Config::Method.new create_api_spec_config + update_api_spec_config = parent_rpcs.update_api_spec if parent_rpcs.respond_to? :update_api_spec + @update_api_spec = ::Gapic::Config::Method.new update_api_spec_config + delete_api_spec_config = parent_rpcs.delete_api_spec if parent_rpcs.respond_to? :delete_api_spec + @delete_api_spec = ::Gapic::Config::Method.new delete_api_spec_config + tag_api_spec_revision_config = parent_rpcs.tag_api_spec_revision if parent_rpcs.respond_to? :tag_api_spec_revision + @tag_api_spec_revision = ::Gapic::Config::Method.new tag_api_spec_revision_config + list_api_spec_revisions_config = parent_rpcs.list_api_spec_revisions if parent_rpcs.respond_to? :list_api_spec_revisions + @list_api_spec_revisions = ::Gapic::Config::Method.new list_api_spec_revisions_config + rollback_api_spec_config = parent_rpcs.rollback_api_spec if parent_rpcs.respond_to? :rollback_api_spec + @rollback_api_spec = ::Gapic::Config::Method.new rollback_api_spec_config + delete_api_spec_revision_config = parent_rpcs.delete_api_spec_revision if parent_rpcs.respond_to? :delete_api_spec_revision + @delete_api_spec_revision = ::Gapic::Config::Method.new delete_api_spec_revision_config + list_api_deployments_config = parent_rpcs.list_api_deployments if parent_rpcs.respond_to? :list_api_deployments + @list_api_deployments = ::Gapic::Config::Method.new list_api_deployments_config + get_api_deployment_config = parent_rpcs.get_api_deployment if parent_rpcs.respond_to? :get_api_deployment + @get_api_deployment = ::Gapic::Config::Method.new get_api_deployment_config + create_api_deployment_config = parent_rpcs.create_api_deployment if parent_rpcs.respond_to? :create_api_deployment + @create_api_deployment = ::Gapic::Config::Method.new create_api_deployment_config + update_api_deployment_config = parent_rpcs.update_api_deployment if parent_rpcs.respond_to? :update_api_deployment + @update_api_deployment = ::Gapic::Config::Method.new update_api_deployment_config + delete_api_deployment_config = parent_rpcs.delete_api_deployment if parent_rpcs.respond_to? :delete_api_deployment + @delete_api_deployment = ::Gapic::Config::Method.new delete_api_deployment_config + tag_api_deployment_revision_config = parent_rpcs.tag_api_deployment_revision if parent_rpcs.respond_to? :tag_api_deployment_revision + @tag_api_deployment_revision = ::Gapic::Config::Method.new tag_api_deployment_revision_config + list_api_deployment_revisions_config = parent_rpcs.list_api_deployment_revisions if parent_rpcs.respond_to? :list_api_deployment_revisions + @list_api_deployment_revisions = ::Gapic::Config::Method.new list_api_deployment_revisions_config + rollback_api_deployment_config = parent_rpcs.rollback_api_deployment if parent_rpcs.respond_to? :rollback_api_deployment + @rollback_api_deployment = ::Gapic::Config::Method.new rollback_api_deployment_config + delete_api_deployment_revision_config = parent_rpcs.delete_api_deployment_revision if parent_rpcs.respond_to? :delete_api_deployment_revision + @delete_api_deployment_revision = ::Gapic::Config::Method.new delete_api_deployment_revision_config + list_artifacts_config = parent_rpcs.list_artifacts if parent_rpcs.respond_to? :list_artifacts + @list_artifacts = ::Gapic::Config::Method.new list_artifacts_config + get_artifact_config = parent_rpcs.get_artifact if parent_rpcs.respond_to? :get_artifact + @get_artifact = ::Gapic::Config::Method.new get_artifact_config + get_artifact_contents_config = parent_rpcs.get_artifact_contents if parent_rpcs.respond_to? :get_artifact_contents + @get_artifact_contents = ::Gapic::Config::Method.new get_artifact_contents_config + create_artifact_config = parent_rpcs.create_artifact if parent_rpcs.respond_to? :create_artifact + @create_artifact = ::Gapic::Config::Method.new create_artifact_config + replace_artifact_config = parent_rpcs.replace_artifact if parent_rpcs.respond_to? :replace_artifact + @replace_artifact = ::Gapic::Config::Method.new replace_artifact_config + delete_artifact_config = parent_rpcs.delete_artifact if parent_rpcs.respond_to? :delete_artifact + @delete_artifact = ::Gapic::Config::Method.new delete_artifact_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb new file mode 100644 index 000000000000..33c3fa1fe0c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb @@ -0,0 +1,2406 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/apigeeregistry/v1/registry_service_pb" + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Registry + module Rest + ## + # REST service stub for the Registry 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_apis REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApisResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ListApisResponse] + # A result object deserialized from the server's reply + def list_apis request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_apis_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_apis", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_api REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # A result object deserialized from the server's reply + def get_api request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_api_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_api", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::Api.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_api REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # A result object deserialized from the server's reply + def create_api request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_api_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_api", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::Api.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_api REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # A result object deserialized from the server's reply + def update_api request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_api_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_api", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::Api.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_api REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_api request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_api", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_api_versions REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse] + # A result object deserialized from the server's reply + def list_api_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_api_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_api_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_api_version REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # A result object deserialized from the server's reply + def get_api_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_api_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_api_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.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_api_version REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # A result object deserialized from the server's reply + def create_api_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_api_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_api_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_api_version REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # A result object deserialized from the server's reply + def update_api_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_api_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_api_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_api_version REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_api_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_api_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_api_specs REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse] + # A result object deserialized from the server's reply + def list_api_specs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_api_specs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_api_specs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # A result object deserialized from the server's reply + def get_api_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_api_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_api_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_api_spec_contents REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def get_api_spec_contents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_api_spec_contents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_api_spec_contents", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # A result object deserialized from the server's reply + def create_api_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_api_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_api_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # A result object deserialized from the server's reply + def update_api_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_api_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_api_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_api_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_api_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 tag_api_spec_revision REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # A result object deserialized from the server's reply + def tag_api_spec_revision request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_tag_api_spec_revision_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "tag_api_spec_revision", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_api_spec_revisions REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse] + # A result object deserialized from the server's reply + def list_api_spec_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_api_spec_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_api_spec_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rollback_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # A result object deserialized from the server's reply + def rollback_api_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rollback_api_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rollback_api_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_api_spec_revision REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # A result object deserialized from the server's reply + def delete_api_spec_revision request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_spec_revision_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_api_spec_revision", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_api_deployments REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse] + # A result object deserialized from the server's reply + def list_api_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_api_deployments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_api_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # A result object deserialized from the server's reply + def get_api_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_api_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_api_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.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_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # A result object deserialized from the server's reply + def create_api_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_api_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_api_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # A result object deserialized from the server's reply + def update_api_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_api_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_api_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_api_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_api_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 tag_api_deployment_revision REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # A result object deserialized from the server's reply + def tag_api_deployment_revision request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_tag_api_deployment_revision_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "tag_api_deployment_revision", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_api_deployment_revisions REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse] + # A result object deserialized from the server's reply + def list_api_deployment_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_api_deployment_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_api_deployment_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rollback_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # A result object deserialized from the server's reply + def rollback_api_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rollback_api_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rollback_api_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_api_deployment_revision REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # A result object deserialized from the server's reply + def delete_api_deployment_revision request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_deployment_revision_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_api_deployment_revision", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_artifacts REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse] + # A result object deserialized from the server's reply + def list_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_artifact REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # A result object deserialized from the server's reply + def get_artifact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_artifact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_artifact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_artifact_contents REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::HttpBody] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::HttpBody] + # A result object deserialized from the server's reply + def get_artifact_contents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_artifact_contents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_artifact_contents", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::HttpBody.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_artifact REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # A result object deserialized from the server's reply + def create_artifact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_artifact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_artifact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.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_artifact REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # A result object deserialized from the server's reply + def replace_artifact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_replace_artifact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "replace_artifact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_artifact REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_artifact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_artifact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_artifact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_apis REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_apis_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/apis", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_api REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_api_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_api REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_api_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/apis", + body: "api", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_api REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_api_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{api.name}", + body: "api", + matches: [ + ["api.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_api REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_api_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_api_versions REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_api_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_api_version REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_api_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_api_version REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_api_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/versions", + body: "api_version", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_api_version REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_api_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{api_version.name}", + body: "api_version", + matches: [ + ["api_version.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_api_version REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_api_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_api_specs REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_api_specs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/specs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_api_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_api_spec_contents REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_api_spec_contents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:getContents", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_api_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/specs", + body: "api_spec", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_api_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{api_spec.name}", + body: "api_spec", + matches: [ + ["api_spec.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_api_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the tag_api_spec_revision REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_tag_api_spec_revision_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:tagRevision", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_api_spec_revisions REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_api_spec_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listRevisions", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rollback_api_spec REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rollback_api_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:rollback", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_api_spec_revision REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_api_spec_revision_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}:deleteRevision", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_api_deployments REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_api_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_api_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_api_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/deployments", + body: "api_deployment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_api_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{api_deployment.name}", + body: "api_deployment", + matches: [ + ["api_deployment.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_api_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the tag_api_deployment_revision REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_tag_api_deployment_revision_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:tagRevision", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_api_deployment_revisions REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_api_deployment_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listRevisions", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rollback_api_deployment REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rollback_api_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:rollback", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_api_deployment_revision REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_api_deployment_revision_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}:deleteRevision", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_artifacts REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/artifacts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/artifacts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/artifacts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/artifacts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/artifacts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_artifact REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_artifact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_artifact_contents REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_artifact_contents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:getContents", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:getContents", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:getContents", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:getContents", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:getContents", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_artifact REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_artifact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/artifacts", + body: "artifact", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/artifacts", + body: "artifact", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/artifacts", + body: "artifact", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/artifacts", + body: "artifact", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/artifacts", + body: "artifact", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the replace_artifact REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest] + # 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_artifact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{artifact.name}", + body: "artifact", + matches: [ + ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :put, + uri_template: "/v1/{artifact.name}", + body: "artifact", + matches: [ + ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :put, + uri_template: "/v1/{artifact.name}", + body: "artifact", + matches: [ + ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :put, + uri_template: "/v1/{artifact.name}", + body: "artifact", + matches: [ + ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :put, + uri_template: "/v1/{artifact.name}", + body: "artifact", + matches: [ + ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_artifact REST call + # + # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_artifact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb new file mode 100644 index 000000000000..696eafb5d184 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/apigee_registry/v1/provisioning/rest" +require "google/cloud/apigee_registry/v1/registry/rest" +require "google/cloud/apigee_registry/v1/bindings_override" +require "google/cloud/apigee_registry/v1/version" + +module Google + module Cloud + module ApigeeRegistry + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/apigee_registry/v1/rest" + # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb new file mode 100644 index 000000000000..15cf2c14d1ab --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ApigeeRegistry + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb new file mode 100644 index 000000000000..f5077b4ec514 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/apigeeregistry/v1/provisioning_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/cloud/apigeeregistry/v1/provisioning_service.proto\x12\x1egoogle.cloud.apigeeregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x15\x43reateInstanceRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x08instance\x18\x03 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.InstanceB\x03\xe0\x41\x02\"U\n\x15\x44\x65leteInstanceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Instance\"R\n\x12GetInstanceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Instance\"\xdd\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\x16\n\x0estatus_message\x18\x05 \x01(\t\x12\x1e\n\x16\x63\x61ncellation_requested\x18\x06 \x01(\x08\x12\x13\n\x0b\x61pi_version\x18\x07 \x01(\t\"\xc2\x04\n\x08Instance\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x04 \x01(\x0e\x32..google.cloud.apigeeregistry.v1.Instance.StateB\x03\xe0\x41\x03\x12\x1a\n\rstate_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x06\x63onfig\x18\x06 \x01(\x0b\x32/.google.cloud.apigeeregistry.v1.Instance.ConfigB\x03\xe0\x41\x02\x1a;\n\x06\x43onfig\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rcmek_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"n\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06:i\xea\x41\x66\n&apigeeregistry.googleapis.com/Instance\x12.google.cloud.apigeeregistry.v1.ApiDeployment.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n+apigeeregistry.googleapis.com/ApiDeployment\x12Kprojects/{project}/locations/{location}/apis/{api}/deployments/{deployment}\"\xb7\x05\n\x08\x41rtifact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\tmime_type\x18\x04 \x01(\t\x12\x17\n\nsize_bytes\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04hash\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x63ontents\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x04:\xda\x03\xea\x41\xd6\x03\n&apigeeregistry.googleapis.com/Artifact\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apigeeregistry.googleapis.com/ApiVersion\"\xbe\x01\n\x17\x43reateApiVersionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apigeeregistry.googleapis.com/ApiVersion\x12\x44\n\x0b\x61pi_version\x18\x02 \x01(\x0b\x32*.google.cloud.apigeeregistry.v1.ApiVersionB\x03\xe0\x41\x02\x12\x1b\n\x0e\x61pi_version_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa7\x01\n\x17UpdateApiVersionRequest\x12\x44\n\x0b\x61pi_version\x18\x01 \x01(\x0b\x32*.google.cloud.apigeeregistry.v1.ApiVersionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"h\n\x17\x44\x65leteApiVersionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apigeeregistry.googleapis.com/ApiVersion\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"\x8b\x01\n\x13ListApiSpecsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%apigeeregistry.googleapis.com/ApiSpec\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\"k\n\x14ListApiSpecsResponse\x12:\n\tapi_specs\x18\x01 \x03(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpec\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x11GetApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"X\n\x19GetApiSpecContentsRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"\xaf\x01\n\x14\x43reateApiSpecRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%apigeeregistry.googleapis.com/ApiSpec\x12>\n\x08\x61pi_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpecB\x03\xe0\x41\x02\x12\x18\n\x0b\x61pi_spec_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9e\x01\n\x14UpdateApiSpecRequest\x12>\n\x08\x61pi_spec\x18\x01 \x01(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpecB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"b\n\x14\x44\x65leteApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"j\n\x19TagApiSpecRevisionRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x10\n\x03tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n\x1bListApiSpecRevisionsRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x1cListApiSpecRevisionsResponse\x12:\n\tapi_specs\x18\x01 \x03(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpec\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x16RollbackApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"[\n\x1c\x44\x65leteApiSpecRevisionRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"\x97\x01\n\x19ListApiDeploymentsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+apigeeregistry.googleapis.com/ApiDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"}\n\x1aListApiDeploymentsResponse\x12\x46\n\x0f\x61pi_deployments\x18\x01 \x03(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x17GetApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\"\xcd\x01\n\x1a\x43reateApiDeploymentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+apigeeregistry.googleapis.com/ApiDeployment\x12J\n\x0e\x61pi_deployment\x18\x02 \x01(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeploymentB\x03\xe0\x41\x02\x12\x1e\n\x11\x61pi_deployment_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x1aUpdateApiDeploymentRequest\x12J\n\x0e\x61pi_deployment\x18\x01 \x01(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeploymentB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"n\n\x1a\x44\x65leteApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"v\n\x1fTagApiDeploymentRevisionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x10\n\x03tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x8d\x01\n!ListApiDeploymentRevisionsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\"ListApiDeploymentRevisionsResponse\x12\x46\n\x0f\x61pi_deployments\x18\x01 \x03(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x1cRollbackApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"g\n\"DeleteApiDeploymentRevisionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\"\x8d\x01\n\x14ListArtifactsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&apigeeregistry.googleapis.com/Artifact\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\"m\n\x15ListArtifactsResponse\x12;\n\tartifacts\x18\x01 \x03(\x0b\x32(.google.cloud.apigeeregistry.v1.Artifact\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x12GetArtifactRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact\"Z\n\x1aGetArtifactContentsRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact\"\xb2\x01\n\x15\x43reateArtifactRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&apigeeregistry.googleapis.com/Artifact\x12?\n\x08\x61rtifact\x18\x02 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.ArtifactB\x03\xe0\x41\x02\x12\x18\n\x0b\x61rtifact_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Y\n\x16ReplaceArtifactRequest\x12?\n\x08\x61rtifact\x18\x01 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.ArtifactB\x03\xe0\x41\x02\"U\n\x15\x44\x65leteArtifactRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact2\xc0\x45\n\x08Registry\x12\xa8\x01\n\x08ListApis\x12/.google.cloud.apigeeregistry.v1.ListApisRequest\x1a\x30.google.cloud.apigeeregistry.v1.ListApisResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/apis\x12\x95\x01\n\x06GetApi\x12-.google.cloud.apigeeregistry.v1.GetApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/apis/*}\x12\xad\x01\n\tCreateApi\x12\x30.google.cloud.apigeeregistry.v1.CreateApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"I\xda\x41\x11parent,api,api_id\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/apis:\x03\x61pi\x12\xaf\x01\n\tUpdateApi\x12\x30.google.cloud.apigeeregistry.v1.UpdateApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"K\xda\x41\x0f\x61pi,update_mask\x82\xd3\xe4\x93\x02\x33\x32,/v1/{api.name=projects/*/locations/*/apis/*}:\x03\x61pi\x12\x8e\x01\n\tDeleteApi\x12\x30.google.cloud.apigeeregistry.v1.DeleteApiRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/apis/*}\x12\xc8\x01\n\x0fListApiVersions\x12\x36.google.cloud.apigeeregistry.v1.ListApiVersionsRequest\x1a\x37.google.cloud.apigeeregistry.v1.ListApiVersionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*/apis/*}/versions\x12\xb5\x01\n\rGetApiVersion\x12\x34.google.cloud.apigeeregistry.v1.GetApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/apis/*/versions/*}\x12\xe5\x01\n\x10\x43reateApiVersion\x12\x37.google.cloud.apigeeregistry.v1.CreateApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"l\xda\x41!parent,api_version,api_version_id\x82\xd3\xe4\x93\x02\x42\"3/v1/{parent=projects/*/locations/*/apis/*}/versions:\x0b\x61pi_version\x12\xe7\x01\n\x10UpdateApiVersion\x12\x37.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"n\xda\x41\x17\x61pi_version,update_mask\x82\xd3\xe4\x93\x02N2?/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}:\x0b\x61pi_version\x12\xa7\x01\n\x10\x44\x65leteApiVersion\x12\x37.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/apis/*/versions/*}\x12\xc7\x01\n\x0cListApiSpecs\x12\x33.google.cloud.apigeeregistry.v1.ListApiSpecsRequest\x1a\x34.google.cloud.apigeeregistry.v1.ListApiSpecsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs\x12\xb4\x01\n\nGetApiSpec\x12\x31.google.cloud.apigeeregistry.v1.GetApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\x12\xbd\x01\n\x12GetApiSpecContents\x12\x39.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest\x1a\x14.google.api.HttpBody\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents\x12\xdb\x01\n\rCreateApiSpec\x12\x34.google.cloud.apigeeregistry.v1.CreateApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"k\xda\x41\x1bparent,api_spec,api_spec_id\x82\xd3\xe4\x93\x02G\";/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs:\x08\x61pi_spec\x12\xdd\x01\n\rUpdateApiSpec\x12\x34.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"m\xda\x41\x14\x61pi_spec,update_mask\x82\xd3\xe4\x93\x02P2D/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}:\x08\x61pi_spec\x12\xa9\x01\n\rDeleteApiSpec\x12\x34.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest\x1a\x16.google.protobuf.Empty\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\x12\xcc\x01\n\x12TagApiSpecRevision\x12\x39.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"R\x82\xd3\xe4\x93\x02L\"G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision:\x01*\x12\xe4\x01\n\x14ListApiSpecRevisions\x12;.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest\x1a<.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse\"Q\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions\x12\xc3\x01\n\x0fRollbackApiSpec\x12\x36.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"O\x82\xd3\xe4\x93\x02I\"D/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback:\x01*\x12\xd9\x01\n\x15\x44\x65leteApiSpecRevision\x12<.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision\x12\xd4\x01\n\x12ListApiDeployments\x12\x39.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest\x1a:.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*/apis/*}/deployments\x12\xc1\x01\n\x10GetApiDeployment\x12\x37.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/apis/*/deployments/*}\x12\xfa\x01\n\x13\x43reateApiDeployment\x12:.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"x\xda\x41\'parent,api_deployment,api_deployment_id\x82\xd3\xe4\x93\x02H\"6/v1/{parent=projects/*/locations/*/apis/*}/deployments:\x0e\x61pi_deployment\x12\xfc\x01\n\x13UpdateApiDeployment\x12:.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"z\xda\x41\x1a\x61pi_deployment,update_mask\x82\xd3\xe4\x93\x02W2E/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}:\x0e\x61pi_deployment\x12\xb0\x01\n\x13\x44\x65leteApiDeployment\x12:.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/apis/*/deployments/*}\x12\xd9\x01\n\x18TagApiDeploymentRevision\x12?.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"M\x82\xd3\xe4\x93\x02G\"B/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision:\x01*\x12\xf1\x01\n\x1aListApiDeploymentRevisions\x12\x41.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest\x1a\x42.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse\"L\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions\x12\xd0\x01\n\x15RollbackApiDeployment\x12<.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback:\x01*\x12\xe6\x01\n\x1b\x44\x65leteApiDeploymentRevision\x12\x42.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision\x12\xca\x03\n\rListArtifacts\x12\x34.google.cloud.apigeeregistry.v1.ListArtifactsRequest\x1a\x35.google.cloud.apigeeregistry.v1.ListArtifactsResponse\"\xcb\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xbb\x02\x12-/v1/{parent=projects/*/locations/*}/artifactsZ6\x12\x34/v1/{parent=projects/*/locations/*/apis/*}/artifactsZA\x12?/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifactsZI\x12G/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifactsZD\x12\x42/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts\x12\xb7\x03\n\x0bGetArtifact\x12\x32.google.cloud.apigeeregistry.v1.GetArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\xc9\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbb\x02\x12-/v1/{name=projects/*/locations/*/artifacts/*}Z6\x12\x34/v1/{name=projects/*/locations/*/apis/*/artifacts/*}ZA\x12?/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}ZI\x12G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}ZD\x12\x42/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}\x12\xef\x03\n\x13GetArtifactContents\x12:.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest\x1a\x14.google.api.HttpBody\"\x85\x03\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf7\x02\x12\x39/v1/{name=projects/*/locations/*/artifacts/*}:getContentsZB\x12@/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContentsZM\x12K/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContentsZU\x12S/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContentsZP\x12N/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents\x12\x86\x04\n\x0e\x43reateArtifact\x12\x35.google.cloud.apigeeregistry.v1.CreateArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\x92\x03\xda\x41\x1bparent,artifact,artifact_id\x82\xd3\xe4\x93\x02\xed\x02\"-/v1/{parent=projects/*/locations/*}/artifacts:\x08\x61rtifactZ@\"4/v1/{parent=projects/*/locations/*/apis/*}/artifacts:\x08\x61rtifactZK\"?/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts:\x08\x61rtifactZS\"G/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts:\x08\x61rtifactZN\"B/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts:\x08\x61rtifact\x12\xa2\x04\n\x0fReplaceArtifact\x12\x36.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\xac\x03\xda\x41\x08\x61rtifact\x82\xd3\xe4\x93\x02\x9a\x03\x1a\x36/v1/{artifact.name=projects/*/locations/*/artifacts/*}:\x08\x61rtifactZI\x1a=/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}:\x08\x61rtifactZT\x1aH/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:\x08\x61rtifactZ\\\x1aP/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:\x08\x61rtifactZW\x1aK/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:\x08\x61rtifact\x12\xab\x03\n\x0e\x44\x65leteArtifact\x12\x35.google.cloud.apigeeregistry.v1.DeleteArtifactRequest\x1a\x16.google.protobuf.Empty\"\xc9\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbb\x02*-/v1/{name=projects/*/locations/*/artifacts/*}Z6*4/v1/{name=projects/*/locations/*/apis/*/artifacts/*}ZA*?/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}ZI*G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}ZD*B/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}\x1aQ\xca\x41\x1d\x61pigeeregistry.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xee\x01\n\"com.google.cloud.apigeeregistry.v1B\x14RegistryServiceProtoP\x01ZJcloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb;apigeeregistrypb\xaa\x02\x1eGoogle.Cloud.ApigeeRegistry.V1\xca\x02\x1eGoogle\\Cloud\\ApigeeRegistry\\V1\xea\x02!Google::Cloud::ApigeeRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ApigeeRegistry + module V1 + ListApisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApisRequest").msgclass + ListApisResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApisResponse").msgclass + GetApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiRequest").msgclass + CreateApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiRequest").msgclass + UpdateApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiRequest").msgclass + DeleteApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiRequest").msgclass + ListApiVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiVersionsRequest").msgclass + ListApiVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiVersionsResponse").msgclass + GetApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiVersionRequest").msgclass + CreateApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiVersionRequest").msgclass + UpdateApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiVersionRequest").msgclass + DeleteApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiVersionRequest").msgclass + ListApiSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecsRequest").msgclass + ListApiSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecsResponse").msgclass + GetApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiSpecRequest").msgclass + GetApiSpecContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest").msgclass + CreateApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiSpecRequest").msgclass + UpdateApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiSpecRequest").msgclass + DeleteApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiSpecRequest").msgclass + TagApiSpecRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest").msgclass + ListApiSpecRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest").msgclass + ListApiSpecRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse").msgclass + RollbackApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.RollbackApiSpecRequest").msgclass + DeleteApiSpecRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest").msgclass + ListApiDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest").msgclass + ListApiDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse").msgclass + GetApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiDeploymentRequest").msgclass + CreateApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest").msgclass + UpdateApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest").msgclass + DeleteApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest").msgclass + TagApiDeploymentRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest").msgclass + ListApiDeploymentRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest").msgclass + ListApiDeploymentRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse").msgclass + RollbackApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest").msgclass + DeleteApiDeploymentRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest").msgclass + ListArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListArtifactsRequest").msgclass + ListArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListArtifactsResponse").msgclass + GetArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetArtifactRequest").msgclass + GetArtifactContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetArtifactContentsRequest").msgclass + CreateArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateArtifactRequest").msgclass + ReplaceArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ReplaceArtifactRequest").msgclass + DeleteArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteArtifactRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb new file mode 100644 index 000000000000..3fb9990b50eb --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb @@ -0,0 +1,128 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/apigeeregistry/v1/registry_service.proto for package 'Google.Cloud.ApigeeRegistry.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/apigeeregistry/v1/registry_service_pb' + +module Google + module Cloud + module ApigeeRegistry + module V1 + module Registry + # The Registry service allows teams to manage descriptions of APIs. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.apigeeregistry.v1.Registry' + + # Returns matching APIs. + rpc :ListApis, ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse + # Returns a specified API. + rpc :GetApi, ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api + # Creates a specified API. + rpc :CreateApi, ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api + # Used to modify a specified API. + rpc :UpdateApi, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api + # Removes a specified API and all of the resources that it + # owns. + rpc :DeleteApi, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Google::Protobuf::Empty + # Returns matching versions. + rpc :ListApiVersions, ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse + # Returns a specified version. + rpc :GetApiVersion, ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion + # Creates a specified version. + rpc :CreateApiVersion, ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion + # Used to modify a specified version. + rpc :UpdateApiVersion, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion + # Removes a specified version and all of the resources that + # it owns. + rpc :DeleteApiVersion, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Google::Protobuf::Empty + # Returns matching specs. + rpc :ListApiSpecs, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse + # Returns a specified spec. + rpc :GetApiSpec, ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec + # Returns the contents of a specified spec. + # If specs are stored with GZip compression, the default behavior + # is to return the spec uncompressed (the mime_type response field + # indicates the exact format returned). + rpc :GetApiSpecContents, ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Google::Api::HttpBody + # Creates a specified spec. + rpc :CreateApiSpec, ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec + # Used to modify a specified spec. + rpc :UpdateApiSpec, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec + # Removes a specified spec, all revisions, and all child + # resources (e.g., artifacts). + rpc :DeleteApiSpec, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Google::Protobuf::Empty + # Adds a tag to a specified revision of a spec. + rpc :TagApiSpecRevision, ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec + # Lists all revisions of a spec. + # Revisions are returned in descending order of revision creation time. + rpc :ListApiSpecRevisions, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse + # Sets the current revision to a specified prior revision. + # Note that this creates a new revision with a new revision ID. + rpc :RollbackApiSpec, ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec + # Deletes a revision of a spec. + rpc :DeleteApiSpecRevision, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec + # Returns matching deployments. + rpc :ListApiDeployments, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse + # Returns a specified deployment. + rpc :GetApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment + # Creates a specified deployment. + rpc :CreateApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment + # Used to modify a specified deployment. + rpc :UpdateApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment + # Removes a specified deployment, all revisions, and all + # child resources (e.g., artifacts). + rpc :DeleteApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Google::Protobuf::Empty + # Adds a tag to a specified revision of a + # deployment. + rpc :TagApiDeploymentRevision, ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment + # Lists all revisions of a deployment. + # Revisions are returned in descending order of revision creation time. + rpc :ListApiDeploymentRevisions, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse + # Sets the current revision to a specified prior + # revision. Note that this creates a new revision with a new revision ID. + rpc :RollbackApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment + # Deletes a revision of a deployment. + rpc :DeleteApiDeploymentRevision, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment + # Returns matching artifacts. + rpc :ListArtifacts, ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse + # Returns a specified artifact. + rpc :GetArtifact, ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact + # Returns the contents of a specified artifact. + # If artifacts are stored with GZip compression, the default behavior + # is to return the artifact uncompressed (the mime_type response field + # indicates the exact format returned). + rpc :GetArtifactContents, ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Google::Api::HttpBody + # Creates a specified artifact. + rpc :CreateArtifact, ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact + # Used to replace a specified artifact. + rpc :ReplaceArtifact, ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact + # Removes a specified artifact. + rpc :DeleteArtifact, ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/README.md new file mode 100644 index 000000000000..6169ad3a961c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Apigee Registry V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb new file mode 100644 index 000000000000..938f7ac6b2fd --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.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 Api + # Message that represents an arbitrary HTTP body. It should only be used for + # payload formats that can't be represented as JSON, such as raw binary or + # an HTML page. + # + # + # This message can be used both in streaming and non-streaming API methods in + # the request as well as the response. + # + # It can be used as a top-level request field, which is convenient if one + # wants to extract parameters from either the URL or HTTP template into the + # request fields and also want access to the raw HTTP body. + # + # Example: + # + # message GetResourceRequest { + # // A unique request id. + # string request_id = 1; + # + # // The raw HTTP body is bound to this field. + # google.api.HttpBody http_body = 2; + # + # } + # + # service ResourceService { + # rpc GetResource(GetResourceRequest) + # returns (google.api.HttpBody); + # rpc UpdateResource(google.api.HttpBody) + # returns (google.protobuf.Empty); + # + # } + # + # Example with streaming methods: + # + # service CaldavService { + # rpc GetCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # rpc UpdateCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # + # } + # + # Use of this type only changes how the request and response bodies are + # handled, all other features will continue to work unchanged. + # @!attribute [rw] content_type + # @return [::String] + # The HTTP Content-Type header value specifying the content type of the body. + # @!attribute [rw] data + # @return [::String] + # The HTTP request/response body as raw binary. + # @!attribute [rw] extensions + # @return [::Array<::Google::Protobuf::Any>] + # Application specific response metadata. Must be set in the first response + # for streaming APIs. + class HttpBody + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb new file mode 100644 index 000000000000..a114ffa9ee43 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ApigeeRegistry + module V1 + # Request message for CreateInstance. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` + # @!attribute [rw] instance_id + # @return [::String] + # Required. Identifier to assign to the Instance. Must be unique within scope of the + # parent resource. + # @!attribute [rw] instance + # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] + # Required. The Instance. + class CreateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteInstance. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Instance to delete. + # Format: `projects/*/locations/*/instances/*`. + class DeleteInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetInstance. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Instance to retrieve. + # Format: `projects/*/locations/*/instances/*`. + class GetInstanceRequest + 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] status_message + # @return [::String] + # Human-readable status of the operation, if any. + # @!attribute [rw] cancellation_requested + # @return [::Boolean] + # 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 [rw] api_version + # @return [::String] + # API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An Instance represents the instance resources of the Registry. + # Currently, only one instance is allowed for each project. + # @!attribute [rw] name + # @return [::String] + # Format: `projects/*/locations/*/instance`. + # Currently only `locations/global` is supported. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update timestamp. + # @!attribute [r] state + # @return [::Google::Cloud::ApigeeRegistry::V1::Instance::State] + # Output only. The current state of the Instance. + # @!attribute [r] state_message + # @return [::String] + # Output only. Extra information of Instance.State if the state is `FAILED`. + # @!attribute [rw] config + # @return [::Google::Cloud::ApigeeRegistry::V1::Instance::Config] + # Required. Config of the Instance. + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Available configurations to provision an Instance. + # @!attribute [r] location + # @return [::String] + # Output only. The GCP location where the Instance resides. + # @!attribute [rw] cmek_key_name + # @return [::String] + # Required. The Customer Managed Encryption Key (CMEK) used for data encryption. + # The CMEK name should follow the format of + # `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`, + # where the `location` must match InstanceConfig.location. + class Config + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the Instance. + module State + # The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0 + + # The Instance has not been initialized or has been deleted. + INACTIVE = 1 + + # The Instance is being created. + CREATING = 2 + + # The Instance has been created and is ready for use. + ACTIVE = 3 + + # The Instance is being updated. + UPDATING = 4 + + # The Instance is being deleted. + DELETING = 5 + + # The Instance encountered an error during a state change. + FAILED = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb new file mode 100644 index 000000000000..e62848d7ff0d --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.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! + + +module Google + module Cloud + module ApigeeRegistry + module V1 + # A top-level description of an API. + # Produced by producers and are commitments to provide services. + # @!attribute [rw] name + # @return [::String] + # Resource name. + # @!attribute [rw] display_name + # @return [::String] + # Human-meaningful name. + # @!attribute [rw] description + # @return [::String] + # A detailed description. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update timestamp. + # @!attribute [rw] availability + # @return [::String] + # A user-definable description of the availability of this service. + # Format: free-form, but we expect single words that describe availability, + # e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN". + # @!attribute [rw] recommended_version + # @return [::String] + # The recommended version of the API. + # Format: `apis/{api}/versions/{version}` + # @!attribute [rw] recommended_deployment + # @return [::String] + # The recommended deployment of the API. + # Format: `apis/{api}/deployments/{deployment}` + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels attach identifying metadata to resources. Identifying metadata can + # be used to filter list operations. + # + # Label keys and values can be no longer than 64 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores, and dashes. International characters are allowed. + # No more than 64 user labels can be associated with one resource (System + # labels are excluded). + # + # See https://goo.gl/xmQnxf for more information and examples of labels. + # System reserved label keys are prefixed with + # `apigeeregistry.googleapis.com/` and cannot be changed. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Annotations attach non-identifying metadata to resources. + # + # Annotation keys and values are less restricted than those of labels, but + # should be generally used for small values of broad interest. Larger, topic- + # specific metadata should be stored in Artifacts. + class Api + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes a particular version of an API. + # ApiVersions are what consumers actually use. + # @!attribute [rw] name + # @return [::String] + # Resource name. + # @!attribute [rw] display_name + # @return [::String] + # Human-meaningful name. + # @!attribute [rw] description + # @return [::String] + # A detailed description. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update timestamp. + # @!attribute [rw] state + # @return [::String] + # A user-definable description of the lifecycle phase of this API version. + # Format: free-form, but we expect single words that describe API maturity, + # e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", + # "DEPRECATED", "RETIRED". + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels attach identifying metadata to resources. Identifying metadata can + # be used to filter list operations. + # + # Label keys and values can be no longer than 64 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # No more than 64 user labels can be associated with one resource (System + # labels are excluded). + # + # See https://goo.gl/xmQnxf for more information and examples of labels. + # System reserved label keys are prefixed with + # `apigeeregistry.googleapis.com/` and cannot be changed. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Annotations attach non-identifying metadata to resources. + # + # Annotation keys and values are less restricted than those of labels, but + # should be generally used for small values of broad interest. Larger, topic- + # specific metadata should be stored in Artifacts. + class ApiVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes a version of an API in a structured way. + # ApiSpecs provide formal descriptions that consumers can use to use a version. + # ApiSpec resources are intended to be fully-resolved descriptions of an + # ApiVersion. When specs consist of multiple files, these should be bundled + # together (e.g., in a zip archive) and stored as a unit. Multiple specs can + # exist to provide representations in different API description formats. + # Synchronization of these representations would be provided by tooling and + # background services. + # @!attribute [rw] name + # @return [::String] + # Resource name. + # @!attribute [rw] filename + # @return [::String] + # A possibly-hierarchical name used to refer to the spec from other specs. + # @!attribute [rw] description + # @return [::String] + # A detailed description. + # @!attribute [r] revision_id + # @return [::String] + # Output only. Immutable. The revision ID of the spec. + # A new revision is committed whenever the spec contents are changed. + # The format is an 8-character hexadecimal string. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp; when the spec resource was created. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Revision creation timestamp; when the represented revision was created. + # @!attribute [r] revision_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update timestamp: when the represented revision was last modified. + # @!attribute [rw] mime_type + # @return [::String] + # A style (format) descriptor for this spec that is specified as a Media Type + # (https://en.wikipedia.org/wiki/Media_type). Possible values include + # `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and + # `application/vnd.apigee.graphql`, with possible suffixes representing + # compression types. These hypothetical names are defined in the vendor tree + # defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. + # Content types can specify compression. Currently only GZip compression is + # supported (indicated with "+gzip"). + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. The size of the spec file in bytes. If the spec is gzipped, this is the + # size of the uncompressed spec. + # @!attribute [r] hash + # @return [::String] + # Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is + # the hash of the uncompressed spec. + # @!attribute [rw] source_uri + # @return [::String] + # The original source URI of the spec (if one exists). + # This is an external location that can be used for reference purposes + # but which may not be authoritative since this external resource may + # change after the spec is retrieved. + # @!attribute [rw] contents + # @return [::String] + # Input only. The contents of the spec. + # Provided by API callers when specs are created or updated. + # To access the contents of a spec, use GetApiSpecContents. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels attach identifying metadata to resources. Identifying metadata can + # be used to filter list operations. + # + # Label keys and values can be no longer than 64 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # No more than 64 user labels can be associated with one resource (System + # labels are excluded). + # + # See https://goo.gl/xmQnxf for more information and examples of labels. + # System reserved label keys are prefixed with + # `apigeeregistry.googleapis.com/` and cannot be changed. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Annotations attach non-identifying metadata to resources. + # + # Annotation keys and values are less restricted than those of labels, but + # should be generally used for small values of broad interest. Larger, topic- + # specific metadata should be stored in Artifacts. + class ApiSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes a service running at particular address that + # provides a particular version of an API. ApiDeployments have revisions which + # correspond to different configurations of a single deployment in time. + # Revision identifiers should be updated whenever the served API spec or + # endpoint address changes. + # @!attribute [rw] name + # @return [::String] + # Resource name. + # @!attribute [rw] display_name + # @return [::String] + # Human-meaningful name. + # @!attribute [rw] description + # @return [::String] + # A detailed description. + # @!attribute [r] revision_id + # @return [::String] + # Output only. Immutable. The revision ID of the deployment. + # A new revision is committed whenever the deployment contents are changed. + # The format is an 8-character hexadecimal string. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp; when the deployment resource was created. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Revision creation timestamp; when the represented revision was created. + # @!attribute [r] revision_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update timestamp: when the represented revision was last modified. + # @!attribute [rw] api_spec_revision + # @return [::String] + # The full resource name (including revision ID) of the spec of the API being + # served by the deployment. Changes to this value will update the revision. + # Format: `apis/{api}/deployments/{deployment}` + # @!attribute [rw] endpoint_uri + # @return [::String] + # The address where the deployment is serving. Changes to this value will + # update the revision. + # @!attribute [rw] external_channel_uri + # @return [::String] + # The address of the external channel of the API (e.g., the Developer + # Portal). Changes to this value will not affect the revision. + # @!attribute [rw] intended_audience + # @return [::String] + # Text briefly identifying the intended audience of the API. Changes to this + # value will not affect the revision. + # @!attribute [rw] access_guidance + # @return [::String] + # Text briefly describing how to access the endpoint. Changes to this value + # will not affect the revision. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels attach identifying metadata to resources. Identifying metadata can + # be used to filter list operations. + # + # Label keys and values can be no longer than 64 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # No more than 64 user labels can be associated with one resource (System + # labels are excluded). + # + # See https://goo.gl/xmQnxf for more information and examples of labels. + # System reserved label keys are prefixed with + # `apigeeregistry.googleapis.com/` and cannot be changed. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Annotations attach non-identifying metadata to resources. + # + # Annotation keys and values are less restricted than those of labels, but + # should be generally used for small values of broad interest. Larger, topic- + # specific metadata should be stored in Artifacts. + class ApiDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Artifacts of resources. Artifacts are unique (single-value) per resource + # and are used to store metadata that is too large or numerous to be stored + # directly on the resource. Since artifacts are stored separately from parent + # resources, they should generally be used for metadata that is needed + # infrequently, i.e., not for display in primary views of the resource but + # perhaps displayed or downloaded upon request. The `ListArtifacts` method + # allows artifacts to be quickly enumerated and checked for presence without + # downloading their (potentially-large) contents. + # @!attribute [rw] name + # @return [::String] + # Resource name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update timestamp. + # @!attribute [rw] mime_type + # @return [::String] + # A content type specifier for the artifact. + # Content type specifiers are Media Types + # (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" + # parameter that specifies a schema for the stored information. + # Content types can specify compression. Currently only GZip compression is + # supported (indicated with "+gzip"). + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. The size of the artifact in bytes. If the artifact is gzipped, this is + # the size of the uncompressed artifact. + # @!attribute [r] hash + # @return [::String] + # Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, + # this is the hash of the uncompressed artifact. + # @!attribute [rw] contents + # @return [::String] + # Input only. The contents of the artifact. + # Provided by API callers when artifacts are created or replaced. + # To access the contents of an artifact, use GetArtifactContents. + class Artifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb new file mode 100644 index 000000000000..1fa0faa2c02b --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb @@ -0,0 +1,712 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ApigeeRegistry + module V1 + # Request message for ListApis. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of APIs. + # Format: `projects/*/locations/*` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of APIs to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListApis` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApis` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + class ListApisRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListApis. + # @!attribute [rw] apis + # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::Api>] + # The APIs 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 ListApisResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetApi. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the API to retrieve. + # Format: `projects/*/locations/*/apis/*` + class GetApiRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateApi. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of APIs. + # Format: `projects/*/locations/*` + # @!attribute [rw] api + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # Required. The API to create. + # @!attribute [rw] api_id + # @return [::String] + # Required. The ID to use for the API, which will become the final component of + # the API's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + class CreateApiRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateApi. + # @!attribute [rw] api + # @return [::Google::Cloud::ApigeeRegistry::V1::Api] + # Required. The API to update. + # + # The `name` field is used to identify the API to update. + # Format: `projects/*/locations/*/apis/*` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the API is not found, a new API will be created. + # In this situation, `update_mask` is ignored. + class UpdateApiRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteApi. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the API to delete. + # Format: `projects/*/locations/*/apis/*` + # @!attribute [rw] force + # @return [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + class DeleteApiRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListApiVersions. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of versions. + # Format: `projects/*/locations/*/apis/*` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of versions to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListApiVersions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiVersions` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + class ListApiVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListApiVersions. + # @!attribute [rw] api_versions + # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] + # 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 ListApiVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetApiVersion. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the version to retrieve. + # Format: `projects/*/locations/*/apis/*/versions/*` + class GetApiVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateApiVersion. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of versions. + # Format: `projects/*/locations/*/apis/*` + # @!attribute [rw] api_version + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # Required. The version to create. + # @!attribute [rw] api_version_id + # @return [::String] + # Required. The ID to use for the version, which will become the final component of + # the version's resource name. + # + # This value should be 1-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + class CreateApiVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateApiVersion. + # @!attribute [rw] api_version + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] + # Required. The version to update. + # + # The `name` field is used to identify the version to update. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the version is not found, a new version will be + # created. In this situation, `update_mask` is ignored. + class UpdateApiVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteApiVersion. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the version to delete. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @!attribute [rw] force + # @return [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + class DeleteApiVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListApiSpecs. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of specs. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of specs to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListApiSpecs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiSpecs` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields except contents. + class ListApiSpecsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListApiSpecs. + # @!attribute [rw] api_specs + # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] + # The specs 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 ListApiSpecsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetApiSpec. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the spec to retrieve. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + class GetApiSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetApiSpecContents. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the spec whose contents should be retrieved. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + class GetApiSpecContentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateApiSpec. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of specs. + # Format: `projects/*/locations/*/apis/*/versions/*` + # @!attribute [rw] api_spec + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # Required. The spec to create. + # @!attribute [rw] api_spec_id + # @return [::String] + # Required. The ID to use for the spec, which will become the final component of + # the spec's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + class CreateApiSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateApiSpec. + # @!attribute [rw] api_spec + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] + # Required. The spec to update. + # + # The `name` field is used to identify the spec to update. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the spec is not found, a new spec will be created. + # In this situation, `update_mask` is ignored. + class UpdateApiSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteApiSpec. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the spec to delete. + # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` + # @!attribute [rw] force + # @return [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + class DeleteApiSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for TagApiSpecRevision. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the spec to be tagged, including the revision ID. + # @!attribute [rw] tag + # @return [::String] + # Required. The tag to apply. + # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + class TagApiSpecRevisionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListApiSpecRevisions. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the spec to list revisions for. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of revisions to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The page token, received from a previous ListApiSpecRevisions call. + # Provide this to retrieve the subsequent page. + class ListApiSpecRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListApiSpecRevisionsResponse. + # @!attribute [rw] api_specs + # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] + # The revisions of the spec. + # @!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 ListApiSpecRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for RollbackApiSpec. + # @!attribute [rw] name + # @return [::String] + # Required. The spec being rolled back. + # @!attribute [rw] revision_id + # @return [::String] + # Required. The revision ID to roll back to. + # It must be a revision of the same spec. + # + # Example: `c7cfa2a8` + class RollbackApiSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteApiSpecRevision. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the spec revision to be deleted, + # with a revision ID explicitly included. + # + # Example: + # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` + class DeleteApiSpecRevisionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListApiDeployments. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of deployments. + # Format: `projects/*/locations/*/apis/*` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of deployments to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListApiDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListApiDeployments` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields. + class ListApiDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListApiDeployments. + # @!attribute [rw] api_deployments + # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] + # The deployments 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 ListApiDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetApiDeployment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment to retrieve. + # Format: `projects/*/locations/*/apis/*/deployments/*` + class GetApiDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateApiDeployment. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of deployments. + # Format: `projects/*/locations/*/apis/*` + # @!attribute [rw] api_deployment + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # Required. The deployment to create. + # @!attribute [rw] api_deployment_id + # @return [::String] + # Required. The ID to use for the deployment, which will become the final component of + # the deployment's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + class CreateApiDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateApiDeployment. + # @!attribute [rw] api_deployment + # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] + # Required. The deployment to update. + # + # The `name` field is used to identify the deployment to update. + # Format: `projects/*/locations/*/apis/*/deployments/*` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. If omitted, all fields are updated that + # are set in the request message (fields set to default values are ignored). + # If an asterisk "*" is specified, all fields are updated, including fields + # that are unspecified/default in the request. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the deployment is not found, a new deployment will be + # created. In this situation, `update_mask` is ignored. + class UpdateApiDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteApiDeployment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment to delete. + # Format: `projects/*/locations/*/apis/*/deployments/*` + # @!attribute [rw] force + # @return [::Boolean] + # If set to true, any child resources will also be deleted. + # (Otherwise, the request will only work if there are no child resources.) + class DeleteApiDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for TagApiDeploymentRevision. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment to be tagged, including the revision ID. + # @!attribute [rw] tag + # @return [::String] + # Required. The tag to apply. + # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + class TagApiDeploymentRevisionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListApiDeploymentRevisions. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment to list revisions for. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of revisions to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The page token, received from a previous ListApiDeploymentRevisions call. + # Provide this to retrieve the subsequent page. + class ListApiDeploymentRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListApiDeploymentRevisionsResponse. + # @!attribute [rw] api_deployments + # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] + # The revisions of the deployment. + # @!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 ListApiDeploymentRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for RollbackApiDeployment. + # @!attribute [rw] name + # @return [::String] + # Required. The deployment being rolled back. + # @!attribute [rw] revision_id + # @return [::String] + # Required. The revision ID to roll back to. + # It must be a revision of the same deployment. + # + # Example: `c7cfa2a8` + class RollbackApiDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteApiDeploymentRevision. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment revision to be deleted, + # with a revision ID explicitly included. + # + # Example: + # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` + class DeleteApiDeploymentRevisionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListArtifacts. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of artifacts. + # Format: `{parent}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. + # The service may return fewer than this value. + # If unspecified, at most 50 values will be returned. + # The maximum is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListArtifacts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListArtifacts` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # An expression that can be used to filter the list. Filters use the Common + # Expression Language and can refer to all message fields except contents. + class ListArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListArtifacts. + # @!attribute [rw] artifacts + # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::Artifact>] + # The artifacts 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 ListArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetArtifact. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the artifact to retrieve. + # Format: `{parent}/artifacts/*` + class GetArtifactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetArtifactContents. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the artifact whose contents should be retrieved. + # Format: `{parent}/artifacts/*` + class GetArtifactContentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateArtifact. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of artifacts. + # Format: `{parent}` + # @!attribute [rw] artifact + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # Required. The artifact to create. + # @!attribute [rw] artifact_id + # @return [::String] + # Required. The ID to use for the artifact, which will become the final component of + # the artifact's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # Following AIP-162, IDs must not have the form of a UUID. + class CreateArtifactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ReplaceArtifact. + # @!attribute [rw] artifact + # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] + # Required. The artifact to replace. + # + # The `name` field is used to identify the artifact to replace. + # Format: `{parent}/artifacts/*` + class ReplaceArtifactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteArtifact. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the artifact to delete. + # Format: `{parent}/artifacts/*` + class DeleteArtifactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/Gemfile new file mode 100644 index 000000000000..5e61b4338c62 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-apigee_registry-v1", path: "../" +else + gem "google-cloud-apigee_registry-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb new file mode 100644 index 000000000000..92b09da67f30 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Provisioning_CreateInstance_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the create_instance call in the Provisioning service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance. +# +def create_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new + + # Call the create_instance method. + result = client.create_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apigeeregistry_v1_generated_Provisioning_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb new file mode 100644 index 000000000000..3439fa1d65bf --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the delete_instance call in the Provisioning service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance. +# +def delete_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new + + # Call the delete_instance method. + result = client.delete_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb new file mode 100644 index 000000000000..2e1c86befd67 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Provisioning_GetInstance_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the get_instance call in the Provisioning service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. + p result +end +# [END apigeeregistry_v1_generated_Provisioning_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb new file mode 100644 index 000000000000..e413a726b047 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_CreateApi_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the create_api call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api. +# +def create_api + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new + + # Call the create_api method. + result = client.create_api request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + p result +end +# [END apigeeregistry_v1_generated_Registry_CreateApi_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb new file mode 100644 index 000000000000..e4304a1c23d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the create_api_deployment call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment. +# +def create_api_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new + + # Call the create_api_deployment method. + result = client.create_api_deployment request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + p result +end +# [END apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb new file mode 100644 index 000000000000..9da3a592518a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_CreateApiSpec_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the create_api_spec call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec. +# +def create_api_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new + + # Call the create_api_spec method. + result = client.create_api_spec request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + p result +end +# [END apigeeregistry_v1_generated_Registry_CreateApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb new file mode 100644 index 000000000000..a01d994dd33c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_CreateApiVersion_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the create_api_version call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version. +# +def create_api_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new + + # Call the create_api_version method. + result = client.create_api_version request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + p result +end +# [END apigeeregistry_v1_generated_Registry_CreateApiVersion_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb new file mode 100644 index 000000000000..9f8fb5a67ded --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_CreateArtifact_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the create_artifact call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact. +# +def create_artifact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new + + # Call the create_artifact method. + result = client.create_artifact request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + p result +end +# [END apigeeregistry_v1_generated_Registry_CreateArtifact_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb new file mode 100644 index 000000000000..5a8c6fe61da4 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_DeleteApi_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the delete_api call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api. +# +def delete_api + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new + + # Call the delete_api method. + result = client.delete_api request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END apigeeregistry_v1_generated_Registry_DeleteApi_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb new file mode 100644 index 000000000000..881de56caad9 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the delete_api_deployment call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment. +# +def delete_api_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new + + # Call the delete_api_deployment method. + result = client.delete_api_deployment request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb new file mode 100644 index 000000000000..9d957a8b01a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the delete_api_deployment_revision call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision. +# +def delete_api_deployment_revision + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new + + # Call the delete_api_deployment_revision method. + result = client.delete_api_deployment_revision request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + p result +end +# [END apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb new file mode 100644 index 000000000000..02270c0a4f98 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the delete_api_spec call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec. +# +def delete_api_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new + + # Call the delete_api_spec method. + result = client.delete_api_spec request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb new file mode 100644 index 000000000000..1c70d953d0c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the delete_api_spec_revision call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision. +# +def delete_api_spec_revision + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new + + # Call the delete_api_spec_revision method. + result = client.delete_api_spec_revision request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + p result +end +# [END apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb new file mode 100644 index 000000000000..01fc31de1684 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the delete_api_version call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version. +# +def delete_api_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new + + # Call the delete_api_version method. + result = client.delete_api_version request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb new file mode 100644 index 000000000000..0057d6a94abc --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_DeleteArtifact_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the delete_artifact call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact. +# +def delete_artifact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new + + # Call the delete_artifact method. + result = client.delete_artifact request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END apigeeregistry_v1_generated_Registry_DeleteArtifact_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb new file mode 100644 index 000000000000..2feab9c7261d --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_GetApi_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the get_api call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api. +# +def get_api + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new + + # Call the get_api method. + result = client.get_api request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + p result +end +# [END apigeeregistry_v1_generated_Registry_GetApi_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb new file mode 100644 index 000000000000..f2a48c417109 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_GetApiDeployment_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the get_api_deployment call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment. +# +def get_api_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new + + # Call the get_api_deployment method. + result = client.get_api_deployment request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + p result +end +# [END apigeeregistry_v1_generated_Registry_GetApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb new file mode 100644 index 000000000000..09d81f227fdc --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_GetApiSpec_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the get_api_spec call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec. +# +def get_api_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new + + # Call the get_api_spec method. + result = client.get_api_spec request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + p result +end +# [END apigeeregistry_v1_generated_Registry_GetApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb new file mode 100644 index 000000000000..6e191fa1b95c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the get_api_spec_contents call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents. +# +def get_api_spec_contents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new + + # Call the get_api_spec_contents method. + result = client.get_api_spec_contents request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb new file mode 100644 index 000000000000..c00ea49c4729 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_GetApiVersion_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the get_api_version call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version. +# +def get_api_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new + + # Call the get_api_version method. + result = client.get_api_version request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + p result +end +# [END apigeeregistry_v1_generated_Registry_GetApiVersion_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb new file mode 100644 index 000000000000..8fd90155a080 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_GetArtifact_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the get_artifact call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact. +# +def get_artifact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new + + # Call the get_artifact method. + result = client.get_artifact request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + p result +end +# [END apigeeregistry_v1_generated_Registry_GetArtifact_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb new file mode 100644 index 000000000000..5cf109ee300c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_GetArtifactContents_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the get_artifact_contents call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents. +# +def get_artifact_contents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new + + # Call the get_artifact_contents method. + result = client.get_artifact_contents request + + # The returned object is of type Google::Api::HttpBody. + p result +end +# [END apigeeregistry_v1_generated_Registry_GetArtifactContents_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb new file mode 100644 index 000000000000..dc2af93bd4df --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_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 apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the list_api_deployment_revisions call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions. +# +def list_api_deployment_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new + + # Call the list_api_deployment_revisions method. + result = client.list_api_deployment_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::ApigeeRegistry::V1::ApiDeployment. + p item + end +end +# [END apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb new file mode 100644 index 000000000000..8a9043424b3c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_ListApiDeployments_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the list_api_deployments call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments. +# +def list_api_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new + + # Call the list_api_deployments method. + result = client.list_api_deployments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + p item + end +end +# [END apigeeregistry_v1_generated_Registry_ListApiDeployments_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb new file mode 100644 index 000000000000..765430a2e352 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_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 apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the list_api_spec_revisions call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions. +# +def list_api_spec_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new + + # Call the list_api_spec_revisions method. + result = client.list_api_spec_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::ApigeeRegistry::V1::ApiSpec. + p item + end +end +# [END apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb new file mode 100644 index 000000000000..d8ba14c39356 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_ListApiSpecs_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the list_api_specs call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs. +# +def list_api_specs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new + + # Call the list_api_specs method. + result = client.list_api_specs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. + p item + end +end +# [END apigeeregistry_v1_generated_Registry_ListApiSpecs_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb new file mode 100644 index 000000000000..a75dbea1d9ca --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_ListApiVersions_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the list_api_versions call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions. +# +def list_api_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new + + # Call the list_api_versions method. + result = client.list_api_versions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. + p item + end +end +# [END apigeeregistry_v1_generated_Registry_ListApiVersions_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb new file mode 100644 index 000000000000..262bd765ed18 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_ListApis_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the list_apis call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis. +# +def list_apis + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new + + # Call the list_apis method. + result = client.list_apis request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. + p item + end +end +# [END apigeeregistry_v1_generated_Registry_ListApis_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb new file mode 100644 index 000000000000..a16b53c72f8c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_ListArtifacts_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the list_artifacts call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts. +# +def list_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new + + # Call the list_artifacts method. + result = client.list_artifacts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. + p item + end +end +# [END apigeeregistry_v1_generated_Registry_ListArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb new file mode 100644 index 000000000000..bbc5e280bff5 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the replace_artifact call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact. +# +def replace_artifact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new + + # Call the replace_artifact method. + result = client.replace_artifact request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. + p result +end +# [END apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb new file mode 100644 index 000000000000..b5d313111fb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the rollback_api_deployment call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment. +# +def rollback_api_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new + + # Call the rollback_api_deployment method. + result = client.rollback_api_deployment request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + p result +end +# [END apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb new file mode 100644 index 000000000000..89cb50ec1b82 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the rollback_api_spec call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec. +# +def rollback_api_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new + + # Call the rollback_api_spec method. + result = client.rollback_api_spec request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + p result +end +# [END apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb new file mode 100644 index 000000000000..09aa8e252abb --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the tag_api_deployment_revision call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision. +# +def tag_api_deployment_revision + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new + + # Call the tag_api_deployment_revision method. + result = client.tag_api_deployment_revision request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + p result +end +# [END apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb new file mode 100644 index 000000000000..e304028fd40a --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the tag_api_spec_revision call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision. +# +def tag_api_spec_revision + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new + + # Call the tag_api_spec_revision method. + result = client.tag_api_spec_revision request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + p result +end +# [END apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb new file mode 100644 index 000000000000..9fca75bea84d --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_UpdateApi_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the update_api call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api. +# +def update_api + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new + + # Call the update_api method. + result = client.update_api request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. + p result +end +# [END apigeeregistry_v1_generated_Registry_UpdateApi_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb new file mode 100644 index 000000000000..3d45bad7f2ed --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the update_api_deployment call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment. +# +def update_api_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new + + # Call the update_api_deployment method. + result = client.update_api_deployment request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. + p result +end +# [END apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb new file mode 100644 index 000000000000..e7aac52c622c --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the update_api_spec call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec. +# +def update_api_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new + + # Call the update_api_spec method. + result = client.update_api_spec request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. + p result +end +# [END apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb new file mode 100644 index 000000000000..b71e3becf695 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync] +require "google/cloud/apigee_registry/v1" + +## +# Snippet for the update_api_version call in the Registry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version. +# +def update_api_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new + + # Call the update_api_version method. + result = client.update_api_version request + + # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. + p result +end +# [END apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json new file mode 100644 index 000000000000..efee9509b017 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json @@ -0,0 +1,1535 @@ +{ + "client_library": { + "name": "google-cloud-apigee_registry-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.apigeeregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "apigeeregistry_v1_generated_Provisioning_CreateInstance_sync", + "title": "Snippet for the create_instance call in the Provisioning service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance.", + "file": "provisioning/create_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_instance", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Provisioning::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" + }, + "method": { + "short_name": "CreateInstance", + "full_name": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", + "service": { + "short_name": "Provisioning", + "full_name": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync", + "title": "Snippet for the delete_instance call in the Provisioning service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance.", + "file": "provisioning/delete_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Provisioning::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" + }, + "method": { + "short_name": "DeleteInstance", + "full_name": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", + "service": { + "short_name": "Provisioning", + "full_name": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Provisioning_GetInstance_sync", + "title": "Snippet for the get_instance call in the Provisioning service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance.", + "file": "provisioning/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::Instance", + "client": { + "short_name": "Provisioning::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", + "service": { + "short_name": "Provisioning", + "full_name": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_ListApis_sync", + "title": "Snippet for the list_apis call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis.", + "file": "registry/list_apis.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_apis", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::ListApisRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApisResponse", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "ListApis", + "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApis", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_GetApi_sync", + "title": "Snippet for the get_api call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api.", + "file": "registry/get_api.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_api", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "GetApi", + "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApi", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_CreateApi_sync", + "title": "Snippet for the create_api call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api.", + "file": "registry/create_api.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_api", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "CreateApi", + "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApi", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApi_sync", + "title": "Snippet for the update_api call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api.", + "file": "registry/update_api.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_api", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "UpdateApi", + "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApi_sync", + "title": "Snippet for the delete_api call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api.", + "file": "registry/delete_api.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_api", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "DeleteApi", + "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_ListApiVersions_sync", + "title": "Snippet for the list_api_versions call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions.", + "file": "registry/list_api_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_api_versions", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "ListApiVersions", + "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_GetApiVersion_sync", + "title": "Snippet for the get_api_version call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version.", + "file": "registry/get_api_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_api_version", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "GetApiVersion", + "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiVersion_sync", + "title": "Snippet for the create_api_version call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version.", + "file": "registry/create_api_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_api_version", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "CreateApiVersion", + "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync", + "title": "Snippet for the update_api_version call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version.", + "file": "registry/update_api_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_api_version", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "UpdateApiVersion", + "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync", + "title": "Snippet for the delete_api_version call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version.", + "file": "registry/delete_api_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_api_version", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "DeleteApiVersion", + "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_ListApiSpecs_sync", + "title": "Snippet for the list_api_specs call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs.", + "file": "registry/list_api_specs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_api_specs", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "ListApiSpecs", + "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_GetApiSpec_sync", + "title": "Snippet for the get_api_spec call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec.", + "file": "registry/get_api_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_api_spec", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "GetApiSpec", + "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync", + "title": "Snippet for the get_api_spec_contents call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents.", + "file": "registry/get_api_spec_contents.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_api_spec_contents", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "GetApiSpecContents", + "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiSpec_sync", + "title": "Snippet for the create_api_spec call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec.", + "file": "registry/create_api_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_api_spec", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "CreateApiSpec", + "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync", + "title": "Snippet for the update_api_spec call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec.", + "file": "registry/update_api_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_api_spec", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "UpdateApiSpec", + "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync", + "title": "Snippet for the delete_api_spec call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec.", + "file": "registry/delete_api_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_api_spec", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "DeleteApiSpec", + "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync", + "title": "Snippet for the tag_api_spec_revision call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision.", + "file": "registry/tag_api_spec_revision.rb", + "language": "RUBY", + "client_method": { + "short_name": "tag_api_spec_revision", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "TagApiSpecRevision", + "full_name": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync", + "title": "Snippet for the list_api_spec_revisions call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions.", + "file": "registry/list_api_spec_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_api_spec_revisions", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "ListApiSpecRevisions", + "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync", + "title": "Snippet for the rollback_api_spec call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec.", + "file": "registry/rollback_api_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "rollback_api_spec", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "RollbackApiSpec", + "full_name": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync", + "title": "Snippet for the delete_api_spec_revision call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision.", + "file": "registry/delete_api_spec_revision.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_api_spec_revision", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "DeleteApiSpecRevision", + "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_ListApiDeployments_sync", + "title": "Snippet for the list_api_deployments call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments.", + "file": "registry/list_api_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_api_deployments", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "ListApiDeployments", + "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_GetApiDeployment_sync", + "title": "Snippet for the get_api_deployment call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment.", + "file": "registry/get_api_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_api_deployment", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "GetApiDeployment", + "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync", + "title": "Snippet for the create_api_deployment call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment.", + "file": "registry/create_api_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_api_deployment", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "CreateApiDeployment", + "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync", + "title": "Snippet for the update_api_deployment call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment.", + "file": "registry/update_api_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_api_deployment", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "UpdateApiDeployment", + "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync", + "title": "Snippet for the delete_api_deployment call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment.", + "file": "registry/delete_api_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_api_deployment", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "DeleteApiDeployment", + "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync", + "title": "Snippet for the tag_api_deployment_revision call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision.", + "file": "registry/tag_api_deployment_revision.rb", + "language": "RUBY", + "client_method": { + "short_name": "tag_api_deployment_revision", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "TagApiDeploymentRevision", + "full_name": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync", + "title": "Snippet for the list_api_deployment_revisions call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions.", + "file": "registry/list_api_deployment_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_api_deployment_revisions", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "ListApiDeploymentRevisions", + "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync", + "title": "Snippet for the rollback_api_deployment call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment.", + "file": "registry/rollback_api_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "rollback_api_deployment", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "RollbackApiDeployment", + "full_name": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync", + "title": "Snippet for the delete_api_deployment_revision call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision.", + "file": "registry/delete_api_deployment_revision.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_api_deployment_revision", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "DeleteApiDeploymentRevision", + "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_ListArtifacts_sync", + "title": "Snippet for the list_artifacts call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts.", + "file": "registry/list_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_artifacts", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "ListArtifacts", + "full_name": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_GetArtifact_sync", + "title": "Snippet for the get_artifact call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact.", + "file": "registry/get_artifact.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_artifact", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "GetArtifact", + "full_name": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_GetArtifactContents_sync", + "title": "Snippet for the get_artifact_contents call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents.", + "file": "registry/get_artifact_contents.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_artifact_contents", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::HttpBody", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "GetArtifactContents", + "full_name": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_CreateArtifact_sync", + "title": "Snippet for the create_artifact call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact.", + "file": "registry/create_artifact.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_artifact", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "CreateArtifact", + "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync", + "title": "Snippet for the replace_artifact call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact.", + "file": "registry/replace_artifact.rb", + "language": "RUBY", + "client_method": { + "short_name": "replace_artifact", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "ReplaceArtifact", + "full_name": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apigeeregistry_v1_generated_Registry_DeleteArtifact_sync", + "title": "Snippet for the delete_artifact call in the Registry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact.", + "file": "registry/delete_artifact.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_artifact", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Registry::Client", + "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" + }, + "method": { + "short_name": "DeleteArtifact", + "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", + "service": { + "short_name": "Registry", + "full_name": "google.cloud.apigeeregistry.v1.Registry" + } + } + }, + "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-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb new file mode 100644 index 000000000000..9015d58c65e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_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/apigeeregistry/v1/provisioning_service_pb" +require "google/cloud/apigeeregistry/v1/provisioning_service_services_pb" +require "google/cloud/apigee_registry/v1/provisioning" + +class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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::ApigeeRegistry::V1::Provisioning::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb new file mode 100644 index 000000000000..0c3f0bb83129 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_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/apigee_registry/v1/provisioning" + +class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_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::ApigeeRegistry::V1::Provisioning::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-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb new file mode 100644 index 000000000000..be7ad7ae6549 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb @@ -0,0 +1,263 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/apigeeregistry/v1/provisioning_service_pb" +require "google/cloud/apigee_registry/v1/provisioning/rest" + + +class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_id = "hello world" + instance = {} + + create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_instance parent: parent, instance_id: instance_id, instance: instance do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_instance ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_instance(::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_instance_client_stub.call_count + end + end + end + + def test_delete_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_instance ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_instance(::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_instance_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_count + end + end + end + + def test_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::ApigeeRegistry::V1::Provisioning::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::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb new file mode 100644 index 000000000000..e0c29cccbd71 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb @@ -0,0 +1,306 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/apigeeregistry/v1/provisioning_service_pb" +require "google/cloud/apigee_registry/v1/provisioning" + +class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + 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_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_id = "hello world" + instance = {} + + create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_instance, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["instance_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Instance), request["instance"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_instance_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_instance parent: parent, instance_id: instance_id, instance: instance do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_instance ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_instance(::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_instance_client_stub.call_rpc_count + end + end + + def test_delete_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_instance, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_instance({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_instance name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_instance ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_instance({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_instance(::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.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_instance_client_stub.call_rpc_count + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Instance.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_instance ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_instance({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::ApigeeRegistry::V1::Provisioning::Client.new do |config| + 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::ApigeeRegistry::V1::Provisioning::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::ApigeeRegistry::V1::Provisioning::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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::ApigeeRegistry::V1::Provisioning::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb new file mode 100644 index 000000000000..1a7ce8fd65fe --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/apigee_registry/v1/registry" + +class ::Google::Cloud::ApigeeRegistry::V1::Registry::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_api_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.api_path project: "value0", location: "value1", api: "value2" + assert_equal "projects/value0/locations/value1/apis/value2", path + end + end + + def test_api_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.api_deployment_path project: "value0", location: "value1", api: "value2", deployment: "value3" + assert_equal "projects/value0/locations/value1/apis/value2/deployments/value3", path + end + end + + def test_api_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.api_spec_path project: "value0", location: "value1", api: "value2", version: "value3", spec: "value4" + assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/specs/value4", path + end + end + + def test_api_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::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.api_version_path project: "value0", location: "value1", api: "value2", version: "value3" + assert_equal "projects/value0/locations/value1/apis/value2/versions/value3", path + end + end + + def test_artifact_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.artifact_path project: "value0", location: "value1", artifact: "value2" + assert_equal "projects/value0/locations/value1/artifacts/value2", path + + path = client.artifact_path project: "value0", location: "value1", api: "value2", artifact: "value3" + assert_equal "projects/value0/locations/value1/apis/value2/artifacts/value3", path + + path = client.artifact_path project: "value0", location: "value1", api: "value2", version: "value3", artifact: "value4" + assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/artifacts/value4", path + + path = client.artifact_path project: "value0", location: "value1", api: "value2", version: "value3", spec: "value4", artifact: "value5" + assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/specs/value4/artifacts/value5", path + + path = client.artifact_path project: "value0", location: "value1", api: "value2", deployment: "value3", artifact: "value4" + assert_equal "projects/value0/locations/value1/apis/value2/deployments/value3/artifacts/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::ApigeeRegistry::V1::Registry::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-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb new file mode 100644 index 000000000000..7c644ec0043d --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb @@ -0,0 +1,2034 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/apigeeregistry/v1/registry_service_pb" +require "google/cloud/apigee_registry/v1/registry/rest" + + +class ::Google::Cloud::ApigeeRegistry::V1::Registry::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_apis + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.new + http_response = OpenStruct.new 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_apis_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_apis_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_apis_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_apis({ 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 + client.list_apis 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 + client.list_apis ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.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 + client.list_apis({ 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 + client.list_apis(::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.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_apis_client_stub.call_count + end + end + end + + def test_get_api + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_api_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_api({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_api name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_api ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_api({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_api(::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_api_client_stub.call_count + end + end + end + + def test_create_api + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + api = {} + api_id = "hello world" + + create_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_api_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_api({ parent: parent, api: api, api_id: api_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_api parent: parent, api: api, api_id: api_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_api ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_api({ parent: parent, api: api, api_id: api_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_api(::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_api_client_stub.call_count + end + end + end + + def test_update_api + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + api = {} + update_mask = {} + allow_missing = true + + update_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_api_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_api api: api, update_mask: update_mask, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_api ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_api(::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_api_client_stub.call_count + end + end + end + + def test_delete_api + # 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_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_api_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_api({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_api name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_api ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_api({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_api(::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.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_api_client_stub.call_count + end + end + end + + def test_list_api_versions + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.new + http_response = OpenStruct.new 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_api_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_api_versions_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_api_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_api_versions ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.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 + client.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_api_versions(::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.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_api_versions_client_stub.call_count + end + end + end + + def test_get_api_version + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_api_version_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_api_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_api_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_api_version ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_api_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_api_version(::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_api_version_client_stub.call_count + end + end + end + + def test_create_api_version + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + api_version = {} + api_version_id = "hello world" + + create_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_api_version_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_api_version parent: parent, api_version: api_version, api_version_id: api_version_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_api_version ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_api_version(::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_api_version_client_stub.call_count + end + end + end + + def test_update_api_version + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + api_version = {} + update_mask = {} + allow_missing = true + + update_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_api_version_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_api_version api_version: api_version, update_mask: update_mask, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_api_version ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_api_version(::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_api_version_client_stub.call_count + end + end + end + + def test_delete_api_version + # 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_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_api_version_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_api_version({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_api_version name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_api_version ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_api_version({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_api_version(::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.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_api_version_client_stub.call_count + end + end + end + + def test_list_api_specs + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.new + http_response = OpenStruct.new 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_api_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_specs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_api_specs_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_api_specs({ 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 + client.list_api_specs 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 + client.list_api_specs ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.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 + client.list_api_specs({ 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 + client.list_api_specs(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.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_api_specs_client_stub.call_count + end + end + end + + def test_get_api_spec + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_api_spec({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_api_spec name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_api_spec ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_api_spec({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_api_spec(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_api_spec_client_stub.call_count + end + end + end + + def test_get_api_spec_contents + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_spec_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_spec_contents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_api_spec_contents_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_api_spec_contents({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_api_spec_contents name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_api_spec_contents ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_api_spec_contents({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_api_spec_contents(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_api_spec_contents_client_stub.call_count + end + end + end + + def test_create_api_spec + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + api_spec = {} + api_spec_id = "hello world" + + create_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_api_spec parent: parent, api_spec: api_spec, api_spec_id: api_spec_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_api_spec ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_api_spec(::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_api_spec_client_stub.call_count + end + end + end + + def test_update_api_spec + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + api_spec = {} + update_mask = {} + allow_missing = true + + update_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_api_spec api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_api_spec ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_api_spec(::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_api_spec_client_stub.call_count + end + end + end + + def test_delete_api_spec + # 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_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_api_spec({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_api_spec name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_api_spec ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_api_spec({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_api_spec(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.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_api_spec_client_stub.call_count + end + end + end + + def test_tag_api_spec_revision + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + tag = "hello world" + + tag_api_spec_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_tag_api_spec_revision_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, tag_api_spec_revision_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.tag_api_spec_revision({ name: name, tag: tag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.tag_api_spec_revision name: name, tag: tag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.tag_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.tag_api_spec_revision({ name: name, tag: tag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.tag_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, tag_api_spec_revision_client_stub.call_count + end + end + end + + def test_list_api_spec_revisions + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.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_api_spec_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::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_spec_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_api_spec_revisions_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_api_spec_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_api_spec_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_api_spec_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.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_api_spec_revisions_client_stub.call_count + end + end + end + + def test_rollback_api_spec + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.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" + + rollback_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_rollback_api_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rollback_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rollback_api_spec({ name: name, revision_id: revision_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rollback_api_spec name: name, revision_id: revision_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rollback_api_spec ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new(name: name, revision_id: revision_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rollback_api_spec({ name: name, revision_id: revision_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rollback_api_spec(::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.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, rollback_api_spec_client_stub.call_count + end + end + end + + def test_delete_api_spec_revision + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_api_spec_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_spec_revision_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_api_spec_revision_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_api_spec_revision({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_api_spec_revision name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_api_spec_revision({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_api_spec_revision_client_stub.call_count + end + end + end + + def test_list_api_deployments + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.new + http_response = OpenStruct.new 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_api_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_api_deployments_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_api_deployments({ 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 + client.list_api_deployments 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 + client.list_api_deployments ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.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 + client.list_api_deployments({ 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 + client.list_api_deployments(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.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_api_deployments_client_stub.call_count + end + end + end + + def test_get_api_deployment + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_api_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_api_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_api_deployment ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_api_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_api_deployment(::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_api_deployment_client_stub.call_count + end + end + end + + def test_create_api_deployment + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + api_deployment = {} + api_deployment_id = "hello world" + + create_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_api_deployment parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_api_deployment ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_api_deployment(::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_api_deployment_client_stub.call_count + end + end + end + + def test_update_api_deployment + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + api_deployment = {} + update_mask = {} + allow_missing = true + + update_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_api_deployment api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_api_deployment ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_api_deployment(::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_api_deployment_client_stub.call_count + end + end + end + + def test_delete_api_deployment + # 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_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_api_deployment({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_api_deployment name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_api_deployment ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_api_deployment({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_api_deployment(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.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_api_deployment_client_stub.call_count + end + end + end + + def test_tag_api_deployment_revision + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + tag = "hello world" + + tag_api_deployment_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_tag_api_deployment_revision_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, tag_api_deployment_revision_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.tag_api_deployment_revision({ name: name, tag: tag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.tag_api_deployment_revision name: name, tag: tag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.tag_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.tag_api_deployment_revision({ name: name, tag: tag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.tag_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, tag_api_deployment_revision_client_stub.call_count + end + end + end + + def test_list_api_deployment_revisions + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.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_api_deployment_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::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_deployment_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_api_deployment_revisions_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_api_deployment_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_api_deployment_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_api_deployment_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.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_api_deployment_revisions_client_stub.call_count + end + end + end + + def test_rollback_api_deployment + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.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" + + rollback_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_rollback_api_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rollback_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rollback_api_deployment({ name: name, revision_id: revision_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rollback_api_deployment name: name, revision_id: revision_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rollback_api_deployment ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new(name: name, revision_id: revision_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rollback_api_deployment({ name: name, revision_id: revision_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rollback_api_deployment(::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.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, rollback_api_deployment_client_stub.call_count + end + end + end + + def test_delete_api_deployment_revision + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_api_deployment_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_deployment_revision_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_api_deployment_revision_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_api_deployment_revision({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_api_deployment_revision name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_api_deployment_revision({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_api_deployment_revision_client_stub.call_count + end + end + end + + def test_list_artifacts + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.new + http_response = OpenStruct.new 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_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_artifacts({ 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 + client.list_artifacts 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 + client.list_artifacts ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.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 + client.list_artifacts({ 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 + client.list_artifacts(::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.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_artifacts_client_stub.call_count + end + end + end + + def test_get_artifact + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_artifact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_artifact_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_artifact({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_artifact name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_artifact ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_artifact({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_artifact(::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_artifact_client_stub.call_count + end + end + end + + def test_get_artifact_contents + # Create test objects. + client_result = ::Google::Api::HttpBody.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_artifact_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_artifact_contents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_artifact_contents_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_artifact_contents({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_artifact_contents name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_artifact_contents ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_artifact_contents({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_artifact_contents(::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_artifact_contents_client_stub.call_count + end + end + end + + def test_create_artifact + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + artifact = {} + artifact_id = "hello world" + + create_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_artifact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_artifact_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_artifact parent: parent, artifact: artifact, artifact_id: artifact_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_artifact ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_artifact(::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_artifact_client_stub.call_count + end + end + end + + def test_replace_artifact + # Create test objects. + client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + artifact = {} + + replace_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_replace_artifact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, replace_artifact_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.replace_artifact({ artifact: artifact }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.replace_artifact artifact: artifact do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.replace_artifact ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.replace_artifact({ artifact: artifact }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.replace_artifact(::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, replace_artifact_client_stub.call_count + end + end + end + + def test_delete_artifact + # 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_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_artifact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_artifact_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_artifact({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_artifact name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_artifact ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_artifact({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_artifact(::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_artifact_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::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::ApigeeRegistry::V1::Registry::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb new file mode 100644 index 000000000000..19a19336c35f --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb @@ -0,0 +1,2259 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/apigeeregistry/v1/registry_service_pb" +require "google/cloud/apigee_registry/v1/registry" + +class ::Google::Cloud::ApigeeRegistry::V1::Registry::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_apis + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_apis_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_apis, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, 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_apis_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_apis({ 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 + client.list_apis 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 + client.list_apis ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.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 + client.list_apis({ 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 + client.list_apis(::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.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_apis_client_stub.call_rpc_count + end + end + + def test_get_api + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_api, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_api_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_api({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_api name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_api ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_api({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_api(::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_api_client_stub.call_rpc_count + end + end + + def test_create_api + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + api = {} + api_id = "hello world" + + create_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_api, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Api), request["api"] + assert_equal "hello world", request["api_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_api_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_api({ parent: parent, api: api, api_id: api_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_api parent: parent, api: api, api_id: api_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_api ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_api({ parent: parent, api: api, api_id: api_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_api(::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_api_client_stub.call_rpc_count + end + end + + def test_update_api + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + api = {} + update_mask = {} + allow_missing = true + + update_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_api, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Api), request["api"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_api_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_api api: api, update_mask: update_mask, allow_missing: allow_missing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_api ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_api(::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_api_client_stub.call_rpc_count + end + end + + def test_delete_api + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_api, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_api_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_api({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_api name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_api ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_api({ 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 + client.delete_api(::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.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_api_client_stub.call_rpc_count + end + end + + def test_list_api_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_api_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_api_versions, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, 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_api_versions_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_api_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_api_versions ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.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 + client.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_api_versions(::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.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_api_versions_client_stub.call_rpc_count + end + end + + def test_get_api_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_api_version, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_api_version_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_api_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_api_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_api_version ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_api_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_api_version(::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_api_version_client_stub.call_rpc_count + end + end + + def test_create_api_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + api_version = {} + api_version_id = "hello world" + + create_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_api_version, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiVersion), request["api_version"] + assert_equal "hello world", request["api_version_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_api_version_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_api_version parent: parent, api_version: api_version, api_version_id: api_version_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_api_version ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_api_version(::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_api_version_client_stub.call_rpc_count + end + end + + def test_update_api_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + api_version = {} + update_mask = {} + allow_missing = true + + update_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_api_version, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiVersion), request["api_version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_api_version_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_api_version api_version: api_version, update_mask: update_mask, allow_missing: allow_missing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_api_version ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_api_version(::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_api_version_client_stub.call_rpc_count + end + end + + def test_delete_api_version + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_api_version, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_api_version_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_api_version({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_api_version name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_api_version ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_api_version({ 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 + client.delete_api_version(::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.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_api_version_client_stub.call_rpc_count + end + end + + def test_list_api_specs + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_api_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_api_specs, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, 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_api_specs_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_api_specs({ 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 + client.list_api_specs 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 + client.list_api_specs ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.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 + client.list_api_specs({ 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 + client.list_api_specs(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.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_api_specs_client_stub.call_rpc_count + end + end + + def test_get_api_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_api_spec, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_api_spec({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_api_spec name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_api_spec ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_api_spec({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_api_spec(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_api_spec_client_stub.call_rpc_count + end + end + + def test_get_api_spec_contents + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_spec_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_api_spec_contents, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_api_spec_contents_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_api_spec_contents({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_api_spec_contents name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_api_spec_contents ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_api_spec_contents({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_api_spec_contents(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_api_spec_contents_client_stub.call_rpc_count + end + end + + def test_create_api_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + api_spec = {} + api_spec_id = "hello world" + + create_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_api_spec, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiSpec), request["api_spec"] + assert_equal "hello world", request["api_spec_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_api_spec parent: parent, api_spec: api_spec, api_spec_id: api_spec_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_api_spec ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_api_spec(::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_api_spec_client_stub.call_rpc_count + end + end + + def test_update_api_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + api_spec = {} + update_mask = {} + allow_missing = true + + update_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_api_spec, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiSpec), request["api_spec"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_api_spec api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_api_spec ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_api_spec(::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_api_spec_client_stub.call_rpc_count + end + end + + def test_delete_api_spec + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_api_spec, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_api_spec({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_api_spec name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_api_spec ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_api_spec({ 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 + client.delete_api_spec(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.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_api_spec_client_stub.call_rpc_count + end + end + + def test_tag_api_spec_revision + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + tag = "hello world" + + tag_api_spec_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :tag_api_spec_revision, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["tag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, tag_api_spec_revision_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.tag_api_spec_revision({ name: name, tag: tag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.tag_api_spec_revision name: name, tag: tag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.tag_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.tag_api_spec_revision({ name: name, tag: tag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.tag_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, tag_api_spec_revision_client_stub.call_rpc_count + end + end + + def test_list_api_spec_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_api_spec_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_api_spec_revisions, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, 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_api_spec_revisions_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_api_spec_revisions name: name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_api_spec_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_api_spec_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.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_api_spec_revisions_client_stub.call_rpc_count + end + end + + def test_rollback_api_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + rollback_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rollback_api_spec, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["revision_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rollback_api_spec_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rollback_api_spec({ name: name, revision_id: revision_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rollback_api_spec name: name, revision_id: revision_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rollback_api_spec ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new(name: name, revision_id: revision_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rollback_api_spec({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rollback_api_spec(::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.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, rollback_api_spec_client_stub.call_rpc_count + end + end + + def test_delete_api_spec_revision + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_api_spec_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_api_spec_revision, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_api_spec_revision_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_api_spec_revision({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_api_spec_revision name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_api_spec_revision({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(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_api_spec_revision_client_stub.call_rpc_count + end + end + + def test_list_api_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_api_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_api_deployments, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, 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_api_deployments_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_api_deployments({ 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 + client.list_api_deployments 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 + client.list_api_deployments ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.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 + client.list_api_deployments({ 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 + client.list_api_deployments(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.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_api_deployments_client_stub.call_rpc_count + end + end + + def test_get_api_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_api_deployment, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_api_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_api_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_api_deployment ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_api_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_api_deployment(::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_api_deployment_client_stub.call_rpc_count + end + end + + def test_create_api_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + api_deployment = {} + api_deployment_id = "hello world" + + create_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_api_deployment, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment), request["api_deployment"] + assert_equal "hello world", request["api_deployment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_api_deployment parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_api_deployment ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_api_deployment(::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_api_deployment_client_stub.call_rpc_count + end + end + + def test_update_api_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + api_deployment = {} + update_mask = {} + allow_missing = true + + update_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_api_deployment, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment), request["api_deployment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_api_deployment api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_api_deployment ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_api_deployment(::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_api_deployment_client_stub.call_rpc_count + end + end + + def test_delete_api_deployment + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_api_deployment, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_api_deployment({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_api_deployment name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_api_deployment ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_api_deployment({ 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 + client.delete_api_deployment(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.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_api_deployment_client_stub.call_rpc_count + end + end + + def test_tag_api_deployment_revision + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + tag = "hello world" + + tag_api_deployment_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :tag_api_deployment_revision, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["tag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, tag_api_deployment_revision_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.tag_api_deployment_revision({ name: name, tag: tag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.tag_api_deployment_revision name: name, tag: tag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.tag_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.tag_api_deployment_revision({ name: name, tag: tag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.tag_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, tag_api_deployment_revision_client_stub.call_rpc_count + end + end + + def test_list_api_deployment_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_api_deployment_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_api_deployment_revisions, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, 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_api_deployment_revisions_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_api_deployment_revisions name: name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_api_deployment_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_api_deployment_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.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_api_deployment_revisions_client_stub.call_rpc_count + end + end + + def test_rollback_api_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + rollback_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rollback_api_deployment, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["revision_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rollback_api_deployment_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rollback_api_deployment({ name: name, revision_id: revision_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rollback_api_deployment name: name, revision_id: revision_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rollback_api_deployment ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new(name: name, revision_id: revision_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rollback_api_deployment({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rollback_api_deployment(::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.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, rollback_api_deployment_client_stub.call_rpc_count + end + end + + def test_delete_api_deployment_revision + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_api_deployment_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_api_deployment_revision, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_api_deployment_revision_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_api_deployment_revision({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_api_deployment_revision name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_api_deployment_revision({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(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_api_deployment_revision_client_stub.call_rpc_count + end + end + + def test_list_artifacts + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_artifacts, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, 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_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_artifacts({ 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 + client.list_artifacts 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 + client.list_artifacts ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.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 + client.list_artifacts({ 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 + client.list_artifacts(::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.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_artifacts_client_stub.call_rpc_count + end + end + + def test_get_artifact + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_artifact, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_artifact_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_artifact({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_artifact name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_artifact ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_artifact({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_artifact(::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_artifact_client_stub.call_rpc_count + end + end + + def test_get_artifact_contents + # Create GRPC objects. + grpc_response = ::Google::Api::HttpBody.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_artifact_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_artifact_contents, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_artifact_contents_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_artifact_contents({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_artifact_contents name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_artifact_contents ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_artifact_contents({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_artifact_contents(::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_artifact_contents_client_stub.call_rpc_count + end + end + + def test_create_artifact + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + artifact = {} + artifact_id = "hello world" + + create_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_artifact, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Artifact), request["artifact"] + assert_equal "hello world", request["artifact_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_artifact_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_artifact parent: parent, artifact: artifact, artifact_id: artifact_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_artifact ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_artifact(::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_artifact_client_stub.call_rpc_count + end + end + + def test_replace_artifact + # Create GRPC objects. + grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + artifact = {} + + replace_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :replace_artifact, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Artifact), request["artifact"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, replace_artifact_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.replace_artifact({ artifact: artifact }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.replace_artifact artifact: artifact do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.replace_artifact ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.replace_artifact({ artifact: artifact }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.replace_artifact(::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, replace_artifact_client_stub.call_rpc_count + end + end + + def test_delete_artifact + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_artifact, name + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_artifact_client_stub do + # Create client + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_artifact({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_artifact name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_artifact ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_artifact({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_artifact(::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(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_artifact_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| + 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::ApigeeRegistry::V1::Registry::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::ApigeeRegistry::V1::Registry::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Registry::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/helper.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-apigee_registry-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-app_engine-v1/.gitignore b/owl-bot-staging/google-cloud-app_engine-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-app_engine-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-app_engine-v1/.repo-metadata.json new file mode 100644 index 000000000000..39c66675fa84 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "appengine.googleapis.com", + "api_shortname": "appengine", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-app_engine-v1/latest", + "distribution_name": "google-cloud-app_engine-v1", + "is_cloud": true, + "language": "ruby", + "name": "appengine", + "name_pretty": "App Engine Admin V1 API", + "product_documentation": "https://cloud.google.com/appengine/docs/admin-api/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The App Engine Admin API provisions and manages your App Engine applications. Note that google-cloud-app_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_engine instead. See the readme for more details.", + "ruby-cloud-env-prefix": "APP_ENGINE", + "ruby-cloud-product-url": "https://cloud.google.com/appengine/docs/admin-api/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-app_engine-v1/.rubocop.yml b/owl-bot-staging/google-cloud-app_engine-v1/.rubocop.yml new file mode 100644 index 000000000000..720182a7512b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-app_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-cloud-app_engine-v1.rb" diff --git a/owl-bot-staging/google-cloud-app_engine-v1/.toys.rb b/owl-bot-staging/google-cloud-app_engine-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/.yardopts b/owl-bot-staging/google-cloud-app_engine-v1/.yardopts new file mode 100644 index 000000000000..86db5abb562d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="App Engine Admin V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-app_engine-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-app_engine-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..ab133c04ffac --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-app_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-cloud-app_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/cloud/app_engine/v1" + +client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/app_engine/v1" + +::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AppEngine::V1::Applications::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-app_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/cloud/app_engine/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AppEngine::V1::Applications::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-app_engine-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-app_engine-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-app_engine-v1/Gemfile b/owl-bot-staging/google-cloud-app_engine-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-app_engine-v1/LICENSE.md b/owl-bot-staging/google-cloud-app_engine-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/README.md b/owl-bot-staging/google-cloud-app_engine-v1/README.md new file mode 100644 index 000000000000..32956c5fb1d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the App Engine Admin V1 API + +Provisions and manages developers' App Engine applications. + +The App Engine Admin API provisions and manages your App Engine applications. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the App Engine Admin V1 API. Most users should consider using +the main client gem, +[google-cloud-app_engine](https://rubygems.org/gems/google-cloud-app_engine). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-app_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/appengine.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/app_engine/v1" + +client = ::Google::Cloud::AppEngine::V1::Applications::Client.new +request = ::Google::Cloud::AppEngine::V1::GetApplicationRequest.new # (request fields as keyword arguments...) +response = client.get_application request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-app_engine-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/appengine/docs/admin-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/cloud/app_engine/v1" +require "logger" + +client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-app_engine`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-app_engine-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-app_engine`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-app_engine-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-app_engine-v1/Rakefile b/owl-bot-staging/google-cloud-app_engine-v1/Rakefile new file mode 100644 index 000000000000..695ad6efa78c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["APP_ENGINE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["APP_ENGINE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["APP_ENGINE_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or APP_ENGINE_TEST_PROJECT=test123 APP_ENGINE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/app_engine/v1/applications/credentials" + ::Google::Cloud::AppEngine::V1::Applications::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["APP_ENGINE_PROJECT"] = project + ENV["APP_ENGINE_TEST_PROJECT"] = project + ENV["APP_ENGINE_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-app_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-cloud-app_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-cloud-app_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-cloud-app_engine-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-app_engine-v1" + header "google-cloud-app_engine-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-app_engine-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-app_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-cloud-app_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-cloud-app_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-cloud-app_engine-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-app_engine-v1/gapic_metadata.json new file mode 100644 index 000000000000..24e44df0c398 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/gapic_metadata.json @@ -0,0 +1,251 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.appengine.v1", + "libraryPackage": "::Google::Cloud::AppEngine::V1", + "services": { + "Applications": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppEngine::V1::Applications::Client", + "rpcs": { + "GetApplication": { + "methods": [ + "get_application" + ] + }, + "CreateApplication": { + "methods": [ + "create_application" + ] + }, + "UpdateApplication": { + "methods": [ + "update_application" + ] + }, + "RepairApplication": { + "methods": [ + "repair_application" + ] + } + } + } + } + }, + "Services": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppEngine::V1::Services::Client", + "rpcs": { + "ListServices": { + "methods": [ + "list_services" + ] + }, + "GetService": { + "methods": [ + "get_service" + ] + }, + "UpdateService": { + "methods": [ + "update_service" + ] + }, + "DeleteService": { + "methods": [ + "delete_service" + ] + } + } + } + } + }, + "Versions": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppEngine::V1::Versions::Client", + "rpcs": { + "ListVersions": { + "methods": [ + "list_versions" + ] + }, + "GetVersion": { + "methods": [ + "get_version" + ] + }, + "CreateVersion": { + "methods": [ + "create_version" + ] + }, + "UpdateVersion": { + "methods": [ + "update_version" + ] + }, + "DeleteVersion": { + "methods": [ + "delete_version" + ] + } + } + } + } + }, + "Instances": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppEngine::V1::Instances::Client", + "rpcs": { + "ListInstances": { + "methods": [ + "list_instances" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + }, + "DeleteInstance": { + "methods": [ + "delete_instance" + ] + }, + "DebugInstance": { + "methods": [ + "debug_instance" + ] + } + } + } + } + }, + "Firewall": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppEngine::V1::Firewall::Client", + "rpcs": { + "ListIngressRules": { + "methods": [ + "list_ingress_rules" + ] + }, + "BatchUpdateIngressRules": { + "methods": [ + "batch_update_ingress_rules" + ] + }, + "CreateIngressRule": { + "methods": [ + "create_ingress_rule" + ] + }, + "GetIngressRule": { + "methods": [ + "get_ingress_rule" + ] + }, + "UpdateIngressRule": { + "methods": [ + "update_ingress_rule" + ] + }, + "DeleteIngressRule": { + "methods": [ + "delete_ingress_rule" + ] + } + } + } + } + }, + "AuthorizedDomains": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client", + "rpcs": { + "ListAuthorizedDomains": { + "methods": [ + "list_authorized_domains" + ] + } + } + } + } + }, + "AuthorizedCertificates": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client", + "rpcs": { + "ListAuthorizedCertificates": { + "methods": [ + "list_authorized_certificates" + ] + }, + "GetAuthorizedCertificate": { + "methods": [ + "get_authorized_certificate" + ] + }, + "CreateAuthorizedCertificate": { + "methods": [ + "create_authorized_certificate" + ] + }, + "UpdateAuthorizedCertificate": { + "methods": [ + "update_authorized_certificate" + ] + }, + "DeleteAuthorizedCertificate": { + "methods": [ + "delete_authorized_certificate" + ] + } + } + } + } + }, + "DomainMappings": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppEngine::V1::DomainMappings::Client", + "rpcs": { + "ListDomainMappings": { + "methods": [ + "list_domain_mappings" + ] + }, + "GetDomainMapping": { + "methods": [ + "get_domain_mapping" + ] + }, + "CreateDomainMapping": { + "methods": [ + "create_domain_mapping" + ] + }, + "UpdateDomainMapping": { + "methods": [ + "update_domain_mapping" + ] + }, + "DeleteDomainMapping": { + "methods": [ + "delete_domain_mapping" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec b/owl-bot-staging/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec new file mode 100644 index 000000000000..2ce2db6e9908 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/app_engine/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-app_engine-v1" + gem.version = Google::Cloud::AppEngine::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The App Engine Admin API provisions and manages your App Engine applications. Note that google-cloud-app_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_engine instead. See the readme for more details." + gem.summary = "Provisions and manages developers' App Engine applications." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google-cloud-app_engine-v1.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google-cloud-app_engine-v1.rb new file mode 100644 index 000000000000..6e59fa6bcf35 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google-cloud-app_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/cloud/app_engine/v1" diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/app_yaml_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/app_yaml_pb.rb new file mode 100644 index 000000000000..6c16bcbffe41 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/app_yaml_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/app_yaml.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n\"google/appengine/v1/app_yaml.proto\x12\x13google.appengine.v1\x1a\x1egoogle/protobuf/duration.proto\"\xe0\x01\n\x10\x41piConfigHandler\x12=\n\x10\x61uth_fail_action\x18\x01 \x01(\x0e\x32#.google.appengine.v1.AuthFailAction\x12\x34\n\x05login\x18\x02 \x01(\x0e\x32%.google.appengine.v1.LoginRequirement\x12\x0e\n\x06script\x18\x03 \x01(\t\x12:\n\x0esecurity_level\x18\x04 \x01(\x0e\x32\".google.appengine.v1.SecurityLevel\x12\x0b\n\x03url\x18\x05 \x01(\t\"\x8f\x02\n\x0c\x45rrorHandler\x12?\n\nerror_code\x18\x01 \x01(\x0e\x32+.google.appengine.v1.ErrorHandler.ErrorCode\x12\x13\n\x0bstatic_file\x18\x02 \x01(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\"\x95\x01\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45RROR_CODE_DEFAULT\x10\x00\x12\x19\n\x15\x45RROR_CODE_OVER_QUOTA\x10\x01\x12\x1d\n\x19\x45RROR_CODE_DOS_API_DENIAL\x10\x02\x12\x16\n\x12\x45RROR_CODE_TIMEOUT\x10\x03\x1a\x02\x10\x01\"\xcd\x05\n\x06UrlMap\x12\x11\n\turl_regex\x18\x01 \x01(\t\x12?\n\x0cstatic_files\x18\x02 \x01(\x0b\x32\'.google.appengine.v1.StaticFilesHandlerH\x00\x12\x34\n\x06script\x18\x03 \x01(\x0b\x32\".google.appengine.v1.ScriptHandlerH\x00\x12?\n\x0c\x61pi_endpoint\x18\x04 \x01(\x0b\x32\'.google.appengine.v1.ApiEndpointHandlerH\x00\x12:\n\x0esecurity_level\x18\x05 \x01(\x0e\x32\".google.appengine.v1.SecurityLevel\x12\x34\n\x05login\x18\x06 \x01(\x0e\x32%.google.appengine.v1.LoginRequirement\x12=\n\x10\x61uth_fail_action\x18\x07 \x01(\x0e\x32#.google.appengine.v1.AuthFailAction\x12Y\n\x1bredirect_http_response_code\x18\x08 \x01(\x0e\x32\x34.google.appengine.v1.UrlMap.RedirectHttpResponseCode\"\xdb\x01\n\x18RedirectHttpResponseCode\x12+\n\'REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED\x10\x00\x12#\n\x1fREDIRECT_HTTP_RESPONSE_CODE_301\x10\x01\x12#\n\x1fREDIRECT_HTTP_RESPONSE_CODE_302\x10\x02\x12#\n\x1fREDIRECT_HTTP_RESPONSE_CODE_303\x10\x03\x12#\n\x1fREDIRECT_HTTP_RESPONSE_CODE_307\x10\x04\x42\x0e\n\x0chandler_type\"\xc0\x02\n\x12StaticFilesHandler\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x19\n\x11upload_path_regex\x18\x02 \x01(\t\x12N\n\x0chttp_headers\x18\x03 \x03(\x0b\x32\x38.google.appengine.v1.StaticFilesHandler.HttpHeadersEntry\x12\x11\n\tmime_type\x18\x04 \x01(\t\x12-\n\nexpiration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1d\n\x15require_matching_file\x18\x06 \x01(\x08\x12\x1c\n\x14\x61pplication_readable\x18\x07 \x01(\x08\x1a\x32\n\x10HttpHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"$\n\rScriptHandler\x12\x13\n\x0bscript_path\x18\x01 \x01(\t\")\n\x12\x41piEndpointHandler\x12\x13\n\x0bscript_path\x18\x01 \x01(\t\"\xeb\x01\n\x0bHealthCheck\x12\x1c\n\x14\x64isable_health_check\x18\x01 \x01(\x08\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x19\n\x11healthy_threshold\x18\x03 \x01(\r\x12\x1b\n\x13unhealthy_threshold\x18\x04 \x01(\r\x12\x19\n\x11restart_threshold\x18\x05 \x01(\r\x12\x31\n\x0e\x63heck_interval\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xf7\x01\n\x0eReadinessCheck\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x19\n\x11\x66\x61ilure_threshold\x18\x03 \x01(\r\x12\x19\n\x11success_threshold\x18\x04 \x01(\r\x12\x31\n\x0e\x63heck_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11\x61pp_start_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xf2\x01\n\rLivenessCheck\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x19\n\x11\x66\x61ilure_threshold\x18\x03 \x01(\r\x12\x19\n\x11success_threshold\x18\x04 \x01(\r\x12\x31\n\x0e\x63heck_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x30\n\rinitial_delay\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"(\n\x07Library\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t*t\n\x0e\x41uthFailAction\x12 \n\x1c\x41UTH_FAIL_ACTION_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41UTH_FAIL_ACTION_REDIRECT\x10\x01\x12!\n\x1d\x41UTH_FAIL_ACTION_UNAUTHORIZED\x10\x02*b\n\x10LoginRequirement\x12\x15\n\x11LOGIN_UNSPECIFIED\x10\x00\x12\x12\n\x0eLOGIN_OPTIONAL\x10\x01\x12\x0f\n\x0bLOGIN_ADMIN\x10\x02\x12\x12\n\x0eLOGIN_REQUIRED\x10\x03*y\n\rSecurityLevel\x12\x16\n\x12SECURE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSECURE_DEFAULT\x10\x00\x12\x10\n\x0cSECURE_NEVER\x10\x01\x12\x13\n\x0fSECURE_OPTIONAL\x10\x02\x12\x11\n\rSECURE_ALWAYS\x10\x03\x1a\x02\x10\x01\x42\xbd\x01\n\x17\x63om.google.appengine.v1B\x0c\x41ppYamlProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + ApiConfigHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ApiConfigHandler").msgclass + ErrorHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ErrorHandler").msgclass + ErrorHandler::ErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ErrorHandler.ErrorCode").enummodule + UrlMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UrlMap").msgclass + UrlMap::RedirectHttpResponseCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UrlMap.RedirectHttpResponseCode").enummodule + StaticFilesHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.StaticFilesHandler").msgclass + ScriptHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ScriptHandler").msgclass + ApiEndpointHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ApiEndpointHandler").msgclass + HealthCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.HealthCheck").msgclass + ReadinessCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ReadinessCheck").msgclass + LivenessCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.LivenessCheck").msgclass + Library = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Library").msgclass + AuthFailAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuthFailAction").enummodule + LoginRequirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.LoginRequirement").enummodule + SecurityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.SecurityLevel").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_pb.rb new file mode 100644 index 000000000000..f320233132ef --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_pb.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/appengine.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/appengine/v1/application_pb' +require 'google/appengine/v1/certificate_pb' +require 'google/appengine/v1/domain_pb' +require 'google/appengine/v1/domain_mapping_pb' +require 'google/appengine/v1/firewall_pb' +require 'google/appengine/v1/instance_pb' +require 'google/appengine/v1/service_pb' +require 'google/appengine/v1/version_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n#google/appengine/v1/appengine.proto\x12\x13google.appengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a%google/appengine/v1/application.proto\x1a%google/appengine/v1/certificate.proto\x1a google/appengine/v1/domain.proto\x1a(google/appengine/v1/domain_mapping.proto\x1a\"google/appengine/v1/firewall.proto\x1a\"google/appengine/v1/instance.proto\x1a!google/appengine/v1/service.proto\x1a!google/appengine/v1/version.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"%\n\x15GetApplicationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"Q\n\x18\x43reateApplicationRequest\x12\x35\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32 .google.appengine.v1.Application\"\x90\x01\n\x18UpdateApplicationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32 .google.appengine.v1.Application\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"(\n\x18RepairApplicationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"L\n\x13ListServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"_\n\x14ListServicesResponse\x12.\n\x08services\x18\x01 \x03(\x0b\x32\x1c.google.appengine.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"!\n\x11GetServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9d\x01\n\x14UpdateServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x07service\x18\x02 \x01(\x0b\x32\x1c.google.appengine.v1.Service\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x17\n\x0fmigrate_traffic\x18\x04 \x01(\x08\"$\n\x14\x44\x65leteServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"|\n\x13ListVersionsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12.\n\x04view\x18\x02 \x01(\x0e\x32 .google.appengine.v1.VersionView\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x14ListVersionsResponse\x12.\n\x08versions\x18\x01 \x03(\x0b\x32\x1c.google.appengine.v1.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\x04view\x18\x02 \x01(\x0e\x32 .google.appengine.v1.VersionView\"U\n\x14\x43reateVersionRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12-\n\x07version\x18\x02 \x01(\x0b\x32\x1c.google.appengine.v1.Version\"\x84\x01\n\x14UpdateVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x07version\x18\x02 \x01(\x0b\x32\x1c.google.appengine.v1.Version\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"$\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"M\n\x14ListInstancesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"b\n\x15ListInstancesResponse\x12\x30\n\tinstances\x18\x01 \x03(\x0b\x32\x1d.google.appengine.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\"\n\x12GetInstanceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"%\n\x15\x44\x65leteInstanceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"5\n\x14\x44\x65\x62ugInstanceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07ssh_key\x18\x02 \x01(\t\"j\n\x17ListIngressRulesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x18\n\x10matching_address\x18\x04 \x01(\t\"m\n\x18ListIngressRulesResponse\x12\x38\n\ringress_rules\x18\x01 \x03(\x0b\x32!.google.appengine.v1.FirewallRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1e\x42\x61tchUpdateIngressRulesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\ringress_rules\x18\x02 \x03(\x0b\x32!.google.appengine.v1.FirewallRule\"[\n\x1f\x42\x61tchUpdateIngressRulesResponse\x12\x38\n\ringress_rules\x18\x01 \x03(\x0b\x32!.google.appengine.v1.FirewallRule\"[\n\x18\x43reateIngressRuleRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12/\n\x04rule\x18\x02 \x01(\x0b\x32!.google.appengine.v1.FirewallRule\"%\n\x15GetIngressRuleRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x8a\x01\n\x18UpdateIngressRuleRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04rule\x18\x02 \x01(\x0b\x32!.google.appengine.v1.FirewallRule\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"(\n\x18\x44\x65leteIngressRuleRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"U\n\x1cListAuthorizedDomainsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"p\n\x1dListAuthorizedDomainsResponse\x12\x36\n\x07\x64omains\x18\x01 \x03(\x0b\x32%.google.appengine.v1.AuthorizedDomain\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x98\x01\n!ListAuthorizedCertificatesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12<\n\x04view\x18\x04 \x01(\x0e\x32..google.appengine.v1.AuthorizedCertificateView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x7f\n\"ListAuthorizedCertificatesResponse\x12@\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32*.google.appengine.v1.AuthorizedCertificate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"m\n\x1fGetAuthorizedCertificateRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x04view\x18\x02 \x01(\x0e\x32..google.appengine.v1.AuthorizedCertificateView\"u\n\"CreateAuthorizedCertificateRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12?\n\x0b\x63\x65rtificate\x18\x02 \x01(\x0b\x32*.google.appengine.v1.AuthorizedCertificate\"\xa4\x01\n\"UpdateAuthorizedCertificateRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x0b\x63\x65rtificate\x18\x02 \x01(\x0b\x32*.google.appengine.v1.AuthorizedCertificate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"2\n\"DeleteAuthorizedCertificateRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"R\n\x19ListDomainMappingsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x1aListDomainMappingsResponse\x12;\n\x0f\x64omain_mappings\x18\x01 \x03(\x0b\x32\".google.appengine.v1.DomainMapping\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\'\n\x17GetDomainMappingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xb0\x01\n\x1a\x43reateDomainMappingRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12:\n\x0e\x64omain_mapping\x18\x02 \x01(\x0b\x32\".google.appengine.v1.DomainMapping\x12\x46\n\x11override_strategy\x18\x04 \x01(\x0e\x32+.google.appengine.v1.DomainOverrideStrategy\"\x97\x01\n\x1aUpdateDomainMappingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x0e\x64omain_mapping\x18\x02 \x01(\x0b\x32\".google.appengine.v1.DomainMapping\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"*\n\x1a\x44\x65leteDomainMappingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t*\"\n\x0bVersionView\x12\t\n\x05\x42\x41SIC\x10\x00\x12\x08\n\x04\x46ULL\x10\x01*H\n\x19\x41uthorizedCertificateView\x12\x15\n\x11\x42\x41SIC_CERTIFICATE\x10\x00\x12\x14\n\x10\x46ULL_CERTIFICATE\x10\x01*\\\n\x16\x44omainOverrideStrategy\x12(\n$UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY\x10\x00\x12\n\n\x06STRICT\x10\x01\x12\x0c\n\x08OVERRIDE\x10\x02\x32\xd1\x06\n\x0c\x41pplications\x12\x80\x01\n\x0eGetApplication\x12*.google.appengine.v1.GetApplicationRequest\x1a .google.appengine.v1.Application\" \xda\x41\x04name\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/{name=apps/*}\x12\xa5\x01\n\x11\x43reateApplication\x12-.google.appengine.v1.CreateApplicationRequest\x1a\x1d.google.longrunning.Operation\"B\xca\x41\"\n\x0b\x41pplication\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x17\"\x08/v1/apps:\x0b\x61pplication\x12\xae\x01\n\x11UpdateApplication\x12-.google.appengine.v1.UpdateApplicationRequest\x1a\x1d.google.longrunning.Operation\"K\xca\x41\"\n\x0b\x41pplication\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02 2\x11/v1/{name=apps/*}:\x0b\x61pplication\x12\xab\x01\n\x11RepairApplication\x12-.google.appengine.v1.RepairApplicationRequest\x1a\x1d.google.longrunning.Operation\"H\xca\x41\"\n\x0b\x41pplication\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/{name=apps/*}:repair:\x01*\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\xa6\x06\n\x08Services\x12\x89\x01\n\x0cListServices\x12(.google.appengine.v1.ListServicesRequest\x1a).google.appengine.v1.ListServicesResponse\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{parent=apps/*}/services\x12x\n\nGetService\x12&.google.appengine.v1.GetServiceRequest\x1a\x1c.google.appengine.v1.Service\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=apps/*/services/*}\x12\xa9\x01\n\rUpdateService\x12).google.appengine.v1.UpdateServiceRequest\x1a\x1d.google.longrunning.Operation\"N\xca\x41\x1e\n\x07Service\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\'2\x1c/v1/{name=apps/*/services/*}:\x07service\x12\xae\x01\n\rDeleteService\x12).google.appengine.v1.DeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"S\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x1e*\x1c/v1/{name=apps/*/services/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\x8e\x08\n\x08Versions\x12\x94\x01\n\x0cListVersions\x12(.google.appengine.v1.ListVersionsRequest\x1a).google.appengine.v1.ListVersionsResponse\"/\x82\xd3\xe4\x93\x02)\x12\'/v1/{parent=apps/*/services/*}/versions\x12\x83\x01\n\nGetVersion\x12&.google.appengine.v1.GetVersionRequest\x1a\x1c.google.appengine.v1.Version\"/\x82\xd3\xe4\x93\x02)\x12\'/v1/{name=apps/*/services/*/versions/*}\x12\xb8\x01\n\rCreateVersion\x12).google.appengine.v1.CreateVersionRequest\x1a\x1d.google.longrunning.Operation\"]\xca\x41\"\n\x07Version\x12\x17\x43reateVersionMetadataV1\x82\xd3\xe4\x93\x02\x32\"\'/v1/{parent=apps/*/services/*}/versions:\x07version\x12\xb4\x01\n\rUpdateVersion\x12).google.appengine.v1.UpdateVersionRequest\x1a\x1d.google.longrunning.Operation\"Y\xca\x41\x1e\n\x07Version\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x32\x32\'/v1/{name=apps/*/services/*/versions/*}:\x07version\x12\xb9\x01\n\rDeleteVersion\x12).google.appengine.v1.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"^\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02)*\'/v1/{name=apps/*/services/*/versions/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\x8d\x07\n\tInstances\x12\xa3\x01\n\rListInstances\x12).google.appengine.v1.ListInstancesRequest\x1a*.google.appengine.v1.ListInstancesResponse\";\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=apps/*/services/*/versions/*}/instances\x12\x92\x01\n\x0bGetInstance\x12\'.google.appengine.v1.GetInstanceRequest\x1a\x1d.google.appengine.v1.Instance\";\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=apps/*/services/*/versions/*/instances/*}\x12\xc7\x01\n\x0e\x44\x65leteInstance\x12*.google.appengine.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x35*3/v1/{name=apps/*/services/*/versions/*/instances/*}\x12\xc1\x01\n\rDebugInstance\x12).google.appengine.v1.DebugInstanceRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41\x1f\n\x08Instance\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02>\"9/v1/{name=apps/*/services/*/versions/*/instances/*}:debug:\x01*\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\x96\t\n\x08\x46irewall\x12\xa2\x01\n\x10ListIngressRules\x12,.google.appengine.v1.ListIngressRulesRequest\x1a-.google.appengine.v1.ListIngressRulesResponse\"1\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=apps/*}/firewall/ingressRules\x12\xc4\x01\n\x17\x42\x61tchUpdateIngressRules\x12\x33.google.appengine.v1.BatchUpdateIngressRulesRequest\x1a\x34.google.appengine.v1.BatchUpdateIngressRulesResponse\">\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=apps/*/firewall/ingressRules}:batchUpdate:\x01*\x12\x9e\x01\n\x11\x43reateIngressRule\x12-.google.appengine.v1.CreateIngressRuleRequest\x1a!.google.appengine.v1.FirewallRule\"7\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=apps/*}/firewall/ingressRules:\x04rule\x12\x92\x01\n\x0eGetIngressRule\x12*.google.appengine.v1.GetIngressRuleRequest\x1a!.google.appengine.v1.FirewallRule\"1\x82\xd3\xe4\x93\x02+\x12)/v1/{name=apps/*/firewall/ingressRules/*}\x12\x9e\x01\n\x11UpdateIngressRule\x12-.google.appengine.v1.UpdateIngressRuleRequest\x1a!.google.appengine.v1.FirewallRule\"7\x82\xd3\xe4\x93\x02\x31\x32)/v1/{name=apps/*/firewall/ingressRules/*}:\x04rule\x12\x8d\x01\n\x11\x44\x65leteIngressRule\x12-.google.appengine.v1.DeleteIngressRuleRequest\x1a\x16.google.protobuf.Empty\"1\x82\xd3\xe4\x93\x02+*)/v1/{name=apps/*/firewall/ingressRules/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\xfc\x02\n\x11\x41uthorizedDomains\x12\xad\x01\n\x15ListAuthorizedDomains\x12\x31.google.appengine.v1.ListAuthorizedDomainsRequest\x1a\x32.google.appengine.v1.ListAuthorizedDomainsResponse\"-\x82\xd3\xe4\x93\x02\'\x12%/v1/{parent=apps/*}/authorizedDomains\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\xf9\x08\n\x16\x41uthorizedCertificates\x12\xc1\x01\n\x1aListAuthorizedCertificates\x12\x36.google.appengine.v1.ListAuthorizedCertificatesRequest\x1a\x37.google.appengine.v1.ListAuthorizedCertificatesResponse\"2\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=apps/*}/authorizedCertificates\x12\xb0\x01\n\x18GetAuthorizedCertificate\x12\x34.google.appengine.v1.GetAuthorizedCertificateRequest\x1a*.google.appengine.v1.AuthorizedCertificate\"2\x82\xd3\xe4\x93\x02,\x12*/v1/{name=apps/*/authorizedCertificates/*}\x12\xc3\x01\n\x1b\x43reateAuthorizedCertificate\x12\x37.google.appengine.v1.CreateAuthorizedCertificateRequest\x1a*.google.appengine.v1.AuthorizedCertificate\"?\x82\xd3\xe4\x93\x02\x39\"*/v1/{parent=apps/*}/authorizedCertificates:\x0b\x63\x65rtificate\x12\xc3\x01\n\x1bUpdateAuthorizedCertificate\x12\x37.google.appengine.v1.UpdateAuthorizedCertificateRequest\x1a*.google.appengine.v1.AuthorizedCertificate\"?\x82\xd3\xe4\x93\x02\x39\x32*/v1/{name=apps/*/authorizedCertificates/*}:\x0b\x63\x65rtificate\x12\xa2\x01\n\x1b\x44\x65leteAuthorizedCertificate\x12\x37.google.appengine.v1.DeleteAuthorizedCertificateRequest\x1a\x16.google.protobuf.Empty\"2\x82\xd3\xe4\x93\x02,**/v1/{name=apps/*/authorizedCertificates/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\xd9\x08\n\x0e\x44omainMappings\x12\xa1\x01\n\x12ListDomainMappings\x12..google.appengine.v1.ListDomainMappingsRequest\x1a/.google.appengine.v1.ListDomainMappingsResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=apps/*}/domainMappings\x12\x90\x01\n\x10GetDomainMapping\x12,.google.appengine.v1.GetDomainMappingRequest\x1a\".google.appengine.v1.DomainMapping\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=apps/*/domainMappings/*}\x12\xc8\x01\n\x13\x43reateDomainMapping\x12/.google.appengine.v1.CreateDomainMappingRequest\x1a\x1d.google.longrunning.Operation\"a\xca\x41$\n\rDomainMapping\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x34\"\"/v1/{parent=apps/*}/domainMappings:\x0e\x64omain_mapping\x12\xc8\x01\n\x13UpdateDomainMapping\x12/.google.appengine.v1.UpdateDomainMappingRequest\x1a\x1d.google.longrunning.Operation\"a\xca\x41$\n\rDomainMapping\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x34\x32\"/v1/{name=apps/*/domainMappings/*}:\x0e\x64omain_mapping\x12\xc0\x01\n\x13\x44\x65leteDomainMapping\x12/.google.appengine.v1.DeleteDomainMappingRequest\x1a\x1d.google.longrunning.Operation\"Y\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02$*\"/v1/{name=apps/*/domainMappings/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xbf\x01\n\x17\x63om.google.appengine.v1B\x0e\x41ppengineProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + GetApplicationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetApplicationRequest").msgclass + CreateApplicationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateApplicationRequest").msgclass + UpdateApplicationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateApplicationRequest").msgclass + RepairApplicationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.RepairApplicationRequest").msgclass + ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListServicesRequest").msgclass + ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListServicesResponse").msgclass + GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetServiceRequest").msgclass + UpdateServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateServiceRequest").msgclass + DeleteServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteServiceRequest").msgclass + ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListVersionsRequest").msgclass + ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListVersionsResponse").msgclass + GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetVersionRequest").msgclass + CreateVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateVersionRequest").msgclass + UpdateVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateVersionRequest").msgclass + DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteVersionRequest").msgclass + ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListInstancesRequest").msgclass + ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListInstancesResponse").msgclass + GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetInstanceRequest").msgclass + DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteInstanceRequest").msgclass + DebugInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DebugInstanceRequest").msgclass + ListIngressRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListIngressRulesRequest").msgclass + ListIngressRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListIngressRulesResponse").msgclass + BatchUpdateIngressRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.BatchUpdateIngressRulesRequest").msgclass + BatchUpdateIngressRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.BatchUpdateIngressRulesResponse").msgclass + CreateIngressRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateIngressRuleRequest").msgclass + GetIngressRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetIngressRuleRequest").msgclass + UpdateIngressRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateIngressRuleRequest").msgclass + DeleteIngressRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteIngressRuleRequest").msgclass + ListAuthorizedDomainsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListAuthorizedDomainsRequest").msgclass + ListAuthorizedDomainsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListAuthorizedDomainsResponse").msgclass + ListAuthorizedCertificatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListAuthorizedCertificatesRequest").msgclass + ListAuthorizedCertificatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListAuthorizedCertificatesResponse").msgclass + GetAuthorizedCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetAuthorizedCertificateRequest").msgclass + CreateAuthorizedCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateAuthorizedCertificateRequest").msgclass + UpdateAuthorizedCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateAuthorizedCertificateRequest").msgclass + DeleteAuthorizedCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteAuthorizedCertificateRequest").msgclass + ListDomainMappingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListDomainMappingsRequest").msgclass + ListDomainMappingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListDomainMappingsResponse").msgclass + GetDomainMappingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetDomainMappingRequest").msgclass + CreateDomainMappingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateDomainMappingRequest").msgclass + UpdateDomainMappingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateDomainMappingRequest").msgclass + DeleteDomainMappingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteDomainMappingRequest").msgclass + VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.VersionView").enummodule + AuthorizedCertificateView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuthorizedCertificateView").enummodule + DomainOverrideStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DomainOverrideStrategy").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_services_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_services_pb.rb new file mode 100644 index 000000000000..77c058829079 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_services_pb.rb @@ -0,0 +1,314 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/appengine/v1/appengine.proto for package 'Google.Cloud.AppEngine.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/appengine/v1/appengine_pb' + +module Google + module Cloud + module AppEngine + module V1 + module Applications + # Manages App Engine applications. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.appengine.v1.Applications' + + # Gets information about an application. + rpc :GetApplication, ::Google::Cloud::AppEngine::V1::GetApplicationRequest, ::Google::Cloud::AppEngine::V1::Application + # Creates an App Engine application for a Google Cloud Platform project. + # Required fields: + # + # * `id` - The ID of the target Cloud Platform project. + # * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. + # + # For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). + rpc :CreateApplication, ::Google::Cloud::AppEngine::V1::CreateApplicationRequest, ::Google::Longrunning::Operation + # Updates the specified Application resource. + # You can update the following fields: + # + # * `auth_domain` - Google authentication domain for controlling user access to the application. + # * `default_cookie_expiration` - Cookie expiration policy for the application. + # * `iap` - Identity-Aware Proxy properties for the application. + rpc :UpdateApplication, ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, ::Google::Longrunning::Operation + # Recreates the required App Engine features for the specified App Engine + # application, for example a Cloud Storage bucket or App Engine service + # account. + # Use this method if you receive an error message about a missing feature, + # for example, *Error retrieving the App Engine service account*. + # If you have deleted your App Engine service account, this will + # not be able to recreate it. Instead, you should attempt to use the + # IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . + # If the deletion was recent, the numeric ID can be found in the Cloud + # Console Activity Log. + rpc :RepairApplication, ::Google::Cloud::AppEngine::V1::RepairApplicationRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + module Services + # Manages services of an application. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.appengine.v1.Services' + + # Lists all the services in the application. + rpc :ListServices, ::Google::Cloud::AppEngine::V1::ListServicesRequest, ::Google::Cloud::AppEngine::V1::ListServicesResponse + # Gets the current configuration of the specified service. + rpc :GetService, ::Google::Cloud::AppEngine::V1::GetServiceRequest, ::Google::Cloud::AppEngine::V1::Service + # Updates the configuration of the specified service. + rpc :UpdateService, ::Google::Cloud::AppEngine::V1::UpdateServiceRequest, ::Google::Longrunning::Operation + # Deletes the specified service and all enclosed versions. + rpc :DeleteService, ::Google::Cloud::AppEngine::V1::DeleteServiceRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + module Versions + # Manages versions of a service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.appengine.v1.Versions' + + # Lists the versions of a service. + rpc :ListVersions, ::Google::Cloud::AppEngine::V1::ListVersionsRequest, ::Google::Cloud::AppEngine::V1::ListVersionsResponse + # Gets the specified Version resource. + # By default, only a `BASIC_VIEW` will be returned. + # Specify the `FULL_VIEW` parameter to get the full resource. + rpc :GetVersion, ::Google::Cloud::AppEngine::V1::GetVersionRequest, ::Google::Cloud::AppEngine::V1::Version + # Deploys code and resource files to a new version. + rpc :CreateVersion, ::Google::Cloud::AppEngine::V1::CreateVersionRequest, ::Google::Longrunning::Operation + # Updates the specified Version resource. + # You can specify the following fields depending on the App Engine + # environment and type of scaling that the version resource uses: + # + # **Standard environment** + # + # * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) + # + # *automatic scaling* in the standard environment: + # + # * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # + # *basic scaling* or *manual scaling* in the standard environment: + # + # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + # + # **Flexible environment** + # + # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + # + # *automatic scaling* in the flexible environment: + # + # * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # + # *manual scaling* in the flexible environment: + # + # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + rpc :UpdateVersion, ::Google::Cloud::AppEngine::V1::UpdateVersionRequest, ::Google::Longrunning::Operation + # Deletes an existing Version resource. + rpc :DeleteVersion, ::Google::Cloud::AppEngine::V1::DeleteVersionRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + module Instances + # Manages instances of a version. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.appengine.v1.Instances' + + # Lists the instances of a version. + # + # Tip: To aggregate details about instances over time, see the + # [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + rpc :ListInstances, ::Google::Cloud::AppEngine::V1::ListInstancesRequest, ::Google::Cloud::AppEngine::V1::ListInstancesResponse + # Gets instance information. + rpc :GetInstance, ::Google::Cloud::AppEngine::V1::GetInstanceRequest, ::Google::Cloud::AppEngine::V1::Instance + # Stops a running instance. + # + # The instance might be automatically recreated based on the scaling settings + # of the version. For more information, see "How Instances are Managed" + # ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | + # [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). + # + # To ensure that instances are not re-created and avoid getting billed, you + # can stop all instances within the target version by changing the serving + # status of the version to `STOPPED` with the + # [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) + # method. + rpc :DeleteInstance, ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation + # Enables debugging on a VM instance. This allows you to use the SSH + # command to connect to the virtual machine where the instance lives. + # While in "debug mode", the instance continues to serve live traffic. + # You should delete the instance when you are done debugging and then + # allow the system to take over and determine if another instance + # should be started. + # + # Only applicable for instances in App Engine flexible environment. + rpc :DebugInstance, ::Google::Cloud::AppEngine::V1::DebugInstanceRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + module Firewall + # Firewall resources are used to define a collection of access control rules + # for an Application. Each rule is defined with a position which specifies + # the rule's order in the sequence of rules, an IP range to be matched against + # requests, and an action to take upon matching requests. + # + # Every request is evaluated against the Firewall rules in priority order. + # Processesing stops at the first rule which matches the request's IP address. + # A final rule always specifies an action that applies to all remaining + # IP addresses. The default final rule for a newly-created application will be + # set to "allow" if not otherwise specified by the user. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.appengine.v1.Firewall' + + # Lists the firewall rules of an application. + rpc :ListIngressRules, ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest, ::Google::Cloud::AppEngine::V1::ListIngressRulesResponse + # Replaces the entire firewall ruleset in one bulk operation. This overrides + # and replaces the rules of an existing firewall with the new rules. + # + # If the final rule does not match traffic with the '*' wildcard IP range, + # then an "allow all" rule is explicitly added to the end of the list. + rpc :BatchUpdateIngressRules, ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest, ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse + # Creates a firewall rule for the application. + rpc :CreateIngressRule, ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest, ::Google::Cloud::AppEngine::V1::FirewallRule + # Gets the specified firewall rule. + rpc :GetIngressRule, ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest, ::Google::Cloud::AppEngine::V1::FirewallRule + # Updates the specified firewall rule. + rpc :UpdateIngressRule, ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest, ::Google::Cloud::AppEngine::V1::FirewallRule + # Deletes the specified firewall rule. + rpc :DeleteIngressRule, ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + module AuthorizedDomains + # Manages domains a user is authorized to administer. To authorize use of a + # domain, verify ownership via + # [Webmaster Central](https://www.google.com/webmasters/verification/home). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.appengine.v1.AuthorizedDomains' + + # Lists all domains the user is authorized to administer. + rpc :ListAuthorizedDomains, ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest, ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse + end + + Stub = Service.rpc_stub_class + end + module AuthorizedCertificates + # Manages SSL certificates a user is authorized to administer. A user can + # administer any SSL certificates applicable to their authorized domains. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.appengine.v1.AuthorizedCertificates' + + # Lists all SSL certificates the user is authorized to administer. + rpc :ListAuthorizedCertificates, ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse + # Gets the specified SSL certificate. + rpc :GetAuthorizedCertificate, ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, ::Google::Cloud::AppEngine::V1::AuthorizedCertificate + # Uploads the specified SSL certificate. + rpc :CreateAuthorizedCertificate, ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, ::Google::Cloud::AppEngine::V1::AuthorizedCertificate + # Updates the specified SSL certificate. To renew a certificate and maintain + # its existing domain mappings, update `certificate_data` with a new + # certificate. The new certificate must be applicable to the same domains as + # the original certificate. The certificate `display_name` may also be + # updated. + rpc :UpdateAuthorizedCertificate, ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, ::Google::Cloud::AppEngine::V1::AuthorizedCertificate + # Deletes the specified SSL certificate. + rpc :DeleteAuthorizedCertificate, ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + module DomainMappings + # Manages domains serving an application. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.appengine.v1.DomainMappings' + + # Lists the domain mappings on an application. + rpc :ListDomainMappings, ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, ::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse + # Gets the specified domain mapping. + rpc :GetDomainMapping, ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, ::Google::Cloud::AppEngine::V1::DomainMapping + # Maps a domain to an application. A user must be authorized to administer a + # domain in order to map it to an application. For a list of available + # authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`](). + rpc :CreateDomainMapping, ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, ::Google::Longrunning::Operation + # Updates the specified domain mapping. To map an SSL certificate to a + # domain mapping, update `certificate_id` to point to an `AuthorizedCertificate` + # resource. A user must be authorized to administer the associated domain + # in order to update a `DomainMapping` resource. + rpc :UpdateDomainMapping, ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, ::Google::Longrunning::Operation + # Deletes the specified domain mapping. A user must be authorized to + # administer the associated domain in order to delete a `DomainMapping` + # resource. + rpc :DeleteDomainMapping, ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/application_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/application_pb.rb new file mode 100644 index 000000000000..cae04fd7d0bb --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/application_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/application.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n%google/appengine/v1/application.proto\x12\x13google.appengine.v1\x1a\x1egoogle/protobuf/duration.proto\"\x89\x08\n\x0b\x41pplication\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12<\n\x0e\x64ispatch_rules\x18\x03 \x03(\x0b\x32$.google.appengine.v1.UrlDispatchRule\x12\x13\n\x0b\x61uth_domain\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\x12\x13\n\x0b\x63ode_bucket\x18\x08 \x01(\t\x12<\n\x19\x64\x65\x66\x61ult_cookie_expiration\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x46\n\x0eserving_status\x18\n \x01(\x0e\x32..google.appengine.v1.Application.ServingStatus\x12\x18\n\x10\x64\x65\x66\x61ult_hostname\x18\x0b \x01(\t\x12\x16\n\x0e\x64\x65\x66\x61ult_bucket\x18\x0c \x01(\t\x12\x17\n\x0fservice_account\x18\r \x01(\t\x12@\n\x03iap\x18\x0e \x01(\x0b\x32\x33.google.appengine.v1.Application.IdentityAwareProxy\x12\x12\n\ngcr_domain\x18\x10 \x01(\t\x12\x44\n\rdatabase_type\x18\x11 \x01(\x0e\x32-.google.appengine.v1.Application.DatabaseType\x12J\n\x10\x66\x65\x61ture_settings\x18\x12 \x01(\x0b\x32\x30.google.appengine.v1.Application.FeatureSettings\x1a\x82\x01\n\x12IdentityAwareProxy\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x18\n\x10oauth2_client_id\x18\x02 \x01(\t\x12\x1c\n\x14oauth2_client_secret\x18\x03 \x01(\t\x12#\n\x1boauth2_client_secret_sha256\x18\x04 \x01(\t\x1aR\n\x0f\x46\x65\x61tureSettings\x12\x1b\n\x13split_health_checks\x18\x01 \x01(\x08\x12\"\n\x1ause_container_optimized_os\x18\x02 \x01(\x08\"U\n\rServingStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x11\n\rUSER_DISABLED\x10\x02\x12\x13\n\x0fSYSTEM_DISABLED\x10\x03\"z\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LOUD_DATASTORE\x10\x01\x12\x13\n\x0f\x43LOUD_FIRESTORE\x10\x02\x12!\n\x1d\x43LOUD_DATASTORE_COMPATIBILITY\x10\x03\"@\n\x0fUrlDispatchRule\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\tB\xc1\x01\n\x17\x63om.google.appengine.v1B\x10\x41pplicationProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application").msgclass + Application::IdentityAwareProxy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application.IdentityAwareProxy").msgclass + Application::FeatureSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application.FeatureSettings").msgclass + Application::ServingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application.ServingStatus").enummodule + Application::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application.DatabaseType").enummodule + UrlDispatchRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UrlDispatchRule").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/audit_data_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/audit_data_pb.rb new file mode 100644 index 000000000000..fe1f827bcd75 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/audit_data_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/audit_data.proto + +require 'google/protobuf' + +require 'google/appengine/v1/appengine_pb' + + +descriptor_data = "\n$google/appengine/v1/audit_data.proto\x12\x13google.appengine.v1\x1a#google/appengine/v1/appengine.proto\"\x9d\x01\n\tAuditData\x12\x42\n\x0eupdate_service\x18\x01 \x01(\x0b\x32(.google.appengine.v1.UpdateServiceMethodH\x00\x12\x42\n\x0e\x63reate_version\x18\x02 \x01(\x0b\x32(.google.appengine.v1.CreateVersionMethodH\x00\x42\x08\n\x06method\"Q\n\x13UpdateServiceMethod\x12:\n\x07request\x18\x01 \x01(\x0b\x32).google.appengine.v1.UpdateServiceRequest\"Q\n\x13\x43reateVersionMethod\x12:\n\x07request\x18\x01 \x01(\x0b\x32).google.appengine.v1.CreateVersionRequestB\xbf\x01\n\x17\x63om.google.appengine.v1B\x0e\x41uditDataProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + AuditData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuditData").msgclass + UpdateServiceMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateServiceMethod").msgclass + CreateVersionMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateVersionMethod").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/certificate_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/certificate_pb.rb new file mode 100644 index 000000000000..f977de580e70 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/certificate_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/certificate.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n%google/appengine/v1/certificate.proto\x12\x13google.appengine.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdb\x02\n\x15\x41uthorizedCertificate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x14\n\x0c\x64omain_names\x18\x04 \x03(\t\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\x14\x63\x65rtificate_raw_data\x18\x06 \x01(\x0b\x32\'.google.appengine.v1.CertificateRawData\x12\x44\n\x13managed_certificate\x18\x07 \x01(\x0b\x32\'.google.appengine.v1.ManagedCertificate\x12\x1f\n\x17visible_domain_mappings\x18\x08 \x03(\t\x12\x1d\n\x15\x64omain_mappings_count\x18\t \x01(\x05\"E\n\x12\x43\x65rtificateRawData\x12\x1a\n\x12public_certificate\x18\x01 \x01(\t\x12\x13\n\x0bprivate_key\x18\x02 \x01(\t\"\x82\x01\n\x12ManagedCertificate\x12\x35\n\x11last_renewal_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x06status\x18\x02 \x01(\x0e\x32%.google.appengine.v1.ManagementStatus*\xc6\x01\n\x10ManagementStatus\x12!\n\x1dMANAGEMENT_STATUS_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x1f\n\x1b\x46\x41ILED_RETRYING_NOT_VISIBLE\x10\x04\x12\x14\n\x10\x46\x41ILED_PERMANENT\x10\x06\x12!\n\x1d\x46\x41ILED_RETRYING_CAA_FORBIDDEN\x10\x07\x12 \n\x1c\x46\x41ILED_RETRYING_CAA_CHECKING\x10\x08\x42\xc1\x01\n\x17\x63om.google.appengine.v1B\x10\x43\x65rtificateProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + AuthorizedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuthorizedCertificate").msgclass + CertificateRawData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CertificateRawData").msgclass + ManagedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ManagedCertificate").msgclass + ManagementStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ManagementStatus").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deploy_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deploy_pb.rb new file mode 100644 index 000000000000..515288edf7f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deploy_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/deploy.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n google/appengine/v1/deploy.proto\x12\x13google.appengine.v1\x1a\x1egoogle/protobuf/duration.proto\"\xbb\x02\n\nDeployment\x12\x39\n\x05\x66iles\x18\x01 \x03(\x0b\x32*.google.appengine.v1.Deployment.FilesEntry\x12\x35\n\tcontainer\x18\x02 \x01(\x0b\x32\".google.appengine.v1.ContainerInfo\x12)\n\x03zip\x18\x03 \x01(\x0b\x32\x1c.google.appengine.v1.ZipInfo\x12\x43\n\x13\x63loud_build_options\x18\x06 \x01(\x0b\x32&.google.appengine.v1.CloudBuildOptions\x1aK\n\nFilesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.google.appengine.v1.FileInfo:\x02\x38\x01\"C\n\x08\x46ileInfo\x12\x12\n\nsource_url\x18\x01 \x01(\t\x12\x10\n\x08sha1_sum\x18\x02 \x01(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\"\x1e\n\rContainerInfo\x12\r\n\x05image\x18\x01 \x01(\t\"b\n\x11\x43loudBuildOptions\x12\x15\n\rapp_yaml_path\x18\x01 \x01(\t\x12\x36\n\x13\x63loud_build_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"2\n\x07ZipInfo\x12\x12\n\nsource_url\x18\x03 \x01(\t\x12\x13\n\x0b\x66iles_count\x18\x04 \x01(\x05\x42\xbc\x01\n\x17\x63om.google.appengine.v1B\x0b\x44\x65ployProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Deployment").msgclass + FileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.FileInfo").msgclass + ContainerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ContainerInfo").msgclass + CloudBuildOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CloudBuildOptions").msgclass + ZipInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ZipInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deployed_files_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deployed_files_pb.rb new file mode 100644 index 000000000000..0c0df0457dea --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deployed_files_pb.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/deployed_files.proto + +require 'google/protobuf' + + +descriptor_data = "\n(google/appengine/v1/deployed_files.proto\x12\x13google.appengine.v1B\xc3\x01\n\x17\x63om.google.appengine.v1B\x12\x44\x65ployedFilesProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_mapping_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_mapping_pb.rb new file mode 100644 index 000000000000..e0674fa7382e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_mapping_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/domain_mapping.proto + +require 'google/protobuf' + + +descriptor_data = "\n(google/appengine/v1/domain_mapping.proto\x12\x13google.appengine.v1\"\xa0\x01\n\rDomainMapping\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x36\n\x0cssl_settings\x18\x03 \x01(\x0b\x32 .google.appengine.v1.SslSettings\x12=\n\x10resource_records\x18\x04 \x03(\x0b\x32#.google.appengine.v1.ResourceRecord\"\xf3\x01\n\x0bSslSettings\x12\x16\n\x0e\x63\x65rtificate_id\x18\x01 \x01(\t\x12O\n\x13ssl_management_type\x18\x03 \x01(\x0e\x32\x32.google.appengine.v1.SslSettings.SslManagementType\x12&\n\x1epending_managed_certificate_id\x18\x04 \x01(\t\"S\n\x11SslManagementType\x12#\n\x1fSSL_MANAGEMENT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\"\xb3\x01\n\x0eResourceRecord\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06rrdata\x18\x02 \x01(\t\x12<\n\x04type\x18\x03 \x01(\x0e\x32..google.appengine.v1.ResourceRecord.RecordType\"E\n\nRecordType\x12\x1b\n\x17RECORD_TYPE_UNSPECIFIED\x10\x00\x12\x05\n\x01\x41\x10\x01\x12\x08\n\x04\x41\x41\x41\x41\x10\x02\x12\t\n\x05\x43NAME\x10\x03\x42\xc3\x01\n\x17\x63om.google.appengine.v1B\x12\x44omainMappingProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + DomainMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DomainMapping").msgclass + SslSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.SslSettings").msgclass + SslSettings::SslManagementType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.SslSettings.SslManagementType").enummodule + ResourceRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ResourceRecord").msgclass + ResourceRecord::RecordType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ResourceRecord.RecordType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_pb.rb new file mode 100644 index 000000000000..f6b8860988cb --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/domain.proto + +require 'google/protobuf' + + +descriptor_data = "\n google/appengine/v1/domain.proto\x12\x13google.appengine.v1\",\n\x10\x41uthorizedDomain\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\tB\xbc\x01\n\x17\x63om.google.appengine.v1B\x0b\x44omainProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + AuthorizedDomain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuthorizedDomain").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/firewall_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/firewall_pb.rb new file mode 100644 index 000000000000..c192769f20c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/firewall_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/firewall.proto + +require 'google/protobuf' + + +descriptor_data = "\n\"google/appengine/v1/firewall.proto\x12\x13google.appengine.v1\"\xbc\x01\n\x0c\x46irewallRule\x12\x10\n\x08priority\x18\x01 \x01(\x05\x12\x38\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32(.google.appengine.v1.FirewallRule.Action\x12\x14\n\x0csource_range\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12UNSPECIFIED_ACTION\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x42\xc7\x01\n com.google.appengine.v1.firewallB\rFirewallProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + FirewallRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.FirewallRule").msgclass + FirewallRule::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.FirewallRule.Action").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/instance_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/instance_pb.rb new file mode 100644 index 000000000000..b07a1180765b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/instance_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/instance.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\"google/appengine/v1/instance.proto\x12\x13google.appengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\x06\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x61pp_engine_release\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x0c\x61vailability\x18\x04 \x01(\x0e\x32*.google.appengine.v1.Instance.AvailabilityB\x03\xe0\x41\x03\x12\x14\n\x07vm_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cvm_zone_name\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05vm_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08requests\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x13\n\x06\x65rrors\x18\n \x01(\x05\x42\x03\xe0\x41\x03\x12\x10\n\x03qps\x18\x0b \x01(\x02\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x61verage_latency\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cmemory_usage\x18\r \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tvm_status\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10vm_debug_enabled\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12\x12\n\x05vm_ip\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12N\n\x0bvm_liveness\x18\x11 \x01(\x0e\x32\x34.google.appengine.v1.Instance.Liveness.LivenessStateB\x03\xe0\x41\x03\x1a\x7f\n\x08Liveness\"s\n\rLivenessState\x12\x1e\n\x1aLIVENESS_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07HEALTHY\x10\x02\x12\r\n\tUNHEALTHY\x10\x03\x12\x0c\n\x08\x44RAINING\x10\x04\x12\x0b\n\x07TIMEOUT\x10\x05\":\n\x0c\x41vailability\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08RESIDENT\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02:m\xea\x41j\n!appengine.googleapis.com/Instance\x12\x45\x61pps/{app}/services/{service}/versions/{version}/instances/{instance}B\xbe\x01\n\x17\x63om.google.appengine.v1B\rInstanceProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Instance").msgclass + Instance::Liveness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Instance.Liveness").msgclass + Instance::Liveness::LivenessState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Instance.Liveness.LivenessState").enummodule + Instance::Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Instance.Availability").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/location_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/location_pb.rb new file mode 100644 index 000000000000..81a9da3f9d46 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/location_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/location.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\"google/appengine/v1/location.proto\x12\x13google.appengine.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x85\x01\n\x10LocationMetadata\x12&\n\x1estandard_environment_available\x18\x02 \x01(\x08\x12&\n\x1e\x66lexible_environment_available\x18\x04 \x01(\x08\x12!\n\x14search_api_available\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x42\xbe\x01\n\x17\x63om.google.appengine.v1B\rLocationProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.LocationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/network_settings_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/network_settings_pb.rb new file mode 100644 index 000000000000..78782d65b683 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/network_settings_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/network_settings.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/appengine/v1/network_settings.proto\x12\x13google.appengine.v1\"\xaa\x02\n\x0fNetworkSettings\x12[\n\x17ingress_traffic_allowed\x18\x01 \x01(\x0e\x32:.google.appengine.v1.NetworkSettings.IngressTrafficAllowed\"\xb9\x01\n\x15IngressTrafficAllowed\x12\'\n#INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED\x10\x00\x12\x1f\n\x1bINGRESS_TRAFFIC_ALLOWED_ALL\x10\x01\x12)\n%INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY\x10\x02\x12+\n\'INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB\x10\x03\x42\xc5\x01\n\x17\x63om.google.appengine.v1B\x14NetworkSettingsProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + NetworkSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.NetworkSettings").msgclass + NetworkSettings::IngressTrafficAllowed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.NetworkSettings.IngressTrafficAllowed").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/operation_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/operation_pb.rb new file mode 100644 index 000000000000..9246c1625510 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/operation_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/operation.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n#google/appengine/v1/operation.proto\x12\x13google.appengine.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x02\n\x13OperationMetadataV1\x12\x0e\n\x06method\x18\x01 \x01(\t\x12/\n\x0binsert_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04user\x18\x04 \x01(\t\x12\x0e\n\x06target\x18\x05 \x01(\t\x12\x19\n\x11\x65phemeral_message\x18\x06 \x01(\t\x12\x0f\n\x07warning\x18\x07 \x03(\t\x12O\n\x17\x63reate_version_metadata\x18\x08 \x01(\x0b\x32,.google.appengine.v1.CreateVersionMetadataV1H\x00\x42\x11\n\x0fmethod_metadata\"1\n\x17\x43reateVersionMetadataV1\x12\x16\n\x0e\x63loud_build_id\x18\x01 \x01(\tB\xbf\x01\n\x17\x63om.google.appengine.v1B\x0eOperationProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + OperationMetadataV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.OperationMetadataV1").msgclass + CreateVersionMetadataV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateVersionMetadataV1").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/service_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/service_pb.rb new file mode 100644 index 000000000000..8a25f262e7cc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/service_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/service.proto + +require 'google/protobuf' + +require 'google/appengine/v1/network_settings_pb' + + +descriptor_data = "\n!google/appengine/v1/service.proto\x12\x13google.appengine.v1\x1a*google/appengine/v1/network_settings.proto\"\xfe\x01\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x30\n\x05split\x18\x03 \x01(\x0b\x32!.google.appengine.v1.TrafficSplit\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.google.appengine.v1.Service.LabelsEntry\x12>\n\x10network_settings\x18\x06 \x01(\x0b\x32$.google.appengine.v1.NetworkSettings\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x84\x02\n\x0cTrafficSplit\x12;\n\x08shard_by\x18\x01 \x01(\x0e\x32).google.appengine.v1.TrafficSplit.ShardBy\x12G\n\x0b\x61llocations\x18\x02 \x03(\x0b\x32\x32.google.appengine.v1.TrafficSplit.AllocationsEntry\x1a\x32\n\x10\x41llocationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\":\n\x07ShardBy\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06\x43OOKIE\x10\x01\x12\x06\n\x02IP\x10\x02\x12\n\n\x06RANDOM\x10\x03\x42\xbd\x01\n\x17\x63om.google.appengine.v1B\x0cServiceProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Service").msgclass + TrafficSplit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.TrafficSplit").msgclass + TrafficSplit::ShardBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.TrafficSplit.ShardBy").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/version_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/version_pb.rb new file mode 100644 index 000000000000..247fbb567ebe --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/version_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/appengine/v1/version.proto + +require 'google/protobuf' + +require 'google/appengine/v1/app_yaml_pb' +require 'google/appengine/v1/deploy_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n!google/appengine/v1/version.proto\x12\x13google.appengine.v1\x1a\"google/appengine/v1/app_yaml.proto\x1a google/appengine/v1/deploy.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x0f\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x42\n\x11\x61utomatic_scaling\x18\x03 \x01(\x0b\x32%.google.appengine.v1.AutomaticScalingH\x00\x12:\n\rbasic_scaling\x18\x04 \x01(\x0b\x32!.google.appengine.v1.BasicScalingH\x00\x12<\n\x0emanual_scaling\x18\x05 \x01(\x0b\x32\".google.appengine.v1.ManualScalingH\x00\x12\x41\n\x10inbound_services\x18\x06 \x03(\x0e\x32\'.google.appengine.v1.InboundServiceType\x12\x16\n\x0einstance_class\x18\x07 \x01(\t\x12-\n\x07network\x18\x08 \x01(\x0b\x32\x1c.google.appengine.v1.Network\x12\r\n\x05zones\x18v \x03(\t\x12\x31\n\tresources\x18\t \x01(\x0b\x32\x1e.google.appengine.v1.Resources\x12\x0f\n\x07runtime\x18\n \x01(\t\x12\x17\n\x0fruntime_channel\x18u \x01(\t\x12\x12\n\nthreadsafe\x18\x0b \x01(\x08\x12\n\n\x02vm\x18\x0c \x01(\x08\x12\x18\n\x0f\x61pp_engine_apis\x18\x80\x01 \x01(\x08\x12\x45\n\rbeta_settings\x18\r \x03(\x0b\x32..google.appengine.v1.Version.BetaSettingsEntry\x12\x0b\n\x03\x65nv\x18\x0e \x01(\t\x12:\n\x0eserving_status\x18\x0f \x01(\x0e\x32\".google.appengine.v1.ServingStatus\x12\x12\n\ncreated_by\x18\x10 \x01(\t\x12/\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x64isk_usage_bytes\x18\x12 \x01(\x03\x12\x1b\n\x13runtime_api_version\x18\x15 \x01(\t\x12$\n\x1cruntime_main_executable_path\x18\x16 \x01(\t\x12\x17\n\x0fservice_account\x18\x7f \x01(\t\x12-\n\x08handlers\x18\x64 \x03(\x0b\x32\x1b.google.appengine.v1.UrlMap\x12\x39\n\x0e\x65rror_handlers\x18\x65 \x03(\x0b\x32!.google.appengine.v1.ErrorHandler\x12/\n\tlibraries\x18\x66 \x03(\x0b\x32\x1c.google.appengine.v1.Library\x12\x39\n\napi_config\x18g \x01(\x0b\x32%.google.appengine.v1.ApiConfigHandler\x12\x45\n\renv_variables\x18h \x03(\x0b\x32..google.appengine.v1.Version.EnvVariablesEntry\x12P\n\x13\x62uild_env_variables\x18} \x03(\x0b\x32\x33.google.appengine.v1.Version.BuildEnvVariablesEntry\x12\x35\n\x12\x64\x65\x66\x61ult_expiration\x18i \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x0chealth_check\x18j \x01(\x0b\x32 .google.appengine.v1.HealthCheck\x12<\n\x0freadiness_check\x18p \x01(\x0b\x32#.google.appengine.v1.ReadinessCheck\x12:\n\x0eliveness_check\x18q \x01(\x0b\x32\".google.appengine.v1.LivenessCheck\x12\x1b\n\x13nobuild_files_regex\x18k \x01(\t\x12\x33\n\ndeployment\x18l \x01(\x0b\x32\x1f.google.appengine.v1.Deployment\x12\x13\n\x0bversion_url\x18m \x01(\t\x12G\n\x15\x65ndpoints_api_service\x18n \x01(\x0b\x32(.google.appengine.v1.EndpointsApiService\x12\x33\n\nentrypoint\x18z \x01(\x0b\x32\x1f.google.appengine.v1.Entrypoint\x12\x45\n\x14vpc_access_connector\x18y \x01(\x0b\x32\'.google.appengine.v1.VpcAccessConnector\x1a\x33\n\x11\x42\x65taSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11\x45nvVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x38\n\x16\x42uildEnvVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07scaling\"\xf7\x01\n\x13\x45ndpointsApiService\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tconfig_id\x18\x02 \x01(\t\x12R\n\x10rollout_strategy\x18\x03 \x01(\x0e\x32\x38.google.appengine.v1.EndpointsApiService.RolloutStrategy\x12\x1e\n\x16\x64isable_trace_sampling\x18\x04 \x01(\x08\"K\n\x0fRolloutStrategy\x12 \n\x1cUNSPECIFIED_ROLLOUT_STRATEGY\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07MANAGED\x10\x02\"\xa9\x05\n\x10\x41utomaticScaling\x12\x33\n\x10\x63ool_down_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x0f\x63pu_utilization\x18\x02 \x01(\x0b\x32#.google.appengine.v1.CpuUtilization\x12\x1f\n\x17max_concurrent_requests\x18\x03 \x01(\x05\x12\x1a\n\x12max_idle_instances\x18\x04 \x01(\x05\x12\x1b\n\x13max_total_instances\x18\x05 \x01(\x05\x12\x36\n\x13max_pending_latency\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12min_idle_instances\x18\x07 \x01(\x05\x12\x1b\n\x13min_total_instances\x18\x08 \x01(\x05\x12\x36\n\x13min_pending_latency\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x13request_utilization\x18\n \x01(\x0b\x32\'.google.appengine.v1.RequestUtilization\x12>\n\x10\x64isk_utilization\x18\x0b \x01(\x0b\x32$.google.appengine.v1.DiskUtilization\x12\x44\n\x13network_utilization\x18\x0c \x01(\x0b\x32\'.google.appengine.v1.NetworkUtilization\x12S\n\x1bstandard_scheduler_settings\x18\x14 \x01(\x0b\x32..google.appengine.v1.StandardSchedulerSettings\"V\n\x0c\x42\x61sicScaling\x12/\n\x0cidle_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_instances\x18\x02 \x01(\x05\"\"\n\rManualScaling\x12\x11\n\tinstances\x18\x01 \x01(\x05\"j\n\x0e\x43puUtilization\x12<\n\x19\x61ggregation_window_length\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12target_utilization\x18\x02 \x01(\x01\"a\n\x12RequestUtilization\x12\'\n\x1ftarget_request_count_per_second\x18\x01 \x01(\x05\x12\"\n\x1atarget_concurrent_requests\x18\x02 \x01(\x05\"\xa7\x01\n\x0f\x44iskUtilization\x12%\n\x1dtarget_write_bytes_per_second\x18\x0e \x01(\x05\x12#\n\x1btarget_write_ops_per_second\x18\x0f \x01(\x05\x12$\n\x1ctarget_read_bytes_per_second\x18\x10 \x01(\x05\x12\"\n\x1atarget_read_ops_per_second\x18\x11 \x01(\x05\"\xb8\x01\n\x12NetworkUtilization\x12$\n\x1ctarget_sent_bytes_per_second\x18\x01 \x01(\x05\x12&\n\x1etarget_sent_packets_per_second\x18\x0b \x01(\x05\x12(\n target_received_bytes_per_second\x18\x0c \x01(\x05\x12*\n\"target_received_packets_per_second\x18\r \x01(\x05\"\x90\x01\n\x19StandardSchedulerSettings\x12\x1e\n\x16target_cpu_utilization\x18\x01 \x01(\x01\x12%\n\x1dtarget_throughput_utilization\x18\x02 \x01(\x01\x12\x15\n\rmin_instances\x18\x03 \x01(\x05\x12\x15\n\rmax_instances\x18\x04 \x01(\x05\"y\n\x07Network\x12\x17\n\x0f\x66orwarded_ports\x18\x01 \x03(\t\x12\x14\n\x0cinstance_tag\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x17\n\x0fsubnetwork_name\x18\x04 \x01(\t\x12\x18\n\x10session_affinity\x18\x05 \x01(\x08\"<\n\x06Volume\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0bvolume_type\x18\x02 \x01(\t\x12\x0f\n\x07size_gb\x18\x03 \x01(\x01\"\x85\x01\n\tResources\x12\x0b\n\x03\x63pu\x18\x01 \x01(\x01\x12\x0f\n\x07\x64isk_gb\x18\x02 \x01(\x01\x12\x11\n\tmemory_gb\x18\x03 \x01(\x01\x12,\n\x07volumes\x18\x04 \x03(\x0b\x32\x1b.google.appengine.v1.Volume\x12\x19\n\x11kms_key_reference\x18\x05 \x01(\t\"\xca\x01\n\x12VpcAccessConnector\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x0e\x65gress_setting\x18\x02 \x01(\x0e\x32\x35.google.appengine.v1.VpcAccessConnector.EgressSetting\"W\n\rEgressSetting\x12\x1e\n\x1a\x45GRESS_SETTING_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x01\x12\x15\n\x11PRIVATE_IP_RANGES\x10\x02\"(\n\nEntrypoint\x12\x0f\n\x05shell\x18\x01 \x01(\tH\x00\x42\t\n\x07\x63ommand*\xbb\x02\n\x12InboundServiceType\x12\x1f\n\x1bINBOUND_SERVICE_UNSPECIFIED\x10\x00\x12\x18\n\x14INBOUND_SERVICE_MAIL\x10\x01\x12\x1f\n\x1bINBOUND_SERVICE_MAIL_BOUNCE\x10\x02\x12\x1e\n\x1aINBOUND_SERVICE_XMPP_ERROR\x10\x03\x12 \n\x1cINBOUND_SERVICE_XMPP_MESSAGE\x10\x04\x12\"\n\x1eINBOUND_SERVICE_XMPP_SUBSCRIBE\x10\x05\x12!\n\x1dINBOUND_SERVICE_XMPP_PRESENCE\x10\x06\x12$\n INBOUND_SERVICE_CHANNEL_PRESENCE\x10\x07\x12\x1a\n\x16INBOUND_SERVICE_WARMUP\x10\t*I\n\rServingStatus\x12\x1e\n\x1aSERVING_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x42\xbd\x01\n\x17\x63om.google.appengine.v1B\x0cVersionProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AppEngine + module V1 + Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Version").msgclass + EndpointsApiService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.EndpointsApiService").msgclass + EndpointsApiService::RolloutStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.EndpointsApiService.RolloutStrategy").enummodule + AutomaticScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AutomaticScaling").msgclass + BasicScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.BasicScaling").msgclass + ManualScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ManualScaling").msgclass + CpuUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CpuUtilization").msgclass + RequestUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.RequestUtilization").msgclass + DiskUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DiskUtilization").msgclass + NetworkUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.NetworkUtilization").msgclass + StandardSchedulerSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.StandardSchedulerSettings").msgclass + Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Network").msgclass + Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Volume").msgclass + Resources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Resources").msgclass + VpcAccessConnector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.VpcAccessConnector").msgclass + VpcAccessConnector::EgressSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.VpcAccessConnector.EgressSetting").enummodule + Entrypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Entrypoint").msgclass + InboundServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.InboundServiceType").enummodule + ServingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ServingStatus").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1.rb new file mode 100644 index 000000000000..1e34509a1be6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1.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 "google/cloud/app_engine/v1/applications" +require "google/cloud/app_engine/v1/services" +require "google/cloud/app_engine/v1/versions" +require "google/cloud/app_engine/v1/instances" +require "google/cloud/app_engine/v1/firewall" +require "google/cloud/app_engine/v1/authorized_domains" +require "google/cloud/app_engine/v1/authorized_certificates" +require "google/cloud/app_engine/v1/domain_mappings" +require "google/cloud/app_engine/v1/version" + +module Google + module Cloud + module AppEngine + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1" + # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/app_engine/v1" + # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/app_engine/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications.rb new file mode 100644 index 000000000000..53bdcee89de8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/applications/credentials" +require "google/cloud/app_engine/v1/applications/operations" +require "google/cloud/app_engine/v1/applications/client" +require "google/cloud/app_engine/v1/applications/rest" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages App Engine applications. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1/applications" + # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_engine/v1/applications/rest" + # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + module Applications + end + end + end + end +end + +helper_path = ::File.join __dir__, "applications", "helpers.rb" +require "google/cloud/app_engine/v1/applications/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/client.rb new file mode 100644 index 000000000000..467071085aa8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/client.rb @@ -0,0 +1,805 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Applications + ## + # Client for the Applications service. + # + # Manages App Engine applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :applications_stub + + ## + # Configure the Applications Client class. + # + # See {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Applications clients + # ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppEngine", "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 Applications Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @applications_stub.universe_domain + end + + ## + # Create a new Applications client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Applications client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/appengine/v1/appengine_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @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 + + @applications_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppEngine::V1::Applications::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @applications_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::Applications::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @applications_stub.logger + end + + # Service calls + + ## + # Gets information about an application. + # + # @overload get_application(request, options = nil) + # Pass arguments to `get_application` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_application(name: nil) + # Pass arguments to `get_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Application resource to get. Example: `apps/myapp`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::Application] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::Application] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Applications::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetApplicationRequest.new + # + # # Call the get_application method. + # result = client.get_application request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::Application. + # p result + # + def get_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @applications_stub.call_rpc :get_application, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an App Engine application for a Google Cloud Platform project. + # Required fields: + # + # * `id` - The ID of the target Cloud Platform project. + # * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. + # + # For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). + # + # @overload create_application(request, options = nil) + # Pass arguments to `create_application` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_application(application: nil) + # Pass arguments to `create_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash] + # Application configuration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Applications::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateApplicationRequest.new + # + # # Call the create_application method. + # result = client.create_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::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_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @applications_stub.call_rpc :create_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified Application resource. + # You can update the following fields: + # + # * `auth_domain` - Google authentication domain for controlling user access to the application. + # * `default_cookie_expiration` - Cookie expiration policy for the application. + # * `iap` - Identity-Aware Proxy properties for the application. + # + # @overload update_application(request, options = nil) + # Pass arguments to `update_application` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_application(name: nil, application: nil, update_mask: nil) + # Pass arguments to `update_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Application resource to update. Example: `apps/myapp`. + # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash] + # An Application containing the updated resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Standard field mask for the set of fields to 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/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Applications::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new + # + # # Call the update_application method. + # result = client.update_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @applications_stub.call_rpc :update_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Recreates the required App Engine features for the specified App Engine + # application, for example a Cloud Storage bucket or App Engine service + # account. + # Use this method if you receive an error message about a missing feature, + # for example, *Error retrieving the App Engine service account*. + # If you have deleted your App Engine service account, this will + # not be able to recreate it. Instead, you should attempt to use the + # IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . + # If the deletion was recent, the numeric ID can be found in the Cloud + # Console Activity Log. + # + # @overload repair_application(request, options = nil) + # Pass arguments to `repair_application` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::RepairApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::RepairApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload repair_application(name: nil) + # Pass arguments to `repair_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the application to repair. Example: `apps/myapp` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Applications::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::RepairApplicationRequest.new + # + # # Call the repair_application method. + # result = client.repair_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def repair_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::RepairApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.repair_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.repair_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.repair_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @applications_stub.call_rpc :repair_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Applications API. + # + # This class represents the configuration for Applications, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_application to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_application.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_application.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::AppEngine::V1::Applications::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Applications API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_application` + # @return [::Gapic::Config::Method] + # + attr_reader :get_application + ## + # RPC-specific configuration for `create_application` + # @return [::Gapic::Config::Method] + # + attr_reader :create_application + ## + # RPC-specific configuration for `update_application` + # @return [::Gapic::Config::Method] + # + attr_reader :update_application + ## + # RPC-specific configuration for `repair_application` + # @return [::Gapic::Config::Method] + # + attr_reader :repair_application + + # @private + def initialize parent_rpcs = nil + get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application + @get_application = ::Gapic::Config::Method.new get_application_config + create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application + @create_application = ::Gapic::Config::Method.new create_application_config + update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application + @update_application = ::Gapic::Config::Method.new update_application_config + repair_application_config = parent_rpcs.repair_application if parent_rpcs.respond_to? :repair_application + @repair_application = ::Gapic::Config::Method.new repair_application_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/credentials.rb new file mode 100644 index 000000000000..ff8a8e28dd45 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/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 AppEngine + module V1 + module Applications + # Credentials for the Applications API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "APP_ENGINE_CREDENTIALS", + "APP_ENGINE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APP_ENGINE_CREDENTIALS_JSON", + "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/applications/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/operations.rb new file mode 100644 index 000000000000..9b48e5fb400f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Applications + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Applications 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 Applications 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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest.rb new file mode 100644 index 000000000000..66ec09bd82e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/applications/credentials" +require "google/cloud/app_engine/v1/applications/rest/operations" +require "google/cloud/app_engine/v1/applications/rest/client" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages App Engine applications. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_engine/v1/applications/rest" + # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + module Applications + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_engine/v1/applications/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/client.rb new file mode 100644 index 000000000000..643976d7873e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/client.rb @@ -0,0 +1,742 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/applications/rest/service_stub" + +module Google + module Cloud + module AppEngine + module V1 + module Applications + module Rest + ## + # REST client for the Applications service. + # + # Manages App Engine applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :applications_stub + + ## + # Configure the Applications Client class. + # + # See {::Google::Cloud::AppEngine::V1::Applications::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Applications clients + # ::Google::Cloud::AppEngine::V1::Applications::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", "AppEngine", "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 Applications Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Applications::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 + @applications_stub.universe_domain + end + + ## + # Create a new Applications REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Applications 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::AppEngine::V1::Applications::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 + + @applications_stub = ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @applications_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::Applications::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @applications_stub.logger + end + + # Service calls + + ## + # Gets information about an application. + # + # @overload get_application(request, options = nil) + # Pass arguments to `get_application` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_application(name: nil) + # Pass arguments to `get_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Application resource to get. Example: `apps/myapp`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::Application] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::Application] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetApplicationRequest.new + # + # # Call the get_application method. + # result = client.get_application request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::Application. + # p result + # + def get_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @applications_stub.get_application request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an App Engine application for a Google Cloud Platform project. + # Required fields: + # + # * `id` - The ID of the target Cloud Platform project. + # * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. + # + # For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). + # + # @overload create_application(request, options = nil) + # Pass arguments to `create_application` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_application(application: nil) + # Pass arguments to `create_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash] + # Application configuration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateApplicationRequest.new + # + # # Call the create_application method. + # result = client.create_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @applications_stub.create_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified Application resource. + # You can update the following fields: + # + # * `auth_domain` - Google authentication domain for controlling user access to the application. + # * `default_cookie_expiration` - Cookie expiration policy for the application. + # * `iap` - Identity-Aware Proxy properties for the application. + # + # @overload update_application(request, options = nil) + # Pass arguments to `update_application` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_application(name: nil, application: nil, update_mask: nil) + # Pass arguments to `update_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Application resource to update. Example: `apps/myapp`. + # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash] + # An Application containing the updated resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Standard field mask for the set of fields to 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/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new + # + # # Call the update_application method. + # result = client.update_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @applications_stub.update_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Recreates the required App Engine features for the specified App Engine + # application, for example a Cloud Storage bucket or App Engine service + # account. + # Use this method if you receive an error message about a missing feature, + # for example, *Error retrieving the App Engine service account*. + # If you have deleted your App Engine service account, this will + # not be able to recreate it. Instead, you should attempt to use the + # IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . + # If the deletion was recent, the numeric ID can be found in the Cloud + # Console Activity Log. + # + # @overload repair_application(request, options = nil) + # Pass arguments to `repair_application` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::RepairApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::RepairApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload repair_application(name: nil) + # Pass arguments to `repair_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the application to repair. Example: `apps/myapp` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::RepairApplicationRequest.new + # + # # Call the repair_application method. + # result = client.repair_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def repair_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::RepairApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.repair_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.repair_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.repair_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @applications_stub.repair_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Applications REST API. + # + # This class represents the configuration for Applications REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Applications::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_application to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_application.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_application.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Applications API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_application` + # @return [::Gapic::Config::Method] + # + attr_reader :get_application + ## + # RPC-specific configuration for `create_application` + # @return [::Gapic::Config::Method] + # + attr_reader :create_application + ## + # RPC-specific configuration for `update_application` + # @return [::Gapic::Config::Method] + # + attr_reader :update_application + ## + # RPC-specific configuration for `repair_application` + # @return [::Gapic::Config::Method] + # + attr_reader :repair_application + + # @private + def initialize parent_rpcs = nil + get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application + @get_application = ::Gapic::Config::Method.new get_application_config + create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application + @create_application = ::Gapic::Config::Method.new create_application_config + update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application + @update_application = ::Gapic::Config::Method.new update_application_config + repair_application_config = parent_rpcs.repair_application if parent_rpcs.respond_to? :repair_application + @repair_application = ::Gapic::Config::Method.new repair_application_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/operations.rb new file mode 100644 index 000000000000..e856615a232e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AppEngine + module V1 + module Applications + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Applications 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 Applications 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb new file mode 100644 index 000000000000..c643100535ef --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb @@ -0,0 +1,326 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Applications + module Rest + ## + # REST service stub for the Applications 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_application REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::Application] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::Application] + # A result object deserialized from the server's reply + def get_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::Application.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_application REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_application REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the repair_application REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::RepairApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def repair_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_repair_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "repair_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_application REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_application REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/apps", + body: "application", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_application REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "application", + matches: [ + ["name", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the repair_application REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::RepairApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_repair_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:repair", + body: "*", + matches: [ + ["name", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates.rb new file mode 100644 index 000000000000..85935d78cddf --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/authorized_certificates/credentials" +require "google/cloud/app_engine/v1/authorized_certificates/client" +require "google/cloud/app_engine/v1/authorized_certificates/rest" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages SSL certificates a user is authorized to administer. A user can + # administer any SSL certificates applicable to their authorized domains. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1/authorized_certificates" + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_engine/v1/authorized_certificates/rest" + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new + # + module AuthorizedCertificates + end + end + end + end +end + +helper_path = ::File.join __dir__, "authorized_certificates", "helpers.rb" +require "google/cloud/app_engine/v1/authorized_certificates/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb new file mode 100644 index 000000000000..9d971ae005d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb @@ -0,0 +1,870 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module AuthorizedCertificates + ## + # Client for the AuthorizedCertificates service. + # + # Manages SSL certificates a user is authorized to administer. A user can + # administer any SSL certificates applicable to their authorized domains. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :authorized_certificates_stub + + ## + # Configure the AuthorizedCertificates Client class. + # + # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AuthorizedCertificates clients + # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppEngine", "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 AuthorizedCertificates Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @authorized_certificates_stub.universe_domain + end + + ## + # Create a new AuthorizedCertificates client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AuthorizedCertificates client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/appengine/v1/appengine_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @authorized_certificates_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @authorized_certificates_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.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 + @authorized_certificates_stub.logger + end + + # Service calls + + ## + # Lists all SSL certificates the user is authorized to administer. + # + # @overload list_authorized_certificates(request, options = nil) + # Pass arguments to `list_authorized_certificates` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_authorized_certificates(parent: nil, view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_authorized_certificates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent `Application` resource. Example: `apps/myapp`. + # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] + # Controls the set of fields returned in the `LIST` response. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new + # + # # Call the list_authorized_certificates method. + # result = client.list_authorized_certificates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedCertificate. + # p item + # end + # + def list_authorized_certificates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_authorized_certificates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_authorized_certificates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_authorized_certificates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.call_rpc :list_authorized_certificates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @authorized_certificates_stub, :list_authorized_certificates, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the specified SSL certificate. + # + # @overload get_authorized_certificate(request, options = nil) + # Pass arguments to `get_authorized_certificate` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_authorized_certificate(name: nil, view: nil) + # Pass arguments to `get_authorized_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/authorizedCertificates/12345`. + # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] + # Controls the set of fields returned in the `GET` response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new + # + # # Call the get_authorized_certificate method. + # result = client.get_authorized_certificate request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + # p result + # + def get_authorized_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_authorized_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_authorized_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_authorized_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.call_rpc :get_authorized_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Uploads the specified SSL certificate. + # + # @overload create_authorized_certificate(request, options = nil) + # Pass arguments to `create_authorized_certificate` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_authorized_certificate(parent: nil, certificate: nil) + # Pass arguments to `create_authorized_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent `Application` resource. Example: `apps/myapp`. + # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash] + # SSL certificate data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new + # + # # Call the create_authorized_certificate method. + # result = client.create_authorized_certificate request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + # p result + # + def create_authorized_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_authorized_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_authorized_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_authorized_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.call_rpc :create_authorized_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified SSL certificate. To renew a certificate and maintain + # its existing domain mappings, update `certificate_data` with a new + # certificate. The new certificate must be applicable to the same domains as + # the original certificate. The certificate `display_name` may also be + # updated. + # + # @overload update_authorized_certificate(request, options = nil) + # Pass arguments to `update_authorized_certificate` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_authorized_certificate(name: nil, certificate: nil, update_mask: nil) + # Pass arguments to `update_authorized_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to update. Example: + # `apps/myapp/authorizedCertificates/12345`. + # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash] + # An `AuthorizedCertificate` containing the updated resource. Only fields set + # in the field mask will be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. Updates are only + # supported on the `certificate_raw_data` and `display_name` fields. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new + # + # # Call the update_authorized_certificate method. + # result = client.update_authorized_certificate request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + # p result + # + def update_authorized_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_authorized_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_authorized_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_authorized_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.call_rpc :update_authorized_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified SSL certificate. + # + # @overload delete_authorized_certificate(request, options = nil) + # Pass arguments to `delete_authorized_certificate` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_authorized_certificate(name: nil) + # Pass arguments to `delete_authorized_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to delete. Example: + # `apps/myapp/authorizedCertificates/12345`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new + # + # # Call the delete_authorized_certificate method. + # result = client.delete_authorized_certificate request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_authorized_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_authorized_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_authorized_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_authorized_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.call_rpc :delete_authorized_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AuthorizedCertificates API. + # + # This class represents the configuration for AuthorizedCertificates, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_authorized_certificates to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_authorized_certificates.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_authorized_certificates.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AuthorizedCertificates API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_authorized_certificates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_authorized_certificates + ## + # RPC-specific configuration for `get_authorized_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_authorized_certificate + ## + # RPC-specific configuration for `create_authorized_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_authorized_certificate + ## + # RPC-specific configuration for `update_authorized_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_authorized_certificate + ## + # RPC-specific configuration for `delete_authorized_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_authorized_certificate + + # @private + def initialize parent_rpcs = nil + list_authorized_certificates_config = parent_rpcs.list_authorized_certificates if parent_rpcs.respond_to? :list_authorized_certificates + @list_authorized_certificates = ::Gapic::Config::Method.new list_authorized_certificates_config + get_authorized_certificate_config = parent_rpcs.get_authorized_certificate if parent_rpcs.respond_to? :get_authorized_certificate + @get_authorized_certificate = ::Gapic::Config::Method.new get_authorized_certificate_config + create_authorized_certificate_config = parent_rpcs.create_authorized_certificate if parent_rpcs.respond_to? :create_authorized_certificate + @create_authorized_certificate = ::Gapic::Config::Method.new create_authorized_certificate_config + update_authorized_certificate_config = parent_rpcs.update_authorized_certificate if parent_rpcs.respond_to? :update_authorized_certificate + @update_authorized_certificate = ::Gapic::Config::Method.new update_authorized_certificate_config + delete_authorized_certificate_config = parent_rpcs.delete_authorized_certificate if parent_rpcs.respond_to? :delete_authorized_certificate + @delete_authorized_certificate = ::Gapic::Config::Method.new delete_authorized_certificate_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/credentials.rb new file mode 100644 index 000000000000..d7c3c73c7dcc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/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 AppEngine + module V1 + module AuthorizedCertificates + # Credentials for the AuthorizedCertificates API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "APP_ENGINE_CREDENTIALS", + "APP_ENGINE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APP_ENGINE_CREDENTIALS_JSON", + "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb new file mode 100644 index 000000000000..fba197657d0e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/authorized_certificates/credentials" +require "google/cloud/app_engine/v1/authorized_certificates/rest/client" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages SSL certificates a user is authorized to administer. A user can + # administer any SSL certificates applicable to their authorized domains. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_engine/v1/authorized_certificates/rest" + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new + # + module AuthorizedCertificates + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_engine/v1/authorized_certificates/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb new file mode 100644 index 000000000000..4dbafd6cac6d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb @@ -0,0 +1,792 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/authorized_certificates/rest/service_stub" + +module Google + module Cloud + module AppEngine + module V1 + module AuthorizedCertificates + module Rest + ## + # REST client for the AuthorizedCertificates service. + # + # Manages SSL certificates a user is authorized to administer. A user can + # administer any SSL certificates applicable to their authorized domains. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :authorized_certificates_stub + + ## + # Configure the AuthorizedCertificates Client class. + # + # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AuthorizedCertificates clients + # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::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", "AppEngine", "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 AuthorizedCertificates Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::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 + @authorized_certificates_stub.universe_domain + end + + ## + # Create a new AuthorizedCertificates REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AuthorizedCertificates 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 + + @authorized_certificates_stub = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @authorized_certificates_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 + @authorized_certificates_stub.logger + end + + # Service calls + + ## + # Lists all SSL certificates the user is authorized to administer. + # + # @overload list_authorized_certificates(request, options = nil) + # Pass arguments to `list_authorized_certificates` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_authorized_certificates(parent: nil, view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_authorized_certificates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent `Application` resource. Example: `apps/myapp`. + # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] + # Controls the set of fields returned in the `LIST` response. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new + # + # # Call the list_authorized_certificates method. + # result = client.list_authorized_certificates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedCertificate. + # p item + # end + # + def list_authorized_certificates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_authorized_certificates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_authorized_certificates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_authorized_certificates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.list_authorized_certificates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @authorized_certificates_stub, :list_authorized_certificates, "certificates", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the specified SSL certificate. + # + # @overload get_authorized_certificate(request, options = nil) + # Pass arguments to `get_authorized_certificate` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_authorized_certificate(name: nil, view: nil) + # Pass arguments to `get_authorized_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/authorizedCertificates/12345`. + # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] + # Controls the set of fields returned in the `GET` response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new + # + # # Call the get_authorized_certificate method. + # result = client.get_authorized_certificate request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + # p result + # + def get_authorized_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_authorized_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_authorized_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_authorized_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.get_authorized_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Uploads the specified SSL certificate. + # + # @overload create_authorized_certificate(request, options = nil) + # Pass arguments to `create_authorized_certificate` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_authorized_certificate(parent: nil, certificate: nil) + # Pass arguments to `create_authorized_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent `Application` resource. Example: `apps/myapp`. + # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash] + # SSL certificate data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new + # + # # Call the create_authorized_certificate method. + # result = client.create_authorized_certificate request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + # p result + # + def create_authorized_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_authorized_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_authorized_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_authorized_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.create_authorized_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified SSL certificate. To renew a certificate and maintain + # its existing domain mappings, update `certificate_data` with a new + # certificate. The new certificate must be applicable to the same domains as + # the original certificate. The certificate `display_name` may also be + # updated. + # + # @overload update_authorized_certificate(request, options = nil) + # Pass arguments to `update_authorized_certificate` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_authorized_certificate(name: nil, certificate: nil, update_mask: nil) + # Pass arguments to `update_authorized_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to update. Example: + # `apps/myapp/authorizedCertificates/12345`. + # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash] + # An `AuthorizedCertificate` containing the updated resource. Only fields set + # in the field mask will be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. Updates are only + # supported on the `certificate_raw_data` and `display_name` fields. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new + # + # # Call the update_authorized_certificate method. + # result = client.update_authorized_certificate request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + # p result + # + def update_authorized_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_authorized_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_authorized_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_authorized_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.update_authorized_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified SSL certificate. + # + # @overload delete_authorized_certificate(request, options = nil) + # Pass arguments to `delete_authorized_certificate` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_authorized_certificate(name: nil) + # Pass arguments to `delete_authorized_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to delete. Example: + # `apps/myapp/authorizedCertificates/12345`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new + # + # # Call the delete_authorized_certificate method. + # result = client.delete_authorized_certificate request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_authorized_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_authorized_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_authorized_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_authorized_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_certificates_stub.delete_authorized_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AuthorizedCertificates REST API. + # + # This class represents the configuration for AuthorizedCertificates REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_authorized_certificates to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_authorized_certificates.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_authorized_certificates.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AuthorizedCertificates API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_authorized_certificates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_authorized_certificates + ## + # RPC-specific configuration for `get_authorized_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_authorized_certificate + ## + # RPC-specific configuration for `create_authorized_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_authorized_certificate + ## + # RPC-specific configuration for `update_authorized_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_authorized_certificate + ## + # RPC-specific configuration for `delete_authorized_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_authorized_certificate + + # @private + def initialize parent_rpcs = nil + list_authorized_certificates_config = parent_rpcs.list_authorized_certificates if parent_rpcs.respond_to? :list_authorized_certificates + @list_authorized_certificates = ::Gapic::Config::Method.new list_authorized_certificates_config + get_authorized_certificate_config = parent_rpcs.get_authorized_certificate if parent_rpcs.respond_to? :get_authorized_certificate + @get_authorized_certificate = ::Gapic::Config::Method.new get_authorized_certificate_config + create_authorized_certificate_config = parent_rpcs.create_authorized_certificate if parent_rpcs.respond_to? :create_authorized_certificate + @create_authorized_certificate = ::Gapic::Config::Method.new create_authorized_certificate_config + update_authorized_certificate_config = parent_rpcs.update_authorized_certificate if parent_rpcs.respond_to? :update_authorized_certificate + @update_authorized_certificate = ::Gapic::Config::Method.new update_authorized_certificate_config + delete_authorized_certificate_config = parent_rpcs.delete_authorized_certificate if parent_rpcs.respond_to? :delete_authorized_certificate + @delete_authorized_certificate = ::Gapic::Config::Method.new delete_authorized_certificate_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/service_stub.rb new file mode 100644 index 000000000000..b9b35fbb6413 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/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/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module AuthorizedCertificates + module Rest + ## + # REST service stub for the AuthorizedCertificates 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_authorized_certificates REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse] + # A result object deserialized from the server's reply + def list_authorized_certificates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_authorized_certificates_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_authorized_certificates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_authorized_certificate REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # A result object deserialized from the server's reply + def get_authorized_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_authorized_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_authorized_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.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_authorized_certificate REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # A result object deserialized from the server's reply + def create_authorized_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_authorized_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_authorized_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_authorized_certificate REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # A result object deserialized from the server's reply + def update_authorized_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_authorized_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_authorized_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_authorized_certificate REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_authorized_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_authorized_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_authorized_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_authorized_certificates REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_authorized_certificates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/authorizedCertificates", + matches: [ + ["parent", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_authorized_certificate REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_authorized_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/authorizedCertificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_authorized_certificate REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_authorized_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/authorizedCertificates", + body: "certificate", + matches: [ + ["parent", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_authorized_certificate REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_authorized_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "certificate", + matches: [ + ["name", %r{^apps/[^/]+/authorizedCertificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_authorized_certificate REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_authorized_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/authorizedCertificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains.rb new file mode 100644 index 000000000000..dad8ef13cedb --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/authorized_domains/credentials" +require "google/cloud/app_engine/v1/authorized_domains/client" +require "google/cloud/app_engine/v1/authorized_domains/rest" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages domains a user is authorized to administer. To authorize use of a + # domain, verify ownership via + # [Webmaster Central](https://www.google.com/webmasters/verification/home). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1/authorized_domains" + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_engine/v1/authorized_domains/rest" + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new + # + module AuthorizedDomains + end + end + end + end +end + +helper_path = ::File.join __dir__, "authorized_domains", "helpers.rb" +require "google/cloud/app_engine/v1/authorized_domains/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/client.rb new file mode 100644 index 000000000000..108cdcdc7dcf --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/client.rb @@ -0,0 +1,484 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module AuthorizedDomains + ## + # Client for the AuthorizedDomains service. + # + # Manages domains a user is authorized to administer. To authorize use of a + # domain, verify ownership via + # [Webmaster Central](https://www.google.com/webmasters/verification/home). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :authorized_domains_stub + + ## + # Configure the AuthorizedDomains Client class. + # + # See {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AuthorizedDomains clients + # ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppEngine", "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 AuthorizedDomains Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @authorized_domains_stub.universe_domain + end + + ## + # Create a new AuthorizedDomains client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AuthorizedDomains client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/appengine/v1/appengine_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @authorized_domains_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @authorized_domains_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.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 + @authorized_domains_stub.logger + end + + # Service calls + + ## + # Lists all domains the user is authorized to administer. + # + # @overload list_authorized_domains(request, options = nil) + # Pass arguments to `list_authorized_domains` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_authorized_domains(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_authorized_domains` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new + # + # # Call the list_authorized_domains method. + # result = client.list_authorized_domains request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedDomain. + # p item + # end + # + def list_authorized_domains request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_authorized_domains.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_authorized_domains.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_authorized_domains.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_domains_stub.call_rpc :list_authorized_domains, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @authorized_domains_stub, :list_authorized_domains, request, response, 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 AuthorizedDomains API. + # + # This class represents the configuration for AuthorizedDomains, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_authorized_domains to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_authorized_domains.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_authorized_domains.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::AppEngine::V1::AuthorizedDomains::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AuthorizedDomains API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_authorized_domains` + # @return [::Gapic::Config::Method] + # + attr_reader :list_authorized_domains + + # @private + def initialize parent_rpcs = nil + list_authorized_domains_config = parent_rpcs.list_authorized_domains if parent_rpcs.respond_to? :list_authorized_domains + @list_authorized_domains = ::Gapic::Config::Method.new list_authorized_domains_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/credentials.rb new file mode 100644 index 000000000000..36cd39714e5e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/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 AppEngine + module V1 + module AuthorizedDomains + # Credentials for the AuthorizedDomains API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "APP_ENGINE_CREDENTIALS", + "APP_ENGINE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APP_ENGINE_CREDENTIALS_JSON", + "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb new file mode 100644 index 000000000000..37c22b4ca21d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/authorized_domains/credentials" +require "google/cloud/app_engine/v1/authorized_domains/rest/client" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages domains a user is authorized to administer. To authorize use of a + # domain, verify ownership via + # [Webmaster Central](https://www.google.com/webmasters/verification/home). + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_engine/v1/authorized_domains/rest" + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new + # + module AuthorizedDomains + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_engine/v1/authorized_domains/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.rb new file mode 100644 index 000000000000..a43cb403846f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.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 "google/cloud/errors" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/authorized_domains/rest/service_stub" + +module Google + module Cloud + module AppEngine + module V1 + module AuthorizedDomains + module Rest + ## + # REST client for the AuthorizedDomains service. + # + # Manages domains a user is authorized to administer. To authorize use of a + # domain, verify ownership via + # [Webmaster Central](https://www.google.com/webmasters/verification/home). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :authorized_domains_stub + + ## + # Configure the AuthorizedDomains Client class. + # + # See {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AuthorizedDomains clients + # ::Google::Cloud::AppEngine::V1::AuthorizedDomains::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", "AppEngine", "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 AuthorizedDomains Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::AuthorizedDomains::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 + @authorized_domains_stub.universe_domain + end + + ## + # Create a new AuthorizedDomains REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AuthorizedDomains 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 + + @authorized_domains_stub = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @authorized_domains_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 + @authorized_domains_stub.logger + end + + # Service calls + + ## + # Lists all domains the user is authorized to administer. + # + # @overload list_authorized_domains(request, options = nil) + # Pass arguments to `list_authorized_domains` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_authorized_domains(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_authorized_domains` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new + # + # # Call the list_authorized_domains method. + # result = client.list_authorized_domains request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedDomain. + # p item + # end + # + def list_authorized_domains request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_authorized_domains.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_authorized_domains.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_authorized_domains.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @authorized_domains_stub.list_authorized_domains request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @authorized_domains_stub, :list_authorized_domains, "domains", request, result, 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 AuthorizedDomains REST API. + # + # This class represents the configuration for AuthorizedDomains REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_authorized_domains to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_authorized_domains.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_authorized_domains.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AuthorizedDomains API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_authorized_domains` + # @return [::Gapic::Config::Method] + # + attr_reader :list_authorized_domains + + # @private + def initialize parent_rpcs = nil + list_authorized_domains_config = parent_rpcs.list_authorized_domains if parent_rpcs.respond_to? :list_authorized_domains + @list_authorized_domains = ::Gapic::Config::Method.new list_authorized_domains_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/service_stub.rb new file mode 100644 index 000000000000..c291e2080aa7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/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/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module AuthorizedDomains + module Rest + ## + # REST service stub for the AuthorizedDomains 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_authorized_domains REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse] + # A result object deserialized from the server's reply + def list_authorized_domains request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_authorized_domains_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_authorized_domains", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse.decode_json response.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_authorized_domains REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_authorized_domains_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/authorizedDomains", + matches: [ + ["parent", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings.rb new file mode 100644 index 000000000000..b0b67fa8bd56 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/domain_mappings/credentials" +require "google/cloud/app_engine/v1/domain_mappings/operations" +require "google/cloud/app_engine/v1/domain_mappings/client" +require "google/cloud/app_engine/v1/domain_mappings/rest" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages domains serving an application. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1/domain_mappings" + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_engine/v1/domain_mappings/rest" + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new + # + module DomainMappings + end + end + end + end +end + +helper_path = ::File.join __dir__, "domain_mappings", "helpers.rb" +require "google/cloud/app_engine/v1/domain_mappings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/client.rb new file mode 100644 index 000000000000..a10fe918d650 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/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/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module DomainMappings + ## + # Client for the DomainMappings service. + # + # Manages domains serving an application. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :domain_mappings_stub + + ## + # Configure the DomainMappings Client class. + # + # See {::Google::Cloud::AppEngine::V1::DomainMappings::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DomainMappings clients + # ::Google::Cloud::AppEngine::V1::DomainMappings::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppEngine", "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 DomainMappings Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::DomainMappings::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @domain_mappings_stub.universe_domain + end + + ## + # Create a new DomainMappings client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DomainMappings client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/appengine/v1/appengine_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @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 + + @domain_mappings_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppEngine::V1::DomainMappings::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @domain_mappings_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::DomainMappings::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @domain_mappings_stub.logger + end + + # Service calls + + ## + # Lists the domain mappings on an application. + # + # @overload list_domain_mappings(request, options = nil) + # Pass arguments to `list_domain_mappings` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_domain_mappings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_domain_mappings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new + # + # # Call the list_domain_mappings method. + # result = client.list_domain_mappings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::DomainMapping. + # p item + # end + # + def list_domain_mappings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_domain_mappings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_domain_mappings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_domain_mappings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.call_rpc :list_domain_mappings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @domain_mappings_stub, :list_domain_mappings, request, response, 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 specified domain mapping. + # + # @overload get_domain_mapping(request, options = nil) + # Pass arguments to `get_domain_mapping` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetDomainMappingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_domain_mapping(name: nil) + # Pass arguments to `get_domain_mapping` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/domainMappings/example.com`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::DomainMapping] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::DomainMapping] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new + # + # # Call the get_domain_mapping method. + # result = client.get_domain_mapping request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::DomainMapping. + # p result + # + def get_domain_mapping request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_domain_mapping.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_domain_mapping.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_domain_mapping.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.call_rpc :get_domain_mapping, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Maps a domain to an application. A user must be authorized to administer a + # domain in order to map it to an application. For a list of available + # authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`](). + # + # @overload create_domain_mapping(request, options = nil) + # Pass arguments to `create_domain_mapping` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_domain_mapping(parent: nil, domain_mapping: nil, override_strategy: nil) + # Pass arguments to `create_domain_mapping` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @param domain_mapping [::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash] + # Domain mapping configuration. + # @param override_strategy [::Google::Cloud::AppEngine::V1::DomainOverrideStrategy] + # Whether the domain creation should override any existing mappings for this + # domain. By default, overrides are rejected. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new + # + # # Call the create_domain_mapping method. + # result = client.create_domain_mapping request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_domain_mapping request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_domain_mapping.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_domain_mapping.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_domain_mapping.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.call_rpc :create_domain_mapping, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 domain mapping. To map an SSL certificate to a + # domain mapping, update `certificate_id` to point to an `AuthorizedCertificate` + # resource. A user must be authorized to administer the associated domain + # in order to update a `DomainMapping` resource. + # + # @overload update_domain_mapping(request, options = nil) + # Pass arguments to `update_domain_mapping` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_domain_mapping(name: nil, domain_mapping: nil, update_mask: nil) + # Pass arguments to `update_domain_mapping` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to update. Example: + # `apps/myapp/domainMappings/example.com`. + # @param domain_mapping [::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash] + # A domain mapping containing the updated resource. Only fields set + # in the field mask will be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Standard field mask for the set of fields to 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/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new + # + # # Call the update_domain_mapping method. + # result = client.update_domain_mapping request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_domain_mapping request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_domain_mapping.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_domain_mapping.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_domain_mapping.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.call_rpc :update_domain_mapping, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 domain mapping. A user must be authorized to + # administer the associated domain in order to delete a `DomainMapping` + # resource. + # + # @overload delete_domain_mapping(request, options = nil) + # Pass arguments to `delete_domain_mapping` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_domain_mapping(name: nil) + # Pass arguments to `delete_domain_mapping` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to delete. Example: + # `apps/myapp/domainMappings/example.com`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new + # + # # Call the delete_domain_mapping method. + # result = client.delete_domain_mapping request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_domain_mapping request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_domain_mapping.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_domain_mapping.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_domain_mapping.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.call_rpc :delete_domain_mapping, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 DomainMappings API. + # + # This class represents the configuration for DomainMappings, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::DomainMappings::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_domain_mappings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::DomainMappings::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_domain_mappings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_domain_mappings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::AppEngine::V1::DomainMappings::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DomainMappings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_domain_mappings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_domain_mappings + ## + # RPC-specific configuration for `get_domain_mapping` + # @return [::Gapic::Config::Method] + # + attr_reader :get_domain_mapping + ## + # RPC-specific configuration for `create_domain_mapping` + # @return [::Gapic::Config::Method] + # + attr_reader :create_domain_mapping + ## + # RPC-specific configuration for `update_domain_mapping` + # @return [::Gapic::Config::Method] + # + attr_reader :update_domain_mapping + ## + # RPC-specific configuration for `delete_domain_mapping` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_domain_mapping + + # @private + def initialize parent_rpcs = nil + list_domain_mappings_config = parent_rpcs.list_domain_mappings if parent_rpcs.respond_to? :list_domain_mappings + @list_domain_mappings = ::Gapic::Config::Method.new list_domain_mappings_config + get_domain_mapping_config = parent_rpcs.get_domain_mapping if parent_rpcs.respond_to? :get_domain_mapping + @get_domain_mapping = ::Gapic::Config::Method.new get_domain_mapping_config + create_domain_mapping_config = parent_rpcs.create_domain_mapping if parent_rpcs.respond_to? :create_domain_mapping + @create_domain_mapping = ::Gapic::Config::Method.new create_domain_mapping_config + update_domain_mapping_config = parent_rpcs.update_domain_mapping if parent_rpcs.respond_to? :update_domain_mapping + @update_domain_mapping = ::Gapic::Config::Method.new update_domain_mapping_config + delete_domain_mapping_config = parent_rpcs.delete_domain_mapping if parent_rpcs.respond_to? :delete_domain_mapping + @delete_domain_mapping = ::Gapic::Config::Method.new delete_domain_mapping_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/credentials.rb new file mode 100644 index 000000000000..17e07ea08acd --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/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 AppEngine + module V1 + module DomainMappings + # Credentials for the DomainMappings API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "APP_ENGINE_CREDENTIALS", + "APP_ENGINE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APP_ENGINE_CREDENTIALS_JSON", + "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb new file mode 100644 index 000000000000..58837c3b66d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AppEngine + module V1 + module DomainMappings + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DomainMappings 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 DomainMappings 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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb new file mode 100644 index 000000000000..ffc634e03369 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/domain_mappings/credentials" +require "google/cloud/app_engine/v1/domain_mappings/rest/operations" +require "google/cloud/app_engine/v1/domain_mappings/rest/client" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages domains serving an application. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_engine/v1/domain_mappings/rest" + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new + # + module DomainMappings + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_engine/v1/domain_mappings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb new file mode 100644 index 000000000000..0995917b09e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb @@ -0,0 +1,833 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/domain_mappings/rest/service_stub" + +module Google + module Cloud + module AppEngine + module V1 + module DomainMappings + module Rest + ## + # REST client for the DomainMappings service. + # + # Manages domains serving an application. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :domain_mappings_stub + + ## + # Configure the DomainMappings Client class. + # + # See {::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DomainMappings clients + # ::Google::Cloud::AppEngine::V1::DomainMappings::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", "AppEngine", "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 DomainMappings Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::DomainMappings::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 + @domain_mappings_stub.universe_domain + end + + ## + # Create a new DomainMappings REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DomainMappings 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::AppEngine::V1::DomainMappings::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 + + @domain_mappings_stub = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @domain_mappings_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @domain_mappings_stub.logger + end + + # Service calls + + ## + # Lists the domain mappings on an application. + # + # @overload list_domain_mappings(request, options = nil) + # Pass arguments to `list_domain_mappings` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_domain_mappings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_domain_mappings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new + # + # # Call the list_domain_mappings method. + # result = client.list_domain_mappings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::DomainMapping. + # p item + # end + # + def list_domain_mappings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_domain_mappings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_domain_mappings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_domain_mappings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.list_domain_mappings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @domain_mappings_stub, :list_domain_mappings, "domain_mappings", request, result, options + 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 specified domain mapping. + # + # @overload get_domain_mapping(request, options = nil) + # Pass arguments to `get_domain_mapping` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetDomainMappingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_domain_mapping(name: nil) + # Pass arguments to `get_domain_mapping` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/domainMappings/example.com`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::DomainMapping] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::DomainMapping] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new + # + # # Call the get_domain_mapping method. + # result = client.get_domain_mapping request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::DomainMapping. + # p result + # + def get_domain_mapping request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_domain_mapping.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_domain_mapping.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_domain_mapping.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.get_domain_mapping request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Maps a domain to an application. A user must be authorized to administer a + # domain in order to map it to an application. For a list of available + # authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`](). + # + # @overload create_domain_mapping(request, options = nil) + # Pass arguments to `create_domain_mapping` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_domain_mapping(parent: nil, domain_mapping: nil, override_strategy: nil) + # Pass arguments to `create_domain_mapping` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @param domain_mapping [::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash] + # Domain mapping configuration. + # @param override_strategy [::Google::Cloud::AppEngine::V1::DomainOverrideStrategy] + # Whether the domain creation should override any existing mappings for this + # domain. By default, overrides are rejected. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new + # + # # Call the create_domain_mapping method. + # result = client.create_domain_mapping request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_domain_mapping request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_domain_mapping.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_domain_mapping.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_domain_mapping.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.create_domain_mapping request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 domain mapping. To map an SSL certificate to a + # domain mapping, update `certificate_id` to point to an `AuthorizedCertificate` + # resource. A user must be authorized to administer the associated domain + # in order to update a `DomainMapping` resource. + # + # @overload update_domain_mapping(request, options = nil) + # Pass arguments to `update_domain_mapping` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_domain_mapping(name: nil, domain_mapping: nil, update_mask: nil) + # Pass arguments to `update_domain_mapping` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to update. Example: + # `apps/myapp/domainMappings/example.com`. + # @param domain_mapping [::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash] + # A domain mapping containing the updated resource. Only fields set + # in the field mask will be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Standard field mask for the set of fields to 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/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new + # + # # Call the update_domain_mapping method. + # result = client.update_domain_mapping request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_domain_mapping request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_domain_mapping.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_domain_mapping.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_domain_mapping.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.update_domain_mapping request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 domain mapping. A user must be authorized to + # administer the associated domain in order to delete a `DomainMapping` + # resource. + # + # @overload delete_domain_mapping(request, options = nil) + # Pass arguments to `delete_domain_mapping` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_domain_mapping(name: nil) + # Pass arguments to `delete_domain_mapping` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to delete. Example: + # `apps/myapp/domainMappings/example.com`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new + # + # # Call the delete_domain_mapping method. + # result = client.delete_domain_mapping request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_domain_mapping request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_domain_mapping.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_domain_mapping.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_domain_mapping.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @domain_mappings_stub.delete_domain_mapping request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 DomainMappings REST API. + # + # This class represents the configuration for DomainMappings REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_domain_mappings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_domain_mappings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_domain_mappings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DomainMappings API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_domain_mappings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_domain_mappings + ## + # RPC-specific configuration for `get_domain_mapping` + # @return [::Gapic::Config::Method] + # + attr_reader :get_domain_mapping + ## + # RPC-specific configuration for `create_domain_mapping` + # @return [::Gapic::Config::Method] + # + attr_reader :create_domain_mapping + ## + # RPC-specific configuration for `update_domain_mapping` + # @return [::Gapic::Config::Method] + # + attr_reader :update_domain_mapping + ## + # RPC-specific configuration for `delete_domain_mapping` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_domain_mapping + + # @private + def initialize parent_rpcs = nil + list_domain_mappings_config = parent_rpcs.list_domain_mappings if parent_rpcs.respond_to? :list_domain_mappings + @list_domain_mappings = ::Gapic::Config::Method.new list_domain_mappings_config + get_domain_mapping_config = parent_rpcs.get_domain_mapping if parent_rpcs.respond_to? :get_domain_mapping + @get_domain_mapping = ::Gapic::Config::Method.new get_domain_mapping_config + create_domain_mapping_config = parent_rpcs.create_domain_mapping if parent_rpcs.respond_to? :create_domain_mapping + @create_domain_mapping = ::Gapic::Config::Method.new create_domain_mapping_config + update_domain_mapping_config = parent_rpcs.update_domain_mapping if parent_rpcs.respond_to? :update_domain_mapping + @update_domain_mapping = ::Gapic::Config::Method.new update_domain_mapping_config + delete_domain_mapping_config = parent_rpcs.delete_domain_mapping if parent_rpcs.respond_to? :delete_domain_mapping + @delete_domain_mapping = ::Gapic::Config::Method.new delete_domain_mapping_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb new file mode 100644 index 000000000000..40e80dc5ac21 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AppEngine + module V1 + module DomainMappings + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DomainMappings 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 DomainMappings 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/service_stub.rb new file mode 100644 index 000000000000..010f03d185ef --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/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/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module DomainMappings + module Rest + ## + # REST service stub for the DomainMappings 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_domain_mappings REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse] + # A result object deserialized from the server's reply + def list_domain_mappings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_domain_mappings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_domain_mappings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_domain_mapping REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetDomainMappingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::DomainMapping] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::DomainMapping] + # A result object deserialized from the server's reply + def get_domain_mapping request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_domain_mapping_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_domain_mapping", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::DomainMapping.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_domain_mapping REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_domain_mapping request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_domain_mapping_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_domain_mapping", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_domain_mapping REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_domain_mapping request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_domain_mapping_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_domain_mapping", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_domain_mapping REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_domain_mapping request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_domain_mapping_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_domain_mapping", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_domain_mappings REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_domain_mappings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/domainMappings", + matches: [ + ["parent", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_domain_mapping REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetDomainMappingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_domain_mapping_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/domainMappings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_domain_mapping REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_domain_mapping_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/domainMappings", + body: "domain_mapping", + matches: [ + ["parent", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_domain_mapping REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_domain_mapping_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "domain_mapping", + matches: [ + ["name", %r{^apps/[^/]+/domainMappings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_domain_mapping REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_domain_mapping_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/domainMappings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall.rb new file mode 100644 index 000000000000..129d1a2d364c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/firewall/credentials" +require "google/cloud/app_engine/v1/firewall/client" +require "google/cloud/app_engine/v1/firewall/rest" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Firewall resources are used to define a collection of access control rules + # for an Application. Each rule is defined with a position which specifies + # the rule's order in the sequence of rules, an IP range to be matched against + # requests, and an action to take upon matching requests. + # + # Every request is evaluated against the Firewall rules in priority order. + # Processesing stops at the first rule which matches the request's IP address. + # A final rule always specifies an action that applies to all remaining + # IP addresses. The default final rule for a newly-created application will be + # set to "allow" if not otherwise specified by the user. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1/firewall" + # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_engine/v1/firewall/rest" + # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + module Firewall + end + end + end + end +end + +helper_path = ::File.join __dir__, "firewall", "helpers.rb" +require "google/cloud/app_engine/v1/firewall/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/client.rb new file mode 100644 index 000000000000..ccdfdb79dc34 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/client.rb @@ -0,0 +1,982 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Firewall + ## + # Client for the Firewall service. + # + # Firewall resources are used to define a collection of access control rules + # for an Application. Each rule is defined with a position which specifies + # the rule's order in the sequence of rules, an IP range to be matched against + # requests, and an action to take upon matching requests. + # + # Every request is evaluated against the Firewall rules in priority order. + # Processesing stops at the first rule which matches the request's IP address. + # A final rule always specifies an action that applies to all remaining + # IP addresses. The default final rule for a newly-created application will be + # set to "allow" if not otherwise specified by the user. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :firewall_stub + + ## + # Configure the Firewall Client class. + # + # See {::Google::Cloud::AppEngine::V1::Firewall::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Firewall clients + # ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppEngine", "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 Firewall Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Firewall::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @firewall_stub.universe_domain + end + + ## + # Create a new Firewall client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Firewall client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/appengine/v1/appengine_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @firewall_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppEngine::V1::Firewall::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @firewall_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.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 + @firewall_stub.logger + end + + # Service calls + + ## + # Lists the firewall rules of an application. + # + # @overload list_ingress_rules(request, options = nil) + # Pass arguments to `list_ingress_rules` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListIngressRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListIngressRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_ingress_rules(parent: nil, page_size: nil, page_token: nil, matching_address: nil) + # Pass arguments to `list_ingress_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] + # Name of the Firewall collection to retrieve. + # Example: `apps/myapp/firewall/ingressRules`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # @param matching_address [::String] + # A valid IP Address. If set, only rules matching this address will be + # returned. The first returned rule will be the rule that fires on requests + # from this IP. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new + # + # # Call the list_ingress_rules method. + # result = client.list_ingress_rules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule. + # p item + # end + # + def list_ingress_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_ingress_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_ingress_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_ingress_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.call_rpc :list_ingress_rules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @firewall_stub, :list_ingress_rules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replaces the entire firewall ruleset in one bulk operation. This overrides + # and replaces the rules of an existing firewall with the new rules. + # + # If the final rule does not match traffic with the '*' wildcard IP range, + # then an "allow all" rule is explicitly added to the end of the list. + # + # @overload batch_update_ingress_rules(request, options = nil) + # Pass arguments to `batch_update_ingress_rules` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_update_ingress_rules(name: nil, ingress_rules: nil) + # Pass arguments to `batch_update_ingress_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 name [::String] + # Name of the Firewall collection to set. + # Example: `apps/myapp/firewall/ingressRules`. + # @param ingress_rules [::Array<::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash>] + # A list of FirewallRules to replace the existing set. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new + # + # # Call the batch_update_ingress_rules method. + # result = client.batch_update_ingress_rules request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse. + # p result + # + def batch_update_ingress_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest + + # Converts hash and nil to 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_update_ingress_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_update_ingress_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_update_ingress_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.call_rpc :batch_update_ingress_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 + + ## + # Creates a firewall rule for the application. + # + # @overload create_ingress_rule(request, options = nil) + # Pass arguments to `create_ingress_rule` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_ingress_rule(parent: nil, rule: nil) + # Pass arguments to `create_ingress_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Firewall collection in which to create a new rule. + # Example: `apps/myapp/firewall/ingressRules`. + # @param rule [::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash] + # A FirewallRule containing the new resource. + # + # The user may optionally provide a position at which the new rule will be + # placed. The positions define a sequential list starting at 1. If a rule + # already exists at the given position, rules greater than the provided + # position will be moved forward by one. + # + # If no position is provided, the server will place the rule as the second to + # last rule in the sequence before the required default allow-all or deny-all + # rule. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new + # + # # Call the create_ingress_rule method. + # result = client.create_ingress_rule request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + # p result + # + def create_ingress_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_ingress_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_ingress_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_ingress_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.call_rpc :create_ingress_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the specified firewall rule. + # + # @overload get_ingress_rule(request, options = nil) + # Pass arguments to `get_ingress_rule` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetIngressRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetIngressRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_ingress_rule(name: nil) + # Pass arguments to `get_ingress_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Firewall resource to retrieve. + # Example: `apps/myapp/firewall/ingressRules/100`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new + # + # # Call the get_ingress_rule method. + # result = client.get_ingress_rule request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + # p result + # + def get_ingress_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_ingress_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_ingress_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_ingress_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.call_rpc :get_ingress_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified firewall rule. + # + # @overload update_ingress_rule(request, options = nil) + # Pass arguments to `update_ingress_rule` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_ingress_rule(name: nil, rule: nil, update_mask: nil) + # Pass arguments to `update_ingress_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Firewall resource to update. + # Example: `apps/myapp/firewall/ingressRules/100`. + # @param rule [::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash] + # A FirewallRule containing the updated resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new + # + # # Call the update_ingress_rule method. + # result = client.update_ingress_rule request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + # p result + # + def update_ingress_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_ingress_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_ingress_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_ingress_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.call_rpc :update_ingress_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified firewall rule. + # + # @overload delete_ingress_rule(request, options = nil) + # Pass arguments to `delete_ingress_rule` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_ingress_rule(name: nil) + # Pass arguments to `delete_ingress_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Firewall resource to delete. + # Example: `apps/myapp/firewall/ingressRules/100`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new + # + # # Call the delete_ingress_rule method. + # result = client.delete_ingress_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_ingress_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_ingress_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_ingress_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_ingress_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.call_rpc :delete_ingress_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Firewall API. + # + # This class represents the configuration for Firewall, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Firewall::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_ingress_rules to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_ingress_rules.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_ingress_rules.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::AppEngine::V1::Firewall::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Firewall API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_ingress_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ingress_rules + ## + # RPC-specific configuration for `batch_update_ingress_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_update_ingress_rules + ## + # RPC-specific configuration for `create_ingress_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ingress_rule + ## + # RPC-specific configuration for `get_ingress_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ingress_rule + ## + # RPC-specific configuration for `update_ingress_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_ingress_rule + ## + # RPC-specific configuration for `delete_ingress_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ingress_rule + + # @private + def initialize parent_rpcs = nil + list_ingress_rules_config = parent_rpcs.list_ingress_rules if parent_rpcs.respond_to? :list_ingress_rules + @list_ingress_rules = ::Gapic::Config::Method.new list_ingress_rules_config + batch_update_ingress_rules_config = parent_rpcs.batch_update_ingress_rules if parent_rpcs.respond_to? :batch_update_ingress_rules + @batch_update_ingress_rules = ::Gapic::Config::Method.new batch_update_ingress_rules_config + create_ingress_rule_config = parent_rpcs.create_ingress_rule if parent_rpcs.respond_to? :create_ingress_rule + @create_ingress_rule = ::Gapic::Config::Method.new create_ingress_rule_config + get_ingress_rule_config = parent_rpcs.get_ingress_rule if parent_rpcs.respond_to? :get_ingress_rule + @get_ingress_rule = ::Gapic::Config::Method.new get_ingress_rule_config + update_ingress_rule_config = parent_rpcs.update_ingress_rule if parent_rpcs.respond_to? :update_ingress_rule + @update_ingress_rule = ::Gapic::Config::Method.new update_ingress_rule_config + delete_ingress_rule_config = parent_rpcs.delete_ingress_rule if parent_rpcs.respond_to? :delete_ingress_rule + @delete_ingress_rule = ::Gapic::Config::Method.new delete_ingress_rule_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/credentials.rb new file mode 100644 index 000000000000..11bd0f56417e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/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 AppEngine + module V1 + module Firewall + # Credentials for the Firewall API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "APP_ENGINE_CREDENTIALS", + "APP_ENGINE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APP_ENGINE_CREDENTIALS_JSON", + "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest.rb new file mode 100644 index 000000000000..192ed20be872 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/firewall/credentials" +require "google/cloud/app_engine/v1/firewall/rest/client" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Firewall resources are used to define a collection of access control rules + # for an Application. Each rule is defined with a position which specifies + # the rule's order in the sequence of rules, an IP range to be matched against + # requests, and an action to take upon matching requests. + # + # Every request is evaluated against the Firewall rules in priority order. + # Processesing stops at the first rule which matches the request's IP address. + # A final rule always specifies an action that applies to all remaining + # IP addresses. The default final rule for a newly-created application will be + # set to "allow" if not otherwise specified by the user. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_engine/v1/firewall/rest" + # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + module Firewall + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_engine/v1/firewall/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/client.rb new file mode 100644 index 000000000000..477ef070a149 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/client.rb @@ -0,0 +1,897 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/firewall/rest/service_stub" + +module Google + module Cloud + module AppEngine + module V1 + module Firewall + module Rest + ## + # REST client for the Firewall service. + # + # Firewall resources are used to define a collection of access control rules + # for an Application. Each rule is defined with a position which specifies + # the rule's order in the sequence of rules, an IP range to be matched against + # requests, and an action to take upon matching requests. + # + # Every request is evaluated against the Firewall rules in priority order. + # Processesing stops at the first rule which matches the request's IP address. + # A final rule always specifies an action that applies to all remaining + # IP addresses. The default final rule for a newly-created application will be + # set to "allow" if not otherwise specified by the user. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :firewall_stub + + ## + # Configure the Firewall Client class. + # + # See {::Google::Cloud::AppEngine::V1::Firewall::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Firewall clients + # ::Google::Cloud::AppEngine::V1::Firewall::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", "AppEngine", "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 Firewall Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Firewall::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 + @firewall_stub.universe_domain + end + + ## + # Create a new Firewall REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Firewall 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 + + @firewall_stub = ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @firewall_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 + @firewall_stub.logger + end + + # Service calls + + ## + # Lists the firewall rules of an application. + # + # @overload list_ingress_rules(request, options = nil) + # Pass arguments to `list_ingress_rules` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListIngressRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListIngressRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_ingress_rules(parent: nil, page_size: nil, page_token: nil, matching_address: nil) + # Pass arguments to `list_ingress_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] + # Name of the Firewall collection to retrieve. + # Example: `apps/myapp/firewall/ingressRules`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # @param matching_address [::String] + # A valid IP Address. If set, only rules matching this address will be + # returned. The first returned rule will be the rule that fires on requests + # from this IP. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new + # + # # Call the list_ingress_rules method. + # result = client.list_ingress_rules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule. + # p item + # end + # + def list_ingress_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_ingress_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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_ingress_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_ingress_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.list_ingress_rules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @firewall_stub, :list_ingress_rules, "ingress_rules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Replaces the entire firewall ruleset in one bulk operation. This overrides + # and replaces the rules of an existing firewall with the new rules. + # + # If the final rule does not match traffic with the '*' wildcard IP range, + # then an "allow all" rule is explicitly added to the end of the list. + # + # @overload batch_update_ingress_rules(request, options = nil) + # Pass arguments to `batch_update_ingress_rules` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_update_ingress_rules(name: nil, ingress_rules: nil) + # Pass arguments to `batch_update_ingress_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 name [::String] + # Name of the Firewall collection to set. + # Example: `apps/myapp/firewall/ingressRules`. + # @param ingress_rules [::Array<::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash>] + # A list of FirewallRules to replace the existing set. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new + # + # # Call the batch_update_ingress_rules method. + # result = client.batch_update_ingress_rules request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse. + # p result + # + def batch_update_ingress_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest + + # Converts hash and nil to an 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_update_ingress_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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_update_ingress_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_update_ingress_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.batch_update_ingress_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 + + ## + # Creates a firewall rule for the application. + # + # @overload create_ingress_rule(request, options = nil) + # Pass arguments to `create_ingress_rule` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_ingress_rule(parent: nil, rule: nil) + # Pass arguments to `create_ingress_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Firewall collection in which to create a new rule. + # Example: `apps/myapp/firewall/ingressRules`. + # @param rule [::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash] + # A FirewallRule containing the new resource. + # + # The user may optionally provide a position at which the new rule will be + # placed. The positions define a sequential list starting at 1. If a rule + # already exists at the given position, rules greater than the provided + # position will be moved forward by one. + # + # If no position is provided, the server will place the rule as the second to + # last rule in the sequence before the required default allow-all or deny-all + # rule. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new + # + # # Call the create_ingress_rule method. + # result = client.create_ingress_rule request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + # p result + # + def create_ingress_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_ingress_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_ingress_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_ingress_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.create_ingress_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the specified firewall rule. + # + # @overload get_ingress_rule(request, options = nil) + # Pass arguments to `get_ingress_rule` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetIngressRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetIngressRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_ingress_rule(name: nil) + # Pass arguments to `get_ingress_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Firewall resource to retrieve. + # Example: `apps/myapp/firewall/ingressRules/100`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new + # + # # Call the get_ingress_rule method. + # result = client.get_ingress_rule request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + # p result + # + def get_ingress_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_ingress_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_ingress_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_ingress_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.get_ingress_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified firewall rule. + # + # @overload update_ingress_rule(request, options = nil) + # Pass arguments to `update_ingress_rule` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_ingress_rule(name: nil, rule: nil, update_mask: nil) + # Pass arguments to `update_ingress_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Firewall resource to update. + # Example: `apps/myapp/firewall/ingressRules/100`. + # @param rule [::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash] + # A FirewallRule containing the updated resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new + # + # # Call the update_ingress_rule method. + # result = client.update_ingress_rule request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + # p result + # + def update_ingress_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_ingress_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_ingress_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_ingress_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.update_ingress_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified firewall rule. + # + # @overload delete_ingress_rule(request, options = nil) + # Pass arguments to `delete_ingress_rule` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_ingress_rule(name: nil) + # Pass arguments to `delete_ingress_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the Firewall resource to delete. + # Example: `apps/myapp/firewall/ingressRules/100`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new + # + # # Call the delete_ingress_rule method. + # result = client.delete_ingress_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_ingress_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_ingress_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_ingress_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_ingress_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firewall_stub.delete_ingress_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Firewall REST API. + # + # This class represents the configuration for Firewall REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Firewall::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_ingress_rules to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_ingress_rules.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_ingress_rules.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Firewall API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_ingress_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ingress_rules + ## + # RPC-specific configuration for `batch_update_ingress_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_update_ingress_rules + ## + # RPC-specific configuration for `create_ingress_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ingress_rule + ## + # RPC-specific configuration for `get_ingress_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ingress_rule + ## + # RPC-specific configuration for `update_ingress_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_ingress_rule + ## + # RPC-specific configuration for `delete_ingress_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ingress_rule + + # @private + def initialize parent_rpcs = nil + list_ingress_rules_config = parent_rpcs.list_ingress_rules if parent_rpcs.respond_to? :list_ingress_rules + @list_ingress_rules = ::Gapic::Config::Method.new list_ingress_rules_config + batch_update_ingress_rules_config = parent_rpcs.batch_update_ingress_rules if parent_rpcs.respond_to? :batch_update_ingress_rules + @batch_update_ingress_rules = ::Gapic::Config::Method.new batch_update_ingress_rules_config + create_ingress_rule_config = parent_rpcs.create_ingress_rule if parent_rpcs.respond_to? :create_ingress_rule + @create_ingress_rule = ::Gapic::Config::Method.new create_ingress_rule_config + get_ingress_rule_config = parent_rpcs.get_ingress_rule if parent_rpcs.respond_to? :get_ingress_rule + @get_ingress_rule = ::Gapic::Config::Method.new get_ingress_rule_config + update_ingress_rule_config = parent_rpcs.update_ingress_rule if parent_rpcs.respond_to? :update_ingress_rule + @update_ingress_rule = ::Gapic::Config::Method.new update_ingress_rule_config + delete_ingress_rule_config = parent_rpcs.delete_ingress_rule if parent_rpcs.respond_to? :delete_ingress_rule + @delete_ingress_rule = ::Gapic::Config::Method.new delete_ingress_rule_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb new file mode 100644 index 000000000000..08fbf0469747 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb @@ -0,0 +1,450 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Firewall + module Rest + ## + # REST service stub for the Firewall 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_ingress_rules REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListIngressRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::ListIngressRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::ListIngressRulesResponse] + # A result object deserialized from the server's reply + def list_ingress_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_ingress_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_ingress_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::ListIngressRulesResponse.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_update_ingress_rules REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] + # A result object deserialized from the server's reply + def batch_update_ingress_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_ingress_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: "batch_update_ingress_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.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_ingress_rule REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # A result object deserialized from the server's reply + def create_ingress_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_ingress_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_ingress_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::FirewallRule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_ingress_rule REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetIngressRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # A result object deserialized from the server's reply + def get_ingress_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_ingress_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_ingress_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::FirewallRule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_ingress_rule REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # A result object deserialized from the server's reply + def update_ingress_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_ingress_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_ingress_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::FirewallRule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_ingress_rule REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_ingress_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_ingress_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_ingress_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_ingress_rules REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListIngressRulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_ingress_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/firewall/ingressRules", + matches: [ + ["parent", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_update_ingress_rules REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest] + # 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_update_ingress_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:batchUpdate", + body: "*", + matches: [ + ["name", %r{^apps/[^/]+/firewall/ingressRules/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_ingress_rule REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_ingress_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/firewall/ingressRules", + body: "rule", + matches: [ + ["parent", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_ingress_rule REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetIngressRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_ingress_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/firewall/ingressRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_ingress_rule REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_ingress_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "rule", + matches: [ + ["name", %r{^apps/[^/]+/firewall/ingressRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_ingress_rule REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_ingress_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/firewall/ingressRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances.rb new file mode 100644 index 000000000000..8059a9b51559 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/instances/credentials" +require "google/cloud/app_engine/v1/instances/operations" +require "google/cloud/app_engine/v1/instances/client" +require "google/cloud/app_engine/v1/instances/rest" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages instances of a version. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1/instances" + # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_engine/v1/instances/rest" + # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new + # + module Instances + end + end + end + end +end + +helper_path = ::File.join __dir__, "instances", "helpers.rb" +require "google/cloud/app_engine/v1/instances/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/client.rb new file mode 100644 index 000000000000..89296e3e98b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/client.rb @@ -0,0 +1,823 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Instances + ## + # Client for the Instances service. + # + # Manages instances of a version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :instances_stub + + ## + # Configure the Instances Client class. + # + # See {::Google::Cloud::AppEngine::V1::Instances::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Instances clients + # ::Google::Cloud::AppEngine::V1::Instances::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppEngine", "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 Instances Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Instances::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @instances_stub.universe_domain + end + + ## + # Create a new Instances client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Instances client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/appengine/v1/appengine_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @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 + + @instances_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppEngine::V1::Instances::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @instances_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::Instances::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @instances_stub.logger + end + + # Service calls + + ## + # Lists the instances of a version. + # + # Tip: To aggregate details about instances over time, see the + # [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Version resource. Example: + # `apps/myapp/services/default/versions/v1`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Instances::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListInstancesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_instances.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instances_stub.call_rpc :list_instances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @instances_stub, :list_instances, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets instance information. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Instances::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instances_stub.call_rpc :get_instance, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops a running instance. + # + # The instance might be automatically recreated based on the scaling settings + # of the version. For more information, see "How Instances are Managed" + # ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | + # [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). + # + # To ensure that instances are not re-created and avoid getting billed, you + # can stop all instances within the target version by changing the serving + # status of the version to `STOPPED` with the + # [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) + # method. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_instance(name: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Instances::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instances_stub.call_rpc :delete_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enables debugging on a VM instance. This allows you to use the SSH + # command to connect to the virtual machine where the instance lives. + # While in "debug mode", the instance continues to serve live traffic. + # You should delete the instance when you are done debugging and then + # allow the system to take over and determine if another instance + # should be started. + # + # Only applicable for instances in App Engine flexible environment. + # + # @overload debug_instance(request, options = nil) + # Pass arguments to `debug_instance` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DebugInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DebugInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload debug_instance(name: nil, ssh_key: nil) + # Pass arguments to `debug_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + # @param ssh_key [::String] + # Public SSH key to add to the instance. Examples: + # + # * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]` + # * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}` + # + # For more information, see + # [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Instances::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DebugInstanceRequest.new + # + # # Call the debug_instance method. + # result = client.debug_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def debug_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DebugInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.debug_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.debug_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.debug_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instances_stub.call_rpc :debug_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Instances API. + # + # This class represents the configuration for Instances, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Instances::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Instances::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Instances API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `debug_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :debug_instance + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + debug_instance_config = parent_rpcs.debug_instance if parent_rpcs.respond_to? :debug_instance + @debug_instance = ::Gapic::Config::Method.new debug_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/credentials.rb new file mode 100644 index 000000000000..701fd528a1fd --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/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 AppEngine + module V1 + module Instances + # Credentials for the Instances API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "APP_ENGINE_CREDENTIALS", + "APP_ENGINE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APP_ENGINE_CREDENTIALS_JSON", + "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/instances/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/operations.rb new file mode 100644 index 000000000000..ebe6b538cafa --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Instances + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Instances 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 Instances 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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest.rb new file mode 100644 index 000000000000..9ccecad165fd --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/instances/credentials" +require "google/cloud/app_engine/v1/instances/rest/operations" +require "google/cloud/app_engine/v1/instances/rest/client" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages instances of a version. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_engine/v1/instances/rest" + # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new + # + module Instances + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_engine/v1/instances/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/client.rb new file mode 100644 index 000000000000..bc023f903bfa --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/client.rb @@ -0,0 +1,752 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/instances/rest/service_stub" + +module Google + module Cloud + module AppEngine + module V1 + module Instances + module Rest + ## + # REST client for the Instances service. + # + # Manages instances of a version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :instances_stub + + ## + # Configure the Instances Client class. + # + # See {::Google::Cloud::AppEngine::V1::Instances::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Instances clients + # ::Google::Cloud::AppEngine::V1::Instances::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", "AppEngine", "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 Instances Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Instances::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 + @instances_stub.universe_domain + end + + ## + # Create a new Instances REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Instances 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::AppEngine::V1::Instances::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 + + @instances_stub = ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @instances_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::Instances::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @instances_stub.logger + end + + # Service calls + + ## + # Lists the instances of a version. + # + # Tip: To aggregate details about instances over time, see the + # [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Version resource. Example: + # `apps/myapp/services/default/versions/v1`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListInstancesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_instances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instances_stub.list_instances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list_instances, "instances", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets instance information. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instances_stub.get_instance request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops a running instance. + # + # The instance might be automatically recreated based on the scaling settings + # of the version. For more information, see "How Instances are Managed" + # ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | + # [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). + # + # To ensure that instances are not re-created and avoid getting billed, you + # can stop all instances within the target version by changing the serving + # status of the version to `STOPPED` with the + # [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) + # method. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_instance(name: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instances_stub.delete_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enables debugging on a VM instance. This allows you to use the SSH + # command to connect to the virtual machine where the instance lives. + # While in "debug mode", the instance continues to serve live traffic. + # You should delete the instance when you are done debugging and then + # allow the system to take over and determine if another instance + # should be started. + # + # Only applicable for instances in App Engine flexible environment. + # + # @overload debug_instance(request, options = nil) + # Pass arguments to `debug_instance` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DebugInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DebugInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload debug_instance(name: nil, ssh_key: nil) + # Pass arguments to `debug_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + # @param ssh_key [::String] + # Public SSH key to add to the instance. Examples: + # + # * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]` + # * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}` + # + # For more information, see + # [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DebugInstanceRequest.new + # + # # Call the debug_instance method. + # result = client.debug_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def debug_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DebugInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.debug_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.debug_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.debug_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instances_stub.debug_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Instances REST API. + # + # This class represents the configuration for Instances REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Instances::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Instances API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `debug_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :debug_instance + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + debug_instance_config = parent_rpcs.debug_instance if parent_rpcs.respond_to? :debug_instance + @debug_instance = ::Gapic::Config::Method.new debug_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/operations.rb new file mode 100644 index 000000000000..1e85f342312b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AppEngine + module V1 + module Instances + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Instances 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 Instances 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb new file mode 100644 index 000000000000..6f85f63088e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb @@ -0,0 +1,326 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Instances + module Rest + ## + # REST service stub for the Instances service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_instances REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::ListInstancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::ListInstancesResponse] + # A result object deserialized from the server's reply + def list_instances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_instances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_instance REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::Instance.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the debug_instance REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DebugInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def debug_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_debug_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "debug_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_instances REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_instances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instances", + matches: [ + ["parent", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the debug_instance REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DebugInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_debug_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:debug", + body: "*", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/rest.rb new file mode 100644 index 000000000000..b20b5db4954d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/rest.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! + +require "google/cloud/app_engine/v1/applications/rest" +require "google/cloud/app_engine/v1/services/rest" +require "google/cloud/app_engine/v1/versions/rest" +require "google/cloud/app_engine/v1/instances/rest" +require "google/cloud/app_engine/v1/firewall/rest" +require "google/cloud/app_engine/v1/authorized_domains/rest" +require "google/cloud/app_engine/v1/authorized_certificates/rest" +require "google/cloud/app_engine/v1/domain_mappings/rest" +require "google/cloud/app_engine/v1/version" + +module Google + module Cloud + module AppEngine + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/app_engine/v1/rest" + # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services.rb new file mode 100644 index 000000000000..ec5887f7f088 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/services/credentials" +require "google/cloud/app_engine/v1/services/operations" +require "google/cloud/app_engine/v1/services/client" +require "google/cloud/app_engine/v1/services/rest" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages services of an application. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1/services" + # client = ::Google::Cloud::AppEngine::V1::Services::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_engine/v1/services/rest" + # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new + # + module Services + end + end + end + end +end + +helper_path = ::File.join __dir__, "services", "helpers.rb" +require "google/cloud/app_engine/v1/services/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/client.rb new file mode 100644 index 000000000000..4b4a84cb43d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/client.rb @@ -0,0 +1,808 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Services + ## + # Client for the Services service. + # + # Manages services of an application. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :services_stub + + ## + # Configure the Services Client class. + # + # See {::Google::Cloud::AppEngine::V1::Services::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Services clients + # ::Google::Cloud::AppEngine::V1::Services::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppEngine", "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 Services Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Services::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @services_stub.universe_domain + end + + ## + # Create a new Services client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Services::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Services client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/appengine/v1/appengine_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @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 + + @services_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppEngine::V1::Services::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @services_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::Services::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @services_stub.logger + end + + # Service calls + + ## + # Lists all the services in the application. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Services::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @services_stub.call_rpc :list_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @services_stub, :list_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the current configuration of the specified service. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service(name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: `apps/myapp/services/default`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Services::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @services_stub.call_rpc :get_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the configuration of the specified service. + # + # @overload update_service(request, options = nil) + # Pass arguments to `update_service` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_service(name: nil, service: nil, update_mask: nil, migrate_traffic: nil) + # Pass arguments to `update_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to update. Example: `apps/myapp/services/default`. + # @param service [::Google::Cloud::AppEngine::V1::Service, ::Hash] + # A Service resource containing the updated service. Only fields set in the + # field mask will be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Standard field mask for the set of fields to be updated. + # @param migrate_traffic [::Boolean] + # Set to `true` to gradually shift traffic to one or more versions that you + # specify. By default, traffic is shifted immediately. + # For gradual traffic migration, the target versions + # must be located within instances that are configured for both + # [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) + # and + # [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). + # You must specify the + # [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) + # field in the Service resource. Gradual traffic migration is not + # supported in the App Engine flexible environment. For examples, see + # [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Services::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateServiceRequest.new + # + # # Call the update_service method. + # result = client.update_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @services_stub.call_rpc :update_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified service and all enclosed versions. + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_service(name: nil) + # Pass arguments to `delete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: `apps/myapp/services/default`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Services::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteServiceRequest.new + # + # # Call the delete_service method. + # result = client.delete_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @services_stub.call_rpc :delete_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Services API. + # + # This class represents the configuration for Services, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Services::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_services to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Services::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Services API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `update_service` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service + ## + # RPC-specific configuration for `delete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service + + # @private + def initialize parent_rpcs = nil + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service + @update_service = ::Gapic::Config::Method.new update_service_config + delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service + @delete_service = ::Gapic::Config::Method.new delete_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/credentials.rb new file mode 100644 index 000000000000..37ece41f9d00 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/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 AppEngine + module V1 + module Services + # Credentials for the Services API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "APP_ENGINE_CREDENTIALS", + "APP_ENGINE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APP_ENGINE_CREDENTIALS_JSON", + "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/services/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/operations.rb new file mode 100644 index 000000000000..873b5e1569ac --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Services + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Services 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 Services 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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest.rb new file mode 100644 index 000000000000..1ddc4ce95ce1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/services/credentials" +require "google/cloud/app_engine/v1/services/rest/operations" +require "google/cloud/app_engine/v1/services/rest/client" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages services of an application. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_engine/v1/services/rest" + # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new + # + module Services + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_engine/v1/services/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/client.rb new file mode 100644 index 000000000000..7a85c337d18f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/client.rb @@ -0,0 +1,737 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/services/rest/service_stub" + +module Google + module Cloud + module AppEngine + module V1 + module Services + module Rest + ## + # REST client for the Services service. + # + # Manages services of an application. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :services_stub + + ## + # Configure the Services Client class. + # + # See {::Google::Cloud::AppEngine::V1::Services::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Services clients + # ::Google::Cloud::AppEngine::V1::Services::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", "AppEngine", "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 Services Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Services::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 + @services_stub.universe_domain + end + + ## + # Create a new Services REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Services 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::AppEngine::V1::Services::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 + + @services_stub = ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @services_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::Services::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @services_stub.logger + end + + # Service calls + + ## + # Lists all the services in the application. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @services_stub.list_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @services_stub, :list_services, "services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the current configuration of the specified service. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service(name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: `apps/myapp/services/default`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @services_stub.get_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the configuration of the specified service. + # + # @overload update_service(request, options = nil) + # Pass arguments to `update_service` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_service(name: nil, service: nil, update_mask: nil, migrate_traffic: nil) + # Pass arguments to `update_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to update. Example: `apps/myapp/services/default`. + # @param service [::Google::Cloud::AppEngine::V1::Service, ::Hash] + # A Service resource containing the updated service. Only fields set in the + # field mask will be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Standard field mask for the set of fields to be updated. + # @param migrate_traffic [::Boolean] + # Set to `true` to gradually shift traffic to one or more versions that you + # specify. By default, traffic is shifted immediately. + # For gradual traffic migration, the target versions + # must be located within instances that are configured for both + # [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) + # and + # [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). + # You must specify the + # [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) + # field in the Service resource. Gradual traffic migration is not + # supported in the App Engine flexible environment. For examples, see + # [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateServiceRequest.new + # + # # Call the update_service method. + # result = client.update_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @services_stub.update_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified service and all enclosed versions. + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_service(name: nil) + # Pass arguments to `delete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: `apps/myapp/services/default`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteServiceRequest.new + # + # # Call the delete_service method. + # result = client.delete_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @services_stub.delete_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Services REST API. + # + # This class represents the configuration for Services REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Services::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_services to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Services::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Services API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `update_service` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service + ## + # RPC-specific configuration for `delete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service + + # @private + def initialize parent_rpcs = nil + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service + @update_service = ::Gapic::Config::Method.new update_service_config + delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service + @delete_service = ::Gapic::Config::Method.new delete_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/operations.rb new file mode 100644 index 000000000000..22bb5f045fcd --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AppEngine + module V1 + module Services + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Services 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 Services 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb new file mode 100644 index 000000000000..b25b03e57c36 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb @@ -0,0 +1,326 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Services + module Rest + ## + # REST service stub for the Services service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_services REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::ListServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::ListServicesResponse] + # A result object deserialized from the server's reply + def list_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::Service] + # A result object deserialized from the server's reply + def get_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_service REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_service REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_services REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/services", + matches: [ + ["parent", %r{^apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "service", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/version.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/version.rb new file mode 100644 index 000000000000..5831639cfbfc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_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 Cloud + module AppEngine + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions.rb new file mode 100644 index 000000000000..d9b0f71b6f77 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/versions/credentials" +require "google/cloud/app_engine/v1/versions/operations" +require "google/cloud/app_engine/v1/versions/client" +require "google/cloud/app_engine/v1/versions/rest" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages versions of a service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_engine/v1/versions" + # client = ::Google::Cloud::AppEngine::V1::Versions::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_engine/v1/versions/rest" + # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new + # + module Versions + end + end + end + end +end + +helper_path = ::File.join __dir__, "versions", "helpers.rb" +require "google/cloud/app_engine/v1/versions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/client.rb new file mode 100644 index 000000000000..527e5651f5c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/client.rb @@ -0,0 +1,944 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Versions + ## + # Client for the Versions service. + # + # Manages versions of a service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :versions_stub + + ## + # Configure the Versions Client class. + # + # See {::Google::Cloud::AppEngine::V1::Versions::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Versions clients + # ::Google::Cloud::AppEngine::V1::Versions::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppEngine", "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 Versions Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Versions::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @versions_stub.universe_domain + end + + ## + # Create a new Versions client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Versions::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Versions client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/appengine/v1/appengine_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @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 + + @versions_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppEngine::V1::Versions::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @versions_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::Versions::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @versions_stub.logger + end + + # Service calls + + ## + # Lists the versions of a service. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_versions(parent: nil, view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Service resource. Example: + # `apps/myapp/services/default`. + # @param view [::Google::Cloud::AppEngine::V1::VersionView] + # Controls the set of fields returned in the `List` response. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Version>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Version>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.call_rpc :list_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @versions_stub, :list_versions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the specified Version resource. + # By default, only a `BASIC_VIEW` will be returned. + # Specify the `FULL_VIEW` parameter to get the full resource. + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1`. + # @param view [::Google::Cloud::AppEngine::V1::VersionView] + # Controls the set of fields returned in the `Get` response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppEngine::V1::Version] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppEngine::V1::Version] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.call_rpc :get_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys code and resource files to a new version. + # + # @overload create_version(request, options = nil) + # Pass arguments to `create_version` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_version(parent: nil, version: nil) + # Pass arguments to `create_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent resource to create this version under. Example: + # `apps/myapp/services/default`. + # @param version [::Google::Cloud::AppEngine::V1::Version, ::Hash] + # Application deployment configuration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateVersionRequest.new + # + # # Call the create_version method. + # result = client.create_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.call_rpc :create_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified Version resource. + # You can specify the following fields depending on the App Engine + # environment and type of scaling that the version resource uses: + # + # **Standard environment** + # + # * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) + # + # *automatic scaling* in the standard environment: + # + # * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # + # *basic scaling* or *manual scaling* in the standard environment: + # + # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + # + # **Flexible environment** + # + # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + # + # *automatic scaling* in the flexible environment: + # + # * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # + # *manual scaling* in the flexible environment: + # + # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + # + # @overload update_version(request, options = nil) + # Pass arguments to `update_version` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_version(name: nil, version: nil, update_mask: nil) + # Pass arguments to `update_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to update. Example: + # `apps/myapp/services/default/versions/1`. + # @param version [::Google::Cloud::AppEngine::V1::Version, ::Hash] + # A Version containing the updated resource. Only fields set in the field + # mask will be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateVersionRequest.new + # + # # Call the update_version method. + # result = client.update_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.call_rpc :update_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing Version resource. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_version(name: nil) + # Pass arguments to `delete_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.call_rpc :delete_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Versions API. + # + # This class represents the configuration for Versions, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Versions::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_versions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Versions::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_versions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_versions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::AppEngine::V1::Versions::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Versions API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `create_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_version + ## + # RPC-specific configuration for `update_version` + # @return [::Gapic::Config::Method] + # + attr_reader :update_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + + # @private + def initialize parent_rpcs = nil + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + create_version_config = parent_rpcs.create_version if parent_rpcs.respond_to? :create_version + @create_version = ::Gapic::Config::Method.new create_version_config + update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version + @update_version = ::Gapic::Config::Method.new update_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/credentials.rb new file mode 100644 index 000000000000..9484ce0c1858 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/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 AppEngine + module V1 + module Versions + # Credentials for the Versions API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "APP_ENGINE_CREDENTIALS", + "APP_ENGINE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "APP_ENGINE_CREDENTIALS_JSON", + "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/versions/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/operations.rb new file mode 100644 index 000000000000..f2ac053dc7f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Versions + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Versions 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 Versions 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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::AppEngine::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest.rb new file mode 100644 index 000000000000..1fda00233d3d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_engine/v1/version" + +require "google/cloud/app_engine/v1/versions/credentials" +require "google/cloud/app_engine/v1/versions/rest/operations" +require "google/cloud/app_engine/v1/versions/rest/client" + +module Google + module Cloud + module AppEngine + module V1 + ## + # Manages versions of a service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_engine/v1/versions/rest" + # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new + # + module Versions + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_engine/v1/versions/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/client.rb new file mode 100644 index 000000000000..c14a061acf55 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/client.rb @@ -0,0 +1,866 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/versions/rest/service_stub" + +module Google + module Cloud + module AppEngine + module V1 + module Versions + module Rest + ## + # REST client for the Versions service. + # + # Manages versions of a service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :versions_stub + + ## + # Configure the Versions Client class. + # + # See {::Google::Cloud::AppEngine::V1::Versions::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Versions clients + # ::Google::Cloud::AppEngine::V1::Versions::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", "AppEngine", "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 Versions Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppEngine::V1::Versions::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 + @versions_stub.universe_domain + end + + ## + # Create a new Versions REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Versions 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::AppEngine::V1::Versions::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 + + @versions_stub = ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @versions_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppEngine::V1::Versions::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @versions_stub.logger + end + + # Service calls + + ## + # Lists the versions of a service. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_versions(parent: nil, view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent Service resource. Example: + # `apps/myapp/services/default`. + # @param view [::Google::Cloud::AppEngine::V1::VersionView] + # Controls the set of fields returned in the `List` response. + # @param page_size [::Integer] + # Maximum results to return per page. + # @param page_token [::String] + # Continuation token for fetching the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Version>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Version>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppEngine::V1::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.list_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @versions_stub, :list_versions, "versions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the specified Version resource. + # By default, only a `BASIC_VIEW` will be returned. + # Specify the `FULL_VIEW` parameter to get the full resource. + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1`. + # @param view [::Google::Cloud::AppEngine::V1::VersionView] + # Controls the set of fields returned in the `Get` response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::Version] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::AppEngine::V1::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.get_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys code and resource files to a new version. + # + # @overload create_version(request, options = nil) + # Pass arguments to `create_version` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::CreateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::CreateVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_version(parent: nil, version: nil) + # Pass arguments to `create_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Name of the parent resource to create this version under. Example: + # `apps/myapp/services/default`. + # @param version [::Google::Cloud::AppEngine::V1::Version, ::Hash] + # Application deployment configuration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::CreateVersionRequest.new + # + # # Call the create_version method. + # result = client.create_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.create_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified Version resource. + # You can specify the following fields depending on the App Engine + # environment and type of scaling that the version resource uses: + # + # **Standard environment** + # + # * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) + # + # *automatic scaling* in the standard environment: + # + # * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) + # + # *basic scaling* or *manual scaling* in the standard environment: + # + # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + # + # **Flexible environment** + # + # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) + # + # *automatic scaling* in the flexible environment: + # + # * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) + # + # *manual scaling* in the flexible environment: + # + # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) + # + # @overload update_version(request, options = nil) + # Pass arguments to `update_version` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::UpdateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::UpdateVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_version(name: nil, version: nil, update_mask: nil) + # Pass arguments to `update_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource to update. Example: + # `apps/myapp/services/default/versions/1`. + # @param version [::Google::Cloud::AppEngine::V1::Version, ::Hash] + # A Version containing the updated resource. Only fields set in the field + # mask will be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::UpdateVersionRequest.new + # + # # Call the update_version method. + # result = client.update_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.update_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing Version resource. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::AppEngine::V1::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppEngine::V1::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_version(name: nil) + # Pass arguments to `delete_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_engine/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppEngine::V1::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @versions_stub.delete_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Versions REST API. + # + # This class represents the configuration for Versions REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppEngine::V1::Versions::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_versions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_versions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_versions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Versions API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `create_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_version + ## + # RPC-specific configuration for `update_version` + # @return [::Gapic::Config::Method] + # + attr_reader :update_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + + # @private + def initialize parent_rpcs = nil + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + create_version_config = parent_rpcs.create_version if parent_rpcs.respond_to? :create_version + @create_version = ::Gapic::Config::Method.new create_version_config + update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version + @update_version = ::Gapic::Config::Method.new update_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/operations.rb new file mode 100644 index 000000000000..20a5e9589a2c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AppEngine + module V1 + module Versions + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Versions 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 Versions 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "appengine.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/service_stub.rb new file mode 100644 index 000000000000..660a3134b5d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/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/appengine/v1/appengine_pb" + +module Google + module Cloud + module AppEngine + module V1 + module Versions + module Rest + ## + # REST service stub for the Versions 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_versions REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::ListVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::ListVersionsResponse] + # A result object deserialized from the server's reply + def list_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_version REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppEngine::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppEngine::V1::Version] + # A result object deserialized from the server's reply + def get_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppEngine::V1::Version.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_version REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_version REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_version REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_versions REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^apps/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_version REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::GetVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_version REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::CreateVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/versions", + body: "version", + matches: [ + ["parent", %r{^apps/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_version REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "version", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_version REST call + # + # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/README.md new file mode 100644 index 000000000000..e1b16a276a9a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# App Engine Admin V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/appengine/v1/app_yaml.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/app_yaml.rb new file mode 100644 index 000000000000..f031e646eb4f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/app_yaml.rb @@ -0,0 +1,385 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/) + # configuration for API handlers. + # @!attribute [rw] auth_fail_action + # @return [::Google::Cloud::AppEngine::V1::AuthFailAction] + # Action to take when users access resources that require + # authentication. Defaults to `redirect`. + # @!attribute [rw] login + # @return [::Google::Cloud::AppEngine::V1::LoginRequirement] + # Level of login required to access this resource. Defaults to + # `optional`. + # @!attribute [rw] script + # @return [::String] + # Path to the script from the application root directory. + # @!attribute [rw] security_level + # @return [::Google::Cloud::AppEngine::V1::SecurityLevel] + # Security (HTTPS) enforcement for this URL. + # @!attribute [rw] url + # @return [::String] + # URL to serve the endpoint at. + class ApiConfigHandler + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom static error page to be served when an error occurs. + # @!attribute [rw] error_code + # @return [::Google::Cloud::AppEngine::V1::ErrorHandler::ErrorCode] + # Error condition this handler applies to. + # @!attribute [rw] static_file + # @return [::String] + # Static file content to be served for this error. + # @!attribute [rw] mime_type + # @return [::String] + # MIME type of file. Defaults to `text/html`. + class ErrorHandler + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error codes. + module ErrorCode + # Not specified. ERROR_CODE_DEFAULT is assumed. + ERROR_CODE_UNSPECIFIED = 0 + + # All other error types. + ERROR_CODE_DEFAULT = 0 + + # Application has exceeded a resource quota. + ERROR_CODE_OVER_QUOTA = 1 + + # Client blocked by the application's Denial of Service protection + # configuration. + ERROR_CODE_DOS_API_DENIAL = 2 + + # Deadline reached before the application responds. + ERROR_CODE_TIMEOUT = 3 + end + end + + # URL pattern and description of how the URL should be handled. App Engine can + # handle URLs by executing application code or by serving static files + # uploaded with the version, such as images, CSS, or JavaScript. + # @!attribute [rw] url_regex + # @return [::String] + # URL prefix. Uses regular expression syntax, which means regexp + # special characters must be escaped, but should not contain groupings. + # All URLs that begin with this prefix are handled by this handler, using the + # portion of the URL after the prefix as part of the file path. + # @!attribute [rw] static_files + # @return [::Google::Cloud::AppEngine::V1::StaticFilesHandler] + # Returns the contents of a file, such as an image, as the response. + # + # Note: The following fields are mutually exclusive: `static_files`, `script`, `api_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] script + # @return [::Google::Cloud::AppEngine::V1::ScriptHandler] + # Executes a script to handle the requests that match this URL + # pattern. Only the `auto` value is supported for Node.js in the + # App Engine standard environment, for example `"script": "auto"`. + # + # Note: The following fields are mutually exclusive: `script`, `static_files`, `api_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] api_endpoint + # @return [::Google::Cloud::AppEngine::V1::ApiEndpointHandler] + # Uses API Endpoints to handle requests. + # + # Note: The following fields are mutually exclusive: `api_endpoint`, `static_files`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] security_level + # @return [::Google::Cloud::AppEngine::V1::SecurityLevel] + # Security (HTTPS) enforcement for this URL. + # @!attribute [rw] login + # @return [::Google::Cloud::AppEngine::V1::LoginRequirement] + # Level of login required to access this resource. Not supported for Node.js + # in the App Engine standard environment. + # @!attribute [rw] auth_fail_action + # @return [::Google::Cloud::AppEngine::V1::AuthFailAction] + # Action to take when users access resources that require + # authentication. Defaults to `redirect`. + # @!attribute [rw] redirect_http_response_code + # @return [::Google::Cloud::AppEngine::V1::UrlMap::RedirectHttpResponseCode] + # `30x` code to use when performing redirects for the `secure` field. + # Defaults to `302`. + class UrlMap + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Redirect codes. + module RedirectHttpResponseCode + # Not specified. `302` is assumed. + REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0 + + # `301 Moved Permanently` code. + REDIRECT_HTTP_RESPONSE_CODE_301 = 1 + + # `302 Moved Temporarily` code. + REDIRECT_HTTP_RESPONSE_CODE_302 = 2 + + # `303 See Other` code. + REDIRECT_HTTP_RESPONSE_CODE_303 = 3 + + # `307 Temporary Redirect` code. + REDIRECT_HTTP_RESPONSE_CODE_307 = 4 + end + end + + # Files served directly to the user for a given URL, such as images, CSS + # stylesheets, or JavaScript source files. Static file handlers describe which + # files in the application directory are static files, and which URLs serve + # them. + # @!attribute [rw] path + # @return [::String] + # Path to the static files matched by the URL pattern, from the + # application root directory. The path can refer to text matched in groupings + # in the URL pattern. + # @!attribute [rw] upload_path_regex + # @return [::String] + # Regular expression that matches the file paths for all files that should be + # referenced by this handler. + # @!attribute [rw] http_headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # HTTP headers to use for all responses from these URLs. + # @!attribute [rw] mime_type + # @return [::String] + # MIME type used to serve all files served by this handler. + # + # Defaults to file-specific MIME types, which are derived from each file's + # filename extension. + # @!attribute [rw] expiration + # @return [::Google::Protobuf::Duration] + # Time a static file served by this handler should be cached + # by web proxies and browsers. + # @!attribute [rw] require_matching_file + # @return [::Boolean] + # Whether this handler should match the request if the file + # referenced by the handler does not exist. + # @!attribute [rw] application_readable + # @return [::Boolean] + # Whether files should also be uploaded as code data. By default, files + # declared in static file handlers are uploaded as static + # data and are only served to end users; they cannot be read by the + # application. If enabled, uploads are charged against both your code and + # static data storage resource quotas. + class StaticFilesHandler + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class HttpHeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Executes a script to handle the request that matches the URL pattern. + # @!attribute [rw] script_path + # @return [::String] + # Path to the script from the application root directory. + class ScriptHandler + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Uses Google Cloud Endpoints to handle requests. + # @!attribute [rw] script_path + # @return [::String] + # Path to the script from the application root directory. + class ApiEndpointHandler + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Health checking configuration for VM instances. Unhealthy instances + # are killed and replaced with new instances. Only applicable for + # instances in App Engine flexible environment. + # @!attribute [rw] disable_health_check + # @return [::Boolean] + # Whether to explicitly disable health checks for this instance. + # @!attribute [rw] host + # @return [::String] + # Host header to send when performing an HTTP health check. + # Example: "myapp.appspot.com" + # @!attribute [rw] healthy_threshold + # @return [::Integer] + # Number of consecutive successful health checks required before receiving + # traffic. + # @!attribute [rw] unhealthy_threshold + # @return [::Integer] + # Number of consecutive failed health checks required before removing + # traffic. + # @!attribute [rw] restart_threshold + # @return [::Integer] + # Number of consecutive failed health checks required before an instance is + # restarted. + # @!attribute [rw] check_interval + # @return [::Google::Protobuf::Duration] + # Interval between health checks. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Time before the health check is considered failed. + class HealthCheck + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Readiness checking configuration for VM instances. Unhealthy instances + # are removed from traffic rotation. + # @!attribute [rw] path + # @return [::String] + # The request path. + # @!attribute [rw] host + # @return [::String] + # Host header to send when performing a HTTP Readiness check. + # Example: "myapp.appspot.com" + # @!attribute [rw] failure_threshold + # @return [::Integer] + # Number of consecutive failed checks required before removing + # traffic. + # @!attribute [rw] success_threshold + # @return [::Integer] + # Number of consecutive successful checks required before receiving + # traffic. + # @!attribute [rw] check_interval + # @return [::Google::Protobuf::Duration] + # Interval between health checks. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Time before the check is considered failed. + # @!attribute [rw] app_start_timeout + # @return [::Google::Protobuf::Duration] + # A maximum time limit on application initialization, measured from moment + # the application successfully replies to a healthcheck until it is ready to + # serve traffic. + class ReadinessCheck + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Health checking configuration for VM instances. Unhealthy instances + # are killed and replaced with new instances. + # @!attribute [rw] path + # @return [::String] + # The request path. + # @!attribute [rw] host + # @return [::String] + # Host header to send when performing a HTTP Liveness check. + # Example: "myapp.appspot.com" + # @!attribute [rw] failure_threshold + # @return [::Integer] + # Number of consecutive failed checks required before considering the + # VM unhealthy. + # @!attribute [rw] success_threshold + # @return [::Integer] + # Number of consecutive successful checks required before considering + # the VM healthy. + # @!attribute [rw] check_interval + # @return [::Google::Protobuf::Duration] + # Interval between health checks. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Time before the check is considered failed. + # @!attribute [rw] initial_delay + # @return [::Google::Protobuf::Duration] + # The initial delay before starting to execute the checks. + class LivenessCheck + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Third-party Python runtime library that is required by the application. + # @!attribute [rw] name + # @return [::String] + # Name of the library. Example: "django". + # @!attribute [rw] version + # @return [::String] + # Version of the library to select, or "latest". + class Library + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Actions to take when the user is not logged in. + module AuthFailAction + # Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed. + AUTH_FAIL_ACTION_UNSPECIFIED = 0 + + # Redirects user to "accounts.google.com". The user is redirected back to the + # application URL after signing in or creating an account. + AUTH_FAIL_ACTION_REDIRECT = 1 + + # Rejects request with a `401` HTTP status code and an error + # message. + AUTH_FAIL_ACTION_UNAUTHORIZED = 2 + end + + # Methods to restrict access to a URL based on login status. + module LoginRequirement + # Not specified. `LOGIN_OPTIONAL` is assumed. + LOGIN_UNSPECIFIED = 0 + + # Does not require that the user is signed in. + LOGIN_OPTIONAL = 1 + + # If the user is not signed in, the `auth_fail_action` is taken. + # In addition, if the user is not an administrator for the + # application, they are given an error message regardless of + # `auth_fail_action`. If the user is an administrator, the handler + # proceeds. + LOGIN_ADMIN = 2 + + # If the user has signed in, the handler proceeds normally. Otherwise, the + # auth_fail_action is taken. + LOGIN_REQUIRED = 3 + end + + # Methods to enforce security (HTTPS) on a URL. + module SecurityLevel + # Not specified. + SECURE_UNSPECIFIED = 0 + + # Both HTTP and HTTPS requests with URLs that match the handler succeed + # without redirects. The application can examine the request to determine + # which protocol was used, and respond accordingly. + SECURE_DEFAULT = 0 + + # Requests for a URL that match this handler that use HTTPS are automatically + # redirected to the HTTP equivalent URL. + SECURE_NEVER = 1 + + # Both HTTP and HTTPS requests with URLs that match the handler succeed + # without redirects. The application can examine the request to determine + # which protocol was used and respond accordingly. + SECURE_OPTIONAL = 2 + + # Requests for a URL that match this handler that do not use HTTPS are + # automatically redirected to the HTTPS URL with the same path. Query + # parameters are reserved for the redirect. + SECURE_ALWAYS = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/appengine.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/appengine.rb new file mode 100644 index 000000000000..a75c2b72ccb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/appengine.rb @@ -0,0 +1,639 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # Request message for `Applications.GetApplication`. + # @!attribute [rw] name + # @return [::String] + # Name of the Application resource to get. Example: `apps/myapp`. + class GetApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Applications.CreateApplication`. + # @!attribute [rw] application + # @return [::Google::Cloud::AppEngine::V1::Application] + # Application configuration. + class CreateApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Applications.UpdateApplication`. + # @!attribute [rw] name + # @return [::String] + # Name of the Application resource to update. Example: `apps/myapp`. + # @!attribute [rw] application + # @return [::Google::Cloud::AppEngine::V1::Application] + # An Application containing the updated resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Standard field mask for the set of fields to be updated. + class UpdateApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for 'Applications.RepairApplication'. + # @!attribute [rw] name + # @return [::String] + # Name of the application to repair. Example: `apps/myapp` + class RepairApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Services.ListServices`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum results to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `Services.ListServices`. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::AppEngine::V1::Service>] + # The services belonging to the requested application. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Services.GetService`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: `apps/myapp/services/default`. + class GetServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Services.UpdateService`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource to update. Example: `apps/myapp/services/default`. + # @!attribute [rw] service + # @return [::Google::Cloud::AppEngine::V1::Service] + # A Service resource containing the updated service. Only fields set in the + # field mask will be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Standard field mask for the set of fields to be updated. + # @!attribute [rw] migrate_traffic + # @return [::Boolean] + # Set to `true` to gradually shift traffic to one or more versions that you + # specify. By default, traffic is shifted immediately. + # For gradual traffic migration, the target versions + # must be located within instances that are configured for both + # [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) + # and + # [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). + # You must specify the + # [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) + # field in the Service resource. Gradual traffic migration is not + # supported in the App Engine flexible environment. For examples, see + # [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + class UpdateServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Services.DeleteService`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: `apps/myapp/services/default`. + class DeleteServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Versions.ListVersions`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent Service resource. Example: + # `apps/myapp/services/default`. + # @!attribute [rw] view + # @return [::Google::Cloud::AppEngine::V1::VersionView] + # Controls the set of fields returned in the `List` response. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum results to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `Versions.ListVersions`. + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::AppEngine::V1::Version>] + # The versions belonging to the requested service. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Versions.GetVersion`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1`. + # @!attribute [rw] view + # @return [::Google::Cloud::AppEngine::V1::VersionView] + # Controls the set of fields returned in the `Get` response. + class GetVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Versions.CreateVersion`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent resource to create this version under. Example: + # `apps/myapp/services/default`. + # @!attribute [rw] version + # @return [::Google::Cloud::AppEngine::V1::Version] + # Application deployment configuration. + class CreateVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Versions.UpdateVersion`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource to update. Example: + # `apps/myapp/services/default/versions/1`. + # @!attribute [rw] version + # @return [::Google::Cloud::AppEngine::V1::Version] + # A Version containing the updated resource. Only fields set in the field + # mask will be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. + class UpdateVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Versions.DeleteVersion`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1`. + class DeleteVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Instances.ListInstances`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent Version resource. Example: + # `apps/myapp/services/default/versions/v1`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum results to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListInstancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `Instances.ListInstances`. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::AppEngine::V1::Instance>] + # The instances belonging to the requested version. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListInstancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Instances.GetInstance`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Instances.DeleteInstance`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + class DeleteInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Instances.DebugInstance`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: + # `apps/myapp/services/default/versions/v1/instances/instance-1`. + # @!attribute [rw] ssh_key + # @return [::String] + # Public SSH key to add to the instance. Examples: + # + # * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]` + # * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}` + # + # For more information, see + # [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). + class DebugInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Firewall.ListIngressRules`. + # @!attribute [rw] parent + # @return [::String] + # Name of the Firewall collection to retrieve. + # Example: `apps/myapp/firewall/ingressRules`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum results to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Continuation token for fetching the next page of results. + # @!attribute [rw] matching_address + # @return [::String] + # A valid IP Address. If set, only rules matching this address will be + # returned. The first returned rule will be the rule that fires on requests + # from this IP. + class ListIngressRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `Firewall.ListIngressRules`. + # @!attribute [rw] ingress_rules + # @return [::Array<::Google::Cloud::AppEngine::V1::FirewallRule>] + # The ingress FirewallRules for this application. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListIngressRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Firewall.BatchUpdateIngressRules`. + # @!attribute [rw] name + # @return [::String] + # Name of the Firewall collection to set. + # Example: `apps/myapp/firewall/ingressRules`. + # @!attribute [rw] ingress_rules + # @return [::Array<::Google::Cloud::AppEngine::V1::FirewallRule>] + # A list of FirewallRules to replace the existing set. + class BatchUpdateIngressRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `Firewall.UpdateAllIngressRules`. + # @!attribute [rw] ingress_rules + # @return [::Array<::Google::Cloud::AppEngine::V1::FirewallRule>] + # The full list of ingress FirewallRules for this application. + class BatchUpdateIngressRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Firewall.CreateIngressRule`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent Firewall collection in which to create a new rule. + # Example: `apps/myapp/firewall/ingressRules`. + # @!attribute [rw] rule + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # A FirewallRule containing the new resource. + # + # The user may optionally provide a position at which the new rule will be + # placed. The positions define a sequential list starting at 1. If a rule + # already exists at the given position, rules greater than the provided + # position will be moved forward by one. + # + # If no position is provided, the server will place the rule as the second to + # last rule in the sequence before the required default allow-all or deny-all + # rule. + class CreateIngressRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Firewall.GetIngressRule`. + # @!attribute [rw] name + # @return [::String] + # Name of the Firewall resource to retrieve. + # Example: `apps/myapp/firewall/ingressRules/100`. + class GetIngressRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Firewall.UpdateIngressRule`. + # @!attribute [rw] name + # @return [::String] + # Name of the Firewall resource to update. + # Example: `apps/myapp/firewall/ingressRules/100`. + # @!attribute [rw] rule + # @return [::Google::Cloud::AppEngine::V1::FirewallRule] + # A FirewallRule containing the updated resource + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. + class UpdateIngressRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `Firewall.DeleteIngressRule`. + # @!attribute [rw] name + # @return [::String] + # Name of the Firewall resource to delete. + # Example: `apps/myapp/firewall/ingressRules/100`. + class DeleteIngressRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `AuthorizedDomains.ListAuthorizedDomains`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum results to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListAuthorizedDomainsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `AuthorizedDomains.ListAuthorizedDomains`. + # @!attribute [rw] domains + # @return [::Array<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] + # The authorized domains belonging to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListAuthorizedDomainsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `AuthorizedCertificates.ListAuthorizedCertificates`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent `Application` resource. Example: `apps/myapp`. + # @!attribute [rw] view + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] + # Controls the set of fields returned in the `LIST` response. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum results to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListAuthorizedCertificatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `AuthorizedCertificates.ListAuthorizedCertificates`. + # @!attribute [rw] certificates + # @return [::Array<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] + # The SSL certificates the user is authorized to administer. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListAuthorizedCertificatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `AuthorizedCertificates.GetAuthorizedCertificate`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: + # `apps/myapp/authorizedCertificates/12345`. + # @!attribute [rw] view + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] + # Controls the set of fields returned in the `GET` response. + class GetAuthorizedCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent `Application` resource. Example: `apps/myapp`. + # @!attribute [rw] certificate + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # SSL certificate data. + class CreateAuthorizedCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource to update. Example: + # `apps/myapp/authorizedCertificates/12345`. + # @!attribute [rw] certificate + # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] + # An `AuthorizedCertificate` containing the updated resource. Only fields set + # in the field mask will be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. Updates are only + # supported on the `certificate_raw_data` and `display_name` fields. + class UpdateAuthorizedCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource to delete. Example: + # `apps/myapp/authorizedCertificates/12345`. + class DeleteAuthorizedCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `DomainMappings.ListDomainMappings`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum results to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListDomainMappingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `DomainMappings.ListDomainMappings`. + # @!attribute [rw] domain_mappings + # @return [::Array<::Google::Cloud::AppEngine::V1::DomainMapping>] + # The domain mappings for the application. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token for fetching the next page of results. + class ListDomainMappingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `DomainMappings.GetDomainMapping`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource requested. Example: + # `apps/myapp/domainMappings/example.com`. + class GetDomainMappingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `DomainMappings.CreateDomainMapping`. + # @!attribute [rw] parent + # @return [::String] + # Name of the parent Application resource. Example: `apps/myapp`. + # @!attribute [rw] domain_mapping + # @return [::Google::Cloud::AppEngine::V1::DomainMapping] + # Domain mapping configuration. + # @!attribute [rw] override_strategy + # @return [::Google::Cloud::AppEngine::V1::DomainOverrideStrategy] + # Whether the domain creation should override any existing mappings for this + # domain. By default, overrides are rejected. + class CreateDomainMappingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `DomainMappings.UpdateDomainMapping`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource to update. Example: + # `apps/myapp/domainMappings/example.com`. + # @!attribute [rw] domain_mapping + # @return [::Google::Cloud::AppEngine::V1::DomainMapping] + # A domain mapping containing the updated resource. Only fields set + # in the field mask will be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Standard field mask for the set of fields to be updated. + class UpdateDomainMappingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `DomainMappings.DeleteDomainMapping`. + # @!attribute [rw] name + # @return [::String] + # Name of the resource to delete. Example: + # `apps/myapp/domainMappings/example.com`. + class DeleteDomainMappingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields that should be returned when {::Google::Cloud::AppEngine::V1::Version Version} resources + # are retrieved. + module VersionView + # Basic version information including scaling and inbound services, + # but not detailed deployment information. + BASIC = 0 + + # The information from `BASIC`, plus detailed information about the + # deployment. This format is required when creating resources, but + # is not returned in `Get` or `List` by default. + FULL = 1 + end + + # Fields that should be returned when an AuthorizedCertificate resource is + # retrieved. + module AuthorizedCertificateView + # Basic certificate information, including applicable domains and expiration + # date. + BASIC_CERTIFICATE = 0 + + # The information from `BASIC_CERTIFICATE`, plus detailed information on the + # domain mappings that have this certificate mapped. + FULL_CERTIFICATE = 1 + end + + # Override strategy for mutating an existing mapping. + module DomainOverrideStrategy + # Strategy unspecified. Defaults to `STRICT`. + UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY = 0 + + # Overrides not allowed. If a mapping already exists for the + # specified domain, the request will return an ALREADY_EXISTS (409). + STRICT = 1 + + # Overrides allowed. If a mapping already exists for the specified domain, + # the request will overwrite it. Note that this might stop another + # Google product from serving. For example, if the domain is + # mapped to another App Engine application, that app will no + # longer serve from that domain. + OVERRIDE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/application.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/application.rb new file mode 100644 index 000000000000..0ddf979e0ff5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/application.rb @@ -0,0 +1,197 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # An Application resource contains the top-level configuration of an App + # Engine application. + # @!attribute [rw] name + # @return [::String] + # Full path to the Application resource in the API. + # Example: `apps/myapp`. + # @!attribute [rw] id + # @return [::String] + # Identifier of the Application resource. This identifier is equivalent + # to the project ID of the Google Cloud Platform project where you want to + # deploy your application. + # Example: `myapp`. + # @!attribute [rw] dispatch_rules + # @return [::Array<::Google::Cloud::AppEngine::V1::UrlDispatchRule>] + # HTTP path dispatch rules for requests to the application that do not + # explicitly target a service or version. Rules are order-dependent. + # Up to 20 dispatch rules can be supported. + # @!attribute [rw] auth_domain + # @return [::String] + # Google Apps authentication domain that controls which users can access + # this application. + # + # Defaults to open access for any Google Account. + # @!attribute [rw] location_id + # @return [::String] + # Location from which this application runs. Application instances + # run out of the data centers in the specified location, which is also where + # all of the application's end user content is stored. + # + # Defaults to `us-central`. + # + # View the list of + # [supported locations](https://cloud.google.com/appengine/docs/locations). + # @!attribute [rw] code_bucket + # @return [::String] + # Google Cloud Storage bucket that can be used for storing files + # associated with this application. This bucket is associated with the + # application and can be used by the gcloud deployment commands. + # @!attribute [rw] default_cookie_expiration + # @return [::Google::Protobuf::Duration] + # Cookie expiration policy for this application. + # @!attribute [rw] serving_status + # @return [::Google::Cloud::AppEngine::V1::Application::ServingStatus] + # Serving status of this application. + # @!attribute [rw] default_hostname + # @return [::String] + # Hostname used to reach this application, as resolved by App Engine. + # @!attribute [rw] default_bucket + # @return [::String] + # Google Cloud Storage bucket that can be used by this application to store + # content. + # @!attribute [rw] service_account + # @return [::String] + # The service account associated with the application. + # This is the app-level default identity. If no identity provided during + # create version, Admin API will fallback to this one. + # @!attribute [rw] iap + # @return [::Google::Cloud::AppEngine::V1::Application::IdentityAwareProxy] + # @!attribute [rw] gcr_domain + # @return [::String] + # The Google Container Registry domain used for storing managed build docker + # images for this application. + # @!attribute [rw] database_type + # @return [::Google::Cloud::AppEngine::V1::Application::DatabaseType] + # The type of the Cloud Firestore or Cloud Datastore database associated with + # this application. + # @!attribute [rw] feature_settings + # @return [::Google::Cloud::AppEngine::V1::Application::FeatureSettings] + # The feature specific settings to be used in the application. + class Application + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Identity-Aware Proxy + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the serving infrastructure will authenticate and + # authorize all incoming requests. + # + # If true, the `oauth2_client_id` and `oauth2_client_secret` + # fields must be non-empty. + # @!attribute [rw] oauth2_client_id + # @return [::String] + # OAuth2 client ID to use for the authentication flow. + # @!attribute [rw] oauth2_client_secret + # @return [::String] + # OAuth2 client secret to use for the authentication flow. + # + # For security reasons, this value cannot be retrieved via the API. + # Instead, the SHA-256 hash of the value is returned in the + # `oauth2_client_secret_sha256` field. + # @!attribute [rw] oauth2_client_secret_sha256 + # @return [::String] + # Hex-encoded SHA-256 hash of the client secret. + class IdentityAwareProxy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The feature specific settings to be used in the application. These define + # behaviors that are user configurable. + # @!attribute [rw] split_health_checks + # @return [::Boolean] + # Boolean value indicating if split health checks should be used instead + # of the legacy health checks. At an app.yaml level, this means defaulting + # to 'readiness_check' and 'liveness_check' values instead of + # 'health_check' ones. Once the legacy 'health_check' behavior is + # deprecated, and this value is always true, this setting can + # be removed. + # @!attribute [rw] use_container_optimized_os + # @return [::Boolean] + # If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/) + # base image for VMs, rather than a base Debian image. + class FeatureSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module ServingStatus + # Serving status is unspecified. + UNSPECIFIED = 0 + + # Application is serving. + SERVING = 1 + + # Application has been disabled by the user. + USER_DISABLED = 2 + + # Application has been disabled by the system. + SYSTEM_DISABLED = 3 + end + + module DatabaseType + # Database type is unspecified. + DATABASE_TYPE_UNSPECIFIED = 0 + + # Cloud Datastore + CLOUD_DATASTORE = 1 + + # Cloud Firestore Native + CLOUD_FIRESTORE = 2 + + # Cloud Firestore in Datastore Mode + CLOUD_DATASTORE_COMPATIBILITY = 3 + end + end + + # Rules to match an HTTP request and dispatch that request to a service. + # @!attribute [rw] domain + # @return [::String] + # Domain name to match against. The wildcard "`*`" is supported if + # specified before a period: "`*.`". + # + # Defaults to matching all domains: "`*`". + # @!attribute [rw] path + # @return [::String] + # Pathname within the host. Must start with a "`/`". A + # single "`*`" can be included at the end of the path. + # + # The sum of the lengths of the domain and path may not + # exceed 100 characters. + # @!attribute [rw] service + # @return [::String] + # Resource ID of a service in this application that should + # serve the matched request. The service must already + # exist. Example: `default`. + class UrlDispatchRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/audit_data.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/audit_data.rb new file mode 100644 index 000000000000..1d081c031ecd --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/audit_data.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! + + +module Google + module Cloud + module AppEngine + module V1 + # App Engine admin service audit log. + # @!attribute [rw] update_service + # @return [::Google::Cloud::AppEngine::V1::UpdateServiceMethod] + # Detailed information about UpdateService call. + # + # Note: The following fields are mutually exclusive: `update_service`, `create_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_version + # @return [::Google::Cloud::AppEngine::V1::CreateVersionMethod] + # Detailed information about CreateVersion call. + # + # Note: The following fields are mutually exclusive: `create_version`, `update_service`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AuditData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detailed information about UpdateService call. + # @!attribute [rw] request + # @return [::Google::Cloud::AppEngine::V1::UpdateServiceRequest] + # Update service request. + class UpdateServiceMethod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detailed information about CreateVersion call. + # @!attribute [rw] request + # @return [::Google::Cloud::AppEngine::V1::CreateVersionRequest] + # Create version request. + class CreateVersionMethod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/certificate.rb new file mode 100644 index 000000000000..93453db57d1d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/certificate.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # An SSL certificate that a user has been authorized to administer. A user + # is authorized to administer any certificate that applies to one of their + # authorized domains. + # @!attribute [rw] name + # @return [::String] + # Full path to the `AuthorizedCertificate` resource in the API. Example: + # `apps/myapp/authorizedCertificates/12345`. + # @!attribute [rw] id + # @return [::String] + # Relative name of the certificate. This is a unique value autogenerated + # on `AuthorizedCertificate` resource creation. Example: `12345`. + # @!attribute [rw] display_name + # @return [::String] + # The user-specified display name of the certificate. This is not + # guaranteed to be unique. Example: `My Certificate`. + # @!attribute [rw] domain_names + # @return [::Array<::String>] + # Topmost applicable domains of this certificate. This certificate + # applies to these domains and their subdomains. Example: `example.com`. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # The time when this certificate expires. To update the renewal time on this + # certificate, upload an SSL certificate with a different expiration time + # using [`AuthorizedCertificates.UpdateAuthorizedCertificate`](). + # @!attribute [rw] certificate_raw_data + # @return [::Google::Cloud::AppEngine::V1::CertificateRawData] + # The SSL certificate serving the `AuthorizedCertificate` resource. This + # must be obtained independently from a certificate authority. + # @!attribute [rw] managed_certificate + # @return [::Google::Cloud::AppEngine::V1::ManagedCertificate] + # Only applicable if this certificate is managed by App Engine. Managed + # certificates are tied to the lifecycle of a `DomainMapping` and cannot be + # updated or deleted via the `AuthorizedCertificates` API. If this + # certificate is manually administered by the user, this field will be empty. + # @!attribute [rw] visible_domain_mappings + # @return [::Array<::String>] + # The full paths to user visible Domain Mapping resources that have this + # certificate mapped. Example: `apps/myapp/domainMappings/example.com`. + # + # This may not represent the full list of mapped domain mappings if the user + # does not have `VIEWER` permissions on all of the applications that have + # this certificate mapped. See `domain_mappings_count` for a complete count. + # + # Only returned by `GET` or `LIST` requests when specifically requested by + # the `view=FULL_CERTIFICATE` option. + # @!attribute [rw] domain_mappings_count + # @return [::Integer] + # Aggregate count of the domain mappings with this certificate mapped. This + # count includes domain mappings on applications for which the user does not + # have `VIEWER` permissions. + # + # Only returned by `GET` or `LIST` requests when specifically requested by + # the `view=FULL_CERTIFICATE` option. + class AuthorizedCertificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An SSL certificate obtained from a certificate authority. + # @!attribute [rw] public_certificate + # @return [::String] + # PEM encoded x.509 public key certificate. This field is set once on + # certificate creation. Must include the header and footer. Example: + #
+        #     -----BEGIN CERTIFICATE-----
+        #     
+        #     -----END CERTIFICATE-----
+        #     
+ # @!attribute [rw] private_key + # @return [::String] + # Unencrypted PEM encoded RSA private key. This field is set once on + # certificate creation and then encrypted. The key size must be 2048 + # bits or fewer. Must include the header and footer. Example: + #
+        #     -----BEGIN RSA PRIVATE KEY-----
+        #     
+        #     -----END RSA PRIVATE KEY-----
+        #     
+ class CertificateRawData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A certificate managed by App Engine. + # @!attribute [rw] last_renewal_time + # @return [::Google::Protobuf::Timestamp] + # Time at which the certificate was last renewed. The renewal process is + # fully managed. Certificate renewal will automatically occur before the + # certificate expires. Renewal errors can be tracked via `ManagementStatus`. + # @!attribute [rw] status + # @return [::Google::Cloud::AppEngine::V1::ManagementStatus] + # Status of certificate management. Refers to the most recent certificate + # acquisition or renewal attempt. + class ManagedCertificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of certificate management. Refers to the most recent certificate + # acquisition or renewal attempt. + module ManagementStatus + MANAGEMENT_STATUS_UNSPECIFIED = 0 + + # Certificate was successfully obtained and inserted into the serving + # system. + OK = 1 + + # Certificate is under active attempts to acquire or renew. + PENDING = 2 + + # Most recent renewal failed due to an invalid DNS setup and will be + # retried. Renewal attempts will continue to fail until the certificate + # domain's DNS configuration is fixed. The last successfully provisioned + # certificate may still be serving. + FAILED_RETRYING_NOT_VISIBLE = 4 + + # All renewal attempts have been exhausted, likely due to an invalid DNS + # setup. + FAILED_PERMANENT = 6 + + # Most recent renewal failed due to an explicit CAA record that does not + # include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will + # continue to fail until the CAA is reconfigured. The last successfully + # provisioned certificate may still be serving. + FAILED_RETRYING_CAA_FORBIDDEN = 7 + + # Most recent renewal failed due to a CAA retrieval failure. This means that + # the domain's DNS provider does not properly handle CAA records, failing + # requests for CAA records when no CAA records are defined. Renewals will + # continue to fail until the DNS provider is changed or a CAA record is + # added for the given domain. The last successfully provisioned certificate + # may still be serving. + FAILED_RETRYING_CAA_CHECKING = 8 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/deploy.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/deploy.rb new file mode 100644 index 000000000000..d0ed79f568df --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/deploy.rb @@ -0,0 +1,130 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # Code and application artifacts used to deploy a version to App Engine. + # @!attribute [rw] files + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AppEngine::V1::FileInfo}] + # Manifest of the files stored in Google Cloud Storage that are included + # as part of this version. All files must be readable using the + # credentials supplied with this call. + # @!attribute [rw] container + # @return [::Google::Cloud::AppEngine::V1::ContainerInfo] + # The Docker image for the container that runs the version. + # Only applicable for instances running in the App Engine flexible environment. + # @!attribute [rw] zip + # @return [::Google::Cloud::AppEngine::V1::ZipInfo] + # The zip file for this deployment, if this is a zip deployment. + # @!attribute [rw] cloud_build_options + # @return [::Google::Cloud::AppEngine::V1::CloudBuildOptions] + # Options for any Google Cloud Build builds created as a part of this + # deployment. + # + # These options will only be used if a new build is created, such as when + # deploying to the App Engine flexible environment using files or zip. + class Deployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AppEngine::V1::FileInfo] + class FilesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Single source file that is part of the version to be deployed. Each source + # file that is deployed must be specified separately. + # @!attribute [rw] source_url + # @return [::String] + # URL source to use to fetch this file. Must be a URL to a resource in + # Google Cloud Storage in the form + # 'http(s)://storage.googleapis.com/\/\'. + # @!attribute [rw] sha1_sum + # @return [::String] + # The SHA1 hash of the file, in hex. + # @!attribute [rw] mime_type + # @return [::String] + # The MIME type of the file. + # + # Defaults to the value from Google Cloud Storage. + class FileInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Docker image that is used to create a container and start a VM instance for + # the version that you deploy. Only applicable for instances running in the App + # Engine flexible environment. + # @!attribute [rw] image + # @return [::String] + # URI to the hosted container image in Google Container Registry. The URI + # must be fully qualified and include a tag or digest. + # Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" + class ContainerInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for the build operations performed as a part of the version + # deployment. Only applicable for App Engine flexible environment when creating + # a version using source code directly. + # @!attribute [rw] app_yaml_path + # @return [::String] + # Path to the yaml file used in deployment, used to determine runtime + # configuration details. + # + # Required for flexible environment builds. + # + # See https://cloud.google.com/appengine/docs/standard/python/config/appref + # for more details. + # @!attribute [rw] cloud_build_timeout + # @return [::Google::Protobuf::Duration] + # The Cloud Build timeout used as part of any dependent builds performed by + # version creation. Defaults to 10 minutes. + class CloudBuildOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The zip file information for a zip deployment. + # @!attribute [rw] source_url + # @return [::String] + # URL of the zip file to deploy from. Must be a URL to a resource in + # Google Cloud Storage in the form + # 'http(s)://storage.googleapis.com/\/\'. + # @!attribute [rw] files_count + # @return [::Integer] + # An estimate of the number of files in a zip for a zip deployment. + # If set, must be greater than or equal to the actual number of files. + # Used for optimizing performance; if not provided, deployment may be slow. + class ZipInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain.rb new file mode 100644 index 000000000000..8fd2fddc232b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # A domain that a user has been authorized to administer. To authorize use + # of a domain, verify ownership via + # [Search Console](https://search.google.com/search-console/welcome). + # @!attribute [rw] name + # @return [::String] + # Full path to the `AuthorizedDomain` resource in the API. Example: + # `apps/myapp/authorizedDomains/example.com`. + # @!attribute [rw] id + # @return [::String] + # Fully qualified domain name of the domain authorized for use. Example: + # `example.com`. + class AuthorizedDomain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain_mapping.rb new file mode 100644 index 000000000000..a78b09f03a18 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain_mapping.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # A domain serving an App Engine application. + # @!attribute [rw] name + # @return [::String] + # Full path to the `DomainMapping` resource in the API. Example: + # `apps/myapp/domainMapping/example.com`. + # @!attribute [rw] id + # @return [::String] + # Relative name of the domain serving the application. Example: + # `example.com`. + # @!attribute [rw] ssl_settings + # @return [::Google::Cloud::AppEngine::V1::SslSettings] + # SSL configuration for this domain. If unconfigured, this domain will not + # serve with SSL. + # @!attribute [rw] resource_records + # @return [::Array<::Google::Cloud::AppEngine::V1::ResourceRecord>] + # The resource records required to configure this domain mapping. These + # records must be added to the domain's DNS configuration in order to + # serve the application via this domain mapping. + class DomainMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SSL configuration for a `DomainMapping` resource. + # @!attribute [rw] certificate_id + # @return [::String] + # ID of the `AuthorizedCertificate` resource configuring SSL for the + # application. Clearing this field will remove SSL support. + # + # By default, a managed certificate is automatically created for every + # domain mapping. To omit SSL support or to configure SSL manually, specify + # `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must + # be authorized to administer the `AuthorizedCertificate` resource to + # manually map it to a `DomainMapping` resource. + # Example: `12345`. + # @!attribute [rw] ssl_management_type + # @return [::Google::Cloud::AppEngine::V1::SslSettings::SslManagementType] + # SSL management type for this domain. If `AUTOMATIC`, a managed certificate + # is automatically provisioned. If `MANUAL`, `certificate_id` must be + # manually specified in order to configure SSL for this domain. + # @!attribute [rw] pending_managed_certificate_id + # @return [::String] + # ID of the managed `AuthorizedCertificate` resource currently being + # provisioned, if applicable. Until the new managed certificate has been + # successfully provisioned, the previous SSL state will be preserved. Once + # the provisioning process completes, the `certificate_id` field will reflect + # the new managed certificate and this field will be left empty. To remove + # SSL support while there is still a pending managed certificate, clear the + # `certificate_id` field with an `UpdateDomainMappingRequest`. + class SslSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The SSL management type for this domain. + module SslManagementType + # Defaults to `AUTOMATIC`. + SSL_MANAGEMENT_TYPE_UNSPECIFIED = 0 + + # SSL support for this domain is configured automatically. The mapped SSL + # certificate will be automatically renewed. + AUTOMATIC = 1 + + # SSL support for this domain is configured manually by the user. Either + # the domain has no SSL support or a user-obtained SSL certificate has been + # explictly mapped to this domain. + MANUAL = 2 + end + end + + # A DNS resource record. + # @!attribute [rw] name + # @return [::String] + # Relative name of the object affected by this record. Only applicable for + # `CNAME` records. Example: 'www'. + # @!attribute [rw] rrdata + # @return [::String] + # Data for this record. Values vary by record type, as defined in RFC 1035 + # (section 5) and RFC 1034 (section 3.6.1). + # @!attribute [rw] type + # @return [::Google::Cloud::AppEngine::V1::ResourceRecord::RecordType] + # Resource record type. Example: `AAAA`. + class ResourceRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A resource record type. + module RecordType + # An unknown resource record. + RECORD_TYPE_UNSPECIFIED = 0 + + # An A resource record. Data is an IPv4 address. + A = 1 + + # An AAAA resource record. Data is an IPv6 address. + AAAA = 2 + + # A CNAME resource record. Data is a domain name to be aliased. + CNAME = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/firewall.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/firewall.rb new file mode 100644 index 000000000000..7ec535b28263 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/firewall.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # A single firewall rule that is evaluated against incoming traffic + # and provides an action to take on matched requests. + # @!attribute [rw] priority + # @return [::Integer] + # A positive integer between [1, Int32.MaxValue-1] that defines the order of + # rule evaluation. Rules with the lowest priority are evaluated first. + # + # A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic + # when no previous rule matches. Only the action of this rule can be modified + # by the user. + # @!attribute [rw] action + # @return [::Google::Cloud::AppEngine::V1::FirewallRule::Action] + # The action to take on matched requests. + # @!attribute [rw] source_range + # @return [::String] + # IP address or range, defined using CIDR notation, of requests that this + # rule applies to. You can use the wildcard character "*" to match all IPs + # equivalent to "0/0" and "::/0" together. + # Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + # or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + # + # + #

Truncation will be silently performed on addresses which are not + # properly truncated. For example, `1.2.3.4/24` is accepted as the same + # address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted + # as the same address as `2001:db8::/32`. + # @!attribute [rw] description + # @return [::String] + # An optional string description of this rule. + # This field has a maximum length of 100 characters. + class FirewallRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Available actions to take on matching requests. + module Action + UNSPECIFIED_ACTION = 0 + + # Matching requests are allowed. + ALLOW = 1 + + # Matching requests are denied. + DENY = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/instance.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/instance.rb new file mode 100644 index 000000000000..68a656bd90ea --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/instance.rb @@ -0,0 +1,137 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # An Instance resource is the computing unit that App Engine uses to + # automatically scale an application. + # @!attribute [r] name + # @return [::String] + # Output only. Full path to the Instance resource in the API. + # Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. + # @!attribute [r] id + # @return [::String] + # Output only. Relative name of the instance within the version. + # Example: `instance-1`. + # @!attribute [r] app_engine_release + # @return [::String] + # Output only. App Engine release this instance is running on. + # @!attribute [r] availability + # @return [::Google::Cloud::AppEngine::V1::Instance::Availability] + # Output only. Availability of the instance. + # @!attribute [r] vm_name + # @return [::String] + # Output only. Name of the virtual machine where this instance lives. Only applicable + # for instances in App Engine flexible environment. + # @!attribute [r] vm_zone_name + # @return [::String] + # Output only. Zone where the virtual machine is located. Only applicable for instances + # in App Engine flexible environment. + # @!attribute [r] vm_id + # @return [::String] + # Output only. Virtual machine ID of this instance. Only applicable for instances in + # App Engine flexible environment. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time that this instance was started. + # @!attribute [r] requests + # @return [::Integer] + # Output only. Number of requests since this instance was started. + # @!attribute [r] errors + # @return [::Integer] + # Output only. Number of errors since this instance was started. + # @!attribute [r] qps + # @return [::Float] + # Output only. Average queries per second (QPS) over the last minute. + # @!attribute [r] average_latency + # @return [::Integer] + # Output only. Average latency (ms) over the last minute. + # @!attribute [r] memory_usage + # @return [::Integer] + # Output only. Total memory in use (bytes). + # @!attribute [r] vm_status + # @return [::String] + # Output only. Status of the virtual machine where this instance lives. Only applicable + # for instances in App Engine flexible environment. + # @!attribute [r] vm_debug_enabled + # @return [::Boolean] + # Output only. Whether this instance is in debug mode. Only applicable for instances in + # App Engine flexible environment. + # @!attribute [r] vm_ip + # @return [::String] + # Output only. The IP address of this instance. Only applicable for instances in App + # Engine flexible environment. + # @!attribute [r] vm_liveness + # @return [::Google::Cloud::AppEngine::V1::Instance::Liveness::LivenessState] + # Output only. The liveness health check of this instance. Only applicable for instances + # in App Engine flexible environment. + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Wrapper for LivenessState enum. + class Liveness + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Liveness health check status for Flex instances. + module LivenessState + # There is no liveness health check for the instance. Only applicable for + # instances in App Engine standard environment. + LIVENESS_STATE_UNSPECIFIED = 0 + + # The health checking system is aware of the instance but its health is + # not known at the moment. + UNKNOWN = 1 + + # The instance is reachable i.e. a connection to the application health + # checking endpoint can be established, and conforms to the requirements + # defined by the health check. + HEALTHY = 2 + + # The instance is reachable, but does not conform to the requirements + # defined by the health check. + UNHEALTHY = 3 + + # The instance is being drained. The existing connections to the instance + # have time to complete, but the new ones are being refused. + DRAINING = 4 + + # The instance is unreachable i.e. a connection to the application health + # checking endpoint cannot be established, or the server does not respond + # within the specified timeout. + TIMEOUT = 5 + end + end + + # Availability of the instance. + module Availability + UNSPECIFIED = 0 + + RESIDENT = 1 + + DYNAMIC = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/location.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/location.rb new file mode 100644 index 000000000000..2df709d7a157 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/location.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # Metadata for the given [google.cloud.location.Location][google.cloud.location.Location]. + # @!attribute [rw] standard_environment_available + # @return [::Boolean] + # App Engine standard environment is available in the given location. + # @!attribute [rw] flexible_environment_available + # @return [::Boolean] + # App Engine flexible environment is available in the given location. + # @!attribute [r] search_api_available + # @return [::Boolean] + # Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search) + # is available in the given location. + class LocationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/network_settings.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/network_settings.rb new file mode 100644 index 000000000000..c93962639ddf --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/network_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! + + +module Google + module Cloud + module AppEngine + module V1 + # A NetworkSettings resource is a container for ingress settings for a version + # or service. + # @!attribute [rw] ingress_traffic_allowed + # @return [::Google::Cloud::AppEngine::V1::NetworkSettings::IngressTrafficAllowed] + # The ingress settings for version or service. + class NetworkSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # If unspecified, INGRESS_TRAFFIC_ALLOWED_ALL will be used. + module IngressTrafficAllowed + # Unspecified + INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED = 0 + + # Allow HTTP traffic from public and private sources. + INGRESS_TRAFFIC_ALLOWED_ALL = 1 + + # Allow HTTP traffic from only private VPC sources. + INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY = 2 + + # Allow HTTP traffic from private VPC sources and through load balancers. + INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/operation.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/operation.rb new file mode 100644 index 000000000000..7111bfba671a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/operation.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # Metadata for the given {::Google::Longrunning::Operation google.longrunning.Operation}. + # @!attribute [rw] method + # @return [::String] + # API method that initiated this operation. Example: + # `google.appengine.v1.Versions.CreateVersion`. + # @!attribute [rw] insert_time + # @return [::Google::Protobuf::Timestamp] + # Time that this operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Time that this operation completed. + # @!attribute [rw] user + # @return [::String] + # User who requested this operation. + # @!attribute [rw] target + # @return [::String] + # Name of the resource that this operation is acting on. Example: + # `apps/myapp/services/default`. + # @!attribute [rw] ephemeral_message + # @return [::String] + # Ephemeral message that may change every time the operation is polled. + # @!attribute [rw] warning + # @return [::Array<::String>] + # Durable messages that persist on every operation poll. + # @!attribute [rw] create_version_metadata + # @return [::Google::Cloud::AppEngine::V1::CreateVersionMetadataV1] + class OperationMetadataV1 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the given {::Google::Longrunning::Operation google.longrunning.Operation} during a + # {::Google::Cloud::AppEngine::V1::CreateVersionRequest google.appengine.v1.CreateVersionRequest}. + # @!attribute [rw] cloud_build_id + # @return [::String] + # The Cloud Build ID if one was created as part of the version create. + class CreateVersionMetadataV1 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/service.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/service.rb new file mode 100644 index 000000000000..75a885008de1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/service.rb @@ -0,0 +1,125 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # A Service resource is a logical component of an application that can share + # state and communicate in a secure fashion with other services. + # For example, an application that handles customer requests might + # include separate services to handle tasks such as backend data + # analysis or API requests from mobile devices. Each service has a + # collection of versions that define a specific set of code used to + # implement the functionality of that service. + # @!attribute [rw] name + # @return [::String] + # Full path to the Service resource in the API. + # Example: `apps/myapp/services/default`. + # @!attribute [rw] id + # @return [::String] + # Relative name of the service within the application. + # Example: `default`. + # @!attribute [rw] split + # @return [::Google::Cloud::AppEngine::V1::TrafficSplit] + # Mapping that defines fractional HTTP traffic diversion to + # different versions within the service. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # A set of labels to apply to this service. Labels are key/value pairs that + # describe the service and all resources that belong to it (e.g., + # versions). The labels can be used to search and group resources, and are + # propagated to the usage and billing reports, enabling fine-grain analysis + # of costs. An example of using labels is to tag resources belonging to + # different environments (e.g., "env=prod", "env=qa"). + # + #

Label keys and values can be no longer than 63 characters and can only + # contain lowercase letters, numeric characters, underscores, dashes, and + # international characters. Label keys must start with a lowercase letter + # or an international character. Each service can have at most 32 labels. + # @!attribute [rw] network_settings + # @return [::Google::Cloud::AppEngine::V1::NetworkSettings] + # Ingress settings for this service. Will apply to all versions. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Traffic routing configuration for versions within a single service. Traffic + # splits define how traffic directed to the service is assigned to versions. + # @!attribute [rw] shard_by + # @return [::Google::Cloud::AppEngine::V1::TrafficSplit::ShardBy] + # Mechanism used to determine which version a request is sent to. + # The traffic selection algorithm will + # be stable for either type until allocations are changed. + # @!attribute [rw] allocations + # @return [::Google::Protobuf::Map{::String => ::Float}] + # Mapping from version IDs within the service to fractional + # (0.000, 1] allocations of traffic for that version. Each version can + # be specified only once, but some versions in the service may not + # have any traffic allocation. Services that have traffic allocated + # cannot be deleted until either the service is deleted or + # their traffic allocation is removed. Allocations must sum to 1. + # Up to two decimal place precision is supported for IP-based splits and + # up to three decimal places is supported for cookie-based splits. + class TrafficSplit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Float] + class AllocationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Available sharding mechanisms. + module ShardBy + # Diversion method unspecified. + UNSPECIFIED = 0 + + # Diversion based on a specially named cookie, "GOOGAPPUID." The cookie + # must be set by the application itself or no diversion will occur. + COOKIE = 1 + + # Diversion based on applying the modulus operation to a fingerprint + # of the IP address. + IP = 2 + + # Diversion based on weighted random assignment. An incoming request is + # randomly routed to a version in the traffic split, with probability + # proportional to the version's traffic share. + RANDOM = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/version.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/version.rb new file mode 100644 index 000000000000..fd1ab9f2a613 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/version.rb @@ -0,0 +1,650 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppEngine + module V1 + # A Version resource is a specific set of source code and configuration files + # that are deployed into a service. + # @!attribute [rw] name + # @return [::String] + # Full path to the Version resource in the API. Example: + # `apps/myapp/services/default/versions/v1`. + # @!attribute [rw] id + # @return [::String] + # Relative name of the version within the service. Example: `v1`. + # Version names can contain only lowercase letters, numbers, or hyphens. + # Reserved names: "default", "latest", and any name with the prefix "ah-". + # @!attribute [rw] automatic_scaling + # @return [::Google::Cloud::AppEngine::V1::AutomaticScaling] + # Automatic scaling is based on request rate, response latencies, and other + # application metrics. Instances are dynamically created and destroyed as + # needed in order to handle traffic. + # + # Note: The following fields are mutually exclusive: `automatic_scaling`, `basic_scaling`, `manual_scaling`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] basic_scaling + # @return [::Google::Cloud::AppEngine::V1::BasicScaling] + # A service with basic scaling will create an instance when the application + # receives a request. The instance will be turned down when the app becomes + # idle. Basic scaling is ideal for work that is intermittent or driven by + # user activity. + # + # Note: The following fields are mutually exclusive: `basic_scaling`, `automatic_scaling`, `manual_scaling`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] manual_scaling + # @return [::Google::Cloud::AppEngine::V1::ManualScaling] + # A service with manual scaling runs continuously, allowing you to perform + # complex initialization and rely on the state of its memory over time. + # Manually scaled versions are sometimes referred to as "backends". + # + # Note: The following fields are mutually exclusive: `manual_scaling`, `automatic_scaling`, `basic_scaling`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] inbound_services + # @return [::Array<::Google::Cloud::AppEngine::V1::InboundServiceType>] + # Before an application can receive email or XMPP messages, the application + # must be configured to enable the service. + # @!attribute [rw] instance_class + # @return [::String] + # Instance class that is used to run this version. Valid values are: + # + # * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G` + # * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G` + # + # Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or + # BasicScaling. + # @!attribute [rw] network + # @return [::Google::Cloud::AppEngine::V1::Network] + # Extra network settings. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] zones + # @return [::Array<::String>] + # The Google Compute Engine zones that are supported by this version in the + # App Engine flexible environment. Deprecated. + # @!attribute [rw] resources + # @return [::Google::Cloud::AppEngine::V1::Resources] + # Machine resources for this version. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] runtime + # @return [::String] + # Desired runtime. Example: `python27`. + # @!attribute [rw] runtime_channel + # @return [::String] + # The channel of the runtime to use. Only available for some + # runtimes. Defaults to the `default` channel. + # @!attribute [rw] threadsafe + # @return [::Boolean] + # Whether multiple requests can be dispatched to this version at once. + # @!attribute [rw] vm + # @return [::Boolean] + # Whether to deploy this version in a container on a virtual machine. + # @!attribute [rw] app_engine_apis + # @return [::Boolean] + # Allows App Engine second generation runtimes to access the legacy bundled + # services. + # @!attribute [rw] beta_settings + # @return [::Google::Protobuf::Map{::String => ::String}] + # Metadata settings that are supplied to this version to enable + # beta runtime features. + # @!attribute [rw] env + # @return [::String] + # App Engine execution environment for this version. + # + # Defaults to `standard`. + # @!attribute [rw] serving_status + # @return [::Google::Cloud::AppEngine::V1::ServingStatus] + # Current serving status of this version. Only the versions with a + # `SERVING` status create instances and can be billed. + # + # `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`. + # @!attribute [rw] created_by + # @return [::String] + # Email address of the user who created this version. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time that this version was created. + # @!attribute [rw] disk_usage_bytes + # @return [::Integer] + # Total size in bytes of all the files that are included in this version + # and currently hosted on the App Engine disk. + # @!attribute [rw] runtime_api_version + # @return [::String] + # The version of the API in the given runtime environment. Please see the + # app.yaml reference for valid values at + # https://cloud.google.com/appengine/docs/standard//config/appref + # @!attribute [rw] runtime_main_executable_path + # @return [::String] + # The path or name of the app's main executable. + # @!attribute [rw] service_account + # @return [::String] + # The identity that the deployed version will run as. + # Admin API will use the App Engine Appspot service account as default if + # this field is neither provided in app.yaml file nor through CLI flag. + # @!attribute [rw] handlers + # @return [::Array<::Google::Cloud::AppEngine::V1::UrlMap>] + # An ordered list of URL-matching patterns that should be applied to incoming + # requests. The first matching URL handles the request and other request + # handlers are not attempted. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] error_handlers + # @return [::Array<::Google::Cloud::AppEngine::V1::ErrorHandler>] + # Custom static error pages. Limited to 10KB per page. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] libraries + # @return [::Array<::Google::Cloud::AppEngine::V1::Library>] + # Configuration for third-party Python runtime libraries that are required + # by the application. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] api_config + # @return [::Google::Cloud::AppEngine::V1::ApiConfigHandler] + # Serving configuration for + # [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/). + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] env_variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # Environment variables available to the application. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] build_env_variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # Environment variables available to the build environment. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] default_expiration + # @return [::Google::Protobuf::Duration] + # Duration that static files should be cached by web proxies and browsers. + # Only applicable if the corresponding + # [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler) + # does not specify its own expiration time. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] health_check + # @return [::Google::Cloud::AppEngine::V1::HealthCheck] + # Configures health checking for instances. Unhealthy instances are + # stopped and replaced with new instances. + # Only applicable in the App Engine flexible environment. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] readiness_check + # @return [::Google::Cloud::AppEngine::V1::ReadinessCheck] + # Configures readiness health checking for instances. + # Unhealthy instances are not put into the backend traffic rotation. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] liveness_check + # @return [::Google::Cloud::AppEngine::V1::LivenessCheck] + # Configures liveness health checking for instances. + # Unhealthy instances are stopped and replaced with new instances + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] nobuild_files_regex + # @return [::String] + # Files that match this pattern will not be built into this version. + # Only applicable for Go runtimes. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] deployment + # @return [::Google::Cloud::AppEngine::V1::Deployment] + # Code and application artifacts that make up this version. + # + # Only returned in `GET` requests if `view=FULL` is set. + # @!attribute [rw] version_url + # @return [::String] + # Serving URL for this version. Example: + # "https://myversion-dot-myservice-dot-myapp.appspot.com" + # @!attribute [rw] endpoints_api_service + # @return [::Google::Cloud::AppEngine::V1::EndpointsApiService] + # Cloud Endpoints configuration. + # + # If endpoints_api_service is set, the Cloud Endpoints Extensible Service + # Proxy will be provided to serve the API implemented by the app. + # @!attribute [rw] entrypoint + # @return [::Google::Cloud::AppEngine::V1::Entrypoint] + # The entrypoint for the application. + # @!attribute [rw] vpc_access_connector + # @return [::Google::Cloud::AppEngine::V1::VpcAccessConnector] + # Enables VPC connectivity for standard apps. + class Version + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class BetaSettingsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class EnvVariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class BuildEnvVariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # [Cloud Endpoints](https://cloud.google.com/endpoints) configuration. + # The Endpoints API Service provides tooling for serving Open API and gRPC + # endpoints via an NGINX proxy. Only valid for App Engine Flexible environment + # deployments. + # + # The fields here refer to the name and configuration ID of a "service" + # resource in the [Service Management API](https://cloud.google.com/service-management/overview). + # @!attribute [rw] name + # @return [::String] + # Endpoints service name which is the name of the "service" resource in the + # Service Management API. For example "myapi.endpoints.myproject.cloud.goog" + # @!attribute [rw] config_id + # @return [::String] + # Endpoints service configuration ID as specified by the Service Management + # API. For example "2016-09-19r1". + # + # By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`. + # This means that Endpoints starts up with a particular configuration ID. + # When a new configuration is rolled out, Endpoints must be given the new + # configuration ID. The `config_id` field is used to give the configuration + # ID and is required in this case. + # + # Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`. + # When using this, Endpoints fetches the latest configuration and does not + # need the configuration ID. In this case, `config_id` must be omitted. + # @!attribute [rw] rollout_strategy + # @return [::Google::Cloud::AppEngine::V1::EndpointsApiService::RolloutStrategy] + # Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If + # `MANAGED`, `config_id` must be omitted. + # @!attribute [rw] disable_trace_sampling + # @return [::Boolean] + # Enable or disable trace sampling. By default, this is set to false for + # enabled. + class EndpointsApiService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Available rollout strategies. + module RolloutStrategy + # Not specified. Defaults to `FIXED`. + UNSPECIFIED_ROLLOUT_STRATEGY = 0 + + # Endpoints service configuration ID will be fixed to the configuration ID + # specified by `config_id`. + FIXED = 1 + + # Endpoints service configuration ID will be updated with each rollout. + MANAGED = 2 + end + end + + # Automatic scaling is based on request rate, response latencies, and other + # application metrics. + # @!attribute [rw] cool_down_period + # @return [::Google::Protobuf::Duration] + # The time period that the + # [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/) + # should wait before it starts collecting information from a new instance. + # This prevents the autoscaler from collecting information when the instance + # is initializing, during which the collected usage would not be reliable. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] cpu_utilization + # @return [::Google::Cloud::AppEngine::V1::CpuUtilization] + # Target scaling by CPU usage. + # @!attribute [rw] max_concurrent_requests + # @return [::Integer] + # Number of concurrent requests an automatic scaling instance can accept + # before the scheduler spawns a new instance. + # + # Defaults to a runtime-specific value. + # @!attribute [rw] max_idle_instances + # @return [::Integer] + # Maximum number of idle instances that should be maintained for this + # version. + # @!attribute [rw] max_total_instances + # @return [::Integer] + # Maximum number of instances that should be started to handle requests for + # this version. + # @!attribute [rw] max_pending_latency + # @return [::Google::Protobuf::Duration] + # Maximum amount of time that a request should wait in the pending queue + # before starting a new instance to handle it. + # @!attribute [rw] min_idle_instances + # @return [::Integer] + # Minimum number of idle instances that should be maintained for + # this version. Only applicable for the default version of a service. + # @!attribute [rw] min_total_instances + # @return [::Integer] + # Minimum number of running instances that should be maintained for this + # version. + # @!attribute [rw] min_pending_latency + # @return [::Google::Protobuf::Duration] + # Minimum amount of time a request should wait in the pending queue before + # starting a new instance to handle it. + # @!attribute [rw] request_utilization + # @return [::Google::Cloud::AppEngine::V1::RequestUtilization] + # Target scaling by request utilization. + # @!attribute [rw] disk_utilization + # @return [::Google::Cloud::AppEngine::V1::DiskUtilization] + # Target scaling by disk usage. + # @!attribute [rw] network_utilization + # @return [::Google::Cloud::AppEngine::V1::NetworkUtilization] + # Target scaling by network usage. + # @!attribute [rw] standard_scheduler_settings + # @return [::Google::Cloud::AppEngine::V1::StandardSchedulerSettings] + # Scheduler settings for standard environment. + class AutomaticScaling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A service with basic scaling will create an instance when the application + # receives a request. The instance will be turned down when the app becomes + # idle. Basic scaling is ideal for work that is intermittent or driven by + # user activity. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Duration of time after the last request that an instance must wait before + # the instance is shut down. + # @!attribute [rw] max_instances + # @return [::Integer] + # Maximum number of instances to create for this version. + class BasicScaling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A service with manual scaling runs continuously, allowing you to perform + # complex initialization and rely on the state of its memory over time. + # @!attribute [rw] instances + # @return [::Integer] + # Number of instances to assign to the service at the start. This number + # can later be altered by using the + # [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions) + # `set_num_instances()` function. + class ManualScaling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target scaling by CPU usage. + # @!attribute [rw] aggregation_window_length + # @return [::Google::Protobuf::Duration] + # Period of time over which CPU utilization is calculated. + # @!attribute [rw] target_utilization + # @return [::Float] + # Target CPU utilization ratio to maintain when scaling. Must be between 0 + # and 1. + class CpuUtilization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target scaling by request utilization. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] target_request_count_per_second + # @return [::Integer] + # Target requests per second. + # @!attribute [rw] target_concurrent_requests + # @return [::Integer] + # Target number of concurrent requests. + class RequestUtilization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target scaling by disk usage. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] target_write_bytes_per_second + # @return [::Integer] + # Target bytes written per second. + # @!attribute [rw] target_write_ops_per_second + # @return [::Integer] + # Target ops written per second. + # @!attribute [rw] target_read_bytes_per_second + # @return [::Integer] + # Target bytes read per second. + # @!attribute [rw] target_read_ops_per_second + # @return [::Integer] + # Target ops read per seconds. + class DiskUtilization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target scaling by network usage. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] target_sent_bytes_per_second + # @return [::Integer] + # Target bytes sent per second. + # @!attribute [rw] target_sent_packets_per_second + # @return [::Integer] + # Target packets sent per second. + # @!attribute [rw] target_received_bytes_per_second + # @return [::Integer] + # Target bytes received per second. + # @!attribute [rw] target_received_packets_per_second + # @return [::Integer] + # Target packets received per second. + class NetworkUtilization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Scheduler settings for standard environment. + # @!attribute [rw] target_cpu_utilization + # @return [::Float] + # Target CPU utilization ratio to maintain when scaling. + # @!attribute [rw] target_throughput_utilization + # @return [::Float] + # Target throughput utilization ratio to maintain when scaling + # @!attribute [rw] min_instances + # @return [::Integer] + # Minimum number of instances to run for this version. Set to zero to disable + # `min_instances` configuration. + # @!attribute [rw] max_instances + # @return [::Integer] + # Maximum number of instances to run for this version. Set to zero to disable + # `max_instances` configuration. + class StandardSchedulerSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Extra network settings. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] forwarded_ports + # @return [::Array<::String>] + # List of ports, or port pairs, to forward from the virtual machine to the + # application container. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] instance_tag + # @return [::String] + # Tag to apply to the instance during creation. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] name + # @return [::String] + # Google Compute Engine network where the virtual machines are created. + # Specify the short name, not the resource path. + # + # Defaults to `default`. + # @!attribute [rw] subnetwork_name + # @return [::String] + # Google Cloud Platform sub-network where the virtual machines are created. + # Specify the short name, not the resource path. + # + # If a subnetwork name is specified, a network name will also be required + # unless it is for the default network. + # + # * If the network that the instance is being created in is a Legacy network, + # then the IP address is allocated from the IPv4Range. + # * If the network that the instance is being created in is an auto Subnet + # Mode Network, then only network name should be specified (not the + # subnetwork_name) and the IP address is created from the IPCidrRange of the + # subnetwork that exists in that zone for that network. + # * If the network that the instance is being created in is a custom Subnet + # Mode Network, then the subnetwork_name must be specified and the + # IP address is created from the IPCidrRange of the subnetwork. + # + # If specified, the subnetwork must exist in the same region as the + # App Engine flexible environment application. + # @!attribute [rw] session_affinity + # @return [::Boolean] + # Enable session affinity. + # Only applicable in the App Engine flexible environment. + class Network + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Volumes mounted within the app container. + # Only applicable in the App Engine flexible environment. + # @!attribute [rw] name + # @return [::String] + # Unique name for the volume. + # @!attribute [rw] volume_type + # @return [::String] + # Underlying volume type, e.g. 'tmpfs'. + # @!attribute [rw] size_gb + # @return [::Float] + # Volume size in gigabytes. + class Volume + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Machine resources for a version. + # @!attribute [rw] cpu + # @return [::Float] + # Number of CPU cores needed. + # @!attribute [rw] disk_gb + # @return [::Float] + # Disk size (GB) needed. + # @!attribute [rw] memory_gb + # @return [::Float] + # Memory (GB) needed. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::AppEngine::V1::Volume>] + # User specified volumes. + # @!attribute [rw] kms_key_reference + # @return [::String] + # The name of the encryption key that is stored in Google Cloud KMS. + # Only should be used by Cloud Composer to encrypt the vm disk + class Resources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # VPC access connector specification. + # @!attribute [rw] name + # @return [::String] + # Full Serverless VPC Access Connector name e.g. + # /projects/my-project/locations/us-central1/connectors/c1. + # @!attribute [rw] egress_setting + # @return [::Google::Cloud::AppEngine::V1::VpcAccessConnector::EgressSetting] + # The egress setting for the connector, controlling what traffic is diverted + # through it. + class VpcAccessConnector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Available egress settings. + # + # This controls what traffic is diverted through the VPC Access Connector + # resource. By default PRIVATE_IP_RANGES will be used. + module EgressSetting + EGRESS_SETTING_UNSPECIFIED = 0 + + # Force the use of VPC Access for all egress traffic from the function. + ALL_TRAFFIC = 1 + + # Use the VPC Access Connector for private IP space from RFC1918. + PRIVATE_IP_RANGES = 2 + end + end + + # The entrypoint for the application. + # @!attribute [rw] shell + # @return [::String] + # The format should be a shell command that can be fed to `bash -c`. + class Entrypoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Available inbound services. + module InboundServiceType + # Not specified. + INBOUND_SERVICE_UNSPECIFIED = 0 + + # Allows an application to receive mail. + INBOUND_SERVICE_MAIL = 1 + + # Allows an application to receive email-bound notifications. + INBOUND_SERVICE_MAIL_BOUNCE = 2 + + # Allows an application to receive error stanzas. + INBOUND_SERVICE_XMPP_ERROR = 3 + + # Allows an application to receive instant messages. + INBOUND_SERVICE_XMPP_MESSAGE = 4 + + # Allows an application to receive user subscription POSTs. + INBOUND_SERVICE_XMPP_SUBSCRIBE = 5 + + # Allows an application to receive a user's chat presence. + INBOUND_SERVICE_XMPP_PRESENCE = 6 + + # Registers an application for notifications when a client connects or + # disconnects from a channel. + INBOUND_SERVICE_CHANNEL_PRESENCE = 7 + + # Enables warmup requests. + INBOUND_SERVICE_WARMUP = 9 + end + + # Run states of a version. + module ServingStatus + # Not specified. + SERVING_STATUS_UNSPECIFIED = 0 + + # Currently serving. Instances are created according to the + # scaling settings of the version. + SERVING = 1 + + # Disabled. No instances will be created and the scaling + # settings are ignored until the state of the version changes + # to `SERVING`. + STOPPED = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-app_engine-v1/snippets/Gemfile new file mode 100644 index 000000000000..af9ca78a8bcc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1", path: "../" +else + gem "google-cloud-app_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-cloud-app_engine-v1/snippets/applications/create_application.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/create_application.rb new file mode 100644 index 000000000000..34253e8ab9a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/create_application.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Applications_CreateApplication_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the create_application call in the Applications service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Applications::Client#create_application. +# +def create_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Applications::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::CreateApplicationRequest.new + + # Call the create_application method. + result = client.create_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Applications_CreateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/get_application.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/get_application.rb new file mode 100644 index 000000000000..01fe38687b89 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/get_application.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Applications_GetApplication_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the get_application call in the Applications service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Applications::Client#get_application. +# +def get_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Applications::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::GetApplicationRequest.new + + # Call the get_application method. + result = client.get_application request + + # The returned object is of type Google::Cloud::AppEngine::V1::Application. + p result +end +# [END appengine_v1_generated_Applications_GetApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/repair_application.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/repair_application.rb new file mode 100644 index 000000000000..bb0fa4afc030 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/repair_application.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Applications_RepairApplication_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the repair_application call in the Applications service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Applications::Client#repair_application. +# +def repair_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Applications::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::RepairApplicationRequest.new + + # Call the repair_application method. + result = client.repair_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Applications_RepairApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/update_application.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/update_application.rb new file mode 100644 index 000000000000..00d97371c546 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/update_application.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Applications_UpdateApplication_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the update_application call in the Applications service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Applications::Client#update_application. +# +def update_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Applications::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new + + # Call the update_application method. + result = client.update_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Applications_UpdateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/create_authorized_certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/create_authorized_certificate.rb new file mode 100644 index 000000000000..42ef74ed5958 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/create_authorized_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the create_authorized_certificate call in the AuthorizedCertificates service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#create_authorized_certificate. +# +def create_authorized_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new + + # Call the create_authorized_certificate method. + result = client.create_authorized_certificate request + + # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + p result +end +# [END appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/delete_authorized_certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/delete_authorized_certificate.rb new file mode 100644 index 000000000000..111a44c0a7b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/delete_authorized_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the delete_authorized_certificate call in the AuthorizedCertificates service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#delete_authorized_certificate. +# +def delete_authorized_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new + + # Call the delete_authorized_certificate method. + result = client.delete_authorized_certificate request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/get_authorized_certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/get_authorized_certificate.rb new file mode 100644 index 000000000000..2242af0affaf --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/get_authorized_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the get_authorized_certificate call in the AuthorizedCertificates service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#get_authorized_certificate. +# +def get_authorized_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new + + # Call the get_authorized_certificate method. + result = client.get_authorized_certificate request + + # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + p result +end +# [END appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/list_authorized_certificates.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/list_authorized_certificates.rb new file mode 100644 index 000000000000..77701b481d42 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/list_authorized_certificates.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the list_authorized_certificates call in the AuthorizedCertificates service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#list_authorized_certificates. +# +def list_authorized_certificates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new + + # Call the list_authorized_certificates method. + result = client.list_authorized_certificates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedCertificate. + p item + end +end +# [END appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/update_authorized_certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/update_authorized_certificate.rb new file mode 100644 index 000000000000..209b245eda50 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/update_authorized_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the update_authorized_certificate call in the AuthorizedCertificates service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#update_authorized_certificate. +# +def update_authorized_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new + + # Call the update_authorized_certificate method. + result = client.update_authorized_certificate request + + # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. + p result +end +# [END appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_domains/list_authorized_domains.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_domains/list_authorized_domains.rb new file mode 100644 index 000000000000..af471202d318 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_domains/list_authorized_domains.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the list_authorized_domains call in the AuthorizedDomains service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::AuthorizedDomains::Client#list_authorized_domains. +# +def list_authorized_domains + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new + + # Call the list_authorized_domains method. + result = client.list_authorized_domains request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedDomain. + p item + end +end +# [END appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/create_domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/create_domain_mapping.rb new file mode 100644 index 000000000000..8ec21b02322f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/create_domain_mapping.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_DomainMappings_CreateDomainMapping_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the create_domain_mapping call in the DomainMappings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::DomainMappings::Client#create_domain_mapping. +# +def create_domain_mapping + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new + + # Call the create_domain_mapping method. + result = client.create_domain_mapping request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_DomainMappings_CreateDomainMapping_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/delete_domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/delete_domain_mapping.rb new file mode 100644 index 000000000000..61682f243205 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/delete_domain_mapping.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_DomainMappings_DeleteDomainMapping_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the delete_domain_mapping call in the DomainMappings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::DomainMappings::Client#delete_domain_mapping. +# +def delete_domain_mapping + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new + + # Call the delete_domain_mapping method. + result = client.delete_domain_mapping request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_DomainMappings_DeleteDomainMapping_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/get_domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/get_domain_mapping.rb new file mode 100644 index 000000000000..8c2a29dc9265 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/get_domain_mapping.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_DomainMappings_GetDomainMapping_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the get_domain_mapping call in the DomainMappings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::DomainMappings::Client#get_domain_mapping. +# +def get_domain_mapping + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new + + # Call the get_domain_mapping method. + result = client.get_domain_mapping request + + # The returned object is of type Google::Cloud::AppEngine::V1::DomainMapping. + p result +end +# [END appengine_v1_generated_DomainMappings_GetDomainMapping_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/list_domain_mappings.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/list_domain_mappings.rb new file mode 100644 index 000000000000..cdad0dc0d30c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/list_domain_mappings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_DomainMappings_ListDomainMappings_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the list_domain_mappings call in the DomainMappings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::DomainMappings::Client#list_domain_mappings. +# +def list_domain_mappings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new + + # Call the list_domain_mappings method. + result = client.list_domain_mappings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppEngine::V1::DomainMapping. + p item + end +end +# [END appengine_v1_generated_DomainMappings_ListDomainMappings_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/update_domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/update_domain_mapping.rb new file mode 100644 index 000000000000..7adfc81daaf7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/update_domain_mapping.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_DomainMappings_UpdateDomainMapping_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the update_domain_mapping call in the DomainMappings service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::DomainMappings::Client#update_domain_mapping. +# +def update_domain_mapping + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new + + # Call the update_domain_mapping method. + result = client.update_domain_mapping request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_DomainMappings_UpdateDomainMapping_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/batch_update_ingress_rules.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/batch_update_ingress_rules.rb new file mode 100644 index 000000000000..8a6c4c3bc7da --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/batch_update_ingress_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 appengine_v1_generated_Firewall_BatchUpdateIngressRules_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the batch_update_ingress_rules call in the Firewall service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Firewall::Client#batch_update_ingress_rules. +# +def batch_update_ingress_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Firewall::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new + + # Call the batch_update_ingress_rules method. + result = client.batch_update_ingress_rules request + + # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse. + p result +end +# [END appengine_v1_generated_Firewall_BatchUpdateIngressRules_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/create_ingress_rule.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/create_ingress_rule.rb new file mode 100644 index 000000000000..e8a820fb1151 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/create_ingress_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Firewall_CreateIngressRule_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the create_ingress_rule call in the Firewall service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Firewall::Client#create_ingress_rule. +# +def create_ingress_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Firewall::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new + + # Call the create_ingress_rule method. + result = client.create_ingress_rule request + + # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + p result +end +# [END appengine_v1_generated_Firewall_CreateIngressRule_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/delete_ingress_rule.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/delete_ingress_rule.rb new file mode 100644 index 000000000000..21d407dbf16b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/delete_ingress_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Firewall_DeleteIngressRule_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the delete_ingress_rule call in the Firewall service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Firewall::Client#delete_ingress_rule. +# +def delete_ingress_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Firewall::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new + + # Call the delete_ingress_rule method. + result = client.delete_ingress_rule request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END appengine_v1_generated_Firewall_DeleteIngressRule_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/get_ingress_rule.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/get_ingress_rule.rb new file mode 100644 index 000000000000..864191b6e8f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/get_ingress_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Firewall_GetIngressRule_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the get_ingress_rule call in the Firewall service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Firewall::Client#get_ingress_rule. +# +def get_ingress_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Firewall::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new + + # Call the get_ingress_rule method. + result = client.get_ingress_rule request + + # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + p result +end +# [END appengine_v1_generated_Firewall_GetIngressRule_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/list_ingress_rules.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/list_ingress_rules.rb new file mode 100644 index 000000000000..d099128ed3a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/list_ingress_rules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Firewall_ListIngressRules_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the list_ingress_rules call in the Firewall service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Firewall::Client#list_ingress_rules. +# +def list_ingress_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Firewall::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new + + # Call the list_ingress_rules method. + result = client.list_ingress_rules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule. + p item + end +end +# [END appengine_v1_generated_Firewall_ListIngressRules_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/update_ingress_rule.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/update_ingress_rule.rb new file mode 100644 index 000000000000..12aa8c2a058e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/update_ingress_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Firewall_UpdateIngressRule_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the update_ingress_rule call in the Firewall service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Firewall::Client#update_ingress_rule. +# +def update_ingress_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Firewall::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new + + # Call the update_ingress_rule method. + result = client.update_ingress_rule request + + # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. + p result +end +# [END appengine_v1_generated_Firewall_UpdateIngressRule_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/debug_instance.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/debug_instance.rb new file mode 100644 index 000000000000..51310960cbc4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/debug_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Instances_DebugInstance_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the debug_instance call in the Instances service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Instances::Client#debug_instance. +# +def debug_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Instances::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::DebugInstanceRequest.new + + # Call the debug_instance method. + result = client.debug_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Instances_DebugInstance_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/delete_instance.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/delete_instance.rb new file mode 100644 index 000000000000..75e366470e95 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/delete_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Instances_DeleteInstance_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the delete_instance call in the Instances service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Instances::Client#delete_instance. +# +def delete_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Instances::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new + + # Call the delete_instance method. + result = client.delete_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Instances_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/get_instance.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/get_instance.rb new file mode 100644 index 000000000000..bd844d902a50 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/get_instance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Instances_GetInstance_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the get_instance call in the Instances service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Instances::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Instances::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::AppEngine::V1::Instance. + p result +end +# [END appengine_v1_generated_Instances_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/list_instances.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/list_instances.rb new file mode 100644 index 000000000000..039ac22d025d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/list_instances.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Instances_ListInstances_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the list_instances call in the Instances service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Instances::Client#list_instances. +# +def list_instances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Instances::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::ListInstancesRequest.new + + # Call the list_instances method. + result = client.list_instances request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppEngine::V1::Instance. + p item + end +end +# [END appengine_v1_generated_Instances_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/delete_service.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/delete_service.rb new file mode 100644 index 000000000000..d09396b6c9f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/delete_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Services_DeleteService_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the delete_service call in the Services service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Services::Client#delete_service. +# +def delete_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Services::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::DeleteServiceRequest.new + + # Call the delete_service method. + result = client.delete_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Services_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/get_service.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/get_service.rb new file mode 100644 index 000000000000..10a9a71431b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/get_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Services_GetService_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the get_service call in the Services service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Services::Client#get_service. +# +def get_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Services::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::GetServiceRequest.new + + # Call the get_service method. + result = client.get_service request + + # The returned object is of type Google::Cloud::AppEngine::V1::Service. + p result +end +# [END appengine_v1_generated_Services_GetService_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/list_services.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/list_services.rb new file mode 100644 index 000000000000..015ba27a87fb --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/list_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Services_ListServices_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the list_services call in the Services service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Services::Client#list_services. +# +def list_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Services::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::ListServicesRequest.new + + # Call the list_services method. + result = client.list_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppEngine::V1::Service. + p item + end +end +# [END appengine_v1_generated_Services_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/update_service.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/update_service.rb new file mode 100644 index 000000000000..c4cfc4436b80 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/update_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Services_UpdateService_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the update_service call in the Services service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Services::Client#update_service. +# +def update_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Services::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::UpdateServiceRequest.new + + # Call the update_service method. + result = client.update_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Services_UpdateService_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/snippet_metadata_google.appengine.v1.json b/owl-bot-staging/google-cloud-app_engine-v1/snippets/snippet_metadata_google.appengine.v1.json new file mode 100644 index 000000000000..37c320912e93 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/snippet_metadata_google.appengine.v1.json @@ -0,0 +1,1375 @@ +{ + "client_library": { + "name": "google-cloud-app_engine-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.appengine.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "appengine_v1_generated_Applications_GetApplication_sync", + "title": "Snippet for the get_application call in the Applications service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Applications::Client#get_application.", + "file": "applications/get_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_application", + "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client#get_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::GetApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::Application", + "client": { + "short_name": "Applications::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client" + }, + "method": { + "short_name": "GetApplication", + "full_name": "google.appengine.v1.Applications.GetApplication", + "service": { + "short_name": "Applications", + "full_name": "google.appengine.v1.Applications" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Applications_CreateApplication_sync", + "title": "Snippet for the create_application call in the Applications service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Applications::Client#create_application.", + "file": "applications/create_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_application", + "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client#create_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::CreateApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Applications::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client" + }, + "method": { + "short_name": "CreateApplication", + "full_name": "google.appengine.v1.Applications.CreateApplication", + "service": { + "short_name": "Applications", + "full_name": "google.appengine.v1.Applications" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Applications_UpdateApplication_sync", + "title": "Snippet for the update_application call in the Applications service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Applications::Client#update_application.", + "file": "applications/update_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_application", + "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client#update_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::UpdateApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Applications::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client" + }, + "method": { + "short_name": "UpdateApplication", + "full_name": "google.appengine.v1.Applications.UpdateApplication", + "service": { + "short_name": "Applications", + "full_name": "google.appengine.v1.Applications" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Applications_RepairApplication_sync", + "title": "Snippet for the repair_application call in the Applications service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Applications::Client#repair_application.", + "file": "applications/repair_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "repair_application", + "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client#repair_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::RepairApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Applications::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client" + }, + "method": { + "short_name": "RepairApplication", + "full_name": "google.appengine.v1.Applications.RepairApplication", + "service": { + "short_name": "Applications", + "full_name": "google.appengine.v1.Applications" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Services_ListServices_sync", + "title": "Snippet for the list_services call in the Services service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Services::Client#list_services.", + "file": "services/list_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_services", + "full_name": "::Google::Cloud::AppEngine::V1::Services::Client#list_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::ListServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::ListServicesResponse", + "client": { + "short_name": "Services::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Services::Client" + }, + "method": { + "short_name": "ListServices", + "full_name": "google.appengine.v1.Services.ListServices", + "service": { + "short_name": "Services", + "full_name": "google.appengine.v1.Services" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Services_GetService_sync", + "title": "Snippet for the get_service call in the Services service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Services::Client#get_service.", + "file": "services/get_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service", + "full_name": "::Google::Cloud::AppEngine::V1::Services::Client#get_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::GetServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::Service", + "client": { + "short_name": "Services::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Services::Client" + }, + "method": { + "short_name": "GetService", + "full_name": "google.appengine.v1.Services.GetService", + "service": { + "short_name": "Services", + "full_name": "google.appengine.v1.Services" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Services_UpdateService_sync", + "title": "Snippet for the update_service call in the Services service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Services::Client#update_service.", + "file": "services/update_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service", + "full_name": "::Google::Cloud::AppEngine::V1::Services::Client#update_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::UpdateServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Services::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Services::Client" + }, + "method": { + "short_name": "UpdateService", + "full_name": "google.appengine.v1.Services.UpdateService", + "service": { + "short_name": "Services", + "full_name": "google.appengine.v1.Services" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Services_DeleteService_sync", + "title": "Snippet for the delete_service call in the Services service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Services::Client#delete_service.", + "file": "services/delete_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service", + "full_name": "::Google::Cloud::AppEngine::V1::Services::Client#delete_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::DeleteServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Services::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Services::Client" + }, + "method": { + "short_name": "DeleteService", + "full_name": "google.appengine.v1.Services.DeleteService", + "service": { + "short_name": "Services", + "full_name": "google.appengine.v1.Services" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Versions_ListVersions_sync", + "title": "Snippet for the list_versions call in the Versions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#list_versions.", + "file": "versions/list_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_versions", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#list_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::ListVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::ListVersionsResponse", + "client": { + "short_name": "Versions::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" + }, + "method": { + "short_name": "ListVersions", + "full_name": "google.appengine.v1.Versions.ListVersions", + "service": { + "short_name": "Versions", + "full_name": "google.appengine.v1.Versions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Versions_GetVersion_sync", + "title": "Snippet for the get_version call in the Versions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#get_version.", + "file": "versions/get_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_version", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#get_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::GetVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::Version", + "client": { + "short_name": "Versions::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" + }, + "method": { + "short_name": "GetVersion", + "full_name": "google.appengine.v1.Versions.GetVersion", + "service": { + "short_name": "Versions", + "full_name": "google.appengine.v1.Versions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Versions_CreateVersion_sync", + "title": "Snippet for the create_version call in the Versions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#create_version.", + "file": "versions/create_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_version", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#create_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::CreateVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Versions::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" + }, + "method": { + "short_name": "CreateVersion", + "full_name": "google.appengine.v1.Versions.CreateVersion", + "service": { + "short_name": "Versions", + "full_name": "google.appengine.v1.Versions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Versions_UpdateVersion_sync", + "title": "Snippet for the update_version call in the Versions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#update_version.", + "file": "versions/update_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_version", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#update_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::UpdateVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Versions::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" + }, + "method": { + "short_name": "UpdateVersion", + "full_name": "google.appengine.v1.Versions.UpdateVersion", + "service": { + "short_name": "Versions", + "full_name": "google.appengine.v1.Versions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Versions_DeleteVersion_sync", + "title": "Snippet for the delete_version call in the Versions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#delete_version.", + "file": "versions/delete_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_version", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#delete_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::DeleteVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Versions::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" + }, + "method": { + "short_name": "DeleteVersion", + "full_name": "google.appengine.v1.Versions.DeleteVersion", + "service": { + "short_name": "Versions", + "full_name": "google.appengine.v1.Versions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Instances_ListInstances_sync", + "title": "Snippet for the list_instances call in the Instances service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Instances::Client#list_instances.", + "file": "instances/list_instances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instances", + "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client#list_instances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::ListInstancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::ListInstancesResponse", + "client": { + "short_name": "Instances::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client" + }, + "method": { + "short_name": "ListInstances", + "full_name": "google.appengine.v1.Instances.ListInstances", + "service": { + "short_name": "Instances", + "full_name": "google.appengine.v1.Instances" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Instances_GetInstance_sync", + "title": "Snippet for the get_instance call in the Instances service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Instances::Client#get_instance.", + "file": "instances/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::Instance", + "client": { + "short_name": "Instances::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.appengine.v1.Instances.GetInstance", + "service": { + "short_name": "Instances", + "full_name": "google.appengine.v1.Instances" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Instances_DeleteInstance_sync", + "title": "Snippet for the delete_instance call in the Instances service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Instances::Client#delete_instance.", + "file": "instances/delete_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance", + "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client#delete_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::DeleteInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Instances::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client" + }, + "method": { + "short_name": "DeleteInstance", + "full_name": "google.appengine.v1.Instances.DeleteInstance", + "service": { + "short_name": "Instances", + "full_name": "google.appengine.v1.Instances" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Instances_DebugInstance_sync", + "title": "Snippet for the debug_instance call in the Instances service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Instances::Client#debug_instance.", + "file": "instances/debug_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "debug_instance", + "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client#debug_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::DebugInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Instances::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client" + }, + "method": { + "short_name": "DebugInstance", + "full_name": "google.appengine.v1.Instances.DebugInstance", + "service": { + "short_name": "Instances", + "full_name": "google.appengine.v1.Instances" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Firewall_ListIngressRules_sync", + "title": "Snippet for the list_ingress_rules call in the Firewall service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#list_ingress_rules.", + "file": "firewall/list_ingress_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_ingress_rules", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#list_ingress_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::ListIngressRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::ListIngressRulesResponse", + "client": { + "short_name": "Firewall::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" + }, + "method": { + "short_name": "ListIngressRules", + "full_name": "google.appengine.v1.Firewall.ListIngressRules", + "service": { + "short_name": "Firewall", + "full_name": "google.appengine.v1.Firewall" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Firewall_BatchUpdateIngressRules_sync", + "title": "Snippet for the batch_update_ingress_rules call in the Firewall service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#batch_update_ingress_rules.", + "file": "firewall/batch_update_ingress_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_update_ingress_rules", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#batch_update_ingress_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse", + "client": { + "short_name": "Firewall::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" + }, + "method": { + "short_name": "BatchUpdateIngressRules", + "full_name": "google.appengine.v1.Firewall.BatchUpdateIngressRules", + "service": { + "short_name": "Firewall", + "full_name": "google.appengine.v1.Firewall" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Firewall_CreateIngressRule_sync", + "title": "Snippet for the create_ingress_rule call in the Firewall service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#create_ingress_rule.", + "file": "firewall/create_ingress_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_ingress_rule", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#create_ingress_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::FirewallRule", + "client": { + "short_name": "Firewall::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" + }, + "method": { + "short_name": "CreateIngressRule", + "full_name": "google.appengine.v1.Firewall.CreateIngressRule", + "service": { + "short_name": "Firewall", + "full_name": "google.appengine.v1.Firewall" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Firewall_GetIngressRule_sync", + "title": "Snippet for the get_ingress_rule call in the Firewall service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#get_ingress_rule.", + "file": "firewall/get_ingress_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_ingress_rule", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#get_ingress_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::GetIngressRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::FirewallRule", + "client": { + "short_name": "Firewall::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" + }, + "method": { + "short_name": "GetIngressRule", + "full_name": "google.appengine.v1.Firewall.GetIngressRule", + "service": { + "short_name": "Firewall", + "full_name": "google.appengine.v1.Firewall" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Firewall_UpdateIngressRule_sync", + "title": "Snippet for the update_ingress_rule call in the Firewall service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#update_ingress_rule.", + "file": "firewall/update_ingress_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_ingress_rule", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#update_ingress_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::FirewallRule", + "client": { + "short_name": "Firewall::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" + }, + "method": { + "short_name": "UpdateIngressRule", + "full_name": "google.appengine.v1.Firewall.UpdateIngressRule", + "service": { + "short_name": "Firewall", + "full_name": "google.appengine.v1.Firewall" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_Firewall_DeleteIngressRule_sync", + "title": "Snippet for the delete_ingress_rule call in the Firewall service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#delete_ingress_rule.", + "file": "firewall/delete_ingress_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_ingress_rule", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#delete_ingress_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Firewall::Client", + "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" + }, + "method": { + "short_name": "DeleteIngressRule", + "full_name": "google.appengine.v1.Firewall.DeleteIngressRule", + "service": { + "short_name": "Firewall", + "full_name": "google.appengine.v1.Firewall" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_sync", + "title": "Snippet for the list_authorized_domains call in the AuthorizedDomains service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedDomains::Client#list_authorized_domains.", + "file": "authorized_domains/list_authorized_domains.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_authorized_domains", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client#list_authorized_domains", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse", + "client": { + "short_name": "AuthorizedDomains::Client", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client" + }, + "method": { + "short_name": "ListAuthorizedDomains", + "full_name": "google.appengine.v1.AuthorizedDomains.ListAuthorizedDomains", + "service": { + "short_name": "AuthorizedDomains", + "full_name": "google.appengine.v1.AuthorizedDomains" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_sync", + "title": "Snippet for the list_authorized_certificates call in the AuthorizedCertificates service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#list_authorized_certificates.", + "file": "authorized_certificates/list_authorized_certificates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_authorized_certificates", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#list_authorized_certificates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse", + "client": { + "short_name": "AuthorizedCertificates::Client", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" + }, + "method": { + "short_name": "ListAuthorizedCertificates", + "full_name": "google.appengine.v1.AuthorizedCertificates.ListAuthorizedCertificates", + "service": { + "short_name": "AuthorizedCertificates", + "full_name": "google.appengine.v1.AuthorizedCertificates" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_sync", + "title": "Snippet for the get_authorized_certificate call in the AuthorizedCertificates service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#get_authorized_certificate.", + "file": "authorized_certificates/get_authorized_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_authorized_certificate", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#get_authorized_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::AuthorizedCertificate", + "client": { + "short_name": "AuthorizedCertificates::Client", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" + }, + "method": { + "short_name": "GetAuthorizedCertificate", + "full_name": "google.appengine.v1.AuthorizedCertificates.GetAuthorizedCertificate", + "service": { + "short_name": "AuthorizedCertificates", + "full_name": "google.appengine.v1.AuthorizedCertificates" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_sync", + "title": "Snippet for the create_authorized_certificate call in the AuthorizedCertificates service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#create_authorized_certificate.", + "file": "authorized_certificates/create_authorized_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_authorized_certificate", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#create_authorized_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::AuthorizedCertificate", + "client": { + "short_name": "AuthorizedCertificates::Client", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" + }, + "method": { + "short_name": "CreateAuthorizedCertificate", + "full_name": "google.appengine.v1.AuthorizedCertificates.CreateAuthorizedCertificate", + "service": { + "short_name": "AuthorizedCertificates", + "full_name": "google.appengine.v1.AuthorizedCertificates" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_sync", + "title": "Snippet for the update_authorized_certificate call in the AuthorizedCertificates service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#update_authorized_certificate.", + "file": "authorized_certificates/update_authorized_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_authorized_certificate", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#update_authorized_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::AuthorizedCertificate", + "client": { + "short_name": "AuthorizedCertificates::Client", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" + }, + "method": { + "short_name": "UpdateAuthorizedCertificate", + "full_name": "google.appengine.v1.AuthorizedCertificates.UpdateAuthorizedCertificate", + "service": { + "short_name": "AuthorizedCertificates", + "full_name": "google.appengine.v1.AuthorizedCertificates" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_sync", + "title": "Snippet for the delete_authorized_certificate call in the AuthorizedCertificates service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#delete_authorized_certificate.", + "file": "authorized_certificates/delete_authorized_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_authorized_certificate", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#delete_authorized_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AuthorizedCertificates::Client", + "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" + }, + "method": { + "short_name": "DeleteAuthorizedCertificate", + "full_name": "google.appengine.v1.AuthorizedCertificates.DeleteAuthorizedCertificate", + "service": { + "short_name": "AuthorizedCertificates", + "full_name": "google.appengine.v1.AuthorizedCertificates" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_DomainMappings_ListDomainMappings_sync", + "title": "Snippet for the list_domain_mappings call in the DomainMappings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#list_domain_mappings.", + "file": "domain_mappings/list_domain_mappings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_domain_mappings", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#list_domain_mappings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse", + "client": { + "short_name": "DomainMappings::Client", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" + }, + "method": { + "short_name": "ListDomainMappings", + "full_name": "google.appengine.v1.DomainMappings.ListDomainMappings", + "service": { + "short_name": "DomainMappings", + "full_name": "google.appengine.v1.DomainMappings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_DomainMappings_GetDomainMapping_sync", + "title": "Snippet for the get_domain_mapping call in the DomainMappings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#get_domain_mapping.", + "file": "domain_mappings/get_domain_mapping.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_domain_mapping", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#get_domain_mapping", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::GetDomainMappingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppEngine::V1::DomainMapping", + "client": { + "short_name": "DomainMappings::Client", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" + }, + "method": { + "short_name": "GetDomainMapping", + "full_name": "google.appengine.v1.DomainMappings.GetDomainMapping", + "service": { + "short_name": "DomainMappings", + "full_name": "google.appengine.v1.DomainMappings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_DomainMappings_CreateDomainMapping_sync", + "title": "Snippet for the create_domain_mapping call in the DomainMappings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#create_domain_mapping.", + "file": "domain_mappings/create_domain_mapping.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_domain_mapping", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#create_domain_mapping", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DomainMappings::Client", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" + }, + "method": { + "short_name": "CreateDomainMapping", + "full_name": "google.appengine.v1.DomainMappings.CreateDomainMapping", + "service": { + "short_name": "DomainMappings", + "full_name": "google.appengine.v1.DomainMappings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_DomainMappings_UpdateDomainMapping_sync", + "title": "Snippet for the update_domain_mapping call in the DomainMappings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#update_domain_mapping.", + "file": "domain_mappings/update_domain_mapping.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_domain_mapping", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#update_domain_mapping", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DomainMappings::Client", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" + }, + "method": { + "short_name": "UpdateDomainMapping", + "full_name": "google.appengine.v1.DomainMappings.UpdateDomainMapping", + "service": { + "short_name": "DomainMappings", + "full_name": "google.appengine.v1.DomainMappings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "appengine_v1_generated_DomainMappings_DeleteDomainMapping_sync", + "title": "Snippet for the delete_domain_mapping call in the DomainMappings service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#delete_domain_mapping.", + "file": "domain_mappings/delete_domain_mapping.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_domain_mapping", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#delete_domain_mapping", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DomainMappings::Client", + "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" + }, + "method": { + "short_name": "DeleteDomainMapping", + "full_name": "google.appengine.v1.DomainMappings.DeleteDomainMapping", + "service": { + "short_name": "DomainMappings", + "full_name": "google.appengine.v1.DomainMappings" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/create_version.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/create_version.rb new file mode 100644 index 000000000000..33f2d7a1a3f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/create_version.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Versions_CreateVersion_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the create_version call in the Versions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Versions::Client#create_version. +# +def create_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Versions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::CreateVersionRequest.new + + # Call the create_version method. + result = client.create_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Versions_CreateVersion_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/delete_version.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/delete_version.rb new file mode 100644 index 000000000000..4684dac48690 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/delete_version.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Versions_DeleteVersion_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the delete_version call in the Versions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Versions::Client#delete_version. +# +def delete_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Versions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::DeleteVersionRequest.new + + # Call the delete_version method. + result = client.delete_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Versions_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/get_version.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/get_version.rb new file mode 100644 index 000000000000..134b446057e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/get_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Versions_GetVersion_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the get_version call in the Versions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Versions::Client#get_version. +# +def get_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Versions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::GetVersionRequest.new + + # Call the get_version method. + result = client.get_version request + + # The returned object is of type Google::Cloud::AppEngine::V1::Version. + p result +end +# [END appengine_v1_generated_Versions_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/list_versions.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/list_versions.rb new file mode 100644 index 000000000000..f915863a909a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/list_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Versions_ListVersions_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the list_versions call in the Versions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Versions::Client#list_versions. +# +def list_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Versions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::ListVersionsRequest.new + + # Call the list_versions method. + result = client.list_versions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppEngine::V1::Version. + p item + end +end +# [END appengine_v1_generated_Versions_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/update_version.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/update_version.rb new file mode 100644 index 000000000000..24fdf281baad --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/update_version.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START appengine_v1_generated_Versions_UpdateVersion_sync] +require "google/cloud/app_engine/v1" + +## +# Snippet for the update_version call in the Versions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppEngine::V1::Versions::Client#update_version. +# +def update_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppEngine::V1::Versions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppEngine::V1::UpdateVersionRequest.new + + # Call the update_version method. + result = client.update_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END appengine_v1_generated_Versions_UpdateVersion_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_operations_test.rb new file mode 100644 index 000000000000..154cce585189 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_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/appengine/v1/appengine_pb" +require "google/appengine/v1/appengine_services_pb" +require "google/cloud/app_engine/v1/applications" + +class ::Google::Cloud::AppEngine::V1::Applications::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::Applications::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::AppEngine::V1::Applications::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_rest_test.rb new file mode 100644 index 000000000000..837f0e0c5dfd --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/applications/rest" + + +class ::Google::Cloud::AppEngine::V1::Applications::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_application + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::Application.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.stub :transcode_get_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_application_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_application({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_application name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_application ::Google::Cloud::AppEngine::V1::GetApplicationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_application({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_application(::Google::Cloud::AppEngine::V1::GetApplicationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_application_client_stub.call_count + end + end + end + + def test_create_application + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + application = {} + + create_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.stub :transcode_create_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_application_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_application({ application: application }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_application application: application do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_application ::Google::Cloud::AppEngine::V1::CreateApplicationRequest.new(application: application) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_application({ application: application }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_application(::Google::Cloud::AppEngine::V1::CreateApplicationRequest.new(application: application), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_application_client_stub.call_count + end + end + end + + def test_update_application + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + application = {} + update_mask = {} + + update_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.stub :transcode_update_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_application_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_application({ name: name, application: application, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_application name: name, application: application, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_application ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new(name: name, application: application, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_application({ name: name, application: application, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_application(::Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new(name: name, application: application, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_application_client_stub.call_count + end + end + end + + def test_repair_application + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + repair_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.stub :transcode_repair_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, repair_application_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.repair_application({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.repair_application name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.repair_application ::Google::Cloud::AppEngine::V1::RepairApplicationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.repair_application({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.repair_application(::Google::Cloud::AppEngine::V1::RepairApplicationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, repair_application_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::Applications::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::AppEngine::V1::Applications::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb new file mode 100644 index 000000000000..4c03cac1d8c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/applications" + +class ::Google::Cloud::AppEngine::V1::Applications::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + 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_application + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::Application.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_application, name + assert_kind_of ::Google::Cloud::AppEngine::V1::GetApplicationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_application_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_application({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_application name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_application ::Google::Cloud::AppEngine::V1::GetApplicationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_application({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_application(::Google::Cloud::AppEngine::V1::GetApplicationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_application_client_stub.call_rpc_count + end + end + + def test_create_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + application = {} + + create_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_application, name + assert_kind_of ::Google::Cloud::AppEngine::V1::CreateApplicationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Application), request["application"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_application_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_application({ application: application }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_application application: application do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_application ::Google::Cloud::AppEngine::V1::CreateApplicationRequest.new(application: application) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_application({ application: application }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_application(::Google::Cloud::AppEngine::V1::CreateApplicationRequest.new(application: application), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_application_client_stub.call_rpc_count + end + end + + def test_update_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + application = {} + update_mask = {} + + update_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_application, name + assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Application), request["application"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_application_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_application({ name: name, application: application, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_application name: name, application: application, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_application ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new(name: name, application: application, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_application({ name: name, application: application, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_application(::Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new(name: name, application: application, 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_application_client_stub.call_rpc_count + end + end + + def test_repair_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + repair_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :repair_application, name + assert_kind_of ::Google::Cloud::AppEngine::V1::RepairApplicationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, repair_application_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.repair_application({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.repair_application name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.repair_application ::Google::Cloud::AppEngine::V1::RepairApplicationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.repair_application({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.repair_application(::Google::Cloud::AppEngine::V1::RepairApplicationRequest.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, repair_application_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| + 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::AppEngine::V1::Applications::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::AppEngine::V1::Applications::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppEngine::V1::Applications::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::AppEngine::V1::Applications::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AppEngine::V1::Applications::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_rest_test.rb new file mode 100644 index 000000000000..c1d656c35d6b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/authorized_certificates/rest" + + +class ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::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_authorized_certificates + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :BASIC_CERTIFICATE + page_size = 42 + page_token = "hello world" + + list_authorized_certificates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_list_authorized_certificates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_authorized_certificates_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_authorized_certificates({ parent: parent, view: view, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_authorized_certificates parent: parent, view: view, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_authorized_certificates ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_authorized_certificates({ parent: parent, view: view, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_authorized_certificates(::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new(parent: parent, view: view, page_size: page_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_authorized_certificates_client_stub.call_count + end + end + end + + def test_get_authorized_certificate + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BASIC_CERTIFICATE + + get_authorized_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_get_authorized_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_authorized_certificate_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_authorized_certificate({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_authorized_certificate name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_authorized_certificate ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_authorized_certificate({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_authorized_certificate(::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.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_authorized_certificate_client_stub.call_count + end + end + end + + def test_create_authorized_certificate + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate = {} + + create_authorized_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_create_authorized_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_authorized_certificate_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_authorized_certificate({ parent: parent, certificate: certificate }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_authorized_certificate parent: parent, certificate: certificate do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_authorized_certificate ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new(parent: parent, certificate: certificate) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_authorized_certificate({ parent: parent, certificate: certificate }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_authorized_certificate(::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new(parent: parent, certificate: certificate), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_authorized_certificate_client_stub.call_count + end + end + end + + def test_update_authorized_certificate + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + certificate = {} + update_mask = {} + + update_authorized_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_update_authorized_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_authorized_certificate_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_authorized_certificate({ name: name, certificate: certificate, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_authorized_certificate name: name, certificate: certificate, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_authorized_certificate ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new(name: name, certificate: certificate, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_authorized_certificate({ name: name, certificate: certificate, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_authorized_certificate(::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new(name: name, certificate: certificate, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_authorized_certificate_client_stub.call_count + end + end + end + + def test_delete_authorized_certificate + # 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_authorized_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_delete_authorized_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_authorized_certificate_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_authorized_certificate({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_authorized_certificate name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_authorized_certificate ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_authorized_certificate({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_authorized_certificate(::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_authorized_certificate_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::AppEngine::V1::AuthorizedCertificates::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::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb new file mode 100644 index 000000000000..cc45d01aca9f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb @@ -0,0 +1,413 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/authorized_certificates" + +class ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_authorized_certificates + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :BASIC_CERTIFICATE + page_size = 42 + page_token = "hello world" + + list_authorized_certificates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_authorized_certificates, name + assert_kind_of ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, request + assert_equal "hello world", request["parent"] + assert_equal :BASIC_CERTIFICATE, request["view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_authorized_certificates_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_authorized_certificates({ parent: parent, view: view, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_authorized_certificates parent: parent, view: view, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_authorized_certificates ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_authorized_certificates({ parent: parent, view: view, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_authorized_certificates(::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_authorized_certificates_client_stub.call_rpc_count + end + end + + def test_get_authorized_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 = :BASIC_CERTIFICATE + + get_authorized_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_authorized_certificate, name + assert_kind_of ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, request + assert_equal "hello world", request["name"] + assert_equal :BASIC_CERTIFICATE, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_authorized_certificate_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_authorized_certificate({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_authorized_certificate name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_authorized_certificate ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_authorized_certificate({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_authorized_certificate(::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.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_authorized_certificate_client_stub.call_rpc_count + end + end + + def test_create_authorized_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate = {} + + create_authorized_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_authorized_certificate, name + assert_kind_of ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::AuthorizedCertificate), request["certificate"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_authorized_certificate_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_authorized_certificate({ parent: parent, certificate: certificate }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_authorized_certificate parent: parent, certificate: certificate do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_authorized_certificate ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new(parent: parent, certificate: certificate) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_authorized_certificate({ parent: parent, certificate: certificate }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_authorized_certificate(::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new(parent: parent, certificate: certificate), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_authorized_certificate_client_stub.call_rpc_count + end + end + + def test_update_authorized_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + certificate = {} + update_mask = {} + + update_authorized_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_authorized_certificate, name + assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::AuthorizedCertificate), request["certificate"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_authorized_certificate_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_authorized_certificate({ name: name, certificate: certificate, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_authorized_certificate name: name, certificate: certificate, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_authorized_certificate ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new(name: name, certificate: certificate, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_authorized_certificate({ name: name, certificate: certificate, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_authorized_certificate(::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new(name: name, certificate: certificate, 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_authorized_certificate_client_stub.call_rpc_count + end + end + + def test_delete_authorized_certificate + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_authorized_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_authorized_certificate, name + assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_authorized_certificate_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_authorized_certificate({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_authorized_certificate name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_authorized_certificate ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_authorized_certificate({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_authorized_certificate(::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new(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_authorized_certificate_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + 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::AppEngine::V1::AuthorizedCertificates::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::AppEngine::V1::AuthorizedCertificates::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_rest_test.rb new file mode 100644 index 000000000000..9bc723155cdc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/authorized_domains/rest" + + +class ::Google::Cloud::AppEngine::V1::AuthorizedDomains::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_authorized_domains + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse.new + http_response = OpenStruct.new 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_authorized_domains_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::ServiceStub.stub :transcode_list_authorized_domains_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_authorized_domains_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_authorized_domains({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_authorized_domains parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_authorized_domains ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_authorized_domains({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_authorized_domains(::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.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_authorized_domains_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::AppEngine::V1::AuthorizedDomains::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::AppEngine::V1::AuthorizedDomains::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb new file mode 100644 index 000000000000..903c80f56daa --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/authorized_domains" + +class ::Google::Cloud::AppEngine::V1::AuthorizedDomains::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_authorized_domains + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_authorized_domains_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_authorized_domains, name + assert_kind_of ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest, 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_authorized_domains_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_authorized_domains({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_authorized_domains parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_authorized_domains ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_authorized_domains({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_authorized_domains(::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.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_authorized_domains_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::AuthorizedDomains::Client.new do |config| + 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::AppEngine::V1::AuthorizedDomains::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::AppEngine::V1::AuthorizedDomains::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_operations_test.rb new file mode 100644 index 000000000000..5b308e85d12e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_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/appengine/v1/appengine_pb" +require "google/appengine/v1/appengine_services_pb" +require "google/cloud/app_engine/v1/domain_mappings" + +class ::Google::Cloud::AppEngine::V1::DomainMappings::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::DomainMappings::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::AppEngine::V1::DomainMappings::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_rest_test.rb new file mode 100644 index 000000000000..480534c2e320 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_rest_test.rb @@ -0,0 +1,375 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/domain_mappings/rest" + + +class ::Google::Cloud::AppEngine::V1::DomainMappings::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_domain_mappings + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse.new + http_response = OpenStruct.new 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_domain_mappings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_list_domain_mappings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_domain_mappings_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_domain_mappings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_domain_mappings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_domain_mappings ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_domain_mappings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_domain_mappings(::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.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_domain_mappings_client_stub.call_count + end + end + end + + def test_get_domain_mapping + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::DomainMapping.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_domain_mapping_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_get_domain_mapping_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_domain_mapping_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_domain_mapping({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_domain_mapping name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_domain_mapping ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_domain_mapping({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_domain_mapping(::Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_domain_mapping_client_stub.call_count + end + end + end + + def test_create_domain_mapping + # Create test objects. + 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" + domain_mapping = {} + override_strategy = :UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY + + create_domain_mapping_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_create_domain_mapping_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_domain_mapping_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_domain_mapping({ parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_domain_mapping parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_domain_mapping ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new(parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_domain_mapping({ parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_domain_mapping(::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new(parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_domain_mapping_client_stub.call_count + end + end + end + + def test_update_domain_mapping + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + domain_mapping = {} + update_mask = {} + + update_domain_mapping_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_update_domain_mapping_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_domain_mapping_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_domain_mapping({ name: name, domain_mapping: domain_mapping, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_domain_mapping name: name, domain_mapping: domain_mapping, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_domain_mapping ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new(name: name, domain_mapping: domain_mapping, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_domain_mapping({ name: name, domain_mapping: domain_mapping, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_domain_mapping(::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new(name: name, domain_mapping: domain_mapping, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_domain_mapping_client_stub.call_count + end + end + end + + def test_delete_domain_mapping + # Create test objects. + client_result = ::Google::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_domain_mapping_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_delete_domain_mapping_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_domain_mapping_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_domain_mapping({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_domain_mapping name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_domain_mapping ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_domain_mapping({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_domain_mapping(::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_domain_mapping_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::AppEngine::V1::DomainMappings::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::AppEngine::V1::DomainMappings::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb new file mode 100644 index 000000000000..00401ff6a52a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb @@ -0,0 +1,440 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/domain_mappings" + +class ::Google::Cloud::AppEngine::V1::DomainMappings::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_domain_mappings + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_domain_mappings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_domain_mappings, name + assert_kind_of ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, 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_domain_mappings_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_domain_mappings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_domain_mappings parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_domain_mappings ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_domain_mappings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_domain_mappings(::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.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_domain_mappings_client_stub.call_rpc_count + end + end + + def test_get_domain_mapping + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::DomainMapping.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_domain_mapping_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_domain_mapping, name + assert_kind_of ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_domain_mapping_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_domain_mapping({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_domain_mapping name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_domain_mapping ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_domain_mapping({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_domain_mapping(::Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_domain_mapping_client_stub.call_rpc_count + end + end + + def test_create_domain_mapping + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + domain_mapping = {} + override_strategy = :UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY + + create_domain_mapping_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_domain_mapping, name + assert_kind_of ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::DomainMapping), request["domain_mapping"] + assert_equal :UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY, request["override_strategy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_domain_mapping_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_domain_mapping({ parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_domain_mapping parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_domain_mapping ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new(parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_domain_mapping({ parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_domain_mapping(::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new(parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy), grpc_options) do |response, operation| + assert_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_domain_mapping_client_stub.call_rpc_count + end + end + + def test_update_domain_mapping + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + domain_mapping = {} + update_mask = {} + + update_domain_mapping_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_domain_mapping, name + assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::DomainMapping), request["domain_mapping"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_domain_mapping_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_domain_mapping({ name: name, domain_mapping: domain_mapping, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_domain_mapping name: name, domain_mapping: domain_mapping, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_domain_mapping ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new(name: name, domain_mapping: domain_mapping, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_domain_mapping({ name: name, domain_mapping: domain_mapping, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_domain_mapping(::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new(name: name, domain_mapping: domain_mapping, 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_domain_mapping_client_stub.call_rpc_count + end + end + + def test_delete_domain_mapping + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_domain_mapping_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_domain_mapping, name + assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_domain_mapping_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_domain_mapping({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_domain_mapping name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_domain_mapping ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_domain_mapping({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_domain_mapping(::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.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_domain_mapping_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::DomainMappings::Client.new do |config| + 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::AppEngine::V1::DomainMappings::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::AppEngine::V1::DomainMappings::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppEngine::V1::DomainMappings::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::AppEngine::V1::DomainMappings::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AppEngine::V1::DomainMappings::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_rest_test.rb new file mode 100644 index 000000000000..45a5a928a77a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_rest_test.rb @@ -0,0 +1,430 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/firewall/rest" + + +class ::Google::Cloud::AppEngine::V1::Firewall::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_ingress_rules + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::ListIngressRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + matching_address = "hello world" + + list_ingress_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::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_list_ingress_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_ingress_rules_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_ingress_rules({ parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_ingress_rules parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_ingress_rules ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_ingress_rules({ parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_ingress_rules(::Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_ingress_rules_client_stub.call_count + end + end + end + + def test_batch_update_ingress_rules + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + ingress_rules = [{}] + + batch_update_ingress_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::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_batch_update_ingress_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_update_ingress_rules_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_update_ingress_rules({ name: name, ingress_rules: ingress_rules }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_update_ingress_rules name: name, ingress_rules: ingress_rules do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_update_ingress_rules ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new(name: name, ingress_rules: ingress_rules) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_update_ingress_rules({ name: name, ingress_rules: ingress_rules }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_update_ingress_rules(::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new(name: name, ingress_rules: ingress_rules), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_update_ingress_rules_client_stub.call_count + end + end + end + + def test_create_ingress_rule + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::FirewallRule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule = {} + + create_ingress_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_create_ingress_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_ingress_rule_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_ingress_rule({ parent: parent, rule: rule }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_ingress_rule parent: parent, rule: rule do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_ingress_rule ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new(parent: parent, rule: rule) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_ingress_rule({ parent: parent, rule: rule }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_ingress_rule(::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new(parent: parent, rule: rule), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_ingress_rule_client_stub.call_count + end + end + end + + def test_get_ingress_rule + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::FirewallRule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_ingress_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_get_ingress_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_ingress_rule_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_ingress_rule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_ingress_rule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_ingress_rule ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_ingress_rule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_ingress_rule(::Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_ingress_rule_client_stub.call_count + end + end + end + + def test_update_ingress_rule + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::FirewallRule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + rule = {} + update_mask = {} + + update_ingress_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_update_ingress_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_ingress_rule_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_ingress_rule({ name: name, rule: rule, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_ingress_rule name: name, rule: rule, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_ingress_rule ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new(name: name, rule: rule, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_ingress_rule({ name: name, rule: rule, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_ingress_rule(::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new(name: name, rule: rule, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_ingress_rule_client_stub.call_count + end + end + end + + def test_delete_ingress_rule + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_ingress_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_delete_ingress_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_ingress_rule_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_ingress_rule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_ingress_rule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_ingress_rule ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_ingress_rule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_ingress_rule(::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_ingress_rule_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::AppEngine::V1::Firewall::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::AppEngine::V1::Firewall::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb new file mode 100644 index 000000000000..c564e8b9bc45 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb @@ -0,0 +1,471 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/firewall" + +class ::Google::Cloud::AppEngine::V1::Firewall::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_ingress_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::ListIngressRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + matching_address = "hello world" + + list_ingress_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_ingress_rules, name + assert_kind_of ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest, 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["matching_address"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_ingress_rules_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_ingress_rules({ parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_ingress_rules parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_ingress_rules ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_ingress_rules({ parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_ingress_rules(::Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_ingress_rules_client_stub.call_rpc_count + end + end + + def test_batch_update_ingress_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + ingress_rules = [{}] + + batch_update_ingress_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_update_ingress_rules, name + assert_kind_of ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest, request + assert_equal "hello world", request["name"] + assert_kind_of ::Google::Cloud::AppEngine::V1::FirewallRule, request["ingress_rules"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_update_ingress_rules_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_update_ingress_rules({ name: name, ingress_rules: ingress_rules }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_update_ingress_rules name: name, ingress_rules: ingress_rules do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_update_ingress_rules ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new(name: name, ingress_rules: ingress_rules) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_update_ingress_rules({ name: name, ingress_rules: ingress_rules }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_update_ingress_rules(::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new(name: name, ingress_rules: ingress_rules), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_update_ingress_rules_client_stub.call_rpc_count + end + end + + def test_create_ingress_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::FirewallRule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 = {} + + create_ingress_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_ingress_rule, name + assert_kind_of ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::FirewallRule), request["rule"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_ingress_rule_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_ingress_rule({ parent: parent, rule: rule }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_ingress_rule parent: parent, rule: rule do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_ingress_rule ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new(parent: parent, rule: rule) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_ingress_rule({ parent: parent, rule: rule }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_ingress_rule(::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new(parent: parent, rule: rule), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_ingress_rule_client_stub.call_rpc_count + end + end + + def test_get_ingress_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::FirewallRule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_ingress_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_ingress_rule, name + assert_kind_of ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_ingress_rule_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_ingress_rule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_ingress_rule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_ingress_rule ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_ingress_rule({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_ingress_rule(::Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_ingress_rule_client_stub.call_rpc_count + end + end + + def test_update_ingress_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::FirewallRule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + rule = {} + update_mask = {} + + update_ingress_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_ingress_rule, name + assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::FirewallRule), request["rule"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_ingress_rule_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_ingress_rule({ name: name, rule: rule, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_ingress_rule name: name, rule: rule, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_ingress_rule ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new(name: name, rule: rule, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_ingress_rule({ name: name, rule: rule, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_ingress_rule(::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new(name: name, rule: rule, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_ingress_rule_client_stub.call_rpc_count + end + end + + def test_delete_ingress_rule + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_ingress_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_ingress_rule, name + assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_ingress_rule_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_ingress_rule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_ingress_rule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_ingress_rule ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_ingress_rule({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_ingress_rule(::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new(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_ingress_rule_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::Firewall::Client.new do |config| + 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::AppEngine::V1::Firewall::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::AppEngine::V1::Firewall::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppEngine::V1::Firewall::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_operations_test.rb new file mode 100644 index 000000000000..16f535d2413c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_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/appengine/v1/appengine_pb" +require "google/appengine/v1/appengine_services_pb" +require "google/cloud/app_engine/v1/instances" + +class ::Google::Cloud::AppEngine::V1::Instances::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::Instances::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::AppEngine::V1::Instances::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_rest_test.rb new file mode 100644 index 000000000000..95add7466c4c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/instances/rest" + + +class ::Google::Cloud::AppEngine::V1::Instances::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_instances + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::ListInstancesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_instances parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_instances ::Google::Cloud::AppEngine::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_instances(::Google::Cloud::AppEngine::V1::ListInstancesRequest.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_instances_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::AppEngine::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::AppEngine::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_count + end + end + end + + def test_delete_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_instance ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_instance(::Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_instance_client_stub.call_count + end + end + end + + def test_debug_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + ssh_key = "hello world" + + debug_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.stub :transcode_debug_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, debug_instance_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.debug_instance({ name: name, ssh_key: ssh_key }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.debug_instance name: name, ssh_key: ssh_key do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.debug_instance ::Google::Cloud::AppEngine::V1::DebugInstanceRequest.new(name: name, ssh_key: ssh_key) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.debug_instance({ name: name, ssh_key: ssh_key }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.debug_instance(::Google::Cloud::AppEngine::V1::DebugInstanceRequest.new(name: name, ssh_key: ssh_key), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, debug_instance_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::Instances::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::AppEngine::V1::Instances::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb new file mode 100644 index 000000000000..f3faa6a77d00 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb @@ -0,0 +1,371 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/instances" + +class ::Google::Cloud::AppEngine::V1::Instances::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_instances + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::ListInstancesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instances, name + assert_kind_of ::Google::Cloud::AppEngine::V1::ListInstancesRequest, 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_instances_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_instances parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_instances ::Google::Cloud::AppEngine::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_instances(::Google::Cloud::AppEngine::V1::ListInstancesRequest.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_instances_client_stub.call_rpc_count + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::Instance.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::AppEngine::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_instance ::Google::Cloud::AppEngine::V1::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_instance({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::AppEngine::V1::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_rpc_count + end + end + + def test_delete_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_instance, name + assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_instance({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_instance name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_instance ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_instance({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_instance(::Google::Cloud::AppEngine::V1::DeleteInstanceRequest.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_instance_client_stub.call_rpc_count + end + end + + def test_debug_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + ssh_key = "hello world" + + debug_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :debug_instance, name + assert_kind_of ::Google::Cloud::AppEngine::V1::DebugInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["ssh_key"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, debug_instance_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.debug_instance({ name: name, ssh_key: ssh_key }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.debug_instance name: name, ssh_key: ssh_key do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.debug_instance ::Google::Cloud::AppEngine::V1::DebugInstanceRequest.new(name: name, ssh_key: ssh_key) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.debug_instance({ name: name, ssh_key: ssh_key }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.debug_instance(::Google::Cloud::AppEngine::V1::DebugInstanceRequest.new(name: name, ssh_key: ssh_key), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, debug_instance_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| + 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::AppEngine::V1::Instances::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::AppEngine::V1::Instances::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppEngine::V1::Instances::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::AppEngine::V1::Instances::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AppEngine::V1::Instances::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_operations_test.rb new file mode 100644 index 000000000000..937a6436d6a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_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/appengine/v1/appengine_pb" +require "google/appengine/v1/appengine_services_pb" +require "google/cloud/app_engine/v1/services" + +class ::Google::Cloud::AppEngine::V1::Services::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::Services::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::AppEngine::V1::Services::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_rest_test.rb new file mode 100644 index 000000000000..f44e66e69a91 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/services/rest" + + +class ::Google::Cloud::AppEngine::V1::Services::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_services + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::ListServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_services_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_services({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_services parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_services ::Google::Cloud::AppEngine::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_services({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_services(::Google::Cloud::AppEngine::V1::ListServicesRequest.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_services_client_stub.call_count + end + end + end + + def test_get_service + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_service ::Google::Cloud::AppEngine::V1::GetServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_service(::Google::Cloud::AppEngine::V1::GetServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_count + end + end + end + + def test_update_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + service = {} + update_mask = {} + migrate_traffic = true + + update_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.stub :transcode_update_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_service({ name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_service name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_service ::Google::Cloud::AppEngine::V1::UpdateServiceRequest.new(name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_service({ name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_service(::Google::Cloud::AppEngine::V1::UpdateServiceRequest.new(name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_client_stub.call_count + end + end + end + + def test_delete_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_service ::Google::Cloud::AppEngine::V1::DeleteServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_service(::Google::Cloud::AppEngine::V1::DeleteServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_client_stub.call_count + end + end + end + + def test_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::AppEngine::V1::Services::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::AppEngine::V1::Services::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb new file mode 100644 index 000000000000..7e0ea18a6da8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb @@ -0,0 +1,375 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/services" + +class ::Google::Cloud::AppEngine::V1::Services::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::ListServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_services, name + assert_kind_of ::Google::Cloud::AppEngine::V1::ListServicesRequest, 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_services_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_services({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_services parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_services ::Google::Cloud::AppEngine::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_services({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_services(::Google::Cloud::AppEngine::V1::ListServicesRequest.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_services_client_stub.call_rpc_count + end + end + + def test_get_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service, name + assert_kind_of ::Google::Cloud::AppEngine::V1::GetServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_service ::Google::Cloud::AppEngine::V1::GetServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_service(::Google::Cloud::AppEngine::V1::GetServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_rpc_count + end + end + + def test_update_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + service = {} + update_mask = {} + migrate_traffic = true + + update_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service, name + assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Service), request["service"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["migrate_traffic"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_service({ name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_service name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_service ::Google::Cloud::AppEngine::V1::UpdateServiceRequest.new(name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_service({ name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_service(::Google::Cloud::AppEngine::V1::UpdateServiceRequest.new(name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_service_client_stub.call_rpc_count + end + end + + def test_delete_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service, name + assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_service({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_service name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_service ::Google::Cloud::AppEngine::V1::DeleteServiceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_service({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_service(::Google::Cloud::AppEngine::V1::DeleteServiceRequest.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_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::Services::Client.new do |config| + 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::AppEngine::V1::Services::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::AppEngine::V1::Services::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppEngine::V1::Services::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::AppEngine::V1::Services::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AppEngine::V1::Services::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_operations_test.rb new file mode 100644 index 000000000000..e5a4962e73ed --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_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/appengine/v1/appengine_pb" +require "google/appengine/v1/appengine_services_pb" +require "google/cloud/app_engine/v1/versions" + +class ::Google::Cloud::AppEngine::V1::Versions::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppEngine::V1::Versions::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::AppEngine::V1::Versions::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_rest_test.rb new file mode 100644 index 000000000000..f5ec58b2fc07 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/versions/rest" + + +class ::Google::Cloud::AppEngine::V1::Versions::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_versions + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::ListVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :BASIC + page_size = 42 + page_token = "hello world" + + list_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_versions({ parent: parent, view: view, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_versions parent: parent, view: view, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_versions ::Google::Cloud::AppEngine::V1::ListVersionsRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_versions({ parent: parent, view: view, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_versions(::Google::Cloud::AppEngine::V1::ListVersionsRequest.new(parent: parent, view: view, page_size: page_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_versions_client_stub.call_count + end + end + end + + def test_get_version + # Create test objects. + client_result = ::Google::Cloud::AppEngine::V1::Version.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BASIC + + get_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_version_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_version({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_version name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_version ::Google::Cloud::AppEngine::V1::GetVersionRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_version({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_version(::Google::Cloud::AppEngine::V1::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_count + end + end + end + + def test_create_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + version = {} + + create_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_create_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_version_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_version({ parent: parent, version: version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_version parent: parent, version: version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_version ::Google::Cloud::AppEngine::V1::CreateVersionRequest.new(parent: parent, version: version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_version({ parent: parent, version: version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_version(::Google::Cloud::AppEngine::V1::CreateVersionRequest.new(parent: parent, version: version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_version_client_stub.call_count + end + end + end + + def test_update_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + version = {} + update_mask = {} + + update_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_update_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_version_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_version({ name: name, version: version, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_version name: name, version: version, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_version ::Google::Cloud::AppEngine::V1::UpdateVersionRequest.new(name: name, version: version, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_version({ name: name, version: version, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_version(::Google::Cloud::AppEngine::V1::UpdateVersionRequest.new(name: name, version: version, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_version_client_stub.call_count + end + end + end + + def test_delete_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_version ::Google::Cloud::AppEngine::V1::DeleteVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_version(::Google::Cloud::AppEngine::V1::DeleteVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_count + end + end + end + + def test_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::AppEngine::V1::Versions::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::AppEngine::V1::Versions::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb new file mode 100644 index 000000000000..f30069053164 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_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/appengine/v1/appengine_pb" +require "google/cloud/app_engine/v1/versions" + +class ::Google::Cloud::AppEngine::V1::Versions::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::ListVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :BASIC + page_size = 42 + page_token = "hello world" + + list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_versions, name + assert_kind_of ::Google::Cloud::AppEngine::V1::ListVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal :BASIC, request["view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_versions_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_versions({ parent: parent, view: view, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_versions parent: parent, view: view, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_versions ::Google::Cloud::AppEngine::V1::ListVersionsRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_versions({ parent: parent, view: view, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_versions(::Google::Cloud::AppEngine::V1::ListVersionsRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_rpc_count + end + end + + def test_get_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppEngine::V1::Version.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BASIC + + get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_version, name + assert_kind_of ::Google::Cloud::AppEngine::V1::GetVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal :BASIC, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_version_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_version({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_version name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_version ::Google::Cloud::AppEngine::V1::GetVersionRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_version({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_version(::Google::Cloud::AppEngine::V1::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_rpc_count + end + end + + def test_create_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + version = {} + + create_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_version, name + assert_kind_of ::Google::Cloud::AppEngine::V1::CreateVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Version), request["version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_version_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_version({ parent: parent, version: version }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_version parent: parent, version: version do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_version ::Google::Cloud::AppEngine::V1::CreateVersionRequest.new(parent: parent, version: version) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_version({ parent: parent, version: version }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_version(::Google::Cloud::AppEngine::V1::CreateVersionRequest.new(parent: parent, version: version), grpc_options) do |response, operation| + assert_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_version_client_stub.call_rpc_count + end + end + + def test_update_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + version = {} + update_mask = {} + + update_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_version, name + assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Version), request["version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_version_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_version({ name: name, version: version, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_version name: name, version: version, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_version ::Google::Cloud::AppEngine::V1::UpdateVersionRequest.new(name: name, version: version, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_version({ name: name, version: version, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_version(::Google::Cloud::AppEngine::V1::UpdateVersionRequest.new(name: name, version: version, 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_version_client_stub.call_rpc_count + end + end + + def test_delete_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_version, name + assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_version_client_stub do + # Create client + client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_version({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_version name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_version ::Google::Cloud::AppEngine::V1::DeleteVersionRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_version({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_version(::Google::Cloud::AppEngine::V1::DeleteVersionRequest.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_version_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::Versions::Client.new do |config| + 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::AppEngine::V1::Versions::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::AppEngine::V1::Versions::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppEngine::V1::Versions::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::AppEngine::V1::Versions::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AppEngine::V1::Versions::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/helper.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_engine-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.gitignore b/owl-bot-staging/google-cloud-app_hub-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json new file mode 100644 index 000000000000..118640b1b4b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "apphub.googleapis.com", + "api_shortname": "apphub", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest", + "distribution_name": "google-cloud-app_hub-v1", + "is_cloud": true, + "language": "ruby", + "name": "apphub", + "name_pretty": "App Hub V1 API", + "product_documentation": "https://cloud.google.com/app-hub/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. Note that google-cloud-app_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_hub instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/app-hub/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml new file mode 100644 index 000000000000..aac5e1a2d3f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-app_hub-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-app_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.yardopts b/owl-bot-staging/google-cloud-app_hub-v1/.yardopts new file mode 100644 index 000000000000..47c312defbe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="App Hub V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..56078e3eba52 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-app_hub-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-app_hub-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/app_hub/v1" + +client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/app_hub/v1" + +::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AppHub::V1::AppHub::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-app_hub-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/app_hub/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AppHub::V1::AppHub::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-app_hub-v1/Gemfile b/owl-bot-staging/google-cloud-app_hub-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-app_hub-v1/README.md b/owl-bot-staging/google-cloud-app_hub-v1/README.md new file mode 100644 index 000000000000..6f98ef04dcba --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the App Hub V1 API + +API Client library for the App Hub V1 API + +google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the App Hub V1 API. Most users should consider using +the main client gem, +[google-cloud-app_hub](https://rubygems.org/gems/google-cloud-app_hub). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-app_hub-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/apphub.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/app_hub/v1" + +client = ::Google::Cloud::AppHub::V1::AppHub::Client.new +request = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new # (request fields as keyword arguments...) +response = client.lookup_service_project_attachment request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/app-hub/docs/overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/app_hub/v1" +require "logger" + +client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-app_hub`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-app_hub-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-app_hub`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-app_hub-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-app_hub-v1/Rakefile b/owl-bot-staging/google-cloud-app_hub-v1/Rakefile new file mode 100644 index 000000000000..6f86b00de1d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-app_hub-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/app_hub/v1/app_hub/credentials" + ::Google::Cloud::AppHub::V1::AppHub::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-app_hub-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-app_hub-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-app_hub-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-app_hub-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-app_hub-v1" + header "google-cloud-app_hub-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-app_hub-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-app_hub-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-app_hub-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-app_hub-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json new file mode 100644 index 000000000000..b9d4fe1df12e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json @@ -0,0 +1,153 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.apphub.v1", + "libraryPackage": "::Google::Cloud::AppHub::V1", + "services": { + "AppHub": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AppHub::V1::AppHub::Client", + "rpcs": { + "LookupServiceProjectAttachment": { + "methods": [ + "lookup_service_project_attachment" + ] + }, + "ListServiceProjectAttachments": { + "methods": [ + "list_service_project_attachments" + ] + }, + "CreateServiceProjectAttachment": { + "methods": [ + "create_service_project_attachment" + ] + }, + "GetServiceProjectAttachment": { + "methods": [ + "get_service_project_attachment" + ] + }, + "DeleteServiceProjectAttachment": { + "methods": [ + "delete_service_project_attachment" + ] + }, + "DetachServiceProjectAttachment": { + "methods": [ + "detach_service_project_attachment" + ] + }, + "ListDiscoveredServices": { + "methods": [ + "list_discovered_services" + ] + }, + "GetDiscoveredService": { + "methods": [ + "get_discovered_service" + ] + }, + "LookupDiscoveredService": { + "methods": [ + "lookup_discovered_service" + ] + }, + "ListServices": { + "methods": [ + "list_services" + ] + }, + "CreateService": { + "methods": [ + "create_service" + ] + }, + "GetService": { + "methods": [ + "get_service" + ] + }, + "UpdateService": { + "methods": [ + "update_service" + ] + }, + "DeleteService": { + "methods": [ + "delete_service" + ] + }, + "ListDiscoveredWorkloads": { + "methods": [ + "list_discovered_workloads" + ] + }, + "GetDiscoveredWorkload": { + "methods": [ + "get_discovered_workload" + ] + }, + "LookupDiscoveredWorkload": { + "methods": [ + "lookup_discovered_workload" + ] + }, + "ListWorkloads": { + "methods": [ + "list_workloads" + ] + }, + "CreateWorkload": { + "methods": [ + "create_workload" + ] + }, + "GetWorkload": { + "methods": [ + "get_workload" + ] + }, + "UpdateWorkload": { + "methods": [ + "update_workload" + ] + }, + "DeleteWorkload": { + "methods": [ + "delete_workload" + ] + }, + "ListApplications": { + "methods": [ + "list_applications" + ] + }, + "CreateApplication": { + "methods": [ + "create_application" + ] + }, + "GetApplication": { + "methods": [ + "get_application" + ] + }, + "UpdateApplication": { + "methods": [ + "update_application" + ] + }, + "DeleteApplication": { + "methods": [ + "delete_application" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec b/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec new file mode 100644 index 000000000000..0052cff0081d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/app_hub/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-app_hub-v1" + gem.version = Google::Cloud::AppHub::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. Note that google-cloud-app_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_hub instead. See the readme for more details." + gem.summary = "API Client library for the App Hub V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb new file mode 100644 index 000000000000..2bd20cb40c59 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/app_hub/v1" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb new file mode 100644 index 000000000000..ebab4dae51e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/app_hub/v1/app_hub" +require "google/cloud/app_hub/v1/version" + +module Google + module Cloud + module AppHub + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/app_hub/v1" + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/app_hub/v1" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/app_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb new file mode 100644 index 000000000000..8fa01251c081 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_hub/v1/version" + +require "google/cloud/app_hub/v1/app_hub/credentials" +require "google/cloud/app_hub/v1/app_hub/paths" +require "google/cloud/app_hub/v1/app_hub/operations" +require "google/cloud/app_hub/v1/app_hub/client" +require "google/cloud/app_hub/v1/app_hub/rest" + +module Google + module Cloud + module AppHub + module V1 + ## + # The App Hub API allows you to manage App Hub resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/app_hub/v1/app_hub" + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/app_hub/v1/app_hub/rest" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module AppHub + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_hub", "helpers.rb" +require "google/cloud/app_hub/v1/app_hub/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb new file mode 100644 index 000000000000..ba386c45603d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb @@ -0,0 +1,3468 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/apphub/v1/apphub_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + ## + # Client for the AppHub service. + # + # The App Hub API allows you to manage App Hub resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_hub_stub + + ## + # Configure the AppHub Client class. + # + # See {::Google::Cloud::AppHub::V1::AppHub::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppHub clients + # ::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppHub", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.lookup_service_project_attachment.timeout = 60.0 + default_config.rpcs.lookup_service_project_attachment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_service_project_attachments.timeout = 60.0 + default_config.rpcs.list_service_project_attachments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_service_project_attachment.timeout = 60.0 + + default_config.rpcs.get_service_project_attachment.timeout = 60.0 + default_config.rpcs.get_service_project_attachment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_service_project_attachment.timeout = 60.0 + + default_config.rpcs.detach_service_project_attachment.timeout = 60.0 + + default_config.rpcs.list_discovered_services.timeout = 60.0 + default_config.rpcs.list_discovered_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_discovered_service.timeout = 60.0 + default_config.rpcs.get_discovered_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_discovered_service.timeout = 60.0 + default_config.rpcs.lookup_discovered_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_services.timeout = 60.0 + default_config.rpcs.list_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_service.timeout = 60.0 + + default_config.rpcs.get_service.timeout = 60.0 + default_config.rpcs.get_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_service.timeout = 60.0 + + default_config.rpcs.delete_service.timeout = 60.0 + + default_config.rpcs.list_discovered_workloads.timeout = 60.0 + default_config.rpcs.list_discovered_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_discovered_workload.timeout = 60.0 + default_config.rpcs.get_discovered_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_discovered_workload.timeout = 60.0 + default_config.rpcs.lookup_discovered_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workload.timeout = 60.0 + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_workload.timeout = 60.0 + + default_config.rpcs.delete_workload.timeout = 60.0 + + default_config.rpcs.list_applications.timeout = 60.0 + default_config.rpcs.list_applications.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_application.timeout = 60.0 + + default_config.rpcs.get_application.timeout = 60.0 + default_config.rpcs.get_application.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_application.timeout = 60.0 + + default_config.rpcs.delete_application.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AppHub Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppHub::V1::AppHub::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @app_hub_stub.universe_domain + end + + ## + # Create a new AppHub client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppHub client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/apphub/v1/apphub_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @app_hub_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AppHub::V1::AppHub::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @app_hub_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_hub_stub.endpoint + config.universe_domain = @app_hub_stub.universe_domain + config.logger = @app_hub_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_hub_stub.endpoint + config.universe_domain = @app_hub_stub.universe_domain + config.logger = @app_hub_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppHub::V1::AppHub::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @app_hub_stub.logger + end + + # Service calls + + ## + # Lists a service project attachment for a given service project. You can + # call this API from any project to find if it is attached to a host project. + # + # @overload lookup_service_project_attachment(request, options = nil) + # Pass arguments to `lookup_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_service_project_attachment(name: nil) + # Pass arguments to `lookup_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Service project ID and location to lookup service project + # attachment for. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new + # + # # Call the lookup_service_project_attachment method. + # result = client.lookup_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. + # p result + # + def lookup_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :lookup_service_project_attachment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists service projects attached to the host project. + # + # @overload list_service_project_attachments(request, options = nil) + # Pass arguments to `list_service_project_attachments` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_service_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_service_project_attachments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to list service project attachments. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new + # + # # Call the list_service_project_attachments method. + # result = client.list_service_project_attachments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. + # p item + # end + # + def list_service_project_attachments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_service_project_attachments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_service_project_attachments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_project_attachments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_service_project_attachments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Attaches a service project to the host project. + # + # @overload create_service_project_attachment(request, options = nil) + # Pass arguments to `create_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_service_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) + # Pass arguments to `create_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to which service project is being + # attached. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @param service_project_attachment_id [::String] + # Required. The service project attachment identifier must contain the + # project id of the service project specified in the + # service_project_attachment.service_project field. + # @param service_project_attachment [::Google::Cloud::AppHub::V1::ServiceProjectAttachment, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new + # + # # Call the create_service_project_attachment method. + # result = client.create_service_project_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_service_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :create_service_project_attachment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a service project attachment. + # + # @overload get_service_project_attachment(request, options = nil) + # Pass arguments to `get_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service_project_attachment(name: nil) + # Pass arguments to `get_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the service project attachment to + # retrieve. Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new + # + # # Call the get_service_project_attachment method. + # result = client.get_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. + # p result + # + def get_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_service_project_attachment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a service project attachment. + # + # @overload delete_service_project_attachment(request, options = nil) + # Pass arguments to `delete_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_service_project_attachment(name: nil, request_id: nil) + # Pass arguments to `delete_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the service project attachment to delete. + # Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new + # + # # Call the delete_service_project_attachment method. + # result = client.delete_service_project_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_service_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :delete_service_project_attachment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detaches a service project from a host project. + # You can call this API from any service project without needing access to + # the host project that it is attached to. + # + # @overload detach_service_project_attachment(request, options = nil) + # Pass arguments to `detach_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload detach_service_project_attachment(name: nil) + # Pass arguments to `detach_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Service project id and location to detach from a host project. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new + # + # # Call the detach_service_project_attachment method. + # result = client.detach_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. + # p result + # + def detach_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.detach_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :detach_service_project_attachment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Discovered Services that can be added to an Application in a host + # project and location. + # + # @overload list_discovered_services(request, options = nil) + # Pass arguments to `list_discovered_services` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_discovered_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Discovered Services on. + # Expected format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new + # + # # Call the list_discovered_services method. + # result = client.list_discovered_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredService. + # p item + # end + # + def list_discovered_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_discovered_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_discovered_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_discovered_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Discovered Service in a host project and location. + # + # @overload get_discovered_service(request, options = nil) + # Pass arguments to `get_discovered_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_discovered_service(name: nil) + # Pass arguments to `get_discovered_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Discovered Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::DiscoveredService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new + # + # # Call the get_discovered_service method. + # result = client.get_discovered_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. + # p result + # + def get_discovered_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_discovered_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_discovered_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_discovered_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a Discovered Service in a host project and location, with a + # given resource URI. + # + # @overload lookup_discovered_service(request, options = nil) + # Pass arguments to `lookup_discovered_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_discovered_service(parent: nil, uri: nil) + # Pass arguments to `lookup_discovered_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to lookup Discovered Service in. + # Expected format: `projects/{project}/locations/{location}`. + # @param uri [::String] + # Required. Resource URI to find DiscoveredService for. + # Accepts both project number and project ID and does translation when + # needed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new + # + # # Call the lookup_discovered_service method. + # result = client.lookup_discovered_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. + # p result + # + def lookup_discovered_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_discovered_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_discovered_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :lookup_discovered_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Services in an Application. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the parent Application to list Services + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Service in an Application. + # + # @overload create_service(request, options = nil) + # Pass arguments to `create_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_service(parent: nil, service_id: nil, service: nil, request_id: nil) + # Pass arguments to `create_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the parent Application to create the + # Service in. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param service_id [::String] + # Required. The Service identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateServiceRequest.new + # + # # Call the create_service method. + # result = client.create_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :create_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Service in an Application. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service(name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Service in an Application. + # + # @overload update_service(request, options = nil) + # Pass arguments to `update_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_service(update_mask: nil, service: nil, request_id: nil) + # Pass arguments to `update_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Service resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new + # + # # Call the update_service method. + # result = client.update_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service&.name + header_params["service.name"] = request.service.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :update_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Service from an Application. + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_service(name: nil, request_id: nil) + # Pass arguments to `delete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Service to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteServiceRequest.new + # + # # Call the delete_service method. + # result = client.delete_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :delete_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Discovered Workloads that can be added to an Application in a host + # project and location. + # + # @overload list_discovered_workloads(request, options = nil) + # Pass arguments to `list_discovered_workloads` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_discovered_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Discovered Workloads on. + # Expected format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new + # + # # Call the list_discovered_workloads method. + # result = client.list_discovered_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. + # p item + # end + # + def list_discovered_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_discovered_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_discovered_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_discovered_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Discovered Workload in a host project and location. + # + # @overload get_discovered_workload(request, options = nil) + # Pass arguments to `get_discovered_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_discovered_workload(name: nil) + # Pass arguments to `get_discovered_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Discovered Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new + # + # # Call the get_discovered_workload method. + # result = client.get_discovered_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. + # p result + # + def get_discovered_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_discovered_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_discovered_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_discovered_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a Discovered Workload in a host project and location, with a + # given resource URI. + # + # @overload lookup_discovered_workload(request, options = nil) + # Pass arguments to `lookup_discovered_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_discovered_workload(parent: nil, uri: nil) + # Pass arguments to `lookup_discovered_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to lookup Discovered Workload in. + # Expected format: `projects/{project}/locations/{location}`. + # @param uri [::String] + # Required. Resource URI to find Discovered Workload for. + # Accepts both project number and project ID and does translation when + # needed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new + # + # # Call the lookup_discovered_workload method. + # result = client.lookup_discovered_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. + # p result + # + def lookup_discovered_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_discovered_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :lookup_discovered_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Workloads in an Application. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the parent Application to list Workloads + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Workload in an Application. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the Application to create Workload in. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param workload_id [::String] + # Required. The Workload identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :create_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Workload in an Application. + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Workload in an Application. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workload(update_mask: nil, workload: nil, request_id: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Workload resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workload&.name + header_params["workload.name"] = request.workload.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :update_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Workload from an Application. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workload(name: nil, request_id: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Workload to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :delete_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Applications in a host project and location. + # + # @overload list_applications(request, options = nil) + # Pass arguments to `list_applications` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListApplicationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListApplicationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_applications` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Applications on. + # Expected format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new + # + # # Call the list_applications method. + # result = client.list_applications request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Application. + # p item + # end + # + def list_applications request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListApplicationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_applications.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_applications.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_applications.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :list_applications, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_applications, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an Application in a host project and location. + # + # @overload create_application(request, options = nil) + # Pass arguments to `create_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil) + # Pass arguments to `create_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to create Application in. + # Expected format: `projects/{project}/locations/{location}`. + # @param application_id [::String] + # Required. The Application identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new + # + # # Call the create_application method. + # result = client.create_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :create_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Application in a host project and location. + # + # @overload get_application(request, options = nil) + # Pass arguments to `get_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_application(name: nil) + # Pass arguments to `get_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Application to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AppHub::V1::Application] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AppHub::V1::Application] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetApplicationRequest.new + # + # # Call the get_application method. + # result = client.get_application request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Application. + # p result + # + def get_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :get_application, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an Application in a host project and location. + # + # @overload update_application(request, options = nil) + # Pass arguments to `update_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_application(update_mask: nil, application: nil, request_id: nil) + # Pass arguments to `update_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Application resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new + # + # # Call the update_application method. + # result = client.update_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.application&.name + header_params["application.name"] = request.application.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :update_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an Application in a host project and location. + # + # @overload delete_application(request, options = nil) + # Pass arguments to `delete_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_application(name: nil, request_id: nil) + # Pass arguments to `delete_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Application to delete. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new + # + # # Call the delete_application method. + # result = client.delete_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_application.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.call_rpc :delete_application, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AppHub API. + # + # This class represents the configuration for AppHub, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppHub::V1::AppHub::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # lookup_service_project_attachment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.lookup_service_project_attachment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.lookup_service_project_attachment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apphub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AppHub API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `lookup_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_service_project_attachment + ## + # RPC-specific configuration for `list_service_project_attachments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_project_attachments + ## + # RPC-specific configuration for `create_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_project_attachment + ## + # RPC-specific configuration for `get_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_project_attachment + ## + # RPC-specific configuration for `delete_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_project_attachment + ## + # RPC-specific configuration for `detach_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :detach_service_project_attachment + ## + # RPC-specific configuration for `list_discovered_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovered_services + ## + # RPC-specific configuration for `get_discovered_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovered_service + ## + # RPC-specific configuration for `lookup_discovered_service` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_discovered_service + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `create_service` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `update_service` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service + ## + # RPC-specific configuration for `delete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service + ## + # RPC-specific configuration for `list_discovered_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovered_workloads + ## + # RPC-specific configuration for `get_discovered_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovered_workload + ## + # RPC-specific configuration for `lookup_discovered_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_discovered_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `create_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `list_applications` + # @return [::Gapic::Config::Method] + # + attr_reader :list_applications + ## + # RPC-specific configuration for `create_application` + # @return [::Gapic::Config::Method] + # + attr_reader :create_application + ## + # RPC-specific configuration for `get_application` + # @return [::Gapic::Config::Method] + # + attr_reader :get_application + ## + # RPC-specific configuration for `update_application` + # @return [::Gapic::Config::Method] + # + attr_reader :update_application + ## + # RPC-specific configuration for `delete_application` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_application + + # @private + def initialize parent_rpcs = nil + lookup_service_project_attachment_config = parent_rpcs.lookup_service_project_attachment if parent_rpcs.respond_to? :lookup_service_project_attachment + @lookup_service_project_attachment = ::Gapic::Config::Method.new lookup_service_project_attachment_config + list_service_project_attachments_config = parent_rpcs.list_service_project_attachments if parent_rpcs.respond_to? :list_service_project_attachments + @list_service_project_attachments = ::Gapic::Config::Method.new list_service_project_attachments_config + create_service_project_attachment_config = parent_rpcs.create_service_project_attachment if parent_rpcs.respond_to? :create_service_project_attachment + @create_service_project_attachment = ::Gapic::Config::Method.new create_service_project_attachment_config + get_service_project_attachment_config = parent_rpcs.get_service_project_attachment if parent_rpcs.respond_to? :get_service_project_attachment + @get_service_project_attachment = ::Gapic::Config::Method.new get_service_project_attachment_config + delete_service_project_attachment_config = parent_rpcs.delete_service_project_attachment if parent_rpcs.respond_to? :delete_service_project_attachment + @delete_service_project_attachment = ::Gapic::Config::Method.new delete_service_project_attachment_config + detach_service_project_attachment_config = parent_rpcs.detach_service_project_attachment if parent_rpcs.respond_to? :detach_service_project_attachment + @detach_service_project_attachment = ::Gapic::Config::Method.new detach_service_project_attachment_config + list_discovered_services_config = parent_rpcs.list_discovered_services if parent_rpcs.respond_to? :list_discovered_services + @list_discovered_services = ::Gapic::Config::Method.new list_discovered_services_config + get_discovered_service_config = parent_rpcs.get_discovered_service if parent_rpcs.respond_to? :get_discovered_service + @get_discovered_service = ::Gapic::Config::Method.new get_discovered_service_config + lookup_discovered_service_config = parent_rpcs.lookup_discovered_service if parent_rpcs.respond_to? :lookup_discovered_service + @lookup_discovered_service = ::Gapic::Config::Method.new lookup_discovered_service_config + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service + @create_service = ::Gapic::Config::Method.new create_service_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service + @update_service = ::Gapic::Config::Method.new update_service_config + delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service + @delete_service = ::Gapic::Config::Method.new delete_service_config + list_discovered_workloads_config = parent_rpcs.list_discovered_workloads if parent_rpcs.respond_to? :list_discovered_workloads + @list_discovered_workloads = ::Gapic::Config::Method.new list_discovered_workloads_config + get_discovered_workload_config = parent_rpcs.get_discovered_workload if parent_rpcs.respond_to? :get_discovered_workload + @get_discovered_workload = ::Gapic::Config::Method.new get_discovered_workload_config + lookup_discovered_workload_config = parent_rpcs.lookup_discovered_workload if parent_rpcs.respond_to? :lookup_discovered_workload + @lookup_discovered_workload = ::Gapic::Config::Method.new lookup_discovered_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications + @list_applications = ::Gapic::Config::Method.new list_applications_config + create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application + @create_application = ::Gapic::Config::Method.new create_application_config + get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application + @get_application = ::Gapic::Config::Method.new get_application_config + update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application + @update_application = ::Gapic::Config::Method.new update_application_config + delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application + @delete_application = ::Gapic::Config::Method.new delete_application_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb new file mode 100644 index 000000000000..541dcc24d08f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + # Credentials for the AppHub API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb new file mode 100644 index 000000000000..97cefaaa2312 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppHub Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AppHub Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apphub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb new file mode 100644 index 000000000000..de11b2b871b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb @@ -0,0 +1,182 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + module AppHub + # Path helper methods for the AppHub API. + module Paths + ## + # Create a fully-qualified Application resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/applications/{application}` + # + # @param project [String] + # @param location [String] + # @param application [String] + # + # @return [::String] + def application_path project:, location:, application: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/applications/#{application}" + end + + ## + # Create a fully-qualified DiscoveredService resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/discoveredServices/{discovered_service}` + # + # @param project [String] + # @param location [String] + # @param discovered_service [String] + # + # @return [::String] + def discovered_service_path project:, location:, discovered_service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/discoveredServices/#{discovered_service}" + end + + ## + # Create a fully-qualified DiscoveredWorkload resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/discoveredWorkloads/{discovered_workload}` + # + # @param project [String] + # @param location [String] + # @param discovered_workload [String] + # + # @return [::String] + def discovered_workload_path project:, location:, discovered_workload: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/discoveredWorkloads/#{discovered_workload}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/applications/{application}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param application [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, application:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "application cannot contain /" if application.to_s.include? "/" + + "projects/#{project}/locations/#{location}/applications/#{application}/services/#{service}" + end + + ## + # Create a fully-qualified ServiceProjectAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/serviceProjectAttachments/{service_project_attachment}` + # + # @param project [String] + # @param location [String] + # @param service_project_attachment [String] + # + # @return [::String] + def service_project_attachment_path project:, location:, service_project_attachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/serviceProjectAttachments/#{service_project_attachment}" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}` + # + # @param project [String] + # @param location [String] + # @param application [String] + # @param workload [String] + # + # @return [::String] + def workload_path project:, location:, application:, workload: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "application cannot contain /" if application.to_s.include? "/" + + "projects/#{project}/locations/#{location}/applications/#{application}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb new file mode 100644 index 000000000000..41025e868601 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/app_hub/v1/version" +require "google/cloud/app_hub/v1/bindings_override" + +require "google/cloud/app_hub/v1/app_hub/credentials" +require "google/cloud/app_hub/v1/app_hub/paths" +require "google/cloud/app_hub/v1/app_hub/rest/operations" +require "google/cloud/app_hub/v1/app_hub/rest/client" + +module Google + module Cloud + module AppHub + module V1 + ## + # The App Hub API allows you to manage App Hub resources. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/app_hub/v1/app_hub/rest" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module AppHub + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/app_hub/v1/app_hub/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb new file mode 100644 index 000000000000..b44d6b6228db --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb @@ -0,0 +1,3245 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/apphub/v1/apphub_service_pb" +require "google/cloud/app_hub/v1/app_hub/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + module Rest + ## + # REST client for the AppHub service. + # + # The App Hub API allows you to manage App Hub resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_hub_stub + + ## + # Configure the AppHub Client class. + # + # See {::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppHub clients + # ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppHub", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.lookup_service_project_attachment.timeout = 60.0 + default_config.rpcs.lookup_service_project_attachment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_service_project_attachments.timeout = 60.0 + default_config.rpcs.list_service_project_attachments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_service_project_attachment.timeout = 60.0 + + default_config.rpcs.get_service_project_attachment.timeout = 60.0 + default_config.rpcs.get_service_project_attachment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_service_project_attachment.timeout = 60.0 + + default_config.rpcs.detach_service_project_attachment.timeout = 60.0 + + default_config.rpcs.list_discovered_services.timeout = 60.0 + default_config.rpcs.list_discovered_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_discovered_service.timeout = 60.0 + default_config.rpcs.get_discovered_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_discovered_service.timeout = 60.0 + default_config.rpcs.lookup_discovered_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_services.timeout = 60.0 + default_config.rpcs.list_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_service.timeout = 60.0 + + default_config.rpcs.get_service.timeout = 60.0 + default_config.rpcs.get_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_service.timeout = 60.0 + + default_config.rpcs.delete_service.timeout = 60.0 + + default_config.rpcs.list_discovered_workloads.timeout = 60.0 + default_config.rpcs.list_discovered_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_discovered_workload.timeout = 60.0 + default_config.rpcs.get_discovered_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_discovered_workload.timeout = 60.0 + default_config.rpcs.lookup_discovered_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workload.timeout = 60.0 + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_workload.timeout = 60.0 + + default_config.rpcs.delete_workload.timeout = 60.0 + + default_config.rpcs.list_applications.timeout = 60.0 + default_config.rpcs.list_applications.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_application.timeout = 60.0 + + default_config.rpcs.get_application.timeout = 60.0 + default_config.rpcs.get_application.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_application.timeout = 60.0 + + default_config.rpcs.delete_application.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AppHub Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @app_hub_stub.universe_domain + end + + ## + # Create a new AppHub REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppHub client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @app_hub_stub = ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @app_hub_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_hub_stub.endpoint + config.universe_domain = @app_hub_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @app_hub_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_hub_stub.endpoint + config.universe_domain = @app_hub_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @app_hub_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AppHub::V1::AppHub::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @app_hub_stub.logger + end + + # Service calls + + ## + # Lists a service project attachment for a given service project. You can + # call this API from any project to find if it is attached to a host project. + # + # @overload lookup_service_project_attachment(request, options = nil) + # Pass arguments to `lookup_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_service_project_attachment(name: nil) + # Pass arguments to `lookup_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Service project ID and location to lookup service project + # attachment for. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new + # + # # Call the lookup_service_project_attachment method. + # result = client.lookup_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. + # p result + # + def lookup_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.lookup_service_project_attachment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists service projects attached to the host project. + # + # @overload list_service_project_attachments(request, options = nil) + # Pass arguments to `list_service_project_attachments` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_service_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_service_project_attachments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to list service project attachments. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new + # + # # Call the list_service_project_attachments method. + # result = client.list_service_project_attachments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. + # p item + # end + # + def list_service_project_attachments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_service_project_attachments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_service_project_attachments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_project_attachments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_service_project_attachments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, "service_project_attachments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Attaches a service project to the host project. + # + # @overload create_service_project_attachment(request, options = nil) + # Pass arguments to `create_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_service_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) + # Pass arguments to `create_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to which service project is being + # attached. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @param service_project_attachment_id [::String] + # Required. The service project attachment identifier must contain the + # project id of the service project specified in the + # service_project_attachment.service_project field. + # @param service_project_attachment [::Google::Cloud::AppHub::V1::ServiceProjectAttachment, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new + # + # # Call the create_service_project_attachment method. + # result = client.create_service_project_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_service_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.create_service_project_attachment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a service project attachment. + # + # @overload get_service_project_attachment(request, options = nil) + # Pass arguments to `get_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service_project_attachment(name: nil) + # Pass arguments to `get_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the service project attachment to + # retrieve. Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new + # + # # Call the get_service_project_attachment method. + # result = client.get_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. + # p result + # + def get_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_service_project_attachment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a service project attachment. + # + # @overload delete_service_project_attachment(request, options = nil) + # Pass arguments to `delete_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_service_project_attachment(name: nil, request_id: nil) + # Pass arguments to `delete_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the service project attachment to delete. + # Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new + # + # # Call the delete_service_project_attachment method. + # result = client.delete_service_project_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_service_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.delete_service_project_attachment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detaches a service project from a host project. + # You can call this API from any service project without needing access to + # the host project that it is attached to. + # + # @overload detach_service_project_attachment(request, options = nil) + # Pass arguments to `detach_service_project_attachment` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload detach_service_project_attachment(name: nil) + # Pass arguments to `detach_service_project_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Service project id and location to detach from a host project. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new + # + # # Call the detach_service_project_attachment method. + # result = client.detach_service_project_attachment request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. + # p result + # + def detach_service_project_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.detach_service_project_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.detach_service_project_attachment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Discovered Services that can be added to an Application in a host + # project and location. + # + # @overload list_discovered_services(request, options = nil) + # Pass arguments to `list_discovered_services` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_discovered_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Discovered Services on. + # Expected format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new + # + # # Call the list_discovered_services method. + # result = client.list_discovered_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredService. + # p item + # end + # + def list_discovered_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_discovered_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_discovered_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_discovered_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_discovered_services, "discovered_services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Discovered Service in a host project and location. + # + # @overload get_discovered_service(request, options = nil) + # Pass arguments to `get_discovered_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_discovered_service(name: nil) + # Pass arguments to `get_discovered_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Discovered Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new + # + # # Call the get_discovered_service method. + # result = client.get_discovered_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. + # p result + # + def get_discovered_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_discovered_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_discovered_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_discovered_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a Discovered Service in a host project and location, with a + # given resource URI. + # + # @overload lookup_discovered_service(request, options = nil) + # Pass arguments to `lookup_discovered_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_discovered_service(parent: nil, uri: nil) + # Pass arguments to `lookup_discovered_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to lookup Discovered Service in. + # Expected format: `projects/{project}/locations/{location}`. + # @param uri [::String] + # Required. Resource URI to find DiscoveredService for. + # Accepts both project number and project ID and does translation when + # needed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new + # + # # Call the lookup_discovered_service method. + # result = client.lookup_discovered_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. + # p result + # + def lookup_discovered_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_discovered_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_discovered_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.lookup_discovered_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Services in an Application. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the parent Application to list Services + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_services, "services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Service in an Application. + # + # @overload create_service(request, options = nil) + # Pass arguments to `create_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_service(parent: nil, service_id: nil, service: nil, request_id: nil) + # Pass arguments to `create_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the parent Application to create the + # Service in. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param service_id [::String] + # Required. The Service identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateServiceRequest.new + # + # # Call the create_service method. + # result = client.create_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.create_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Service in an Application. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service(name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Service in an Application. + # + # @overload update_service(request, options = nil) + # Pass arguments to `update_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_service(update_mask: nil, service: nil, request_id: nil) + # Pass arguments to `update_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Service resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new + # + # # Call the update_service method. + # result = client.update_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.update_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Service from an Application. + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_service(name: nil, request_id: nil) + # Pass arguments to `delete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Service to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteServiceRequest.new + # + # # Call the delete_service method. + # result = client.delete_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.delete_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Discovered Workloads that can be added to an Application in a host + # project and location. + # + # @overload list_discovered_workloads(request, options = nil) + # Pass arguments to `list_discovered_workloads` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_discovered_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Discovered Workloads on. + # Expected format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new + # + # # Call the list_discovered_workloads method. + # result = client.list_discovered_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. + # p item + # end + # + def list_discovered_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_discovered_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_discovered_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_discovered_workloads request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, "discovered_workloads", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Discovered Workload in a host project and location. + # + # @overload get_discovered_workload(request, options = nil) + # Pass arguments to `get_discovered_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_discovered_workload(name: nil) + # Pass arguments to `get_discovered_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Discovered Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new + # + # # Call the get_discovered_workload method. + # result = client.get_discovered_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. + # p result + # + def get_discovered_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_discovered_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_discovered_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_discovered_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a Discovered Workload in a host project and location, with a + # given resource URI. + # + # @overload lookup_discovered_workload(request, options = nil) + # Pass arguments to `lookup_discovered_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_discovered_workload(parent: nil, uri: nil) + # Pass arguments to `lookup_discovered_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Host project ID and location to lookup Discovered Workload in. + # Expected format: `projects/{project}/locations/{location}`. + # @param uri [::String] + # Required. Resource URI to find Discovered Workload for. + # Accepts both project number and project ID and does translation when + # needed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new + # + # # Call the lookup_discovered_workload method. + # result = client.lookup_discovered_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. + # p result + # + def lookup_discovered_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_discovered_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.lookup_discovered_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Workloads in an Application. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the parent Application to list Workloads + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_workloads request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_workloads, "workloads", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Workload in an Application. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Fully qualified name of the Application to create Workload in. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param workload_id [::String] + # Required. The Workload identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.create_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a Workload in an Application. + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Workload in an Application. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workload(update_mask: nil, workload: nil, request_id: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Workload resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.update_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Workload from an Application. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workload(name: nil, request_id: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Workload to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.delete_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Applications in a host project and location. + # + # @overload list_applications(request, options = nil) + # Pass arguments to `list_applications` via a request object, either of type + # {::Google::Cloud::AppHub::V1::ListApplicationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::ListApplicationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_applications` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to list Applications on. + # Expected format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new + # + # # Call the list_applications method. + # result = client.list_applications request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AppHub::V1::Application. + # p item + # end + # + def list_applications request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListApplicationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_applications.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_applications.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_applications.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.list_applications request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_applications, "applications", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an Application in a host project and location. + # + # @overload create_application(request, options = nil) + # Pass arguments to `create_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::CreateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::CreateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil) + # Pass arguments to `create_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project and location to create Application in. + # Expected format: `projects/{project}/locations/{location}`. + # @param application_id [::String] + # Required. The Application identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new + # + # # Call the create_application method. + # result = client.create_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.create_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Application in a host project and location. + # + # @overload get_application(request, options = nil) + # Pass arguments to `get_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::GetApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::GetApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_application(name: nil) + # Pass arguments to `get_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Application to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Application] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Application] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::GetApplicationRequest.new + # + # # Call the get_application method. + # result = client.get_application request + # + # # The returned object is of type Google::Cloud::AppHub::V1::Application. + # p result + # + def get_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.get_application request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an Application in a host project and location. + # + # @overload update_application(request, options = nil) + # Pass arguments to `update_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::UpdateApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::UpdateApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_application(update_mask: nil, application: nil, request_id: nil) + # Pass arguments to `update_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Application resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new + # + # # Call the update_application method. + # result = client.update_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.update_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an Application in a host project and location. + # + # @overload delete_application(request, options = nil) + # Pass arguments to `delete_application` via a request object, either of type + # {::Google::Cloud::AppHub::V1::DeleteApplicationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AppHub::V1::DeleteApplicationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_application(name: nil, request_id: nil) + # Pass arguments to `delete_application` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified name of the Application to delete. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/app_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new + # + # # Call the delete_application method. + # result = client.delete_application request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_application request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteApplicationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_application.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_application.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_application.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_hub_stub.delete_application request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AppHub REST API. + # + # This class represents the configuration for AppHub REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # lookup_service_project_attachment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.lookup_service_project_attachment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.lookup_service_project_attachment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apphub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AppHub API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `lookup_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_service_project_attachment + ## + # RPC-specific configuration for `list_service_project_attachments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_project_attachments + ## + # RPC-specific configuration for `create_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_project_attachment + ## + # RPC-specific configuration for `get_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_project_attachment + ## + # RPC-specific configuration for `delete_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_project_attachment + ## + # RPC-specific configuration for `detach_service_project_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :detach_service_project_attachment + ## + # RPC-specific configuration for `list_discovered_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovered_services + ## + # RPC-specific configuration for `get_discovered_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovered_service + ## + # RPC-specific configuration for `lookup_discovered_service` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_discovered_service + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `create_service` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `update_service` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service + ## + # RPC-specific configuration for `delete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service + ## + # RPC-specific configuration for `list_discovered_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovered_workloads + ## + # RPC-specific configuration for `get_discovered_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovered_workload + ## + # RPC-specific configuration for `lookup_discovered_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_discovered_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `create_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `list_applications` + # @return [::Gapic::Config::Method] + # + attr_reader :list_applications + ## + # RPC-specific configuration for `create_application` + # @return [::Gapic::Config::Method] + # + attr_reader :create_application + ## + # RPC-specific configuration for `get_application` + # @return [::Gapic::Config::Method] + # + attr_reader :get_application + ## + # RPC-specific configuration for `update_application` + # @return [::Gapic::Config::Method] + # + attr_reader :update_application + ## + # RPC-specific configuration for `delete_application` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_application + + # @private + def initialize parent_rpcs = nil + lookup_service_project_attachment_config = parent_rpcs.lookup_service_project_attachment if parent_rpcs.respond_to? :lookup_service_project_attachment + @lookup_service_project_attachment = ::Gapic::Config::Method.new lookup_service_project_attachment_config + list_service_project_attachments_config = parent_rpcs.list_service_project_attachments if parent_rpcs.respond_to? :list_service_project_attachments + @list_service_project_attachments = ::Gapic::Config::Method.new list_service_project_attachments_config + create_service_project_attachment_config = parent_rpcs.create_service_project_attachment if parent_rpcs.respond_to? :create_service_project_attachment + @create_service_project_attachment = ::Gapic::Config::Method.new create_service_project_attachment_config + get_service_project_attachment_config = parent_rpcs.get_service_project_attachment if parent_rpcs.respond_to? :get_service_project_attachment + @get_service_project_attachment = ::Gapic::Config::Method.new get_service_project_attachment_config + delete_service_project_attachment_config = parent_rpcs.delete_service_project_attachment if parent_rpcs.respond_to? :delete_service_project_attachment + @delete_service_project_attachment = ::Gapic::Config::Method.new delete_service_project_attachment_config + detach_service_project_attachment_config = parent_rpcs.detach_service_project_attachment if parent_rpcs.respond_to? :detach_service_project_attachment + @detach_service_project_attachment = ::Gapic::Config::Method.new detach_service_project_attachment_config + list_discovered_services_config = parent_rpcs.list_discovered_services if parent_rpcs.respond_to? :list_discovered_services + @list_discovered_services = ::Gapic::Config::Method.new list_discovered_services_config + get_discovered_service_config = parent_rpcs.get_discovered_service if parent_rpcs.respond_to? :get_discovered_service + @get_discovered_service = ::Gapic::Config::Method.new get_discovered_service_config + lookup_discovered_service_config = parent_rpcs.lookup_discovered_service if parent_rpcs.respond_to? :lookup_discovered_service + @lookup_discovered_service = ::Gapic::Config::Method.new lookup_discovered_service_config + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service + @create_service = ::Gapic::Config::Method.new create_service_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service + @update_service = ::Gapic::Config::Method.new update_service_config + delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service + @delete_service = ::Gapic::Config::Method.new delete_service_config + list_discovered_workloads_config = parent_rpcs.list_discovered_workloads if parent_rpcs.respond_to? :list_discovered_workloads + @list_discovered_workloads = ::Gapic::Config::Method.new list_discovered_workloads_config + get_discovered_workload_config = parent_rpcs.get_discovered_workload if parent_rpcs.respond_to? :get_discovered_workload + @get_discovered_workload = ::Gapic::Config::Method.new get_discovered_workload_config + lookup_discovered_workload_config = parent_rpcs.lookup_discovered_workload if parent_rpcs.respond_to? :lookup_discovered_workload + @lookup_discovered_workload = ::Gapic::Config::Method.new lookup_discovered_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications + @list_applications = ::Gapic::Config::Method.new list_applications_config + create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application + @create_application = ::Gapic::Config::Method.new create_application_config + get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application + @get_application = ::Gapic::Config::Method.new get_application_config + update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application + @update_application = ::Gapic::Config::Method.new update_application_config + delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application + @delete_application = ::Gapic::Config::Method.new delete_application_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb new file mode 100644 index 000000000000..58bf92c3e26d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppHub Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AppHub Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AppHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "apphub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb new file mode 100644 index 000000000000..8c21b329cfc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb @@ -0,0 +1,1736 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/apphub/v1/apphub_service_pb" + +module Google + module Cloud + module AppHub + module V1 + module AppHub + module Rest + ## + # REST service stub for the AppHub service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the lookup_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] + # A result object deserialized from the server's reply + def lookup_service_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_service_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_service_project_attachments REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse] + # A result object deserialized from the server's reply + def list_service_project_attachments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_project_attachments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_service_project_attachments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_service_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_service_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # A result object deserialized from the server's reply + def get_service_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_service_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_service_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the detach_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] + # A result object deserialized from the server's reply + def detach_service_project_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_detach_service_project_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "detach_service_project_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_discovered_services REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse] + # A result object deserialized from the server's reply + def list_discovered_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_discovered_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_discovered_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_discovered_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredService] + # A result object deserialized from the server's reply + def get_discovered_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_discovered_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_discovered_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::DiscoveredService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the lookup_discovered_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] + # A result object deserialized from the server's reply + def lookup_discovered_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_discovered_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_discovered_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_services REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListServicesResponse] + # A result object deserialized from the server's reply + def list_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Service] + # A result object deserialized from the server's reply + def get_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_discovered_workloads REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse] + # A result object deserialized from the server's reply + def list_discovered_workloads request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_discovered_workloads_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_discovered_workloads", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_discovered_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # A result object deserialized from the server's reply + def get_discovered_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_discovered_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_discovered_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the lookup_discovered_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] + # A result object deserialized from the server's reply + def lookup_discovered_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_discovered_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_discovered_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListWorkloadsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListWorkloadsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListWorkloadsResponse] + # A result object deserialized from the server's reply + def list_workloads request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workloads", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Workload] + # A result object deserialized from the server's reply + def get_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::Workload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_applications REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListApplicationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::ListApplicationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::ListApplicationsResponse] + # A result object deserialized from the server's reply + def list_applications request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_applications_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_applications", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AppHub::V1::Application] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AppHub::V1::Application] + # A result object deserialized from the server's reply + def get_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AppHub::V1::Application.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteApplicationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_application request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_application_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_application", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_service_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:lookupServiceProjectAttachment", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_project_attachments REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_service_project_attachments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/serviceProjectAttachments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_service_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/serviceProjectAttachments", + body: "service_project_attachment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_service_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the detach_service_project_attachment REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_detach_service_project_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:detachServiceProjectAttachment", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_discovered_services REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_discovered_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/discoveredServices", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_discovered_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_discovered_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/discoveredServices/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_discovered_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_discovered_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/discoveredServices:lookup", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_services REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/services", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/services", + body: "service", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{service.name}", + body: "service", + matches: [ + ["service.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_discovered_workloads REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_discovered_workloads_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/discoveredWorkloads", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_discovered_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_discovered_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/discoveredWorkloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_discovered_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_discovered_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/discoveredWorkloads:lookup", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListWorkloadsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workloads_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workloads", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workloads", + body: "workload", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{workload.name}", + body: "workload", + matches: [ + ["workload.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_applications REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::ListApplicationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_applications_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/applications", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::CreateApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/applications", + body: "application", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::GetApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::UpdateApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{application.name}", + body: "application", + matches: [ + ["application.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_application REST call + # + # @param request_pb [::Google::Cloud::AppHub::V1::DeleteApplicationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_application_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb new file mode 100644 index 000000000000..126149ab3449 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module AppHub + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/app_hub/v1/rest" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AppHub"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb new file mode 100644 index 000000000000..722942549fd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/app_hub/v1/app_hub/rest" +require "google/cloud/app_hub/v1/bindings_override" +require "google/cloud/app_hub/v1/version" + +module Google + module Cloud + module AppHub + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/app_hub/v1/rest" + # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb new file mode 100644 index 000000000000..471b04475c54 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb new file mode 100644 index 000000000000..12080e3972e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/apphub/v1/apphub_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/apphub/v1/application_pb' +require 'google/cloud/apphub/v1/service_pb' +require 'google/cloud/apphub/v1/service_project_attachment_pb' +require 'google/cloud/apphub/v1/workload_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n+google/cloud/apphub/v1/apphub_service.proto\x12\x16google.cloud.apphub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/apphub/v1/application.proto\x1a$google/cloud/apphub/v1/service.proto\x1a\x37google/cloud/apphub/v1/service_project_attachment.proto\x1a%google/cloud/apphub/v1/workload.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"`\n%LookupServiceProjectAttachmentRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"~\n&LookupServiceProjectAttachmentResponse\x12T\n\x1aservice_project_attachment\x18\x01 \x01(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachment\"\xcb\x01\n$ListServiceProjectAttachmentsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.apphub.googleapis.com/ServiceProjectAttachment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n%ListServiceProjectAttachmentsResponse\x12U\n\x1bservice_project_attachments\x18\x01 \x03(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8f\x02\n%CreateServiceProjectAttachmentRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.apphub.googleapis.com/ServiceProjectAttachment\x12*\n\x1dservice_project_attachment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x1aservice_project_attachment\x18\x03 \x01(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachmentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\"GetServiceProjectAttachmentRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.apphub.googleapis.com/ServiceProjectAttachment\"\x86\x01\n%DeleteServiceProjectAttachmentRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.apphub.googleapis.com/ServiceProjectAttachment\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"`\n%DetachServiceProjectAttachmentRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"(\n&DetachServiceProjectAttachmentResponse\"\xa9\x01\n\x13ListServicesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x61pphub.googleapis.com/Service\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"w\n\x14ListServicesResponse\x12\x31\n\x08services\x18\x01 \x03(\x0b\x32\x1f.google.cloud.apphub.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x1dListDiscoveredServicesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'apphub.googleapis.com/DiscoveredService\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1eListDiscoveredServicesResponse\x12\x46\n\x13\x64iscovered_services\x18\x01 \x03(\x0b\x32).google.cloud.apphub.v1.DiscoveredService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xb6\x01\n\x14\x43reateServiceRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x61pphub.googleapis.com/Service\x12\x17\n\nservice_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x07service\x18\x03 \x01(\x0b\x32\x1f.google.cloud.apphub.v1.ServiceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"H\n\x11GetServiceRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61pphub.googleapis.com/Service\"\\\n\x1bGetDiscoveredServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'apphub.googleapis.com/DiscoveredService\"s\n\x1eLookupDiscoveredServiceRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'apphub.googleapis.com/DiscoveredService\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"h\n\x1fLookupDiscoveredServiceResponse\x12\x45\n\x12\x64iscovered_service\x18\x01 \x01(\x0b\x32).google.cloud.apphub.v1.DiscoveredService\"\x9c\x01\n\x14UpdateServiceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x07service\x18\x02 \x01(\x0b\x32\x1f.google.cloud.apphub.v1.ServiceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"d\n\x14\x44\x65leteServiceRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61pphub.googleapis.com/Service\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb1\x01\n\x17ListApplicationsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!apphub.googleapis.com/Application\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x18ListApplicationsResponse\x12\x39\n\x0c\x61pplications\x18\x01 \x03(\x0b\x32#.google.cloud.apphub.v1.Application\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xca\x01\n\x18\x43reateApplicationRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!apphub.googleapis.com/Application\x12\x1b\n\x0e\x61pplication_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0b\x61pplication\x18\x03 \x01(\x0b\x32#.google.cloud.apphub.v1.ApplicationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"P\n\x15GetApplicationRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/Application\"\xa8\x01\n\x18UpdateApplicationRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12=\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32#.google.cloud.apphub.v1.ApplicationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"l\n\x18\x44\x65leteApplicationRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/Application\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x14ListWorkloadsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x61pphub.googleapis.com/Workload\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x15ListWorkloadsResponse\x12\x33\n\tworkloads\x18\x01 \x03(\x0b\x32 .google.cloud.apphub.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbf\x01\n\x1eListDiscoveredWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apphub.googleapis.com/DiscoveredWorkload\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n\x1fListDiscoveredWorkloadsResponse\x12H\n\x14\x64iscovered_workloads\x18\x01 \x03(\x0b\x32*.google.cloud.apphub.v1.DiscoveredWorkload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbb\x01\n\x15\x43reateWorkloadRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x61pphub.googleapis.com/Workload\x12\x18\n\x0bworkload_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x08workload\x18\x03 \x01(\x0b\x32 .google.cloud.apphub.v1.WorkloadB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"J\n\x12GetWorkloadRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61pphub.googleapis.com/Workload\"^\n\x1cGetDiscoveredWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apphub.googleapis.com/DiscoveredWorkload\"u\n\x1fLookupDiscoveredWorkloadRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apphub.googleapis.com/DiscoveredWorkload\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"k\n LookupDiscoveredWorkloadResponse\x12G\n\x13\x64iscovered_workload\x18\x01 \x01(\x0b\x32*.google.cloud.apphub.v1.DiscoveredWorkload\"\x9f\x01\n\x15UpdateWorkloadRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x08workload\x18\x02 \x01(\x0b\x32 .google.cloud.apphub.v1.WorkloadB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x15\x44\x65leteWorkloadRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61pphub.googleapis.com/Workload\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xa7/\n\x06\x41ppHub\x12\xf0\x01\n\x1eLookupServiceProjectAttachment\x12=.google.cloud.apphub.v1.LookupServiceProjectAttachmentRequest\x1a>.google.cloud.apphub.v1.LookupServiceProjectAttachmentResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*}:lookupServiceProjectAttachment\x12\xec\x01\n\x1dListServiceProjectAttachments\x12<.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest\x1a=.google.cloud.apphub.v1.ListServiceProjectAttachmentsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/serviceProjectAttachments\x12\xd4\x02\n\x1e\x43reateServiceProjectAttachment\x12=.google.cloud.apphub.v1.CreateServiceProjectAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\xd3\x01\xca\x41-\n\x18ServiceProjectAttachment\x12\x11OperationMetadata\xda\x41?parent,service_project_attachment,service_project_attachment_id\x82\xd3\xe4\x93\x02[\"=/v1/{parent=projects/*/locations/*}/serviceProjectAttachments:\x1aservice_project_attachment\x12\xd9\x01\n\x1bGetServiceProjectAttachment\x12:.google.cloud.apphub.v1.GetServiceProjectAttachmentRequest\x1a\x30.google.cloud.apphub.v1.ServiceProjectAttachment\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}\x12\xf9\x01\n\x1e\x44\x65leteServiceProjectAttachment\x12=.google.cloud.apphub.v1.DeleteServiceProjectAttachmentRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}\x12\xf3\x01\n\x1e\x44\x65tachServiceProjectAttachment\x12=.google.cloud.apphub.v1.DetachServiceProjectAttachmentRequest\x1a>.google.cloud.apphub.v1.DetachServiceProjectAttachmentResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\"@/v1/{name=projects/*/locations/*}:detachServiceProjectAttachment:\x01*\x12\xd0\x01\n\x16ListDiscoveredServices\x12\x35.google.cloud.apphub.v1.ListDiscoveredServicesRequest\x1a\x36.google.cloud.apphub.v1.ListDiscoveredServicesResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/discoveredServices\x12\xbd\x01\n\x14GetDiscoveredService\x12\x33.google.cloud.apphub.v1.GetDiscoveredServiceRequest\x1a).google.cloud.apphub.v1.DiscoveredService\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/discoveredServices/*}\x12\xde\x01\n\x17LookupDiscoveredService\x12\x36.google.cloud.apphub.v1.LookupDiscoveredServiceRequest\x1a\x37.google.cloud.apphub.v1.LookupDiscoveredServiceResponse\"R\xda\x41\nparent,uri\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/discoveredServices:lookup\x12\xb7\x01\n\x0cListServices\x12+.google.cloud.apphub.v1.ListServicesRequest\x1a,.google.cloud.apphub.v1.ListServicesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/applications/*}/services\x12\xe6\x01\n\rCreateService\x12,.google.cloud.apphub.v1.CreateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1c\n\x07Service\x12\x11OperationMetadata\xda\x41\x19parent,service,service_id\x82\xd3\xe4\x93\x02\x46\";/v1/{parent=projects/*/locations/*/applications/*}/services:\x07service\x12\xa4\x01\n\nGetService\x12).google.cloud.apphub.v1.GetServiceRequest\x1a\x1f.google.cloud.apphub.v1.Service\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/applications/*/services/*}\x12\xe8\x01\n\rUpdateService\x12,.google.cloud.apphub.v1.UpdateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1c\n\x07Service\x12\x11OperationMetadata\xda\x41\x13service,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{service.name=projects/*/locations/*/applications/*/services/*}:\x07service\x12\xd5\x01\n\rDeleteService\x12,.google.cloud.apphub.v1.DeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/applications/*/services/*}\x12\xd4\x01\n\x17ListDiscoveredWorkloads\x12\x36.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest\x1a\x37.google.cloud.apphub.v1.ListDiscoveredWorkloadsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/discoveredWorkloads\x12\xc1\x01\n\x15GetDiscoveredWorkload\x12\x34.google.cloud.apphub.v1.GetDiscoveredWorkloadRequest\x1a*.google.cloud.apphub.v1.DiscoveredWorkload\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/discoveredWorkloads/*}\x12\xe2\x01\n\x18LookupDiscoveredWorkload\x12\x37.google.cloud.apphub.v1.LookupDiscoveredWorkloadRequest\x1a\x38.google.cloud.apphub.v1.LookupDiscoveredWorkloadResponse\"S\xda\x41\nparent,uri\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*}/discoveredWorkloads:lookup\x12\xbb\x01\n\rListWorkloads\x12,.google.cloud.apphub.v1.ListWorkloadsRequest\x1a-.google.cloud.apphub.v1.ListWorkloadsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12*] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb new file mode 100644 index 000000000000..1b34c270e2f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb @@ -0,0 +1,787 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # Request for LookupServiceProjectAttachment. + # @!attribute [rw] name + # @return [::String] + # Required. Service project ID and location to lookup service project + # attachment for. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + class LookupServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for LookupServiceProjectAttachment. + # @!attribute [rw] service_project_attachment + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # Service project attachment for a project if exists, empty otherwise. + class LookupServiceProjectAttachmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListServiceProjectAttachments. + # @!attribute [rw] parent + # @return [::String] + # Required. Host project ID and location to list service project attachments. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListServiceProjectAttachmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListServiceProjectAttachments. + # @!attribute [rw] service_project_attachments + # @return [::Array<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] + # List of service project attachments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListServiceProjectAttachmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateServiceProjectAttachment. + # @!attribute [rw] parent + # @return [::String] + # Required. Host project ID and location to which service project is being + # attached. Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] service_project_attachment_id + # @return [::String] + # Required. The service project attachment identifier must contain the + # project id of the service project specified in the + # service_project_attachment.service_project field. + # @!attribute [rw] service_project_attachment + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetServiceProjectAttachment. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the service project attachment to + # retrieve. Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + class GetServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteServiceProjectAttachment. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the service project attachment to delete. + # Expected format: + # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DetachServiceProjectAttachment. + # @!attribute [rw] name + # @return [::String] + # Required. Service project id and location to detach from a host project. + # Only global location is supported. Expected format: + # `projects/{project}/locations/{location}`. + class DetachServiceProjectAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for DetachServiceProjectAttachment. + class DetachServiceProjectAttachmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListServices. + # @!attribute [rw] parent + # @return [::String] + # Required. Fully qualified name of the parent Application to list Services + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListServices. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::AppHub::V1::Service>] + # List of Services. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListDiscoveredServices. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location to list Discovered Services on. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListDiscoveredServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListDiscoveredServices. + # @!attribute [rw] discovered_services + # @return [::Array<::Google::Cloud::AppHub::V1::DiscoveredService>] + # List of Discovered Services. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDiscoveredServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateService. + # @!attribute [rw] parent + # @return [::String] + # Required. Fully qualified name of the parent Application to create the + # Service in. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!attribute [rw] service_id + # @return [::String] + # Required. The Service identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @!attribute [rw] service + # @return [::Google::Cloud::AppHub::V1::Service] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetService. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + class GetServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetDiscoveredService. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Discovered Service to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. + class GetDiscoveredServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for LookupDiscoveredService. + # @!attribute [rw] parent + # @return [::String] + # Required. Host project ID and location to lookup Discovered Service in. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] uri + # @return [::String] + # Required. Resource URI to find DiscoveredService for. + # Accepts both project number and project ID and does translation when + # needed. + class LookupDiscoveredServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for LookupDiscoveredService. + # @!attribute [rw] discovered_service + # @return [::Google::Cloud::AppHub::V1::DiscoveredService] + # Discovered Service if exists, empty otherwise. + class LookupDiscoveredServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateService. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Service resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @!attribute [rw] service + # @return [::Google::Cloud::AppHub::V1::Service] + # Required. The resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteService. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Service to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListApplications. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location to list Applications on. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListApplicationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListApplications. + # @!attribute [rw] applications + # @return [::Array<::Google::Cloud::AppHub::V1::Application>] + # List of Applications. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListApplicationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateApplication. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location to create Application in. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] application_id + # @return [::String] + # Required. The Application identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @!attribute [rw] application + # @return [::Google::Cloud::AppHub::V1::Application] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetApplication. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Application to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + class GetApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateApplication. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Application resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @!attribute [rw] application + # @return [::Google::Cloud::AppHub::V1::Application] + # Required. The resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteApplication. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Application to delete. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteApplicationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListWorkloads. + # @!attribute [rw] parent + # @return [::String] + # Required. Fully qualified name of the parent Application to list Workloads + # for. Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListWorkloads. + # @!attribute [rw] workloads + # @return [::Array<::Google::Cloud::AppHub::V1::Workload>] + # List of Workloads. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListDiscoveredWorkloads. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location to list Discovered Workloads on. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListDiscoveredWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListDiscoveredWorkloads. + # @!attribute [rw] discovered_workloads + # @return [::Array<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] + # List of Discovered Workloads. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDiscoveredWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateWorkload. + # @!attribute [rw] parent + # @return [::String] + # Required. Fully qualified name of the Application to create Workload in. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}`. + # @!attribute [rw] workload_id + # @return [::String] + # Required. The Workload identifier. + # Must contain only lowercase letters, numbers + # or hyphens, with the first character a letter, the last a letter or a + # number, and a 63 character maximum. + # @!attribute [rw] workload + # @return [::Google::Cloud::AppHub::V1::Workload] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetWorkload. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + class GetWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetDiscoveredWorkload. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Discovered Workload to fetch. + # Expected format: + # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. + class GetDiscoveredWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for LookupDiscoveredWorkload. + # @!attribute [rw] parent + # @return [::String] + # Required. Host project ID and location to lookup Discovered Workload in. + # Expected format: `projects/{project}/locations/{location}`. + # @!attribute [rw] uri + # @return [::String] + # Required. Resource URI to find Discovered Workload for. + # Accepts both project number and project ID and does translation when + # needed. + class LookupDiscoveredWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for LookupDiscoveredWorkload. + # @!attribute [rw] discovered_workload + # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] + # Discovered Workload if exists, empty otherwise. + class LookupDiscoveredWorkloadResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateWorkload. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Workload resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. + # The API changes the values of the fields as specified in the update_mask. + # The API ignores the values of all fields not covered by the update_mask. + # You can also unset a field by not specifying it in the updated message, but + # adding the field to the mask. This clears whatever value the field + # previously had. + # @!attribute [rw] workload + # @return [::Google::Cloud::AppHub::V1::Workload] + # Required. The resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteWorkload. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified name of the Workload to delete from an + # Application. Expected format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb new file mode 100644 index 000000000000..e67a1568db65 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # Application defines the governance boundary for App Hub entities that + # perform a logical end-to-end business function. + # App Hub supports application level IAM permission to align with governance + # requirements. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of an Application. Format: + # `"projects/{host-project-id}/locations/{location}/applications/{application-id}"` + # @!attribute [rw] display_name + # @return [::String] + # Optional. User-defined name for the Application. + # Can have a maximum length of 63 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User-defined description of an Application. + # Can have a maximum length of 2048 characters. + # @!attribute [rw] attributes + # @return [::Google::Cloud::AppHub::V1::Attributes] + # Optional. Consumer provided attributes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update time. + # @!attribute [rw] scope + # @return [::Google::Cloud::AppHub::V1::Scope] + # Required. Immutable. Defines what data can be included into this + # Application. Limits which Services and Workloads can be registered. + # @!attribute [r] uid + # @return [::String] + # Output only. A universally unique identifier (in UUID4 format) for the + # `Application`. + # @!attribute [r] state + # @return [::Google::Cloud::AppHub::V1::Application::State] + # Output only. Application state. + class Application + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Application state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The Application is being created. + CREATING = 1 + + # The Application is ready to register Services and Workloads. + ACTIVE = 2 + + # The Application is being deleted. + DELETING = 3 + end + end + + # Scope of an application. + # @!attribute [rw] type + # @return [::Google::Cloud::AppHub::V1::Scope::Type] + # Required. Scope Type. + class Scope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Scope Type. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # Regional type. + REGIONAL = 1 + + # Global type. + GLOBAL = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb new file mode 100644 index 000000000000..841a166336a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # Consumer provided attributes. + # @!attribute [rw] criticality + # @return [::Google::Cloud::AppHub::V1::Criticality] + # Optional. User-defined criticality information. + # @!attribute [rw] environment + # @return [::Google::Cloud::AppHub::V1::Environment] + # Optional. User-defined environment information. + # @!attribute [rw] developer_owners + # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] + # Optional. Developer team that owns development and coding. + # @!attribute [rw] operator_owners + # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] + # Optional. Operator team that ensures runtime and operations. + # @!attribute [rw] business_owners + # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] + # Optional. Business team that ensures user needs are met and value is + # delivered + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Criticality of the Application, Service, or Workload + # @!attribute [rw] type + # @return [::Google::Cloud::AppHub::V1::Criticality::Type] + # Required. Criticality Type. + class Criticality + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Criticality Type. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # Mission critical service, application or workload. + MISSION_CRITICAL = 1 + + # High impact. + HIGH = 2 + + # Medium impact. + MEDIUM = 3 + + # Low impact. + LOW = 4 + end + end + + # Environment of the Application, Service, or Workload + # @!attribute [rw] type + # @return [::Google::Cloud::AppHub::V1::Environment::Type] + # Required. Environment Type. + class Environment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Environment Type. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # Production environment. + PRODUCTION = 1 + + # Staging environment. + STAGING = 2 + + # Test environment. + TEST = 3 + + # Development environment. + DEVELOPMENT = 4 + end + end + + # Contact information of stakeholders. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Contact's name. + # Can have a maximum length of 63 characters. + # @!attribute [rw] email + # @return [::String] + # Required. Email address of the contacts. + class ContactInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb new file mode 100644 index 000000000000..78a43787310d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # Service is an App Hub data model that contains a discovered service, which + # represents a network or API interface that exposes some functionality to + # clients for consumption over the network. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of a Service. Format: + # `"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}"` + # @!attribute [rw] display_name + # @return [::String] + # Optional. User-defined name for the Service. + # Can have a maximum length of 63 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User-defined description of a Service. + # Can have a maximum length of 2048 characters. + # @!attribute [r] service_reference + # @return [::Google::Cloud::AppHub::V1::ServiceReference] + # Output only. Reference to an underlying networking resource that can + # comprise a Service. These are immutable. + # @!attribute [r] service_properties + # @return [::Google::Cloud::AppHub::V1::ServiceProperties] + # Output only. Properties of an underlying compute resource that can comprise + # a Service. These are immutable. + # @!attribute [rw] attributes + # @return [::Google::Cloud::AppHub::V1::Attributes] + # Optional. Consumer provided attributes. + # @!attribute [rw] discovered_service + # @return [::String] + # Required. Immutable. The resource name of the original discovered service. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update time. + # @!attribute [r] uid + # @return [::String] + # Output only. A universally unique identifier (UUID) for the `Service` in + # the UUID4 format. + # @!attribute [r] state + # @return [::Google::Cloud::AppHub::V1::Service::State] + # Output only. Service state. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Service state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The service is being created. + CREATING = 1 + + # The service is ready. + ACTIVE = 2 + + # The service is being deleted. + DELETING = 3 + + # The underlying networking resources have been deleted. + DETACHED = 4 + end + end + + # Reference to an underlying networking resource that can comprise a Service. + # @!attribute [r] uri + # @return [::String] + # Output only. The underlying resource URI. For example, URI of Forwarding + # Rule, URL Map, and Backend Service. + class ServiceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of an underlying cloud resource that can comprise a Service. + # @!attribute [r] gcp_project + # @return [::String] + # Output only. The service project identifier that the underlying cloud + # resource resides in. + # @!attribute [r] location + # @return [::String] + # Output only. The location that the underlying resource resides in, for + # example, us-west1. + # @!attribute [r] zone + # @return [::String] + # Output only. The location that the underlying resource resides in if it is + # zonal, for example, us-west1-a). + class ServiceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DiscoveredService is a network or API interface that exposes some + # functionality to clients for consumption over the network. A discovered + # service can be registered to a App Hub service. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the discovered service. Format: + # `"projects/{host-project-id}/locations/{location}/discoveredServices/{uuid}"` + # @!attribute [r] service_reference + # @return [::Google::Cloud::AppHub::V1::ServiceReference] + # Output only. Reference to an underlying networking resource that can + # comprise a Service. These are immutable. + # @!attribute [r] service_properties + # @return [::Google::Cloud::AppHub::V1::ServiceProperties] + # Output only. Properties of an underlying compute resource that can comprise + # a Service. These are immutable. + class DiscoveredService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb new file mode 100644 index 000000000000..2da9f70c19b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # ServiceProjectAttachment represents an attachment from a service project to a + # host project. Service projects contain the underlying cloud + # infrastructure resources, and expose these resources to the host project + # through a ServiceProjectAttachment. With the attachments, the host project + # can provide an aggregated view of resources across all service projects. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of a ServiceProjectAttachment. Format: + # `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."` + # @!attribute [rw] service_project + # @return [::String] + # Required. Immutable. Service project name in the format: `"projects/abc"` + # or `"projects/123"`. As input, project name with either project id or + # number are accepted. As output, this field will contain project number. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time. + # @!attribute [r] uid + # @return [::String] + # Output only. A globally unique identifier (in UUID4 format) for the + # `ServiceProjectAttachment`. + # @!attribute [r] state + # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment::State] + # Output only. ServiceProjectAttachment state. + class ServiceProjectAttachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ServiceProjectAttachment state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The ServiceProjectAttachment is being created. + CREATING = 1 + + # The ServiceProjectAttachment is ready. + # This means Services and Workloads under the corresponding + # ServiceProjectAttachment is ready for registration. + ACTIVE = 2 + + # The ServiceProjectAttachment is being deleted. + DELETING = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb new file mode 100644 index 000000000000..9d71177bf824 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AppHub + module V1 + # Workload is an App Hub data model that contains a discovered workload, which + # represents a binary deployment (such as managed instance groups (MIGs) and + # GKE deployments) that performs the smallest logical subset of business + # functionality. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the Workload. Format: + # `"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"` + # @!attribute [rw] display_name + # @return [::String] + # Optional. User-defined name for the Workload. + # Can have a maximum length of 63 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User-defined description of a Workload. + # Can have a maximum length of 2048 characters. + # @!attribute [r] workload_reference + # @return [::Google::Cloud::AppHub::V1::WorkloadReference] + # Output only. Reference of an underlying compute resource represented by the + # Workload. These are immutable. + # @!attribute [r] workload_properties + # @return [::Google::Cloud::AppHub::V1::WorkloadProperties] + # Output only. Properties of an underlying compute resource represented by + # the Workload. These are immutable. + # @!attribute [rw] discovered_workload + # @return [::String] + # Required. Immutable. The resource name of the original discovered workload. + # @!attribute [rw] attributes + # @return [::Google::Cloud::AppHub::V1::Attributes] + # Optional. Consumer provided attributes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update time. + # @!attribute [r] uid + # @return [::String] + # Output only. A universally unique identifier (UUID) for the `Workload` in + # the UUID4 format. + # @!attribute [r] state + # @return [::Google::Cloud::AppHub::V1::Workload::State] + # Output only. Workload state. + class Workload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Workload state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The Workload is being created. + CREATING = 1 + + # The Workload is ready. + ACTIVE = 2 + + # The Workload is being deleted. + DELETING = 3 + + # The underlying compute resources have been deleted. + DETACHED = 4 + end + end + + # Reference of an underlying compute resource represented by the Workload. + # @!attribute [r] uri + # @return [::String] + # Output only. The underlying compute resource uri. + class WorkloadReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of an underlying compute resource represented by the Workload. + # @!attribute [r] gcp_project + # @return [::String] + # Output only. The service project identifier that the underlying cloud + # resource resides in. Empty for non-cloud resources. + # @!attribute [r] location + # @return [::String] + # Output only. The location that the underlying compute resource resides in + # (for example, us-west1). + # @!attribute [r] zone + # @return [::String] + # Output only. The location that the underlying compute resource resides in + # if it is zonal (for example, us-west1-a). + class WorkloadProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DiscoveredWorkload is a binary deployment (such as managed instance groups + # (MIGs) and GKE deployments) that performs the smallest logical subset of + # business functionality. A discovered workload can be registered to an App Hub + # Workload. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the discovered workload. Format: + # `"projects/{host-project-id}/locations/{location}/discoveredWorkloads/{uuid}"` + # @!attribute [r] workload_reference + # @return [::Google::Cloud::AppHub::V1::WorkloadReference] + # Output only. Reference of an underlying compute resource represented by the + # Workload. These are immutable. + # @!attribute [r] workload_properties + # @return [::Google::Cloud::AppHub::V1::WorkloadProperties] + # Output only. Properties of an underlying compute resource represented by + # the Workload. These are immutable. + class DiscoveredWorkload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile new file mode 100644 index 000000000000..01e4ee88000f --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-app_hub-v1", path: "../" +else + gem "google-cloud-app_hub-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb new file mode 100644 index 000000000000..ecb6729ae83a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_CreateApplication_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the create_application call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#create_application. +# +def create_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new + + # Call the create_application method. + result = client.create_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_CreateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb new file mode 100644 index 000000000000..909a8e44c897 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_CreateService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the create_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#create_service. +# +def create_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::CreateServiceRequest.new + + # Call the create_service method. + result = client.create_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_CreateService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb new file mode 100644 index 000000000000..bef16146076a --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the create_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment. +# +def create_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new + + # Call the create_service_project_attachment method. + result = client.create_service_project_attachment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb new file mode 100644 index 000000000000..09e9695fc333 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_CreateWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the create_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#create_workload. +# +def create_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new + + # Call the create_workload method. + result = client.create_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb new file mode 100644 index 000000000000..246fde1039c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_DeleteApplication_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the delete_application call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#delete_application. +# +def delete_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new + + # Call the delete_application method. + result = client.delete_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_DeleteApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb new file mode 100644 index 000000000000..96f1cd39b61c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_DeleteService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the delete_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#delete_service. +# +def delete_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DeleteServiceRequest.new + + # Call the delete_service method. + result = client.delete_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb new file mode 100644 index 000000000000..76b3adb08c91 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the delete_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment. +# +def delete_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new + + # Call the delete_service_project_attachment method. + result = client.delete_service_project_attachment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb new file mode 100644 index 000000000000..438e272456a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_DeleteWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the delete_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#delete_workload. +# +def delete_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new + + # Call the delete_workload method. + result = client.delete_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb new file mode 100644 index 000000000000..fd0a2727844c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the detach_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment. +# +def detach_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new + + # Call the detach_service_project_attachment method. + result = client.detach_service_project_attachment request + + # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. + p result +end +# [END apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb new file mode 100644 index 000000000000..b24e9656c575 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetApplication_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_application call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_application. +# +def get_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetApplicationRequest.new + + # Call the get_application method. + result = client.get_application request + + # The returned object is of type Google::Cloud::AppHub::V1::Application. + p result +end +# [END apphub_v1_generated_AppHub_GetApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb new file mode 100644 index 000000000000..8d6b3faca3aa --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetDiscoveredService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_discovered_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service. +# +def get_discovered_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new + + # Call the get_discovered_service method. + result = client.get_discovered_service request + + # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. + p result +end +# [END apphub_v1_generated_AppHub_GetDiscoveredService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb new file mode 100644 index 000000000000..d5a7376701be --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_discovered_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload. +# +def get_discovered_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new + + # Call the get_discovered_workload method. + result = client.get_discovered_workload request + + # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. + p result +end +# [END apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb new file mode 100644 index 000000000000..cf9240d27574 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_service. +# +def get_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetServiceRequest.new + + # Call the get_service method. + result = client.get_service request + + # The returned object is of type Google::Cloud::AppHub::V1::Service. + p result +end +# [END apphub_v1_generated_AppHub_GetService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb new file mode 100644 index 000000000000..d913e0dd0077 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment. +# +def get_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new + + # Call the get_service_project_attachment method. + result = client.get_service_project_attachment request + + # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. + p result +end +# [END apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb new file mode 100644 index 000000000000..981d5001c644 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_GetWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the get_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#get_workload. +# +def get_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new + + # Call the get_workload method. + result = client.get_workload request + + # The returned object is of type Google::Cloud::AppHub::V1::Workload. + p result +end +# [END apphub_v1_generated_AppHub_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb new file mode 100644 index 000000000000..a0c9e9dc43c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_ListApplications_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_applications call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_applications. +# +def list_applications + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new + + # Call the list_applications method. + result = client.list_applications request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::Application. + p item + end +end +# [END apphub_v1_generated_AppHub_ListApplications_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb new file mode 100644 index 000000000000..16595dffd427 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_ListDiscoveredServices_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_discovered_services call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services. +# +def list_discovered_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new + + # Call the list_discovered_services method. + result = client.list_discovered_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredService. + p item + end +end +# [END apphub_v1_generated_AppHub_ListDiscoveredServices_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb new file mode 100644 index 000000000000..8af6d5b9a9e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_discovered_workloads call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads. +# +def list_discovered_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new + + # Call the list_discovered_workloads method. + result = client.list_discovered_workloads request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. + p item + end +end +# [END apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb new file mode 100644 index 000000000000..c9dc10bc0854 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_service_project_attachments call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments. +# +def list_service_project_attachments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new + + # Call the list_service_project_attachments method. + result = client.list_service_project_attachments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. + p item + end +end +# [END apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb new file mode 100644 index 000000000000..f63e8b919d25 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_ListServices_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_services call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_services. +# +def list_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListServicesRequest.new + + # Call the list_services method. + result = client.list_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::Service. + p item + end +end +# [END apphub_v1_generated_AppHub_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb new file mode 100644 index 000000000000..98bee1c64a09 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_ListWorkloads_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the list_workloads call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#list_workloads. +# +def list_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new + + # Call the list_workloads method. + result = client.list_workloads request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AppHub::V1::Workload. + p item + end +end +# [END apphub_v1_generated_AppHub_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb new file mode 100644 index 000000000000..70e65424d4a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_LookupDiscoveredService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the lookup_discovered_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service. +# +def lookup_discovered_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new + + # Call the lookup_discovered_service method. + result = client.lookup_discovered_service request + + # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. + p result +end +# [END apphub_v1_generated_AppHub_LookupDiscoveredService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb new file mode 100644 index 000000000000..d1d638e8c7dc --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the lookup_discovered_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload. +# +def lookup_discovered_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new + + # Call the lookup_discovered_workload method. + result = client.lookup_discovered_workload request + + # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. + p result +end +# [END apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb new file mode 100644 index 000000000000..86dc1e535b27 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the lookup_service_project_attachment call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment. +# +def lookup_service_project_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new + + # Call the lookup_service_project_attachment method. + result = client.lookup_service_project_attachment request + + # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. + p result +end +# [END apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb new file mode 100644 index 000000000000..b2ddfd7fe664 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_UpdateApplication_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the update_application call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#update_application. +# +def update_application + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new + + # Call the update_application method. + result = client.update_application request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_UpdateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb new file mode 100644 index 000000000000..e0a74c946803 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_UpdateService_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the update_service call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#update_service. +# +def update_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new + + # Call the update_service method. + result = client.update_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_UpdateService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb new file mode 100644 index 000000000000..fc6d58bbc083 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START apphub_v1_generated_AppHub_UpdateWorkload_sync] +require "google/cloud/app_hub/v1" + +## +# Snippet for the update_workload call in the AppHub service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AppHub::V1::AppHub::Client#update_workload. +# +def update_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AppHub::V1::AppHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new + + # Call the update_workload method. + result = client.update_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END apphub_v1_generated_AppHub_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json b/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json new file mode 100644 index 000000000000..43c82a87d67c --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json @@ -0,0 +1,1095 @@ +{ + "client_library": { + "name": "google-cloud-app_hub-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.apphub.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync", + "title": "Snippet for the lookup_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment.", + "file": "app_hub/lookup_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "LookupServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.LookupServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync", + "title": "Snippet for the list_service_project_attachments call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments.", + "file": "app_hub/list_service_project_attachments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_project_attachments", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListServiceProjectAttachments", + "full_name": "google.cloud.apphub.v1.AppHub.ListServiceProjectAttachments", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync", + "title": "Snippet for the create_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment.", + "file": "app_hub/create_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "CreateServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.CreateServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync", + "title": "Snippet for the get_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment.", + "file": "app_hub/get_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ServiceProjectAttachment", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.GetServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync", + "title": "Snippet for the delete_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment.", + "file": "app_hub/delete_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DeleteServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.DeleteServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync", + "title": "Snippet for the detach_service_project_attachment call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment.", + "file": "app_hub/detach_service_project_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "detach_service_project_attachment", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DetachServiceProjectAttachment", + "full_name": "google.cloud.apphub.v1.AppHub.DetachServiceProjectAttachment", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListDiscoveredServices_sync", + "title": "Snippet for the list_discovered_services call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services.", + "file": "app_hub/list_discovered_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_discovered_services", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListDiscoveredServices", + "full_name": "google.cloud.apphub.v1.AppHub.ListDiscoveredServices", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetDiscoveredService_sync", + "title": "Snippet for the get_discovered_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service.", + "file": "app_hub/get_discovered_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_discovered_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::DiscoveredService", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetDiscoveredService", + "full_name": "google.cloud.apphub.v1.AppHub.GetDiscoveredService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_LookupDiscoveredService_sync", + "title": "Snippet for the lookup_discovered_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service.", + "file": "app_hub/lookup_discovered_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_discovered_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "LookupDiscoveredService", + "full_name": "google.cloud.apphub.v1.AppHub.LookupDiscoveredService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListServices_sync", + "title": "Snippet for the list_services call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_services.", + "file": "app_hub/list_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_services", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListServicesResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListServices", + "full_name": "google.cloud.apphub.v1.AppHub.ListServices", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_CreateService_sync", + "title": "Snippet for the create_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_service.", + "file": "app_hub/create_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::CreateServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "CreateService", + "full_name": "google.cloud.apphub.v1.AppHub.CreateService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetService_sync", + "title": "Snippet for the get_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_service.", + "file": "app_hub/get_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::Service", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetService", + "full_name": "google.cloud.apphub.v1.AppHub.GetService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_UpdateService_sync", + "title": "Snippet for the update_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_service.", + "file": "app_hub/update_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::UpdateServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "UpdateService", + "full_name": "google.cloud.apphub.v1.AppHub.UpdateService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DeleteService_sync", + "title": "Snippet for the delete_service call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_service.", + "file": "app_hub/delete_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DeleteServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DeleteService", + "full_name": "google.cloud.apphub.v1.AppHub.DeleteService", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync", + "title": "Snippet for the list_discovered_workloads call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads.", + "file": "app_hub/list_discovered_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_discovered_workloads", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListDiscoveredWorkloads", + "full_name": "google.cloud.apphub.v1.AppHub.ListDiscoveredWorkloads", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync", + "title": "Snippet for the get_discovered_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload.", + "file": "app_hub/get_discovered_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_discovered_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::DiscoveredWorkload", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetDiscoveredWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.GetDiscoveredWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync", + "title": "Snippet for the lookup_discovered_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload.", + "file": "app_hub/lookup_discovered_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_discovered_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "LookupDiscoveredWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.LookupDiscoveredWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListWorkloads_sync", + "title": "Snippet for the list_workloads call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_workloads.", + "file": "app_hub/list_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workloads", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListWorkloadsResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListWorkloads", + "full_name": "google.cloud.apphub.v1.AppHub.ListWorkloads", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_CreateWorkload_sync", + "title": "Snippet for the create_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_workload.", + "file": "app_hub/create_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::CreateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "CreateWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.CreateWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetWorkload_sync", + "title": "Snippet for the get_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_workload.", + "file": "app_hub/get_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::Workload", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.GetWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_UpdateWorkload_sync", + "title": "Snippet for the update_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_workload.", + "file": "app_hub/update_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::UpdateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "UpdateWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.UpdateWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DeleteWorkload_sync", + "title": "Snippet for the delete_workload call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_workload.", + "file": "app_hub/delete_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workload", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DeleteWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DeleteWorkload", + "full_name": "google.cloud.apphub.v1.AppHub.DeleteWorkload", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_ListApplications_sync", + "title": "Snippet for the list_applications call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_applications.", + "file": "app_hub/list_applications.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_applications", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_applications", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::ListApplicationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::ListApplicationsResponse", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "ListApplications", + "full_name": "google.cloud.apphub.v1.AppHub.ListApplications", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_CreateApplication_sync", + "title": "Snippet for the create_application call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_application.", + "file": "app_hub/create_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_application", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::CreateApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "CreateApplication", + "full_name": "google.cloud.apphub.v1.AppHub.CreateApplication", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_GetApplication_sync", + "title": "Snippet for the get_application call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_application.", + "file": "app_hub/get_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_application", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::GetApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AppHub::V1::Application", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "GetApplication", + "full_name": "google.cloud.apphub.v1.AppHub.GetApplication", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_UpdateApplication_sync", + "title": "Snippet for the update_application call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_application.", + "file": "app_hub/update_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_application", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::UpdateApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "UpdateApplication", + "full_name": "google.cloud.apphub.v1.AppHub.UpdateApplication", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "apphub_v1_generated_AppHub_DeleteApplication_sync", + "title": "Snippet for the delete_application call in the AppHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_application.", + "file": "app_hub/delete_application.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_application", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_application", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AppHub::V1::DeleteApplicationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppHub::Client", + "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" + }, + "method": { + "short_name": "DeleteApplication", + "full_name": "google.cloud.apphub.v1.AppHub.DeleteApplication", + "service": { + "short_name": "AppHub", + "full_name": "google.cloud.apphub.v1.AppHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb new file mode 100644 index 000000000000..89c1203c023d --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/apphub/v1/apphub_service_pb" +require "google/cloud/apphub/v1/apphub_service_services_pb" +require "google/cloud/app_hub/v1/app_hub" + +class ::Google::Cloud::AppHub::V1::AppHub::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb new file mode 100644 index 000000000000..546a7a4d6b65 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/app_hub/v1/app_hub" + +class ::Google::Cloud::AppHub::V1::AppHub::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_application_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.application_path project: "value0", location: "value1", application: "value2" + assert_equal "projects/value0/locations/value1/applications/value2", path + end + end + + def test_discovered_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.discovered_service_path project: "value0", location: "value1", discovered_service: "value2" + assert_equal "projects/value0/locations/value1/discoveredServices/value2", path + end + end + + def test_discovered_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.discovered_workload_path project: "value0", location: "value1", discovered_workload: "value2" + assert_equal "projects/value0/locations/value1/discoveredWorkloads/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", application: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/applications/value2/services/value3", path + end + end + + def test_service_project_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_project_attachment_path project: "value0", location: "value1", service_project_attachment: "value2" + assert_equal "projects/value0/locations/value1/serviceProjectAttachments/value2", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path project: "value0", location: "value1", application: "value2", workload: "value3" + assert_equal "projects/value0/locations/value1/applications/value2/workloads/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb new file mode 100644 index 000000000000..56aebc59c755 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb @@ -0,0 +1,1605 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/apphub/v1/apphub_service_pb" +require "google/cloud/app_hub/v1/app_hub/rest" + + +class ::Google::Cloud::AppHub::V1::AppHub::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_lookup_service_project_attachment + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + lookup_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lookup_service_project_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_service_project_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_service_project_attachment ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_service_project_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_service_project_attachment(::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_service_project_attachment_client_stub.call_count + end + end + end + + def test_list_service_project_attachments + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_service_project_attachments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_service_project_attachments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_project_attachments_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_service_project_attachments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_service_project_attachments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_service_project_attachments ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_service_project_attachments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_service_project_attachments(::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_service_project_attachments_client_stub.call_count + end + end + end + + def test_create_service_project_attachment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_project_attachment_id = "hello world" + service_project_attachment = {} + request_id = "hello world" + + create_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_service_project_attachment parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_service_project_attachment ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_service_project_attachment(::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_project_attachment_client_stub.call_count + end + end + end + + def test_get_service_project_attachment + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_service_project_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_service_project_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_service_project_attachment ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_service_project_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_service_project_attachment(::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_project_attachment_client_stub.call_count + end + end + end + + def test_delete_service_project_attachment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_service_project_attachment({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_service_project_attachment name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_service_project_attachment ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_service_project_attachment({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_service_project_attachment(::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_project_attachment_client_stub.call_count + end + end + end + + def test_detach_service_project_attachment + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + detach_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_detach_service_project_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, detach_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.detach_service_project_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.detach_service_project_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.detach_service_project_attachment ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.detach_service_project_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.detach_service_project_attachment(::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, detach_service_project_attachment_client_stub.call_count + end + end + end + + def test_list_discovered_services + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_discovered_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_discovered_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_discovered_services_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_discovered_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_discovered_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_discovered_services ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_discovered_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_discovered_services(::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_discovered_services_client_stub.call_count + end + end + end + + def test_get_discovered_service + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::DiscoveredService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovered_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_discovered_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_discovered_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_discovered_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_discovered_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_discovered_service ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_discovered_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_discovered_service(::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_discovered_service_client_stub.call_count + end + end + end + + def test_lookup_discovered_service + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + uri = "hello world" + + lookup_discovered_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_discovered_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_discovered_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lookup_discovered_service({ parent: parent, uri: uri }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_discovered_service parent: parent, uri: uri do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_discovered_service ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_discovered_service({ parent: parent, uri: uri }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_discovered_service(::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_discovered_service_client_stub.call_count + end + end + end + + def test_list_services + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_services_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_services ::Google::Cloud::AppHub::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_services(::Google::Cloud::AppHub::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_count + end + end + end + + def test_create_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_id = "hello world" + service = {} + request_id = "hello world" + + create_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_service parent: parent, service_id: service_id, service: service, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_service ::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_service(::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_client_stub.call_count + end + end + end + + def test_get_service + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_service ::Google::Cloud::AppHub::V1::GetServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_service(::Google::Cloud::AppHub::V1::GetServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_count + end + end + end + + def test_update_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + service = {} + request_id = "hello world" + + update_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_service({ update_mask: update_mask, service: service, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_service update_mask: update_mask, service: service, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_service ::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_service({ update_mask: update_mask, service: service, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_service(::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_client_stub.call_count + end + end + end + + def test_delete_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_service({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_service name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_service ::Google::Cloud::AppHub::V1::DeleteServiceRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_service({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_service(::Google::Cloud::AppHub::V1::DeleteServiceRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_client_stub.call_count + end + end + end + + def test_list_discovered_workloads + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_discovered_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_discovered_workloads_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_discovered_workloads_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_discovered_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_discovered_workloads ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_discovered_workloads(::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_discovered_workloads_client_stub.call_count + end + end + end + + def test_get_discovered_workload + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovered_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_discovered_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_discovered_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_discovered_workload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_discovered_workload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_discovered_workload ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_discovered_workload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_discovered_workload(::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_discovered_workload_client_stub.call_count + end + end + end + + def test_lookup_discovered_workload + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + uri = "hello world" + + lookup_discovered_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_discovered_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_discovered_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lookup_discovered_workload({ parent: parent, uri: uri }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_discovered_workload parent: parent, uri: uri do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_discovered_workload ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_discovered_workload({ parent: parent, uri: uri }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_discovered_workload(::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_discovered_workload_client_stub.call_count + end + end + end + + def test_list_workloads + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workloads ::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workloads(::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_workloads_client_stub.call_count + end + end + end + + def test_create_workload + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload_id = "hello world" + workload = {} + request_id = "hello world" + + create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workload parent: parent, workload_id: workload_id, workload: workload, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workload ::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workload(::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_count + end + end + end + + def test_get_workload + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::Workload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workload ::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workload(::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_count + end + end + end + + def test_update_workload + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + workload = {} + request_id = "hello world" + + update_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workload update_mask: update_mask, workload: workload, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workload ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workload(::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workload_client_stub.call_count + end + end + end + + def test_delete_workload + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workload({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workload name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workload ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workload({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workload(::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workload_client_stub.call_count + end + end + end + + def test_list_applications + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_applications_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_applications_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_applications_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_applications({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_applications parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_applications ::Google::Cloud::AppHub::V1::ListApplicationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_applications({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_applications(::Google::Cloud::AppHub::V1::ListApplicationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_applications_client_stub.call_count + end + end + end + + def test_create_application + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + application_id = "hello world" + application = {} + request_id = "hello world" + + create_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_application_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_application parent: parent, application_id: application_id, application: application, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_application ::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_application(::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_application_client_stub.call_count + end + end + end + + def test_get_application + # Create test objects. + client_result = ::Google::Cloud::AppHub::V1::Application.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_application_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_application({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_application name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_application ::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_application({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_application(::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_application_client_stub.call_count + end + end + end + + def test_update_application + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + application = {} + request_id = "hello world" + + update_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_application_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_application({ update_mask: update_mask, application: application, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_application update_mask: update_mask, application: application, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_application ::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_application({ update_mask: update_mask, application: application, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_application(::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_application_client_stub.call_count + end + end + end + + def test_delete_application + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_application_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_application_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_application({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_application name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_application ::Google::Cloud::AppHub::V1::DeleteApplicationRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_application({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_application(::Google::Cloud::AppHub::V1::DeleteApplicationRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_application_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb new file mode 100644 index 000000000000..f3ff5043e655 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb @@ -0,0 +1,1865 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/apphub/v1/apphub_service_pb" +require "google/cloud/app_hub/v1/app_hub" + +class ::Google::Cloud::AppHub::V1::AppHub::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_lookup_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + lookup_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lookup_service_project_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_service_project_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_service_project_attachment ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_service_project_attachment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_service_project_attachment(::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_list_service_project_attachments + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_service_project_attachments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_project_attachments, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_service_project_attachments_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_service_project_attachments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_service_project_attachments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_service_project_attachments ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_service_project_attachments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_service_project_attachments(::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_service_project_attachments_client_stub.call_rpc_count + end + end + + def test_create_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_project_attachment_id = "hello world" + service_project_attachment = {} + request_id = "hello world" + + create_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["service_project_attachment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::ServiceProjectAttachment), request["service_project_attachment"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_service_project_attachment parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_service_project_attachment ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_service_project_attachment(::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_get_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_service_project_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_service_project_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_service_project_attachment ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_service_project_attachment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_service_project_attachment(::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_delete_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_service_project_attachment({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_service_project_attachment name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_service_project_attachment ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_service_project_attachment({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_service_project_attachment(::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_detach_service_project_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + detach_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :detach_service_project_attachment, name + assert_kind_of ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, detach_service_project_attachment_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.detach_service_project_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.detach_service_project_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.detach_service_project_attachment ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.detach_service_project_attachment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.detach_service_project_attachment(::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, detach_service_project_attachment_client_stub.call_rpc_count + end + end + + def test_list_discovered_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_discovered_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_discovered_services, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_discovered_services_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_discovered_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_discovered_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_discovered_services ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_discovered_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_discovered_services(::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_discovered_services_client_stub.call_rpc_count + end + end + + def test_get_discovered_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::DiscoveredService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovered_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_discovered_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_discovered_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_discovered_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_discovered_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_discovered_service ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_discovered_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_discovered_service(::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_discovered_service_client_stub.call_rpc_count + end + end + + def test_lookup_discovered_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + uri = "hello world" + + lookup_discovered_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_discovered_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["uri"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_discovered_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lookup_discovered_service({ parent: parent, uri: uri }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_discovered_service parent: parent, uri: uri do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_discovered_service ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_discovered_service({ parent: parent, uri: uri }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_discovered_service(::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_discovered_service_client_stub.call_rpc_count + end + end + + def test_list_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_services, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_services_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_services ::Google::Cloud::AppHub::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_services(::Google::Cloud::AppHub::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_rpc_count + end + end + + def test_create_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_id = "hello world" + service = {} + request_id = "hello world" + + create_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::CreateServiceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["service_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Service), request["service"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_service parent: parent, service_id: service_id, service: service, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_service ::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_service(::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_service_client_stub.call_rpc_count + end + end + + def test_get_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_service ::Google::Cloud::AppHub::V1::GetServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_service(::Google::Cloud::AppHub::V1::GetServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_rpc_count + end + end + + def test_update_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + service = {} + request_id = "hello world" + + update_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::UpdateServiceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Service), request["service"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_service({ update_mask: update_mask, service: service, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_service update_mask: update_mask, service: service, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_service ::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_service({ update_mask: update_mask, service: service, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_service(::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_service_client_stub.call_rpc_count + end + end + + def test_delete_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service, name + assert_kind_of ::Google::Cloud::AppHub::V1::DeleteServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_service({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_service name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_service ::Google::Cloud::AppHub::V1::DeleteServiceRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_service({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_service(::Google::Cloud::AppHub::V1::DeleteServiceRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_service_client_stub.call_rpc_count + end + end + + def test_list_discovered_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_discovered_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_discovered_workloads, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_discovered_workloads_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_discovered_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_discovered_workloads ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_discovered_workloads(::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_discovered_workloads_client_stub.call_rpc_count + end + end + + def test_get_discovered_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovered_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_discovered_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_discovered_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_discovered_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_discovered_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_discovered_workload ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_discovered_workload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_discovered_workload(::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_discovered_workload_client_stub.call_rpc_count + end + end + + def test_lookup_discovered_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + uri = "hello world" + + lookup_discovered_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_discovered_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["uri"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_discovered_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lookup_discovered_workload({ parent: parent, uri: uri }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_discovered_workload parent: parent, uri: uri do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_discovered_workload ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_discovered_workload({ parent: parent, uri: uri }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_discovered_workload(::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_discovered_workload_client_stub.call_rpc_count + end + end + + def test_list_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workloads, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListWorkloadsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workloads_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workloads ::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workloads(::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_workloads_client_stub.call_rpc_count + end + end + + def test_create_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload_id = "hello world" + workload = {} + request_id = "hello world" + + create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::CreateWorkloadRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["workload_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Workload), request["workload"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workload parent: parent, workload_id: workload_id, workload: workload, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workload ::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workload(::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_rpc_count + end + end + + def test_get_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workload ::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workload(::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_rpc_count + end + end + + def test_update_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + workload = {} + request_id = "hello world" + + update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Workload), request["workload"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_workload update_mask: update_mask, workload: workload, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_workload ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_workload(::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_workload_client_stub.call_rpc_count + end + end + + def test_delete_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workload, name + assert_kind_of ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workload_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workload({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workload name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workload ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workload({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workload(::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_workload_client_stub.call_rpc_count + end + end + + def test_list_applications + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_applications_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_applications, name + assert_kind_of ::Google::Cloud::AppHub::V1::ListApplicationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_applications_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_applications({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_applications parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_applications ::Google::Cloud::AppHub::V1::ListApplicationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_applications({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_applications(::Google::Cloud::AppHub::V1::ListApplicationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_applications_client_stub.call_rpc_count + end + end + + def test_create_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + application_id = "hello world" + application = {} + request_id = "hello world" + + create_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_application, name + assert_kind_of ::Google::Cloud::AppHub::V1::CreateApplicationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["application_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Application), request["application"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_application_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_application parent: parent, application_id: application_id, application: application, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_application ::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_application(::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_application_client_stub.call_rpc_count + end + end + + def test_get_application + # Create GRPC objects. + grpc_response = ::Google::Cloud::AppHub::V1::Application.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_application, name + assert_kind_of ::Google::Cloud::AppHub::V1::GetApplicationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_application_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_application({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_application name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_application ::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_application({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_application(::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_application_client_stub.call_rpc_count + end + end + + def test_update_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + application = {} + request_id = "hello world" + + update_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_application, name + assert_kind_of ::Google::Cloud::AppHub::V1::UpdateApplicationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Application), request["application"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_application_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_application({ update_mask: update_mask, application: application, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_application update_mask: update_mask, application: application, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_application ::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_application({ update_mask: update_mask, application: application, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_application(::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_application_client_stub.call_rpc_count + end + end + + def test_delete_application + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_application, name + assert_kind_of ::Google::Cloud::AppHub::V1::DeleteApplicationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_application_client_stub do + # Create client + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_application({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_application name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_application ::Google::Cloud::AppHub::V1::DeleteApplicationRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_application({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_application(::Google::Cloud::AppHub::V1::DeleteApplicationRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_application_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore b/owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json new file mode 100644 index 000000000000..b7c7a7f45d14 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "artifactregistry.googleapis.com", + "api_shortname": "artifactregistry", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest", + "distribution_name": "google-cloud-artifact_registry-v1", + "is_cloud": true, + "language": "ruby", + "name": "artifactregistry", + "name_pretty": "Artifact Registry V1 API", + "product_documentation": "https://cloud.google.com/artifact-registry/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ARTIFACT_REGISTRY", + "ruby-cloud-product-url": "https://cloud.google.com/artifact-registry/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml b/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml new file mode 100644 index 000000000000..de96e2618870 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-artifact_registry-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-artifact_registry-v1.rb" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts b/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts new file mode 100644 index 000000000000..79e1614b4868 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Artifact Registry V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1ae5019e3c04 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-artifact_registry-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-artifact_registry-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/artifact_registry/v1" + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/artifact_registry/v1" + +::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-artifact_registry-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/artifact_registry/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md b/owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1/README.md new file mode 100644 index 000000000000..e782a263370f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Artifact Registry V1 API + +Store and manage build artifacts in a scalable and integrated service built on Google infrastructure. + +Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Artifact Registry V1 API. Most users should consider using +the main client gem, +[google-cloud-artifact_registry](https://rubygems.org/gems/google-cloud-artifact_registry). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-artifact_registry-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/artifact_registry/v1" + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new +request = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new # (request fields as keyword arguments...) +response = client.list_docker_images request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/artifact-registry/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/artifact_registry/v1" +require "logger" + +client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-artifact_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-artifact_registry-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-artifact_registry`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-artifact_registry-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile b/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile new file mode 100644 index 000000000000..4148fa14709c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-artifact_registry-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ARTIFACT_REGISTRY_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ARTIFACT_REGISTRY_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ARTIFACT_REGISTRY_TEST_PROJECT=test123 ARTIFACT_REGISTRY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/artifact_registry/v1/artifact_registry/credentials" + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ARTIFACT_REGISTRY_PROJECT"] = project + ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] = project + ENV["ARTIFACT_REGISTRY_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-artifact_registry-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-artifact_registry-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-artifact_registry-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-artifact_registry-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-artifact_registry-v1" + header "google-cloud-artifact_registry-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-artifact_registry-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-artifact_registry-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-artifact_registry-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-artifact_registry-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json new file mode 100644 index 000000000000..02e8cf3c04bd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json @@ -0,0 +1,268 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.devtools.artifactregistry.v1", + "libraryPackage": "::Google::Cloud::ArtifactRegistry::V1", + "services": { + "ArtifactRegistry": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client", + "rpcs": { + "ListDockerImages": { + "methods": [ + "list_docker_images" + ] + }, + "GetDockerImage": { + "methods": [ + "get_docker_image" + ] + }, + "ListMavenArtifacts": { + "methods": [ + "list_maven_artifacts" + ] + }, + "GetMavenArtifact": { + "methods": [ + "get_maven_artifact" + ] + }, + "ListNpmPackages": { + "methods": [ + "list_npm_packages" + ] + }, + "GetNpmPackage": { + "methods": [ + "get_npm_package" + ] + }, + "ListPythonPackages": { + "methods": [ + "list_python_packages" + ] + }, + "GetPythonPackage": { + "methods": [ + "get_python_package" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "import_apt_artifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "import_yum_artifacts" + ] + }, + "ListRepositories": { + "methods": [ + "list_repositories" + ] + }, + "GetRepository": { + "methods": [ + "get_repository" + ] + }, + "CreateRepository": { + "methods": [ + "create_repository" + ] + }, + "UpdateRepository": { + "methods": [ + "update_repository" + ] + }, + "DeleteRepository": { + "methods": [ + "delete_repository" + ] + }, + "ListPackages": { + "methods": [ + "list_packages" + ] + }, + "GetPackage": { + "methods": [ + "get_package" + ] + }, + "DeletePackage": { + "methods": [ + "delete_package" + ] + }, + "ListVersions": { + "methods": [ + "list_versions" + ] + }, + "GetVersion": { + "methods": [ + "get_version" + ] + }, + "DeleteVersion": { + "methods": [ + "delete_version" + ] + }, + "BatchDeleteVersions": { + "methods": [ + "batch_delete_versions" + ] + }, + "UpdateVersion": { + "methods": [ + "update_version" + ] + }, + "ListFiles": { + "methods": [ + "list_files" + ] + }, + "GetFile": { + "methods": [ + "get_file" + ] + }, + "DeleteFile": { + "methods": [ + "delete_file" + ] + }, + "UpdateFile": { + "methods": [ + "update_file" + ] + }, + "ListTags": { + "methods": [ + "list_tags" + ] + }, + "GetTag": { + "methods": [ + "get_tag" + ] + }, + "CreateTag": { + "methods": [ + "create_tag" + ] + }, + "UpdateTag": { + "methods": [ + "update_tag" + ] + }, + "DeleteTag": { + "methods": [ + "delete_tag" + ] + }, + "CreateRule": { + "methods": [ + "create_rule" + ] + }, + "ListRules": { + "methods": [ + "list_rules" + ] + }, + "GetRule": { + "methods": [ + "get_rule" + ] + }, + "UpdateRule": { + "methods": [ + "update_rule" + ] + }, + "DeleteRule": { + "methods": [ + "delete_rule" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "get_project_settings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "update_project_settings" + ] + }, + "GetVPCSCConfig": { + "methods": [ + "get_vpcsc_config" + ] + }, + "UpdateVPCSCConfig": { + "methods": [ + "update_vpcsc_config" + ] + }, + "UpdatePackage": { + "methods": [ + "update_package" + ] + }, + "ListAttachments": { + "methods": [ + "list_attachments" + ] + }, + "GetAttachment": { + "methods": [ + "get_attachment" + ] + }, + "CreateAttachment": { + "methods": [ + "create_attachment" + ] + }, + "DeleteAttachment": { + "methods": [ + "delete_attachment" + ] + }, + "ExportArtifact": { + "methods": [ + "export_artifact" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec b/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec new file mode 100644 index 000000000000..4b8e2a65e5ce --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/artifact_registry/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-artifact_registry-v1" + gem.version = Google::Cloud::ArtifactRegistry::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details." + gem.summary = "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb new file mode 100644 index 000000000000..81605be80ce5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/artifact_registry/v1" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb new file mode 100644 index 000000000000..0fa4b7bfbe28 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/artifact_registry/v1/artifact_registry" +require "google/cloud/artifact_registry/v1/version" + +module Google + module Cloud + module ArtifactRegistry + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/artifact_registry/v1" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/artifact_registry/v1" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/artifact_registry/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb new file mode 100644 index 000000000000..ee43fe7eedff --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/artifact_registry/v1/version" + +require "google/cloud/artifact_registry/v1/artifact_registry/credentials" +require "google/cloud/artifact_registry/v1/artifact_registry/paths" +require "google/cloud/artifact_registry/v1/artifact_registry/operations" +require "google/cloud/artifact_registry/v1/artifact_registry/client" +require "google/cloud/artifact_registry/v1/artifact_registry/rest" + +module Google + module Cloud + module ArtifactRegistry + module V1 + ## + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/artifact_registry/v1/artifact_registry" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/artifact_registry/v1/artifact_registry/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module ArtifactRegistry + end + end + end + end +end + +helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb" +require "google/cloud/artifact_registry/v1/artifact_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb new file mode 100644 index 000000000000..2973415f04dd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb @@ -0,0 +1,5572 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/devtools/artifactregistry/v1/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + ## + # Client for the ArtifactRegistry service. + # + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :artifact_registry_stub + + ## + # Configure the ArtifactRegistry Client class. + # + # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ArtifactRegistry clients + # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ArtifactRegistry", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @artifact_registry_stub.universe_domain + end + + ## + # Create a new ArtifactRegistry client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ArtifactRegistry client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/devtools/artifactregistry/v1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @artifact_registry_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @artifact_registry_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @artifact_registry_stub.endpoint + config.universe_domain = @artifact_registry_stub.universe_domain + config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @artifact_registry_stub.logger + end + + # Service calls + + ## + # Lists docker images. + # + # @overload list_docker_images(request, options = nil) + # Pass arguments to `list_docker_images` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_docker_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose docker images will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param order_by [::String] + # The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new + # + # # Call the list_docker_images method. + # result = client.list_docker_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. + # p item + # end + # + def list_docker_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_docker_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_docker_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a docker image. + # + # @overload get_docker_image(request, options = nil) + # Pass arguments to `get_docker_image` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_docker_image(name: nil) + # Pass arguments to `get_docker_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the docker images. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new + # + # # Call the get_docker_image method. + # result = client.get_docker_image request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. + # p result + # + def get_docker_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_docker_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_docker_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_docker_image, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists maven artifacts. + # + # @overload list_maven_artifacts(request, options = nil) + # Pass arguments to `list_maven_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose maven artifacts will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new + # + # # Call the list_maven_artifacts method. + # result = client.list_maven_artifacts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + # p item + # end + # + def list_maven_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_maven_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_maven_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_maven_artifacts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a maven artifact. + # + # @overload get_maven_artifact(request, options = nil) + # Pass arguments to `get_maven_artifact` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_maven_artifact(name: nil) + # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the maven artifact. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new + # + # # Call the get_maven_artifact method. + # result = client.get_maven_artifact request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + # p result + # + def get_maven_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_maven_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_maven_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_maven_artifact, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists npm packages. + # + # @overload list_npm_packages(request, options = nil) + # Pass arguments to `list_npm_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_npm_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose npm packages will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new + # + # # Call the list_npm_packages method. + # result = client.list_npm_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. + # p item + # end + # + def list_npm_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_npm_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_npm_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_npm_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a npm package. + # + # @overload get_npm_package(request, options = nil) + # Pass arguments to `get_npm_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_npm_package(name: nil) + # Pass arguments to `get_npm_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the npm package. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new + # + # # Call the get_npm_package method. + # result = client.get_npm_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. + # p result + # + def get_npm_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_npm_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_npm_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_npm_package, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists python packages. + # + # @overload list_python_packages(request, options = nil) + # Pass arguments to `list_python_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_python_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose python packages will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new + # + # # Call the list_python_packages method. + # result = client.list_python_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. + # p item + # end + # + def list_python_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_python_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_python_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_python_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a python package. + # + # @overload get_python_package(request, options = nil) + # Pass arguments to `get_python_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_python_package(name: nil) + # Pass arguments to `get_python_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the python package. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new + # + # # Call the get_python_package method. + # result = client.get_python_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. + # p result + # + def get_python_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_python_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_python_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_python_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_python_package, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_apt_artifacts(request, options = nil) + # Pass arguments to `import_apt_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_apt_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new + # + # # Call the import_apt_artifacts method. + # result = client.import_apt_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_apt_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_apt_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_apt_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_yum_artifacts(request, options = nil) + # Pass arguments to `import_yum_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_yum_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new + # + # # Call the import_yum_artifacts method. + # result = client.import_yum_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_yum_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_yum_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_yum_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists repositories. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose repositories will be + # listed. + # @param page_size [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # + # Examples of using a filter: + # + # To filter the results of your request to repositories with the name + # `my-repo` in project `my-project` in the `us-central` region, append the + # following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + # @param order_by [::String] + # Optional. The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new + # + # # Call the list_repositories method. + # result = client.list_repositories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Repository. + # p item + # end + # + def list_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_repositories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_repositories, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + # p result + # + def get_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_repository, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_repository(parent: nil, repository_id: nil, repository: nil) + # Pass arguments to `create_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the repository will be + # created. + # @param repository_id [::String] + # Required. The repository id to use for this repository. + # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] + # Required. The repository to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new + # + # # Call the create_repository method. + # result = client.create_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_repository(repository: nil, update_mask: nil) + # Pass arguments to `update_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] + # The repository that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + # p result + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.repository&.name + header_params["repository.name"] = request.repository.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_repository, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_repository(name: nil) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new + # + # # Call the delete_repository method. + # result = client.delete_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists packages. + # + # @overload list_packages(request, options = nil) + # Pass arguments to `list_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose packages will be listed. + # @param page_size [::Integer] + # The maximum number of packages to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to packages with the name + # `my-package` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + # + # To filter the results of your request to packages with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request": + # + # * `"annotations.external_link:external_link_value"` + # + # To filter the results just for a specific annotation key `external_link`, + # append the following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to packages with the annotation key-value pair + # [`external.link`:`https://example.com/my-package`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-package`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @param order_by [::String] + # Optional. The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new + # + # # Call the list_packages method. + # result = client.list_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. + # p item + # end + # + def list_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a package. + # + # @overload get_package(request, options = nil) + # Pass arguments to `get_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_package(name: nil) + # Pass arguments to `get_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the package to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new + # + # # Call the get_package method. + # result = client.get_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + # p result + # + def get_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_package, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # + # @overload delete_package(request, options = nil) + # Pass arguments to `delete_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_package(name: nil) + # Pass arguments to `delete_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the package to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new + # + # # Call the delete_package method. + # result = client.delete_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists versions. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil) + # Pass arguments to `list_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose versions will be listed. + # @param page_size [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # @param order_by [::String] + # Optional. The field to order the results by. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to versions with the name + # `my-version` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + # + # To filter the results of your request to versions with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to versions with the annotation key-value pair + # [`external.link`:`https://example.com/my-version`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-version`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_versions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a version + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the version to retrieve. + # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_version(name: nil, force: nil) + # Pass arguments to `delete_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the version to delete. + # @param force [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes multiple versions across a repository. The returned operation will + # complete once the versions have been deleted. + # + # @overload batch_delete_versions(request, options = nil) + # Pass arguments to `batch_delete_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_delete_versions(parent: nil, names: nil, validate_only: nil) + # Pass arguments to `batch_delete_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the repository holding all requested versions. + # @param names [::Array<::String>] + # Required. The names of the versions to delete. + # The maximum number of versions deleted per batch is determined by the + # service and is dependent on the available resources in the region. + # @param validate_only [::Boolean] + # If true, the request is performed without deleting data, following AIP-163. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new + # + # # Call the batch_delete_versions method. + # result = client.batch_delete_versions request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_delete_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_delete_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_delete_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_delete_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :batch_delete_versions, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a version. + # + # @overload update_version(request, options = nil) + # Pass arguments to `update_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_version(version: nil, update_mask: nil) + # Pass arguments to `update_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash] + # Required. The Version that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new + # + # # Call the update_version method. + # result = client.update_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + # p result + # + def update_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.version&.name + header_params["version.name"] = request.version.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists files. + # + # @overload list_files(request, options = nil) + # Pass arguments to `list_files` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the repository whose files will be listed. For + # example: "projects/p1/locations/us-central1/repositories/repo1 + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to files with the name `my_file.txt` + # in project `my-project` in the `us-central` region, in repository + # `my-repo`, append the following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + # + # To filter the results of your request to files owned by the version `1.0` + # in package `pkg1`, append the following filter expression to your request: + # + # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # + # To filter the results of your request to files with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to files with the annotation key-value pair + # [`external.link`:`https://example.com/my-file`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-file`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @param page_size [::Integer] + # The maximum number of files to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param order_by [::String] + # The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new + # + # # Call the list_files method. + # result = client.list_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. + # p item + # end + # + def list_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_files.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a file. + # + # @overload get_file(request, options = nil) + # Pass arguments to `get_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_file(name: nil) + # Pass arguments to `get_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the file to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new + # + # # Call the get_file method. + # result = client.get_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + # p result + # + def get_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_file, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a file and all of its content. It is only allowed on generic + # repositories. The returned operation will complete once the file has been + # deleted. + # + # @overload delete_file(request, options = nil) + # Pass arguments to `delete_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_file(name: nil) + # Pass arguments to `delete_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the file to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new + # + # # Call the delete_file method. + # result = client.delete_file request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_file, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a file. + # + # @overload update_file(request, options = nil) + # Pass arguments to `update_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_file(file: nil, update_mask: nil) + # Pass arguments to `update_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash] + # Required. The File that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new + # + # # Call the update_file method. + # result = client.update_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + # p result + # + def update_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.file&.name + header_params["file.name"] = request.file.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_file, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tags. + # + # @overload list_tags(request, options = nil) + # Pass arguments to `list_tags` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tags` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent package whose tags will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `version` + # + # Examples of using a filter: + # + # To filter the results of your request to tags with the name `my-tag` in + # package `my-package` in repository `my-repo` in project "`y-project` in + # the us-central region, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + # + # To filter the results of your request to tags applied to the version + # `1.0` in package `my-package`, append the following filter expression to + # your request: + # + # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # @param page_size [::Integer] + # The maximum number of tags to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new + # + # # Call the list_tags method. + # result = client.list_tags request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. + # p item + # end + # + def list_tags request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tags.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tags.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tags.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a tag. + # + # @overload get_tag(request, options = nil) + # Pass arguments to `get_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_tag(name: nil) + # Pass arguments to `get_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new + # + # # Call the get_tag method. + # result = client.get_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def get_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_tag, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a tag. + # + # @overload create_tag(request, options = nil) + # Pass arguments to `create_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_tag(parent: nil, tag_id: nil, tag: nil) + # Pass arguments to `create_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource where the tag will be created. + # @param tag_id [::String] + # The tag id to use for this repository. + # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] + # The tag to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new + # + # # Call the create_tag method. + # result = client.create_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def create_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_tag, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a tag. + # + # @overload update_tag(request, options = nil) + # Pass arguments to `update_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_tag(tag: nil, update_mask: nil) + # Pass arguments to `update_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] + # The tag that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new + # + # # Call the update_tag method. + # result = client.update_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def update_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.tag&.name + header_params["tag.name"] = request.tag.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_tag, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a tag. + # + # @overload delete_tag(request, options = nil) + # Pass arguments to `delete_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_tag(name: nil) + # Pass arguments to `delete_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new + # + # # Call the delete_tag method. + # result = client.delete_tag request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_tag, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_rule(parent: nil, rule_id: nil, rule: nil) + # Pass arguments to `create_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the rule will be created. + # @param rule_id [::String] + # The rule id to use for this repository. + # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] + # The rule to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_rules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent repository whose rules will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1`. + # @param page_size [::Integer] + # The maximum number of rules to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_rules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_rules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_rule(name: nil) + # Pass arguments to `get_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] + # The rule that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.rule&.name + header_params["rule.name"] = request.rule.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_rule(name: nil) + # Pass arguments to `delete_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the IAM policy for a given resource. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for a given resource. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Tests if the caller has a list of permissions on a resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the Settings for the Project. + # + # @overload get_project_settings(request, options = nil) + # Pass arguments to `get_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_project_settings(name: nil) + # Pass arguments to `get_project_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the projectSettings resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new + # + # # Call the get_project_settings method. + # result = client.get_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + # p result + # + def get_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_project_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Settings for the Project. + # + # @overload update_project_settings(request, options = nil) + # Pass arguments to `update_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_project_settings(project_settings: nil, update_mask: nil) + # Pass arguments to `update_project_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash] + # The project settings. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new + # + # # Call the update_project_settings method. + # result = client.update_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + # p result + # + def update_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_project_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.project_settings&.name + header_params["project_settings.name"] = request.project_settings.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the VPCSC Config for the Project. + # + # @overload get_vpcsc_config(request, options = nil) + # Pass arguments to `get_vpcsc_config` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_vpcsc_config(name: nil) + # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the VPCSCConfig resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new + # + # # Call the get_vpcsc_config method. + # result = client.get_vpcsc_config request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + # p result + # + def get_vpcsc_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_vpcsc_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vpcsc_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_vpcsc_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the VPCSC Config for the Project. + # + # @overload update_vpcsc_config(request, options = nil) + # Pass arguments to `update_vpcsc_config` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil) + # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash] + # The project config. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new + # + # # Call the update_vpcsc_config method. + # result = client.update_vpcsc_config request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + # p result + # + def update_vpcsc_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_vpcsc_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.vpcsc_config&.name + header_params["vpcsc_config.name"] = request.vpcsc_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vpcsc_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_vpcsc_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a package. + # + # @overload update_package(request, options = nil) + # Pass arguments to `update_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_package(package: nil, update_mask: nil) + # Pass arguments to `update_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash] + # The package that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new + # + # # Call the update_package method. + # result = client.update_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + # p result + # + def update_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.package&.name + header_params["package.name"] = request.package.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_package, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists attachments. + # + # @overload list_attachments(request, options = nil) + # Pass arguments to `list_attachments` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attachments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose attachments will be listed. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `target` + # * `type` + # * `attachment_namespace` + # @param page_size [::Integer] + # The maximum number of attachments to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new + # + # # Call the list_attachments method. + # result = client.list_attachments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. + # p item + # end + # + def list_attachments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_attachments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_attachments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_attachments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_attachments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_attachments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an attachment. + # + # @overload get_attachment(request, options = nil) + # Pass arguments to `get_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_attachment(name: nil) + # Pass arguments to `get_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the attachment to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new + # + # # Call the get_attachment method. + # result = client.get_attachment request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. + # p result + # + def get_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_attachment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an attachment. The returned Operation will finish once the + # attachment has been created. Its response will be the created attachment. + # + # @overload create_attachment(request, options = nil) + # Pass arguments to `create_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil) + # Pass arguments to `create_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the attachment will be + # created. + # @param attachment_id [::String] + # Required. The attachment id to use for this attachment. + # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash] + # Required. The attachment to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new + # + # # Call the create_attachment method. + # result = client.create_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_attachment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an attachment. The returned Operation will + # finish once the attachments has been deleted. It will not have any + # Operation metadata and will return a `google.protobuf.Empty` response. + # + # @overload delete_attachment(request, options = nil) + # Pass arguments to `delete_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_attachment(name: nil) + # Pass arguments to `delete_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the attachment to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new + # + # # Call the delete_attachment method. + # result = client.delete_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_attachment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_attachment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports an artifact to a Cloud Storage bucket. + # + # @overload export_artifact(request, options = nil) + # Pass arguments to `export_artifact` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_artifact(source_version: nil, source_tag: nil, gcs_path: nil, repository: nil) + # Pass arguments to `export_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source_version [::String] + # The artifact version to export. + # Format: + # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} + # + # Note: The following parameters are mutually exclusive: `source_version`, `source_tag`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param source_tag [::String] + # The artifact tag to export. + # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} + # + # Note: The following parameters are mutually exclusive: `source_tag`, `source_version`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param gcs_path [::String] + # The Cloud Storage path to export the artifact to. Should start with the + # bucket name, and optionally have a directory path. Examples: + # `dst_bucket`, `dst_bucket/sub_dir`. + # Existing objects with the same path will be overwritten. + # @param repository [::String] + # Required. The repository of the artifact to export. + # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new + # + # # Call the export_artifact method. + # result = client.export_artifact request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.repository + header_params["repository"] = request.repository + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_artifact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :export_artifact, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ArtifactRegistry API. + # + # This class represents the configuration for ArtifactRegistry, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_docker_images to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_docker_images.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_docker_images.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ArtifactRegistry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_docker_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_docker_images + ## + # RPC-specific configuration for `get_docker_image` + # @return [::Gapic::Config::Method] + # + attr_reader :get_docker_image + ## + # RPC-specific configuration for `list_maven_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_maven_artifacts + ## + # RPC-specific configuration for `get_maven_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :get_maven_artifact + ## + # RPC-specific configuration for `list_npm_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_npm_packages + ## + # RPC-specific configuration for `get_npm_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_npm_package + ## + # RPC-specific configuration for `list_python_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_python_packages + ## + # RPC-specific configuration for `get_python_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_python_package + ## + # RPC-specific configuration for `import_apt_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_apt_artifacts + ## + # RPC-specific configuration for `import_yum_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_yum_artifacts + ## + # RPC-specific configuration for `list_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_repositories + ## + # RPC-specific configuration for `get_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :get_repository + ## + # RPC-specific configuration for `create_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :create_repository + ## + # RPC-specific configuration for `update_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :update_repository + ## + # RPC-specific configuration for `delete_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_repository + ## + # RPC-specific configuration for `list_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_packages + ## + # RPC-specific configuration for `get_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_package + ## + # RPC-specific configuration for `delete_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_package + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `batch_delete_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_versions + ## + # RPC-specific configuration for `update_version` + # @return [::Gapic::Config::Method] + # + attr_reader :update_version + ## + # RPC-specific configuration for `list_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_files + ## + # RPC-specific configuration for `get_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file + ## + # RPC-specific configuration for `delete_file` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_file + ## + # RPC-specific configuration for `update_file` + # @return [::Gapic::Config::Method] + # + attr_reader :update_file + ## + # RPC-specific configuration for `list_tags` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tags + ## + # RPC-specific configuration for `get_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tag + ## + # RPC-specific configuration for `create_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tag + ## + # RPC-specific configuration for `update_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tag + ## + # RPC-specific configuration for `delete_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tag + ## + # RPC-specific configuration for `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `get_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_settings + ## + # RPC-specific configuration for `update_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_settings + ## + # RPC-specific configuration for `get_vpcsc_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vpcsc_config + ## + # RPC-specific configuration for `update_vpcsc_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vpcsc_config + ## + # RPC-specific configuration for `update_package` + # @return [::Gapic::Config::Method] + # + attr_reader :update_package + ## + # RPC-specific configuration for `list_attachments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attachments + ## + # RPC-specific configuration for `get_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attachment + ## + # RPC-specific configuration for `create_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attachment + ## + # RPC-specific configuration for `delete_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attachment + ## + # RPC-specific configuration for `export_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :export_artifact + + # @private + def initialize parent_rpcs = nil + list_docker_images_config = parent_rpcs.list_docker_images if parent_rpcs.respond_to? :list_docker_images + @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config + get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image + @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config + list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts + @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config + get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact + @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config + list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages + @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config + get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package + @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config + list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages + @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config + get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package + @get_python_package = ::Gapic::Config::Method.new get_python_package_config + import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts + @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config + import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts + @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config + list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories + @list_repositories = ::Gapic::Config::Method.new list_repositories_config + get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository + @get_repository = ::Gapic::Config::Method.new get_repository_config + create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository + @create_repository = ::Gapic::Config::Method.new create_repository_config + update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository + @update_repository = ::Gapic::Config::Method.new update_repository_config + delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository + @delete_repository = ::Gapic::Config::Method.new delete_repository_config + list_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages + @list_packages = ::Gapic::Config::Method.new list_packages_config + get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package + @get_package = ::Gapic::Config::Method.new get_package_config + delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package + @delete_package = ::Gapic::Config::Method.new delete_package_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions + @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config + update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version + @update_version = ::Gapic::Config::Method.new update_version_config + list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files + @list_files = ::Gapic::Config::Method.new list_files_config + get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file + @get_file = ::Gapic::Config::Method.new get_file_config + delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file + @delete_file = ::Gapic::Config::Method.new delete_file_config + update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file + @update_file = ::Gapic::Config::Method.new update_file_config + list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags + @list_tags = ::Gapic::Config::Method.new list_tags_config + get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag + @get_tag = ::Gapic::Config::Method.new get_tag_config + create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag + @create_tag = ::Gapic::Config::Method.new create_tag_config + update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag + @update_tag = ::Gapic::Config::Method.new update_tag_config + delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag + @delete_tag = ::Gapic::Config::Method.new delete_tag_config + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings + @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config + update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings + @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config + get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config + @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config + update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config + @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config + update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package + @update_package = ::Gapic::Config::Method.new update_package_config + list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments + @list_attachments = ::Gapic::Config::Method.new list_attachments_config + get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment + @get_attachment = ::Gapic::Config::Method.new get_attachment_config + create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment + @create_attachment = ::Gapic::Config::Method.new create_attachment_config + delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment + @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config + export_artifact_config = parent_rpcs.export_artifact if parent_rpcs.respond_to? :export_artifact + @export_artifact = ::Gapic::Config::Method.new export_artifact_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb new file mode 100644 index 000000000000..808d2715f8ee --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + # Credentials for the ArtifactRegistry API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "ARTIFACT_REGISTRY_CREDENTIALS", + "ARTIFACT_REGISTRY_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ARTIFACT_REGISTRY_CREDENTIALS_JSON", + "ARTIFACT_REGISTRY_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb new file mode 100644 index 000000000000..9daad577067b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ArtifactRegistry Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb new file mode 100644 index 000000000000..624a366f2e6a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb @@ -0,0 +1,333 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + # Path helper methods for the ArtifactRegistry API. + module Paths + ## + # Create a fully-qualified Attachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param attachment [String] + # + # @return [::String] + def attachment_path project:, location:, repository:, attachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/attachments/#{attachment}" + end + + ## + # Create a fully-qualified DockerImage resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param docker_image [String] + # + # @return [::String] + def docker_image_path project:, location:, repository:, docker_image: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/dockerImages/#{docker_image}" + end + + ## + # Create a fully-qualified File resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/files/{file}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param file [String] + # + # @return [::String] + def file_path project:, location:, repository:, file: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/files/#{file}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified MavenArtifact resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param maven_artifact [String] + # + # @return [::String] + def maven_artifact_path project:, location:, repository:, maven_artifact: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/mavenArtifacts/#{maven_artifact}" + end + + ## + # Create a fully-qualified NpmPackage resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param npm_package [String] + # + # @return [::String] + def npm_package_path project:, location:, repository:, npm_package: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/npmPackages/#{npm_package}" + end + + ## + # Create a fully-qualified Package resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param package [String] + # + # @return [::String] + def package_path project:, location:, repository:, package: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}" + end + + ## + # Create a fully-qualified ProjectSettings resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/projectSettings` + # + # @param project [String] + # + # @return [::String] + def project_settings_path project: + "projects/#{project}/projectSettings" + end + + ## + # Create a fully-qualified PythonPackage resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param python_package [String] + # + # @return [::String] + def python_package_path project:, location:, repository:, python_package: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/pythonPackages/#{python_package}" + end + + ## + # Create a fully-qualified Repository resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # + # @return [::String] + def repository_path project:, location:, repository: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}" + end + + ## + # Create a fully-qualified Rule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param rule [String] + # + # @return [::String] + def rule_path project:, location:, repository:, rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/rules/#{rule}" + end + + ## + # Create a fully-qualified SecretVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{secret_version}` + # + # @param project [String] + # @param secret [String] + # @param secret_version [String] + # + # @return [::String] + def secret_version_path project:, secret:, secret_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" + end + + ## + # Create a fully-qualified Tag resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param package [String] + # @param tag [String] + # + # @return [::String] + def tag_path project:, location:, repository:, package:, tag: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}" + end + + ## + # Create a fully-qualified Version resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param package [String] + # @param version [String] + # + # @return [::String] + def version_path project:, location:, repository:, package:, version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/versions/#{version}" + end + + ## + # Create a fully-qualified VpcscConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/vpcscConfig` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def vpcsc_config_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/vpcscConfig" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb new file mode 100644 index 000000000000..64924d2a2ee7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/artifact_registry/v1/version" +require "google/cloud/artifact_registry/v1/bindings_override" + +require "google/cloud/artifact_registry/v1/artifact_registry/credentials" +require "google/cloud/artifact_registry/v1/artifact_registry/paths" +require "google/cloud/artifact_registry/v1/artifact_registry/rest/operations" +require "google/cloud/artifact_registry/v1/artifact_registry/rest/client" + +module Google + module Cloud + module ArtifactRegistry + module V1 + ## + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/artifact_registry/v1/artifact_registry/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module ArtifactRegistry + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/artifact_registry/v1/artifact_registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb new file mode 100644 index 000000000000..3324eebda0a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb @@ -0,0 +1,5187 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/devtools/artifactregistry/v1/service_pb" +require "google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + module Rest + ## + # REST client for the ArtifactRegistry service. + # + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :artifact_registry_stub + + ## + # Configure the ArtifactRegistry Client class. + # + # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ArtifactRegistry clients + # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ArtifactRegistry", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @artifact_registry_stub.universe_domain + end + + ## + # Create a new ArtifactRegistry REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ArtifactRegistry client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @artifact_registry_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @artifact_registry_stub.endpoint + config.universe_domain = @artifact_registry_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @artifact_registry_stub.logger + end + + # Service calls + + ## + # Lists docker images. + # + # @overload list_docker_images(request, options = nil) + # Pass arguments to `list_docker_images` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_docker_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose docker images will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param order_by [::String] + # The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new + # + # # Call the list_docker_images method. + # result = client.list_docker_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. + # p item + # end + # + def list_docker_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_docker_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_docker_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_docker_images request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, "docker_images", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a docker image. + # + # @overload get_docker_image(request, options = nil) + # Pass arguments to `get_docker_image` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_docker_image(name: nil) + # Pass arguments to `get_docker_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the docker images. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new + # + # # Call the get_docker_image method. + # result = client.get_docker_image request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. + # p result + # + def get_docker_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_docker_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_docker_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_docker_image request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists maven artifacts. + # + # @overload list_maven_artifacts(request, options = nil) + # Pass arguments to `list_maven_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose maven artifacts will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new + # + # # Call the list_maven_artifacts method. + # result = client.list_maven_artifacts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + # p item + # end + # + def list_maven_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_maven_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_maven_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_maven_artifacts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, "maven_artifacts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a maven artifact. + # + # @overload get_maven_artifact(request, options = nil) + # Pass arguments to `get_maven_artifact` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_maven_artifact(name: nil) + # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the maven artifact. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new + # + # # Call the get_maven_artifact method. + # result = client.get_maven_artifact request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + # p result + # + def get_maven_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_maven_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_maven_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_maven_artifact request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists npm packages. + # + # @overload list_npm_packages(request, options = nil) + # Pass arguments to `list_npm_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_npm_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose npm packages will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new + # + # # Call the list_npm_packages method. + # result = client.list_npm_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. + # p item + # end + # + def list_npm_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_npm_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_npm_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_npm_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, "npm_packages", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a npm package. + # + # @overload get_npm_package(request, options = nil) + # Pass arguments to `get_npm_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_npm_package(name: nil) + # Pass arguments to `get_npm_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the npm package. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new + # + # # Call the get_npm_package method. + # result = client.get_npm_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. + # p result + # + def get_npm_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_npm_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_npm_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_npm_package request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists python packages. + # + # @overload list_python_packages(request, options = nil) + # Pass arguments to `list_python_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_python_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose python packages will be + # listed. + # @param page_size [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new + # + # # Call the list_python_packages method. + # result = client.list_python_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. + # p item + # end + # + def list_python_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_python_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_python_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_python_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, "python_packages", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a python package. + # + # @overload get_python_package(request, options = nil) + # Pass arguments to `get_python_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_python_package(name: nil) + # Pass arguments to `get_python_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the python package. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new + # + # # Call the get_python_package method. + # result = client.get_python_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. + # p result + # + def get_python_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_python_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_python_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_python_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_python_package request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_apt_artifacts(request, options = nil) + # Pass arguments to `import_apt_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_apt_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new + # + # # Call the import_apt_artifacts method. + # result = client.import_apt_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_apt_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_apt_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.import_apt_artifacts request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_yum_artifacts(request, options = nil) + # Pass arguments to `import_yum_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_yum_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new + # + # # Call the import_yum_artifacts method. + # result = client.import_yum_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_yum_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_yum_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.import_yum_artifacts request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists repositories. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose repositories will be + # listed. + # @param page_size [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # + # Examples of using a filter: + # + # To filter the results of your request to repositories with the name + # `my-repo` in project `my-project` in the `us-central` region, append the + # following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + # @param order_by [::String] + # Optional. The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new + # + # # Call the list_repositories method. + # result = client.list_repositories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Repository. + # p item + # end + # + def list_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_repositories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_repositories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_repositories, "repositories", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + # p result + # + def get_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_repository request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_repository(parent: nil, repository_id: nil, repository: nil) + # Pass arguments to `create_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the repository will be + # created. + # @param repository_id [::String] + # Required. The repository id to use for this repository. + # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] + # Required. The repository to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new + # + # # Call the create_repository method. + # result = client.create_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_repository(repository: nil, update_mask: nil) + # Pass arguments to `update_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] + # The repository that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + # p result + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_repository request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_repository(name: nil) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new + # + # # Call the delete_repository method. + # result = client.delete_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists packages. + # + # @overload list_packages(request, options = nil) + # Pass arguments to `list_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose packages will be listed. + # @param page_size [::Integer] + # The maximum number of packages to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to packages with the name + # `my-package` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + # + # To filter the results of your request to packages with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request": + # + # * `"annotations.external_link:external_link_value"` + # + # To filter the results just for a specific annotation key `external_link`, + # append the following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to packages with the annotation key-value pair + # [`external.link`:`https://example.com/my-package`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-package`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @param order_by [::String] + # Optional. The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new + # + # # Call the list_packages method. + # result = client.list_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. + # p item + # end + # + def list_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a package. + # + # @overload get_package(request, options = nil) + # Pass arguments to `get_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_package(name: nil) + # Pass arguments to `get_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the package to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new + # + # # Call the get_package method. + # result = client.get_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + # p result + # + def get_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_package request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # + # @overload delete_package(request, options = nil) + # Pass arguments to `delete_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_package(name: nil) + # Pass arguments to `delete_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the package to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new + # + # # Call the delete_package method. + # result = client.delete_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_package request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists versions. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil) + # Pass arguments to `list_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose versions will be listed. + # @param page_size [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # @param order_by [::String] + # Optional. The field to order the results by. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to versions with the name + # `my-version` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + # + # To filter the results of your request to versions with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to versions with the annotation key-value pair + # [`external.link`:`https://example.com/my-version`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-version`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_versions, "versions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a version + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the version to retrieve. + # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_version(name: nil, force: nil) + # Pass arguments to `delete_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the version to delete. + # @param force [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes multiple versions across a repository. The returned operation will + # complete once the versions have been deleted. + # + # @overload batch_delete_versions(request, options = nil) + # Pass arguments to `batch_delete_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_delete_versions(parent: nil, names: nil, validate_only: nil) + # Pass arguments to `batch_delete_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the repository holding all requested versions. + # @param names [::Array<::String>] + # Required. The names of the versions to delete. + # The maximum number of versions deleted per batch is determined by the + # service and is dependent on the available resources in the region. + # @param validate_only [::Boolean] + # If true, the request is performed without deleting data, following AIP-163. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new + # + # # Call the batch_delete_versions method. + # result = client.batch_delete_versions request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_delete_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_delete_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_delete_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_delete_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.batch_delete_versions request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a version. + # + # @overload update_version(request, options = nil) + # Pass arguments to `update_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_version(version: nil, update_mask: nil) + # Pass arguments to `update_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash] + # Required. The Version that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new + # + # # Call the update_version method. + # result = client.update_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + # p result + # + def update_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists files. + # + # @overload list_files(request, options = nil) + # Pass arguments to `list_files` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the repository whose files will be listed. For + # example: "projects/p1/locations/us-central1/repositories/repo1 + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to files with the name `my_file.txt` + # in project `my-project` in the `us-central` region, in repository + # `my-repo`, append the following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + # + # To filter the results of your request to files owned by the version `1.0` + # in package `pkg1`, append the following filter expression to your request: + # + # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # + # To filter the results of your request to files with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to files with the annotation key-value pair + # [`external.link`:`https://example.com/my-file`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-file`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @param page_size [::Integer] + # The maximum number of files to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param order_by [::String] + # The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new + # + # # Call the list_files method. + # result = client.list_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. + # p item + # end + # + def list_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_files.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_files request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a file. + # + # @overload get_file(request, options = nil) + # Pass arguments to `get_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_file(name: nil) + # Pass arguments to `get_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the file to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new + # + # # Call the get_file method. + # result = client.get_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + # p result + # + def get_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_file request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a file and all of its content. It is only allowed on generic + # repositories. The returned operation will complete once the file has been + # deleted. + # + # @overload delete_file(request, options = nil) + # Pass arguments to `delete_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_file(name: nil) + # Pass arguments to `delete_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the file to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new + # + # # Call the delete_file method. + # result = client.delete_file request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_file request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a file. + # + # @overload update_file(request, options = nil) + # Pass arguments to `update_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_file(file: nil, update_mask: nil) + # Pass arguments to `update_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash] + # Required. The File that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new + # + # # Call the update_file method. + # result = client.update_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + # p result + # + def update_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_file request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tags. + # + # @overload list_tags(request, options = nil) + # Pass arguments to `list_tags` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tags` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent package whose tags will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `version` + # + # Examples of using a filter: + # + # To filter the results of your request to tags with the name `my-tag` in + # package `my-package` in repository `my-repo` in project "`y-project` in + # the us-central region, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + # + # To filter the results of your request to tags applied to the version + # `1.0` in package `my-package`, append the following filter expression to + # your request: + # + # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # @param page_size [::Integer] + # The maximum number of tags to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new + # + # # Call the list_tags method. + # result = client.list_tags request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. + # p item + # end + # + def list_tags request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tags.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tags.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tags.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_tags request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a tag. + # + # @overload get_tag(request, options = nil) + # Pass arguments to `get_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_tag(name: nil) + # Pass arguments to `get_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new + # + # # Call the get_tag method. + # result = client.get_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def get_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_tag request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a tag. + # + # @overload create_tag(request, options = nil) + # Pass arguments to `create_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_tag(parent: nil, tag_id: nil, tag: nil) + # Pass arguments to `create_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource where the tag will be created. + # @param tag_id [::String] + # The tag id to use for this repository. + # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] + # The tag to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new + # + # # Call the create_tag method. + # result = client.create_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def create_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_tag request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a tag. + # + # @overload update_tag(request, options = nil) + # Pass arguments to `update_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_tag(tag: nil, update_mask: nil) + # Pass arguments to `update_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] + # The tag that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new + # + # # Call the update_tag method. + # result = client.update_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + # p result + # + def update_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_tag request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a tag. + # + # @overload delete_tag(request, options = nil) + # Pass arguments to `delete_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_tag(name: nil) + # Pass arguments to `delete_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new + # + # # Call the delete_tag method. + # result = client.delete_tag request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_tag request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_rule(parent: nil, rule_id: nil, rule: nil) + # Pass arguments to `create_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the rule will be created. + # @param rule_id [::String] + # The rule id to use for this repository. + # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] + # The rule to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_rules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent repository whose rules will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1`. + # @param page_size [::Integer] + # The maximum number of rules to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_rules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_rules, "rules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_rule(name: nil) + # Pass arguments to `get_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] + # The rule that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_rule(name: nil) + # Pass arguments to `delete_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the IAM policy for a given resource. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for a given resource. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Tests if the caller has a list of permissions on a resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the Settings for the Project. + # + # @overload get_project_settings(request, options = nil) + # Pass arguments to `get_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_project_settings(name: nil) + # Pass arguments to `get_project_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the projectSettings resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new + # + # # Call the get_project_settings method. + # result = client.get_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + # p result + # + def get_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_project_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_project_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Settings for the Project. + # + # @overload update_project_settings(request, options = nil) + # Pass arguments to `update_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_project_settings(project_settings: nil, update_mask: nil) + # Pass arguments to `update_project_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash] + # The project settings. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new + # + # # Call the update_project_settings method. + # result = client.update_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + # p result + # + def update_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_project_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_project_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the VPCSC Config for the Project. + # + # @overload get_vpcsc_config(request, options = nil) + # Pass arguments to `get_vpcsc_config` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_vpcsc_config(name: nil) + # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the VPCSCConfig resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new + # + # # Call the get_vpcsc_config method. + # result = client.get_vpcsc_config request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + # p result + # + def get_vpcsc_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_vpcsc_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_vpcsc_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_vpcsc_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the VPCSC Config for the Project. + # + # @overload update_vpcsc_config(request, options = nil) + # Pass arguments to `update_vpcsc_config` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil) + # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash] + # The project config. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new + # + # # Call the update_vpcsc_config method. + # result = client.update_vpcsc_config request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + # p result + # + def update_vpcsc_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_vpcsc_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_vpcsc_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_vpcsc_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a package. + # + # @overload update_package(request, options = nil) + # Pass arguments to `update_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_package(package: nil, update_mask: nil) + # Pass arguments to `update_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash] + # The package that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new + # + # # Call the update_package method. + # result = client.update_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + # p result + # + def update_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_package request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists attachments. + # + # @overload list_attachments(request, options = nil) + # Pass arguments to `list_attachments` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attachments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose attachments will be listed. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `target` + # * `type` + # * `attachment_namespace` + # @param page_size [::Integer] + # The maximum number of attachments to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new + # + # # Call the list_attachments method. + # result = client.list_attachments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. + # p item + # end + # + def list_attachments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_attachments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_attachments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_attachments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_attachments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_attachments, "attachments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an attachment. + # + # @overload get_attachment(request, options = nil) + # Pass arguments to `get_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_attachment(name: nil) + # Pass arguments to `get_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the attachment to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new + # + # # Call the get_attachment method. + # result = client.get_attachment request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. + # p result + # + def get_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_attachment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an attachment. The returned Operation will finish once the + # attachment has been created. Its response will be the created attachment. + # + # @overload create_attachment(request, options = nil) + # Pass arguments to `create_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil) + # Pass arguments to `create_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the attachment will be + # created. + # @param attachment_id [::String] + # Required. The attachment id to use for this attachment. + # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash] + # Required. The attachment to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new + # + # # Call the create_attachment method. + # result = client.create_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_attachment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an attachment. The returned Operation will + # finish once the attachments has been deleted. It will not have any + # Operation metadata and will return a `google.protobuf.Empty` response. + # + # @overload delete_attachment(request, options = nil) + # Pass arguments to `delete_attachment` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_attachment(name: nil) + # Pass arguments to `delete_attachment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the attachment to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new + # + # # Call the delete_attachment method. + # result = client.delete_attachment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_attachment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_attachment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_attachment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_attachment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_attachment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports an artifact to a Cloud Storage bucket. + # + # @overload export_artifact(request, options = nil) + # Pass arguments to `export_artifact` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_artifact(source_version: nil, source_tag: nil, gcs_path: nil, repository: nil) + # Pass arguments to `export_artifact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source_version [::String] + # The artifact version to export. + # Format: + # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} + # + # Note: The following parameters are mutually exclusive: `source_version`, `source_tag`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param source_tag [::String] + # The artifact tag to export. + # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} + # + # Note: The following parameters are mutually exclusive: `source_tag`, `source_version`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param gcs_path [::String] + # The Cloud Storage path to export the artifact to. Should start with the + # bucket name, and optionally have a directory path. Examples: + # `dst_bucket`, `dst_bucket/sub_dir`. + # Existing objects with the same path will be overwritten. + # @param repository [::String] + # Required. The repository of the artifact to export. + # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new + # + # # Call the export_artifact method. + # result = client.export_artifact request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_artifact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_artifact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_artifact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_artifact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.export_artifact request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ArtifactRegistry REST API. + # + # This class represents the configuration for ArtifactRegistry REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_docker_images to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_docker_images.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_docker_images.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ArtifactRegistry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_docker_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_docker_images + ## + # RPC-specific configuration for `get_docker_image` + # @return [::Gapic::Config::Method] + # + attr_reader :get_docker_image + ## + # RPC-specific configuration for `list_maven_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_maven_artifacts + ## + # RPC-specific configuration for `get_maven_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :get_maven_artifact + ## + # RPC-specific configuration for `list_npm_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_npm_packages + ## + # RPC-specific configuration for `get_npm_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_npm_package + ## + # RPC-specific configuration for `list_python_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_python_packages + ## + # RPC-specific configuration for `get_python_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_python_package + ## + # RPC-specific configuration for `import_apt_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_apt_artifacts + ## + # RPC-specific configuration for `import_yum_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_yum_artifacts + ## + # RPC-specific configuration for `list_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_repositories + ## + # RPC-specific configuration for `get_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :get_repository + ## + # RPC-specific configuration for `create_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :create_repository + ## + # RPC-specific configuration for `update_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :update_repository + ## + # RPC-specific configuration for `delete_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_repository + ## + # RPC-specific configuration for `list_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_packages + ## + # RPC-specific configuration for `get_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_package + ## + # RPC-specific configuration for `delete_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_package + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `batch_delete_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_versions + ## + # RPC-specific configuration for `update_version` + # @return [::Gapic::Config::Method] + # + attr_reader :update_version + ## + # RPC-specific configuration for `list_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_files + ## + # RPC-specific configuration for `get_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file + ## + # RPC-specific configuration for `delete_file` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_file + ## + # RPC-specific configuration for `update_file` + # @return [::Gapic::Config::Method] + # + attr_reader :update_file + ## + # RPC-specific configuration for `list_tags` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tags + ## + # RPC-specific configuration for `get_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tag + ## + # RPC-specific configuration for `create_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tag + ## + # RPC-specific configuration for `update_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tag + ## + # RPC-specific configuration for `delete_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tag + ## + # RPC-specific configuration for `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `get_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_settings + ## + # RPC-specific configuration for `update_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_settings + ## + # RPC-specific configuration for `get_vpcsc_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vpcsc_config + ## + # RPC-specific configuration for `update_vpcsc_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vpcsc_config + ## + # RPC-specific configuration for `update_package` + # @return [::Gapic::Config::Method] + # + attr_reader :update_package + ## + # RPC-specific configuration for `list_attachments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attachments + ## + # RPC-specific configuration for `get_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attachment + ## + # RPC-specific configuration for `create_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attachment + ## + # RPC-specific configuration for `delete_attachment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attachment + ## + # RPC-specific configuration for `export_artifact` + # @return [::Gapic::Config::Method] + # + attr_reader :export_artifact + + # @private + def initialize parent_rpcs = nil + list_docker_images_config = parent_rpcs.list_docker_images if parent_rpcs.respond_to? :list_docker_images + @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config + get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image + @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config + list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts + @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config + get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact + @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config + list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages + @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config + get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package + @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config + list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages + @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config + get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package + @get_python_package = ::Gapic::Config::Method.new get_python_package_config + import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts + @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config + import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts + @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config + list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories + @list_repositories = ::Gapic::Config::Method.new list_repositories_config + get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository + @get_repository = ::Gapic::Config::Method.new get_repository_config + create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository + @create_repository = ::Gapic::Config::Method.new create_repository_config + update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository + @update_repository = ::Gapic::Config::Method.new update_repository_config + delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository + @delete_repository = ::Gapic::Config::Method.new delete_repository_config + list_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages + @list_packages = ::Gapic::Config::Method.new list_packages_config + get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package + @get_package = ::Gapic::Config::Method.new get_package_config + delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package + @delete_package = ::Gapic::Config::Method.new delete_package_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions + @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config + update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version + @update_version = ::Gapic::Config::Method.new update_version_config + list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files + @list_files = ::Gapic::Config::Method.new list_files_config + get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file + @get_file = ::Gapic::Config::Method.new get_file_config + delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file + @delete_file = ::Gapic::Config::Method.new delete_file_config + update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file + @update_file = ::Gapic::Config::Method.new update_file_config + list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags + @list_tags = ::Gapic::Config::Method.new list_tags_config + get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag + @get_tag = ::Gapic::Config::Method.new get_tag_config + create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag + @create_tag = ::Gapic::Config::Method.new create_tag_config + update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag + @update_tag = ::Gapic::Config::Method.new update_tag_config + delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag + @delete_tag = ::Gapic::Config::Method.new delete_tag_config + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings + @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config + update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings + @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config + get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config + @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config + update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config + @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config + update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package + @update_package = ::Gapic::Config::Method.new update_package_config + list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments + @list_attachments = ::Gapic::Config::Method.new list_attachments_config + get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment + @get_attachment = ::Gapic::Config::Method.new get_attachment_config + create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment + @create_attachment = ::Gapic::Config::Method.new create_attachment_config + delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment + @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config + export_artifact_config = parent_rpcs.export_artifact if parent_rpcs.respond_to? :export_artifact + @export_artifact = ::Gapic::Config::Method.new export_artifact_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb new file mode 100644 index 000000000000..4c61fedb3bfd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ArtifactRegistry Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb new file mode 100644 index 000000000000..715fb81776d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb @@ -0,0 +1,3149 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/devtools/artifactregistry/v1/service_pb" + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + module Rest + ## + # REST service stub for the ArtifactRegistry service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_docker_images REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse] + # A result object deserialized from the server's reply + def list_docker_images request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_docker_images_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_docker_images", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_docker_image REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] + # A result object deserialized from the server's reply + def get_docker_image request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_docker_image_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_docker_image", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_maven_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse] + # A result object deserialized from the server's reply + def list_maven_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_maven_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_maven_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_maven_artifact REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] + # A result object deserialized from the server's reply + def get_maven_artifact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_maven_artifact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_maven_artifact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_npm_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse] + # A result object deserialized from the server's reply + def list_npm_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_npm_packages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_npm_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_npm_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] + # A result object deserialized from the server's reply + def get_npm_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_npm_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_npm_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_python_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse] + # A result object deserialized from the server's reply + def list_python_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_python_packages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_python_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_python_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] + # A result object deserialized from the server's reply + def get_python_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_python_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_python_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_apt_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_apt_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_apt_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_apt_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_yum_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_yum_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_yum_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_yum_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse] + # A result object deserialized from the server's reply + def list_repositories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_repositories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # A result object deserialized from the server's reply + def get_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Repository.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # A result object deserialized from the server's reply + def update_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Repository.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse] + # A result object deserialized from the server's reply + def list_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_packages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # A result object deserialized from the server's reply + def get_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Package.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse] + # A result object deserialized from the server's reply + def list_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # A result object deserialized from the server's reply + def get_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Version.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_delete_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_delete_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_delete_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # A result object deserialized from the server's reply + def update_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Version.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_files REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse] + # A result object deserialized from the server's reply + def list_files request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_files_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_files", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # A result object deserialized from the server's reply + def get_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::File.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # A result object deserialized from the server's reply + def update_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::File.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tags REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse] + # A result object deserialized from the server's reply + def list_tags request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tags_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tags", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # A result object deserialized from the server's reply + def get_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # A result object deserialized from the server's reply + def create_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # A result object deserialized from the server's reply + def update_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # A result object deserialized from the server's reply + def create_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_rules REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse] + # A result object deserialized from the server's reply + def list_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # A result object deserialized from the server's reply + def get_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # A result object deserialized from the server's reply + def update_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # A result object deserialized from the server's reply + def get_project_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_project_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_project_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # A result object deserialized from the server's reply + def update_project_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_project_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_project_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_vpcsc_config REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # A result object deserialized from the server's reply + def get_vpcsc_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_vpcsc_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_vpcsc_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_vpcsc_config REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # A result object deserialized from the server's reply + def update_vpcsc_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_vpcsc_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_vpcsc_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # A result object deserialized from the server's reply + def update_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Package.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_attachments REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse] + # A result object deserialized from the server's reply + def list_attachments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_attachments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_attachments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # A result object deserialized from the server's reply + def get_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1::Attachment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_attachment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_attachment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_attachment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_artifact REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_artifact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_artifact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_artifact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_docker_images REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_docker_images_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dockerImages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_docker_image REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_docker_image_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/dockerImages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_maven_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_maven_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/mavenArtifacts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_maven_artifact REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_maven_artifact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/mavenArtifacts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_npm_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_npm_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/npmPackages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_npm_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_npm_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/npmPackages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_python_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_python_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/pythonPackages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_python_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_python_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pythonPackages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_apt_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_apt_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/aptArtifacts:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_yum_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_yum_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/yumArtifacts:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_repositories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/repositories", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/repositories", + body: "repository", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{repository.name}", + body: "repository", + matches: [ + ["repository.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/packages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_delete_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_delete_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/versions:batchDelete", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{version.name}", + body: "version", + matches: [ + ["version.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_files REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_files_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/files", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{file.name}", + body: "file", + matches: [ + ["file.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tags REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tags_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tags", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tags", + body: "tag", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{tag.name}", + body: "tag", + matches: [ + ["tag.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rules", + body: "rule", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rules REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rule.name}", + body: "rule", + matches: [ + ["rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_rule REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_project_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/projectSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_project_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{project_settings.name}", + body: "project_settings", + matches: [ + ["project_settings.name", %r{^projects/[^/]+/projectSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_vpcsc_config REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_vpcsc_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/vpcscConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_vpcsc_config REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_vpcsc_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{vpcsc_config.name}", + body: "vpcsc_config", + matches: [ + ["vpcsc_config.name", %r{^projects/[^/]+/locations/[^/]+/vpcscConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{package.name}", + body: "package", + matches: [ + ["package.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attachments REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_attachments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attachments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/attachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/attachments", + body: "attachment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_attachment REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_attachment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/attachments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_artifact REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_artifact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{repository}:exportArtifact", + body: "*", + matches: [ + ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb new file mode 100644 index 000000000000..5cb15289f659 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module ArtifactRegistry + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/artifact_registry/v1/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ArtifactRegistry"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb new file mode 100644 index 000000000000..d0a4958ba59d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/artifact_registry/v1/artifact_registry/rest" +require "google/cloud/artifact_registry/v1/bindings_override" +require "google/cloud/artifact_registry/v1/version" + +module Google + module Cloud + module ArtifactRegistry + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/artifact_registry/v1/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb new file mode 100644 index 000000000000..e60f17647d63 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb new file mode 100644 index 000000000000..d52d7db02386 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/apt_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1/apt_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xba\x03\n\x0b\x41ptArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x0cpackage_type\x18\x03 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.AptArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcomponent\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ontrol_file\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/AptArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}\"B\n\x1bImportAptArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x8d\x01\n\x19ImportAptArtifactsRequest\x12V\n\ngcs_source\x18\x02 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa2\x01\n\x1bImportAptArtifactsErrorInfo\x12V\n\ngcs_source\x18\x01 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xb7\x01\n\x1aImportAptArtifactsResponse\x12G\n\rapt_artifacts\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.AptArtifact\x12P\n\x06\x65rrors\x18\x02 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo\"\x1c\n\x1aImportAptArtifactsMetadataB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10\x41ptArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + AptArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.AptArtifact").msgclass + AptArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.AptArtifact.PackageType").enummodule + ImportAptArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource").msgclass + ImportAptArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsRequest").msgclass + ImportAptArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo").msgclass + ImportAptArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsResponse").msgclass + ImportAptArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb new file mode 100644 index 000000000000..37a131ac39a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/devtools/artifactregistry/v1/artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x04\n\x0b\x44ockerImage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\x18\n\x10image_size_bytes\x18\x04 \x01(\x03\x12/\n\x0bupload_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nmedia_type\x18\x06 \x01(\t\x12.\n\nbuild_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\rartifact_type\x18\t \x01(\t\x12P\n\x0fimage_manifests\x18\x0b \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.ImageManifestB\x03\xe0\x41\x01:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/DockerImage\x12]projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}\"\xb2\x01\n\rImageManifest\x12\x19\n\x0c\x61rchitecture\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x0f\n\x02os\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x64igest\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmedia_type\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nos_version\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bos_features\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07variant\x18\x07 \x01(\tB\x03\xe0\x41\x01\"g\n\x17ListDockerImagesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\"|\n\x18ListDockerImagesResponse\x12G\n\rdocker_images\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.DockerImage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15GetDockerImageRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+artifactregistry.googleapis.com/DockerImage\"\xf5\x02\n\rMavenArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07pom_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08group_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61rtifact_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x96\x01\xea\x41\x92\x01\n-artifactregistry.googleapis.com/MavenArtifact\x12\x61projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}\"\x89\x01\n\x19ListMavenArtifactsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-artifactregistry.googleapis.com/MavenArtifact\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1aListMavenArtifactsResponse\x12K\n\x0fmaven_artifacts\x18\x01 \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.MavenArtifact\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17GetMavenArtifactRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-artifactregistry.googleapis.com/MavenArtifact\"\xd0\x02\n\nNpmPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cpackage_name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x0c\n\x04tags\x18\x05 \x03(\t\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x8d\x01\xea\x41\x89\x01\n*artifactregistry.googleapis.com/NpmPackage\x12[projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}\"\x83\x01\n\x16ListNpmPackagesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/NpmPackage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListNpmPackagesResponse\x12\x45\n\x0cnpm_packages\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.NpmPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetNpmPackageRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/NpmPackage\"\xe0\x02\n\rPythonPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cpackage_name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x96\x01\xea\x41\x92\x01\n-artifactregistry.googleapis.com/PythonPackage\x12\x61projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}\"\x89\x01\n\x19ListPythonPackagesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-artifactregistry.googleapis.com/PythonPackage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1aListPythonPackagesResponse\x12K\n\x0fpython_packages\x18\x01 \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.PythonPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17GetPythonPackageRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-artifactregistry.googleapis.com/PythonPackageB\xf8\x01\n\'com.google.devtools.artifactregistry.v1B\rArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + DockerImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DockerImage").msgclass + ImageManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImageManifest").msgclass + ListDockerImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListDockerImagesRequest").msgclass + ListDockerImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListDockerImagesResponse").msgclass + GetDockerImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetDockerImageRequest").msgclass + MavenArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.MavenArtifact").msgclass + ListMavenArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListMavenArtifactsRequest").msgclass + ListMavenArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListMavenArtifactsResponse").msgclass + GetMavenArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetMavenArtifactRequest").msgclass + NpmPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.NpmPackage").msgclass + ListNpmPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListNpmPackagesRequest").msgclass + ListNpmPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListNpmPackagesResponse").msgclass + GetNpmPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetNpmPackageRequest").msgclass + PythonPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.PythonPackage").msgclass + ListPythonPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPythonPackagesRequest").msgclass + ListPythonPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPythonPackagesResponse").msgclass + GetPythonPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetPythonPackageRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb new file mode 100644 index 000000000000..704480588aca --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/attachment.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/devtools/artifactregistry/v1/attachment.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x04\n\nAttachment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x1c\n\x14\x61ttachment_namespace\x18\x04 \x01(\t\x12Z\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.Attachment.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x05\x66iles\x18\x08 \x03(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\x12\x1d\n\x10oci_version_name\x18\t \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8c\x01\xea\x41\x88\x01\n*artifactregistry.googleapis.com/Attachment\x12Zprojects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}\"\x98\x01\n\x16ListAttachmentsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Attachment\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"x\n\x17ListAttachmentsResponse\x12\x44\n\x0b\x61ttachments\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Attachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetAttachmentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Attachment\"\xc3\x01\n\x17\x43reateAttachmentRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Attachment\x12\x1a\n\rattachment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\nattachment\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.AttachmentB\x03\xe0\x41\x02\"[\n\x17\x44\x65leteAttachmentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/AttachmentB\xfa\x01\n\'com.google.devtools.artifactregistry.v1B\x0f\x41ttachmentProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Attachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Attachment").msgclass + ListAttachmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListAttachmentsRequest").msgclass + ListAttachmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListAttachmentsResponse").msgclass + GetAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetAttachmentRequest").msgclass + CreateAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateAttachmentRequest").msgclass + DeleteAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteAttachmentRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb new file mode 100644 index 000000000000..314b552fdc62 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/export.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/devtools/artifactregistry/v1/file_pb' +require 'google/devtools/artifactregistry/v1/version_pb' + + +descriptor_data = "\n0google/devtools/artifactregistry/v1/export.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a\x31google/devtools/artifactregistry/v1/version.proto\"\x9d\x02\n\x15\x45xportArtifactRequest\x12\x46\n\x0esource_version\x18\x02 \x01(\tB,\xfa\x41)\n\'artifactregistry.googleapis.com/VersionH\x00\x12>\n\nsource_tag\x18\x04 \x01(\tB(\xfa\x41%\n#artifactregistry.googleapis.com/TagH\x00\x12\x12\n\x08gcs_path\x18\x03 \x01(\tH\x01\x12\x46\n\nrepository\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\x11\n\x0fsource_artifactB\r\n\x0b\x64\x65stination\"`\n\x16\x45xportArtifactResponse\x12\x46\n\x10\x65xported_version\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.Version\"\xa9\x02\n\x16\x45xportArtifactMetadata\x12`\n\x0e\x65xported_files\x18\x01 \x03(\x0b\x32H.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile\x1a\xac\x01\n\x0c\x45xportedFile\x12\x19\n\x0fgcs_object_path\x18\x02 \x01(\tH\x00\x12\x37\n\x04name\x18\x01 \x01(\tB)\xfa\x41&\n$artifactregistry.googleapis.com/File\x12\x39\n\x06hashes\x18\x03 \x03(\x0b\x32).google.devtools.artifactregistry.v1.HashB\r\n\x0b\x64\x65stinationB\xf6\x01\n\'com.google.devtools.artifactregistry.v1B\x0b\x45xportProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + ExportArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactRequest").msgclass + ExportArtifactResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactResponse").msgclass + ExportArtifactMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactMetadata").msgclass + ExportArtifactMetadata::ExportedFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb new file mode 100644 index 000000000000..18141ebfddc3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/file.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/devtools/artifactregistry/v1/file.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x01\n\x04Hash\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.devtools.artifactregistry.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\"M\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\x12\x11\n\rDIRSUM_SHA256\x10\x03\"\x98\x04\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\x12\x39\n\x06hashes\x18\x04 \x03(\x0b\x32).google.devtools.artifactregistry.v1.Hash\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\r\n\x05owner\x18\x07 \x01(\t\x12\x33\n\nfetch_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0b\x61nnotations\x18\t \x03(\x0b\x32:.google.devtools.artifactregistry.v1.File.AnnotationsEntryB\x03\xe0\x41\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:y\xea\x41v\n$artifactregistry.googleapis.com/File\x12Nprojects/{project}/locations/{location}/repositories/{repository}/files/{file}\"\x99\x01\n\x10ListFilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/File\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"f\n\x11ListFilesResponse\x12\x38\n\x05\x66iles\x18\x01 \x03(\x0b\x32).google.devtools.artifactregistry.v1.File\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x0eGetFileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\"O\n\x11\x44\x65leteFileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\"\x87\x01\n\x11UpdateFileRequest\x12<\n\x04\x66ile\x18\x01 \x01(\x0b\x32).google.devtools.artifactregistry.v1.FileB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x42\xf4\x01\n\'com.google.devtools.artifactregistry.v1B\tFileProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Hash").msgclass + Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Hash.HashType").enummodule + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.File").msgclass + ListFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListFilesRequest").msgclass + ListFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListFilesResponse").msgclass + GetFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetFileRequest").msgclass + DeleteFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteFileRequest").msgclass + UpdateFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateFileRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb new file mode 100644 index 000000000000..4834b13eda56 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/generic.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/devtools/artifactregistry/v1/generic.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x02\n\x0fGenericArtifact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x9c\x01\xea\x41\x98\x01\n/artifactregistry.googleapis.com/GenericArtifact\x12\x65projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}B\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cGenericProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + GenericArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GenericArtifact").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb new file mode 100644 index 000000000000..a68f52f8871f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/go.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/devtools/artifactregistry/v1/go.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x02\n\x08GoModule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x87\x01\xea\x41\x83\x01\n(artifactregistry.googleapis.com/GoModule\x12Wprojects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}B\xf2\x01\n\'com.google.devtools.artifactregistry.v1B\x07GoProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + GoModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GoModule").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb new file mode 100644 index 000000000000..dfa39a394c4e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/kfp_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1/kfp_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc4\x01\n\x0bKfpArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x02 \x01(\t:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/KfpArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}B\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10KfpArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + KfpArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.KfpArtifact").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb new file mode 100644 index 000000000000..40d4e366eaf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/package.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/devtools/artifactregistry/v1/package.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x03\n\x07Package\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12W\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32=.google.devtools.artifactregistry.v1.Package.AnnotationsEntryB\x03\xe0\x41\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x82\x01\xea\x41\x7f\n\'artifactregistry.googleapis.com/Package\x12Tprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}\"\xa9\x01\n\x13ListPackagesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'artifactregistry.googleapis.com/Package\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"o\n\x14ListPackagesResponse\x12>\n\x08packages\x18\x01 \x03(\x0b\x32,.google.devtools.artifactregistry.v1.Package\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x11GetPackageRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Package\"U\n\x14\x44\x65letePackageRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Package\"\x86\x01\n\x14UpdatePackageRequest\x12=\n\x07package\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.Package\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cPackageProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Package").msgclass + ListPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPackagesRequest").msgclass + ListPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPackagesResponse").msgclass + GetPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetPackageRequest").msgclass + DeletePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeletePackageRequest").msgclass + UpdatePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdatePackageRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb new file mode 100644 index 000000000000..a2d3a43bb3f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/repository.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/devtools/artifactregistry/v1/repository.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"s\n\x0eUpstreamPolicy\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\nrepository\x18\x02 \x01(\tB/\xfa\x41,\n*artifactregistry.googleapis.com/Repository\x12\x10\n\x08priority\x18\x03 \x01(\x05\"\xa8\x03\n\x16\x43leanupPolicyCondition\x12\\\n\ttag_state\x18\x02 \x01(\x0e\x32\x44.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagStateH\x00\x88\x01\x01\x12\x14\n\x0ctag_prefixes\x18\x03 \x03(\t\x12\x1d\n\x15version_name_prefixes\x18\x04 \x03(\t\x12\x1d\n\x15package_name_prefixes\x18\x05 \x03(\t\x12\x32\n\nolder_than\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x12\x32\n\nnewer_than\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationH\x02\x88\x01\x01\"H\n\x08TagState\x12\x19\n\x15TAG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06TAGGED\x10\x01\x12\x0c\n\x08UNTAGGED\x10\x02\x12\x07\n\x03\x41NY\x10\x03\x42\x0c\n\n_tag_stateB\r\n\x0b_older_thanB\r\n\x0b_newer_than\"h\n\x1f\x43leanupPolicyMostRecentVersions\x12\x1d\n\x15package_name_prefixes\x18\x01 \x03(\t\x12\x17\n\nkeep_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\r\n\x0b_keep_count\"\xe8\x02\n\rCleanupPolicy\x12P\n\tcondition\x18\x02 \x01(\x0b\x32;.google.devtools.artifactregistry.v1.CleanupPolicyConditionH\x00\x12\x64\n\x14most_recent_versions\x18\x04 \x01(\x0b\x32\x44.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12I\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x39.google.devtools.artifactregistry.v1.CleanupPolicy.Action\"6\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04KEEP\x10\x02\x42\x10\n\x0e\x63ondition_type\"i\n\x17VirtualRepositoryConfig\x12N\n\x11upstream_policies\x18\x01 \x03(\x0b\x32\x33.google.devtools.artifactregistry.v1.UpstreamPolicy\"\xcd\x1f\n\x16RemoteRepositoryConfig\x12i\n\x11\x64ocker_repository\x18\x02 \x01(\x0b\x32L.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryH\x00\x12g\n\x10maven_repository\x18\x03 \x01(\x0b\x32K.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryH\x00\x12\x63\n\x0enpm_repository\x18\x04 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryH\x00\x12i\n\x11python_repository\x18\x05 \x01(\x0b\x32L.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryH\x00\x12\x63\n\x0e\x61pt_repository\x18\x06 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryH\x00\x12\x63\n\x0eyum_repository\x18\x07 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryH\x00\x12o\n\x11\x63ommon_repository\x18\x0e \x01(\x0b\x32R.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepositoryH\x00\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12r\n\x14upstream_credentials\x18\t \x01(\x0b\x32O.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentialsB\x03\xe0\x41\x01\x12(\n\x1b\x64isable_upstream_validation\x18\x0c \x01(\x08\x42\x03\xe0\x41\x04\x1a\xbf\x02\n\x13UpstreamCredentials\x12\x94\x01\n\x1dusername_password_credentials\x18\x01 \x01(\x0b\x32k.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentialsH\x00\x1a\x81\x01\n\x1bUsernamePasswordCredentials\x12\x10\n\x08username\x18\x01 \x01(\t\x12P\n\x17password_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionB\r\n\x0b\x63redentials\x1a\xfe\x02\n\x10\x44ockerRepository\x12z\n\x11public_repository\x18\x01 \x01(\x0e\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepositoryH\x00\x12z\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"E\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x0e\n\nDOCKER_HUB\x10\x01\x42\n\n\x08upstream\x1a\xfe\x02\n\x0fMavenRepository\x12y\n\x11public_repository\x18\x01 \x01(\x0e\x32\\.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepositoryH\x00\x12y\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32\\.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"H\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x11\n\rMAVEN_CENTRAL\x10\x01\x42\n\n\x08upstream\x1a\xf0\x02\n\rNpmRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0e\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"@\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\t\n\x05NPMJS\x10\x01\x42\n\n\x08upstream\x1a\xf8\x02\n\x10PythonRepository\x12z\n\x11public_repository\x18\x01 \x01(\x0e\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepositoryH\x00\x12z\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"?\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x08\n\x04PYPI\x10\x01\x42\n\n\x08upstream\x1a\xc1\x04\n\rAptRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepositoryH\x00\x1a\x90\x02\n\x10PublicRepository\x12\x82\x01\n\x0frepository_base\x18\x01 \x01(\x0e\x32i.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase\x12\x17\n\x0frepository_path\x18\x02 \x01(\t\"^\n\x0eRepositoryBase\x12\x1f\n\x1bREPOSITORY_BASE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45\x42IAN\x10\x01\x12\n\n\x06UBUNTU\x10\x02\x12\x13\n\x0f\x44\x45\x42IAN_SNAPSHOT\x10\x03\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\tB\n\n\x08upstream\x1a\xed\x04\n\rYumRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepositoryH\x00\x1a\xbc\x02\n\x10PublicRepository\x12\x82\x01\n\x0frepository_base\x18\x01 \x01(\x0e\x32i.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase\x12\x17\n\x0frepository_path\x18\x02 \x01(\t\"\x89\x01\n\x0eRepositoryBase\x12\x1f\n\x1bREPOSITORY_BASE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x45NTOS\x10\x01\x12\x10\n\x0c\x43\x45NTOS_DEBUG\x10\x02\x12\x10\n\x0c\x43\x45NTOS_VAULT\x10\x03\x12\x11\n\rCENTOS_STREAM\x10\x04\x12\t\n\x05ROCKY\x10\x05\x12\x08\n\x04\x45PEL\x10\x06\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\tB\n\n\x08upstream\x1a*\n\x16\x43ommonRemoteRepository\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0f\n\rremote_source\"\xbf\x14\n\nRepository\x12]\n\x0cmaven_config\x18\t \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigH\x00\x12_\n\rdocker_config\x18\x11 \x01(\x0b\x32\x46.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigH\x00\x12\x61\n\x19virtual_repository_config\x18\x0e \x01(\x0b\x32<.google.devtools.artifactregistry.v1.VirtualRepositoryConfigH\x01\x12_\n\x18remote_repository_config\x18\x0f \x01(\x0b\x32;.google.devtools.artifactregistry.v1.RemoteRepositoryConfigH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x36.google.devtools.artifactregistry.v1.Repository.FormatB\x03\xe0\x41\x01\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12K\n\x06labels\x18\x04 \x03(\x0b\x32;.google.devtools.artifactregistry.v1.Repository.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x12G\n\x04mode\x18\n \x01(\x0e\x32\x34.google.devtools.artifactregistry.v1.Repository.ModeB\x03\xe0\x41\x01\x12\x63\n\x10\x63leanup_policies\x18\x0c \x03(\x0b\x32\x44.google.devtools.artifactregistry.v1.Repository.CleanupPoliciesEntryB\x03\xe0\x41\x01\x12\x17\n\nsize_bytes\x18\r \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12#\n\x16\x63leanup_policy_dry_run\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\x1dvulnerability_scanning_config\x18\x13 \x01(\x0b\x32K.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfigB\x03\xe0\x41\x01\x12&\n\x19\x64isallow_unspecified_mode\x18\x15 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzi\x18\x16 \x01(\x08\x42\x03\xe0\x41\x03\x12\x19\n\x0cregistry_uri\x18\x1a \x01(\tB\x03\xe0\x41\x03\x1a\xf3\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12k\n\x0eversion_policy\x18\x02 \x01(\x0e\x32S.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a\x30\n\x16\x44ockerRepositoryConfig\x12\x16\n\x0eimmutable_tags\x18\x01 \x01(\x08\x1a\xc7\x04\n\x1bVulnerabilityScanningConfig\x12|\n\x11\x65nablement_config\x18\x01 \x01(\x0e\x32\\.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfigB\x03\xe0\x41\x01\x12\x39\n\x10last_enable_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12z\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32[.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementStateB\x03\xe0\x41\x03\x12$\n\x17\x65nablement_state_reason\x18\x04 \x01(\tB\x03\xe0\x41\x03\"R\n\x10\x45nablementConfig\x12!\n\x1d\x45NABLEMENT_CONFIG_UNSPECIFIED\x10\x00\x12\r\n\tINHERITED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"y\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14SCANNING_UNSUPPORTED\x10\x01\x12\x15\n\x11SCANNING_DISABLED\x10\x02\x12\x13\n\x0fSCANNING_ACTIVE\x10\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aj\n\x14\x43leanupPoliciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.devtools.artifactregistry.v1.CleanupPolicy:\x02\x38\x01\"\x86\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08\x12\x07\n\x03KFP\x10\t\x12\x06\n\x02GO\x10\n\x12\x0b\n\x07GENERIC\x10\x0b\x12\x08\n\x04RUBY\x10\x0c\"d\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_REPOSITORY\x10\x01\x12\x16\n\x12VIRTUAL_REPOSITORY\x10\x02\x12\x15\n\x11REMOTE_REPOSITORY\x10\x03:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_configB\r\n\x0bmode_config\"\xb0\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x18ListRepositoriesResponse\x12\x45\n\x0crepositories\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xc3\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x1a\n\rrepository_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\nrepository\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.RepositoryB\x03\xe0\x41\x02\"\x8f\x01\n\x17UpdateRepositoryRequest\x12\x43\n\nrepository\x18\x01 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\xe7\x03\n\'com.google.devtools.artifactregistry.v1B\x0fRepositoryProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + UpstreamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpstreamPolicy").msgclass + CleanupPolicyCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyCondition").msgclass + CleanupPolicyCondition::TagState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState").enummodule + CleanupPolicyMostRecentVersions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions").msgclass + CleanupPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicy").msgclass + CleanupPolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicy.Action").enummodule + VirtualRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VirtualRepositoryConfig").msgclass + RemoteRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig").msgclass + RemoteRepositoryConfig::UpstreamCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials").msgclass + RemoteRepositoryConfig::UpstreamCredentials::UsernamePasswordCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials").msgclass + RemoteRepositoryConfig::DockerRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository").msgclass + RemoteRepositoryConfig::DockerRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository").msgclass + RemoteRepositoryConfig::DockerRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository").enummodule + RemoteRepositoryConfig::MavenRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository").msgclass + RemoteRepositoryConfig::MavenRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository").msgclass + RemoteRepositoryConfig::MavenRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository").enummodule + RemoteRepositoryConfig::NpmRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository").msgclass + RemoteRepositoryConfig::NpmRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository").msgclass + RemoteRepositoryConfig::NpmRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository").enummodule + RemoteRepositoryConfig::PythonRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository").msgclass + RemoteRepositoryConfig::PythonRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository").msgclass + RemoteRepositoryConfig::PythonRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository").enummodule + RemoteRepositoryConfig::AptRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository").msgclass + RemoteRepositoryConfig::AptRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository").msgclass + RemoteRepositoryConfig::AptRepository::PublicRepository::RepositoryBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase").enummodule + RemoteRepositoryConfig::AptRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository").msgclass + RemoteRepositoryConfig::YumRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository").msgclass + RemoteRepositoryConfig::YumRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository").msgclass + RemoteRepositoryConfig::YumRepository::PublicRepository::RepositoryBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase").enummodule + RemoteRepositoryConfig::YumRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository").msgclass + RemoteRepositoryConfig::CommonRemoteRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository").msgclass + Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository").msgclass + Repository::MavenRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig").msgclass + Repository::MavenRepositoryConfig::VersionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy").enummodule + Repository::DockerRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig").msgclass + Repository::VulnerabilityScanningConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig").msgclass + Repository::VulnerabilityScanningConfig::EnablementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig").enummodule + Repository::VulnerabilityScanningConfig::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState").enummodule + Repository::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.Format").enummodule + Repository::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.Mode").enummodule + ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRepositoriesRequest").msgclass + ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRepositoriesResponse").msgclass + GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetRepositoryRequest").msgclass + CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateRepositoryRequest").msgclass + UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateRepositoryRequest").msgclass + DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteRepositoryRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb new file mode 100644 index 000000000000..4bac0fc5a283 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/rule.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n.google/devtools/artifactregistry/v1/rule.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\"\xc5\x03\n\x04Rule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.Rule.Action\x12\x46\n\toperation\x18\x03 \x01(\x0e\x32\x33.google.devtools.artifactregistry.v1.Rule.Operation\x12)\n\tcondition\x18\x04 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x12\n\npackage_id\x18\x05 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\"4\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44OWNLOAD\x10\x01:y\xea\x41v\n$artifactregistry.googleapis.com/Rule\x12Nprojects/{project}/locations/{location}/repositories/{repository}/rules/{rule}\"w\n\x10ListRulesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"f\n\x11ListRulesResponse\x12\x38\n\x05rules\x18\x01 \x03(\x0b\x32).google.devtools.artifactregistry.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x0eGetRuleRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/Rule\"\x9b\x01\n\x11\x43reateRuleRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/Rule\x12\x0f\n\x07rule_id\x18\x02 \x01(\t\x12\x37\n\x04rule\x18\x03 \x01(\x0b\x32).google.devtools.artifactregistry.v1.Rule\"}\n\x11UpdateRuleRequest\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.devtools.artifactregistry.v1.Rule\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"O\n\x11\x44\x65leteRuleRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/RuleB\xf4\x01\n\'com.google.devtools.artifactregistry.v1B\tRuleProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule").msgclass + Rule::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule.Action").enummodule + Rule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule.Operation").enummodule + ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRulesRequest").msgclass + ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRulesResponse").msgclass + GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetRuleRequest").msgclass + CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateRuleRequest").msgclass + UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateRuleRequest").msgclass + DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteRuleRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb new file mode 100644 index 000000000000..ac3659b2f1e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/devtools/artifactregistry/v1/apt_artifact_pb' +require 'google/devtools/artifactregistry/v1/artifact_pb' +require 'google/devtools/artifactregistry/v1/attachment_pb' +require 'google/devtools/artifactregistry/v1/export_pb' +require 'google/devtools/artifactregistry/v1/file_pb' +require 'google/devtools/artifactregistry/v1/package_pb' +require 'google/devtools/artifactregistry/v1/repository_pb' +require 'google/devtools/artifactregistry/v1/rule_pb' +require 'google/devtools/artifactregistry/v1/settings_pb' +require 'google/devtools/artifactregistry/v1/tag_pb' +require 'google/devtools/artifactregistry/v1/version_pb' +require 'google/devtools/artifactregistry/v1/vpcsc_config_pb' +require 'google/devtools/artifactregistry/v1/yum_artifact_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n1google/devtools/artifactregistry/v1/service.proto\x12#google.devtools.artifactregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x36google/devtools/artifactregistry/v1/apt_artifact.proto\x1a\x32google/devtools/artifactregistry/v1/artifact.proto\x1a\x34google/devtools/artifactregistry/v1/attachment.proto\x1a\x30google/devtools/artifactregistry/v1/export.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a\x31google/devtools/artifactregistry/v1/package.proto\x1a\x34google/devtools/artifactregistry/v1/repository.proto\x1a.google/devtools/artifactregistry/v1/rule.proto\x1a\x32google/devtools/artifactregistry/v1/settings.proto\x1a-google/devtools/artifactregistry/v1/tag.proto\x1a\x31google/devtools/artifactregistry/v1/version.proto\x1a\x36google/devtools/artifactregistry/v1/vpcsc_config.proto\x1a\x36google/devtools/artifactregistry/v1/yum_artifact.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x13\n\x11OperationMetadata2\xa6Z\n\x10\x41rtifactRegistry\x12\xe1\x01\n\x10ListDockerImages\x12<.google.devtools.artifactregistry.v1.ListDockerImagesRequest\x1a=.google.devtools.artifactregistry.v1.ListDockerImagesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages\x12\xce\x01\n\x0eGetDockerImage\x12:.google.devtools.artifactregistry.v1.GetDockerImageRequest\x1a\x30.google.devtools.artifactregistry.v1.DockerImage\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}\x12\xe9\x01\n\x12ListMavenArtifacts\x12>.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest\x1a?.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts\x12\xd6\x01\n\x10GetMavenArtifact\x12<.google.devtools.artifactregistry.v1.GetMavenArtifactRequest\x1a\x32.google.devtools.artifactregistry.v1.MavenArtifact\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}\x12\xdd\x01\n\x0fListNpmPackages\x12;.google.devtools.artifactregistry.v1.ListNpmPackagesRequest\x1a<.google.devtools.artifactregistry.v1.ListNpmPackagesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages\x12\xca\x01\n\rGetNpmPackage\x12\x39.google.devtools.artifactregistry.v1.GetNpmPackageRequest\x1a/.google.devtools.artifactregistry.v1.NpmPackage\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}\x12\xe9\x01\n\x12ListPythonPackages\x12>.google.devtools.artifactregistry.v1.ListPythonPackagesRequest\x1a?.google.devtools.artifactregistry.v1.ListPythonPackagesResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages\x12\xd6\x01\n\x10GetPythonPackage\x12<.google.devtools.artifactregistry.v1.GetPythonPackageRequest\x1a\x32.google.devtools.artifactregistry.v1.PythonPackage\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}\x12\xcb\x02\n\x12ImportAptArtifacts\x12>.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x80\x01\n>google.devtools.artifactregistry.v1.ImportAptArtifactsResponse\x12>google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import:\x01*\x12\xcb\x02\n\x12ImportYumArtifacts\x12>.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x80\x01\n>google.devtools.artifactregistry.v1.ImportYumArtifactsResponse\x12>google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import:\x01*\x12\xd2\x01\n\x10ListRepositories\x12<.google.devtools.artifactregistry.v1.ListRepositoriesRequest\x1a=.google.devtools.artifactregistry.v1.ListRepositoriesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/repositories\x12\xbc\x01\n\rGetRepository\x12\x39.google.devtools.artifactregistry.v1.GetRepositoryRequest\x1a/.google.devtools.artifactregistry.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xc2\x02\n\x10\x43reateRepository\x12<.google.devtools.artifactregistry.v1.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xd0\x01\xca\x41g\n.google.devtools.artifactregistry.v1.Repository\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xeb\x01\n\x10UpdateRepository\x12<.google.devtools.artifactregistry.v1.UpdateRepositoryRequest\x1a/.google.devtools.artifactregistry.v1.Repository\"h\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x82\x02\n\x10\x44\x65leteRepository\x12<.google.devtools.artifactregistry.v1.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xd1\x01\n\x0cListPackages\x12\x38.google.devtools.artifactregistry.v1.ListPackagesRequest\x1a\x39.google.devtools.artifactregistry.v1.ListPackagesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/repositories/*}/packages\x12\xbe\x01\n\nGetPackage\x12\x36.google.devtools.artifactregistry.v1.GetPackageRequest\x1a,.google.devtools.artifactregistry.v1.Package\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/repositories/*/packages/*}\x12\x87\x02\n\rDeletePackage\x12\x39.google.devtools.artifactregistry.v1.DeletePackageRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/repositories/*/packages/*}\x12\xdc\x01\n\x0cListVersions\x12\x38.google.devtools.artifactregistry.v1.ListVersionsRequest\x1a\x39.google.devtools.artifactregistry.v1.ListVersionsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions\x12\xc9\x01\n\nGetVersion\x12\x36.google.devtools.artifactregistry.v1.GetVersionRequest\x1a,.google.devtools.artifactregistry.v1.Version\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\x92\x02\n\rDeleteVersion\x12\x39.google.devtools.artifactregistry.v1.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xbf\x02\n\x13\x42\x61tchDeleteVersions\x12?.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41X\n\x15google.protobuf.Empty\x12?google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02W\"R/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete:\x01*\x12\xef\x01\n\rUpdateVersion\x12\x39.google.devtools.artifactregistry.v1.UpdateVersionRequest\x1a,.google.devtools.artifactregistry.v1.Version\"u\xda\x41\x13version,update_mask\x82\xd3\xe4\x93\x02Y2N/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}:\x07version\x12\xc5\x01\n\tListFiles\x12\x35.google.devtools.artifactregistry.v1.ListFilesRequest\x1a\x36.google.devtools.artifactregistry.v1.ListFilesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/files\x12\xb3\x01\n\x07GetFile\x12\x33.google.devtools.artifactregistry.v1.GetFileRequest\x1a).google.devtools.artifactregistry.v1.File\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*/files/**}\x12\xfe\x01\n\nDeleteFile\x12\x36.google.devtools.artifactregistry.v1.DeleteFileRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/files/*}\x12\xcf\x01\n\nUpdateFile\x12\x36.google.devtools.artifactregistry.v1.UpdateFileRequest\x1a).google.devtools.artifactregistry.v1.File\"^\xda\x41\x10\x66ile,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{file.name=projects/*/locations/*/repositories/*/files/*}:\x04\x66ile\x12\xcc\x01\n\x08ListTags\x12\x34.google.devtools.artifactregistry.v1.ListTagsRequest\x1a\x35.google.devtools.artifactregistry.v1.ListTagsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags\x12\xb9\x01\n\x06GetTag\x12\x32.google.devtools.artifactregistry.v1.GetTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xd1\x01\n\tCreateTag\x12\x35.google.devtools.artifactregistry.v1.CreateTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"c\xda\x41\x11parent,tag,tag_id\x82\xd3\xe4\x93\x02I\"B/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags:\x03tag\x12\xd3\x01\n\tUpdateTag\x12\x35.google.devtools.artifactregistry.v1.UpdateTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"e\xda\x41\x0ftag,update_mask\x82\xd3\xe4\x93\x02M2F/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}:\x03tag\x12\xad\x01\n\tDeleteTag\x12\x35.google.devtools.artifactregistry.v1.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xcd\x01\n\nCreateRule\x12\x36.google.devtools.artifactregistry.v1.CreateRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"\\\xda\x41\x13parent,rule,rule_id\x82\xd3\xe4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/rules:\x04rule\x12\xc5\x01\n\tListRules\x12\x35.google.devtools.artifactregistry.v1.ListRulesRequest\x1a\x36.google.devtools.artifactregistry.v1.ListRulesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/rules\x12\xb2\x01\n\x07GetRule\x12\x33.google.devtools.artifactregistry.v1.GetRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/repositories/*/rules/*}\x12\xcf\x01\n\nUpdateRule\x12\x36.google.devtools.artifactregistry.v1.UpdateRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"^\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}:\x04rule\x12\xa5\x01\n\nDeleteRule\x12\x36.google.devtools.artifactregistry.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/rules/*}\x12\x97\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\x94\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"I\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xbd\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\xc0\x01\n\x12GetProjectSettings\x12>.google.devtools.artifactregistry.v1.GetProjectSettingsRequest\x1a\x34.google.devtools.artifactregistry.v1.ProjectSettings\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/v1/{name=projects/*/projectSettings}\x12\x81\x02\n\x15UpdateProjectSettings\x12\x41.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest\x1a\x34.google.devtools.artifactregistry.v1.ProjectSettings\"o\xda\x41\x1cproject_settings,update_mask\x82\xd3\xe4\x93\x02J26/v1/{project_settings.name=projects/*/projectSettings}:\x10project_settings\x12\xbc\x01\n\x0eGetVPCSCConfig\x12:.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest\x1a\x30.google.devtools.artifactregistry.v1.VPCSCConfig\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/vpcscConfig}\x12\xf1\x01\n\x11UpdateVPCSCConfig\x12=.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest\x1a\x30.google.devtools.artifactregistry.v1.VPCSCConfig\"k\xda\x41\x18vpcsc_config,update_mask\x82\xd3\xe4\x93\x02J2:/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}:\x0cvpcsc_config\x12\xe4\x01\n\rUpdatePackage\x12\x39.google.devtools.artifactregistry.v1.UpdatePackageRequest\x1a,.google.devtools.artifactregistry.v1.Package\"j\xda\x41\x13package,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}:\x07package\x12\xdd\x01\n\x0fListAttachments\x12;.google.devtools.artifactregistry.v1.ListAttachmentsRequest\x1a<.google.devtools.artifactregistry.v1.ListAttachmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/attachments\x12\xca\x01\n\rGetAttachment\x12\x39.google.devtools.artifactregistry.v1.GetAttachmentRequest\x1a/.google.devtools.artifactregistry.v1.Attachment\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/attachments/*}\x12\xd0\x02\n\x10\x43reateAttachment\x12<.google.devtools.artifactregistry.v1.CreateAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\xde\x01\xca\x41g\n.google.devtools.artifactregistry.v1.Attachment\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x1fparent,attachment,attachment_id\x82\xd3\xe4\x93\x02L\">/v1/{parent=projects/*/locations/*/repositories/*}/attachments:\nattachment\x12\x90\x02\n\x10\x44\x65leteAttachment\x12<.google.devtools.artifactregistry.v1.DeleteAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/attachments/*}\x12\xb9\x02\n\x0e\x45xportArtifact\x12:.google.devtools.artifactregistry.v1.ExportArtifactRequest\x1a\x1d.google.longrunning.Operation\"\xcb\x01\xca\x41x\n:google.devtools.artifactregistry.v1.ExportArtifactResponse\x12:google.devtools.artifactregistry.v1.ExportArtifactMetadata\x82\xd3\xe4\x93\x02J\"E/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact:\x01*\x1a\x8c\x01\xca\x41\x1f\x61rtifactregistry.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cServiceProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb new file mode 100644 index 000000000000..cd63f995e427 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb @@ -0,0 +1,172 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/devtools/artifactregistry/v1/service.proto for package 'Google.Cloud.ArtifactRegistry.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/devtools/artifactregistry/v1/service_pb' + +module Google + module Cloud + module ArtifactRegistry + module V1 + module ArtifactRegistry + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.devtools.artifactregistry.v1.ArtifactRegistry' + + # Lists docker images. + rpc :ListDockerImages, ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse + # Gets a docker image. + rpc :GetDockerImage, ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Google::Cloud::ArtifactRegistry::V1::DockerImage + # Lists maven artifacts. + rpc :ListMavenArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse + # Gets a maven artifact. + rpc :GetMavenArtifact, ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact + # Lists npm packages. + rpc :ListNpmPackages, ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse + # Gets a npm package. + rpc :GetNpmPackage, ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::NpmPackage + # Lists python packages. + rpc :ListPythonPackages, ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse + # Gets a python package. + rpc :GetPythonPackage, ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::PythonPackage + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + rpc :ImportAptArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Google::Longrunning::Operation + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + rpc :ImportYumArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Google::Longrunning::Operation + # Lists repositories. + rpc :ListRepositories, ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse + # Gets a repository. + rpc :GetRepository, ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1::Repository + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + rpc :CreateRepository, ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, ::Google::Longrunning::Operation + # Updates a repository. + rpc :UpdateRepository, ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1::Repository + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + rpc :DeleteRepository, ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, ::Google::Longrunning::Operation + # Lists packages. + rpc :ListPackages, ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse + # Gets a package. + rpc :GetPackage, ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::Package + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + rpc :DeletePackage, ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Google::Longrunning::Operation + # Lists versions. + rpc :ListVersions, ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse + # Gets a version + rpc :GetVersion, ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Google::Cloud::ArtifactRegistry::V1::Version + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + rpc :DeleteVersion, ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Google::Longrunning::Operation + # Deletes multiple versions across a repository. The returned operation will + # complete once the versions have been deleted. + rpc :BatchDeleteVersions, ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Google::Longrunning::Operation + # Updates a version. + rpc :UpdateVersion, ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Google::Cloud::ArtifactRegistry::V1::Version + # Lists files. + rpc :ListFiles, ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse + # Gets a file. + rpc :GetFile, ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Google::Cloud::ArtifactRegistry::V1::File + # Deletes a file and all of its content. It is only allowed on generic + # repositories. The returned operation will complete once the file has been + # deleted. + rpc :DeleteFile, ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Google::Longrunning::Operation + # Updates a file. + rpc :UpdateFile, ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Google::Cloud::ArtifactRegistry::V1::File + # Lists tags. + rpc :ListTags, ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse + # Gets a tag. + rpc :GetTag, ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag + # Creates a tag. + rpc :CreateTag, ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag + # Updates a tag. + rpc :UpdateTag, ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag + # Deletes a tag. + rpc :DeleteTag, ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Google::Protobuf::Empty + # Creates a rule. + rpc :CreateRule, ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule + # Lists rules. + rpc :ListRules, ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse + # Gets a rule. + rpc :GetRule, ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule + # Updates a rule. + rpc :UpdateRule, ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule + # Deletes a rule. + rpc :DeleteRule, ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Google::Protobuf::Empty + # Updates the IAM policy for a given resource. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the IAM policy for a given resource. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Tests if the caller has a list of permissions on a resource. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Retrieves the Settings for the Project. + rpc :GetProjectSettings, ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings + # Updates the Settings for the Project. + rpc :UpdateProjectSettings, ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings + # Retrieves the VPCSC Config for the Project. + rpc :GetVPCSCConfig, ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig + # Updates the VPCSC Config for the Project. + rpc :UpdateVPCSCConfig, ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig + # Updates a package. + rpc :UpdatePackage, ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Google::Cloud::ArtifactRegistry::V1::Package + # Lists attachments. + rpc :ListAttachments, ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse + # Gets an attachment. + rpc :GetAttachment, ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Google::Cloud::ArtifactRegistry::V1::Attachment + # Creates an attachment. The returned Operation will finish once the + # attachment has been created. Its response will be the created attachment. + rpc :CreateAttachment, ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Google::Longrunning::Operation + # Deletes an attachment. The returned Operation will + # finish once the attachments has been deleted. It will not have any + # Operation metadata and will return a `google.protobuf.Empty` response. + rpc :DeleteAttachment, ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Google::Longrunning::Operation + # Exports an artifact to a Cloud Storage bucket. + rpc :ExportArtifact, ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb new file mode 100644 index 000000000000..0c2cce6155dc --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/settings.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n2google/devtools/artifactregistry/v1/settings.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x88\x04\n\x0fProjectSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12g\n\x18legacy_redirection_state\x18\x02 \x01(\x0e\x32\x45.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState\x12\x14\n\x0cpull_percent\x18\x03 \x01(\x05\"\x8d\x02\n\x10RedirectionState\x12!\n\x1dREDIRECTION_STATE_UNSPECIFIED\x10\x00\x12$\n REDIRECTION_FROM_GCR_IO_DISABLED\x10\x01\x12#\n\x1fREDIRECTION_FROM_GCR_IO_ENABLED\x10\x02\x12)\n!REDIRECTION_FROM_GCR_IO_FINALIZED\x10\x03\x1a\x02\x08\x01\x12/\n+REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING\x10\x05\x12/\n+REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING\x10\x06:X\xea\x41U\n/artifactregistry.googleapis.com/ProjectSettings\x12\"projects/{project}/projectSettings\"b\n\x19GetProjectSettingsRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/artifactregistry.googleapis.com/ProjectSettings\"\x9f\x01\n\x1cUpdateProjectSettingsRequest\x12N\n\x10project_settings\x18\x02 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1.ProjectSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xf8\x01\n\'com.google.devtools.artifactregistry.v1B\rSettingsProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + ProjectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ProjectSettings").msgclass + ProjectSettings::RedirectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState").enummodule + GetProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetProjectSettingsRequest").msgclass + UpdateProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb new file mode 100644 index 000000000000..bb7df2a34734 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/tag.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n-google/devtools/artifactregistry/v1/tag.proto\x12#google.devtools.artifactregistry.v1\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:\x8a\x01\xea\x41\x86\x01\n#artifactregistry.googleapis.com/Tag\x12_projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}\"X\n\x0fListTagsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"c\n\x10ListTagsResponse\x12\x36\n\x04tags\x18\x01 \x03(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1d\n\rGetTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"i\n\x10\x43reateTagRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\x12\x35\n\x03tag\x18\x03 \x01(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\"z\n\x10UpdateTagRequest\x12\x35\n\x03tag\x18\x01 \x01(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\" \n\x10\x44\x65leteTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\xf3\x01\n\'com.google.devtools.artifactregistry.v1B\x08TagProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Tag").msgclass + ListTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListTagsRequest").msgclass + ListTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListTagsResponse").msgclass + GetTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetTagRequest").msgclass + CreateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateTagRequest").msgclass + UpdateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateTagRequest").msgclass + DeleteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteTagRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb new file mode 100644 index 000000000000..d391b66a4f6d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/version.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/devtools/artifactregistry/v1/file_pb' +require 'google/devtools/artifactregistry/v1/tag_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/devtools/artifactregistry/v1/version.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a-google/devtools/artifactregistry/v1/tag.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xea\x04\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x0crelated_tags\x18\x07 \x03(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.devtools.artifactregistry.v1.Version.AnnotationsEntryB\x03\xe0\x41\x01\x12\x44\n\x0c\x66ingerprints\x18\n \x03(\x0b\x32).google.devtools.artifactregistry.v1.HashB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x96\x01\xea\x41\x92\x01\n\'artifactregistry.googleapis.com/Version\x12gprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}\"\xb8\x01\n\x13ListVersionsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12>\n\x04view\x18\x04 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.VersionView\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"o\n\x14ListVersionsResponse\x12>\n\x08versions\x18\x01 \x03(\x0b\x32,.google.devtools.artifactregistry.v1.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x04view\x18\x02 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.VersionView\"3\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"\xb1\x01\n\x1a\x42\x61tchDeleteVersionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xfa\x41)\x12\'artifactregistry.googleapis.com/Version\x12>\n\x05names\x18\x02 \x03(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Version\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"6\n\x1b\x42\x61tchDeleteVersionsMetadata\x12\x17\n\x0f\x66\x61iled_versions\x18\x02 \x03(\t\"\x8b\x01\n\x14UpdateVersionRequest\x12\x42\n\x07version\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.VersionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*@\n\x0bVersionView\x12\x1c\n\x18VERSION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cVersionProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Version").msgclass + ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListVersionsRequest").msgclass + ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListVersionsResponse").msgclass + GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetVersionRequest").msgclass + DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteVersionRequest").msgclass + BatchDeleteVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest").msgclass + BatchDeleteVersionsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata").msgclass + UpdateVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateVersionRequest").msgclass + VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VersionView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb new file mode 100644 index 000000000000..dbb9ba0543ee --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/vpcsc_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1/vpcsc_config.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x98\x02\n\x0bVPCSCConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\x0cvpcsc_policy\x18\x02 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy\"@\n\x0bVPCSCPolicy\x12\x1c\n\x18VPCSC_POLICY_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02:e\xea\x41\x62\n+artifactregistry.googleapis.com/VpcscConfig\x12\x33projects/{project}/locations/{location}/vpcscConfig\"Z\n\x15GetVPCSCConfigRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+artifactregistry.googleapis.com/VpcscConfig\"\x93\x01\n\x18UpdateVPCSCConfigRequest\x12\x46\n\x0cvpcsc_config\x18\x01 \x01(\x0b\x32\x30.google.devtools.artifactregistry.v1.VPCSCConfig\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10VPCSCConfigProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + VPCSCConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VPCSCConfig").msgclass + VPCSCConfig::VPCSCPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy").enummodule + GetVPCSCConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetVPCSCConfigRequest").msgclass + UpdateVPCSCConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb new file mode 100644 index 000000000000..a52fb7f9c0ff --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1/yum_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1/yum_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x87\x03\n\x0bYumArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x0cpackage_type\x18\x03 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.YumArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/YumArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}\"B\n\x1bImportYumArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x8d\x01\n\x19ImportYumArtifactsRequest\x12V\n\ngcs_source\x18\x02 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa2\x01\n\x1bImportYumArtifactsErrorInfo\x12V\n\ngcs_source\x18\x01 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xb7\x01\n\x1aImportYumArtifactsResponse\x12G\n\ryum_artifacts\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.YumArtifact\x12P\n\x06\x65rrors\x18\x02 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo\"\x1c\n\x1aImportYumArtifactsMetadataB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10YumArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1 + YumArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.YumArtifact").msgclass + YumArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.YumArtifact.PackageType").enummodule + ImportYumArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource").msgclass + ImportYumArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsRequest").msgclass + ImportYumArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo").msgclass + ImportYumArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsResponse").msgclass + ImportYumArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md new file mode 100644 index 000000000000..94b4fba12369 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Artifact Registry V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb new file mode 100644 index 000000000000..a312b90573bf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A detailed representation of an Apt artifact. Information in the record + # is derived from the archive's control file. + # See https://www.debian.org/doc/debian-policy/ch-controlfields.html + # @!attribute [r] name + # @return [::String] + # Output only. The Artifact Registry resource name of the artifact. + # @!attribute [r] package_name + # @return [::String] + # Output only. The Apt package name of the artifact. + # @!attribute [r] package_type + # @return [::Google::Cloud::ArtifactRegistry::V1::AptArtifact::PackageType] + # Output only. An artifact is a binary or source package. + # @!attribute [r] architecture + # @return [::String] + # Output only. Operating system architecture of the artifact. + # @!attribute [r] component + # @return [::String] + # Output only. Repository component of the artifact. + # @!attribute [r] control_file + # @return [::String] + # Output only. Contents of the artifact's control metadata file. + class AptArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Package type is either binary or source. + module PackageType + # Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0 + + # Binary package. + BINARY = 1 + + # Source package. + SOURCE = 2 + end + end + + # Google Cloud Storage location where the artifacts currently reside. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + # @!attribute [rw] use_wildcards + # @return [::Boolean] + # Supports URI wildcards for matching multiple objects from a single URI. + class ImportAptArtifactsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to import new apt artifacts. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource] + # Google Cloud Storage location where input content is located. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the artifacts will be imported. + class ImportAptArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error information explaining why a package was not imported. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource] + # Google Cloud Storage location requested. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The detailed error status. + class ImportAptArtifactsErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message from importing APT artifacts. + # @!attribute [rw] apt_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::AptArtifact>] + # The Apt artifacts imported. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsErrorInfo>] + # Detailed error info for packages that were not imported. + class ImportAptArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata for importing artifacts. + class ImportAptArtifactsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb new file mode 100644 index 000000000000..19aa2ab91f75 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb @@ -0,0 +1,384 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # DockerImage represents a docker artifact. + # The following fields are returned as untyped metadata in the Version + # resource, using camelcase keys (i.e. metadata.imageSizeBytes): + # * imageSizeBytes + # * mediaType + # * buildTime + # @!attribute [rw] name + # @return [::String] + # Required. registry_location, project_id, repository_name and image id forms + # a unique image + # name:`projects//locations//repositories//dockerImages/`. + # For example, + # "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ + # nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", + # where "us-west4" is the registry_location, "test-project" is the + # project_id, "test-repo" is the repository_name and + # "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" + # is the image's digest. + # @!attribute [rw] uri + # @return [::String] + # Required. URL to access the image. + # Example: + # us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf + # @!attribute [rw] tags + # @return [::Array<::String>] + # Tags attached to this image. + # @!attribute [rw] image_size_bytes + # @return [::Integer] + # Calculated size of the image. + # This field is returned as the 'metadata.imageSizeBytes' field in the + # Version resource. + # @!attribute [rw] upload_time + # @return [::Google::Protobuf::Timestamp] + # Time the image was uploaded. + # @!attribute [rw] media_type + # @return [::String] + # Media type of this image, e.g. + # "application/vnd.docker.distribution.manifest.v2+json". + # This field is returned as the 'metadata.mediaType' field in the + # Version resource. + # @!attribute [rw] build_time + # @return [::Google::Protobuf::Timestamp] + # The time this image was built. + # This field is returned as the 'metadata.buildTime' field in the + # Version resource. + # The build time is returned to the client as an RFC 3339 string, which can + # be easily used with the JavaScript Date constructor. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the docker image was last updated. + # @!attribute [rw] artifact_type + # @return [::String] + # ArtifactType of this image, e.g. "application/vnd.example+type". + # If the `subject_digest` is set and no `artifact_type` is given, the + # `media_type` will be considered as the `artifact_type`. This field is + # returned as the `metadata.artifactType` field in the Version resource. + # @!attribute [rw] image_manifests + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImageManifest>] + # Optional. For multi-arch images (manifest lists), this field contains the + # list of image manifests. + class DockerImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of a single image manifest within a multi-arch image. + # @!attribute [rw] architecture + # @return [::String] + # Optional. The CPU architecture of the image. + # Values are provided by the Docker client and are not validated by Artifact + # Registry. Example values include "amd64", "arm64", "ppc64le", "s390x", + # "riscv64", "mips64le", etc. + # @!attribute [rw] os + # @return [::String] + # Optional. The operating system of the image. + # Values are provided by the Docker client and are not validated by Artifact + # Registry. Example values include "linux", "windows", "darwin", "aix", etc. + # @!attribute [rw] digest + # @return [::String] + # Optional. The manifest digest, in the format "sha256:". + # @!attribute [rw] media_type + # @return [::String] + # Optional. The media type of the manifest, e.g., + # "application/vnd.docker.distribution.manifest.v2+json" + # @!attribute [rw] os_version + # @return [::String] + # Optional. The OS version of the image, for example on Windows + # `10.0.14393.1066`. + # @!attribute [rw] os_features + # @return [::Array<::String>] + # Optional. The required OS features for the image, for example on Windows + # `win32k`. + # @!attribute [rw] variant + # @return [::String] + # Optional. The variant of the CPU in the image, for example `v7` to specify + # ARMv7 when architecture is `arm`. + class ImageManifest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list docker images. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose docker images will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] order_by + # @return [::String] + # The field to order the results by. + class ListDockerImagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing docker images. + # @!attribute [rw] docker_images + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] + # The docker images returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of artifacts, or empty if there are no + # more artifacts to return. + class ListDockerImagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get docker images. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the docker images. + class GetDockerImageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MavenArtifact represents a maven artifact. + # @!attribute [rw] name + # @return [::String] + # Required. registry_location, project_id, repository_name and maven_artifact + # forms a unique artifact For example, + # "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ + # com.google.guava:guava:31.0-jre", + # where "us-west4" is the registry_location, "test-project" is the + # project_id, "test-repo" is the repository_name and + # "com.google.guava:guava:31.0-jre" + # is the maven artifact. + # @!attribute [rw] pom_uri + # @return [::String] + # Required. URL to access the pom file of the artifact. + # Example: + # us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom + # @!attribute [rw] group_id + # @return [::String] + # Group ID for the artifact. + # Example: + # com.google.guava + # @!attribute [rw] artifact_id + # @return [::String] + # Artifact ID for the artifact. + # @!attribute [rw] version + # @return [::String] + # Version of this artifact. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the artifact was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the artifact was updated. + class MavenArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list maven artifacts. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose maven artifacts will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListMavenArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing maven artifacts. + # @!attribute [rw] maven_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] + # The maven artifacts returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of artifacts, or empty if there are no + # more artifacts to return. + class ListMavenArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get maven artifacts. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the maven artifact. + class GetMavenArtifactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NpmPackage represents an npm artifact. + # @!attribute [rw] name + # @return [::String] + # Required. registry_location, project_id, repository_name and npm_package + # forms a unique package For example, + # "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ + # npm_test:1.0.0", + # where "us-west4" is the registry_location, "test-project" is the + # project_id, "test-repo" is the repository_name and + # npm_test:1.0.0" is the npm package. + # @!attribute [rw] package_name + # @return [::String] + # Package for the artifact. + # @!attribute [rw] version + # @return [::String] + # Version of this package. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Tags attached to this package. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the package was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the package was updated. + class NpmPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list npm packages. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose npm packages will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListNpmPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing npm packages. + # @!attribute [rw] npm_packages + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] + # The npm packages returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of artifacts, or empty if there are no + # more artifacts to return. + class ListNpmPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get npm packages. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the npm package. + class GetNpmPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PythonPackage represents a python artifact. + # @!attribute [rw] name + # @return [::String] + # Required. registry_location, project_id, repository_name and python_package + # forms a unique package + # name:`projects//locations//repository//pythonPackages/`. + # For example, + # "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ + # python_package:1.0.0", + # where "us-west4" is the registry_location, "test-project" is the + # project_id, "test-repo" is the repository_name and + # python_package:1.0.0" is the python package. + # @!attribute [rw] uri + # @return [::String] + # Required. URL to access the package. + # Example: + # us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz + # @!attribute [rw] package_name + # @return [::String] + # Package for the artifact. + # @!attribute [rw] version + # @return [::String] + # Version of this package. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the package was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the package was updated. + class PythonPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list python packages. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose python packages will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of artifacts to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListPythonPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing python packages. + # @!attribute [rw] python_packages + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] + # The python packages returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of artifacts, or empty if there are no + # more artifacts to return. + class ListPythonPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get python packages. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the python package. + class GetPythonPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb new file mode 100644 index 000000000000..4f4aa4117723 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # An Attachment refers to additional metadata that can be attached to + # artifacts in Artifact Registry. An attachment consists of one or more files. + # @!attribute [rw] name + # @return [::String] + # The name of the attachment. E.g. + # `projects/p1/locations/us/repositories/repo/attachments/sbom`. + # @!attribute [rw] target + # @return [::String] + # Required. The target the attachment is for, can be a Version, Package or + # Repository. E.g. + # `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. + # @!attribute [rw] type + # @return [::String] + # Type of attachment. + # E.g. `application/vnd.spdx+json` + # @!attribute [rw] attachment_namespace + # @return [::String] + # The namespace this attachment belongs to. + # E.g. If an attachment is created by artifact analysis, namespace is set + # to `artifactanalysis.googleapis.com`. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User annotations. These attributes can only be set and used by + # the user, and not by Artifact Registry. See + # https://google.aip.dev/128#annotations for more details such as format and + # size limitations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the attachment was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the attachment was last updated. + # @!attribute [rw] files + # @return [::Array<::String>] + # Required. The files that belong to this attachment. + # If the file ID part contains slashes, they are escaped. E.g. + # `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. + # @!attribute [r] oci_version_name + # @return [::String] + # Output only. The name of the OCI version that this attachment created. Only + # populated for Docker attachments. E.g. + # `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. + class Attachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request to list attachments. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose attachments will be listed. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `target` + # * `type` + # * `attachment_namespace` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of attachments to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListAttachmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing attachments. + # @!attribute [rw] attachments + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Attachment>] + # The attachments returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of attachments, or empty if there are + # no more attachments to return. + class ListAttachmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve an attachment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the attachment to retrieve. + class GetAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new attachment. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource where the attachment will be + # created. + # @!attribute [rw] attachment_id + # @return [::String] + # Required. The attachment id to use for this attachment. + # @!attribute [rw] attachment + # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] + # Required. The attachment to be created. + class CreateAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an attachment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the attachment to delete. + class DeleteAttachmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb new file mode 100644 index 000000000000..a94ff905b658 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # The request for exporting an artifact to a destination. + # @!attribute [rw] source_version + # @return [::String] + # The artifact version to export. + # Format: + # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} + # + # Note: The following fields are mutually exclusive: `source_version`, `source_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] source_tag + # @return [::String] + # The artifact tag to export. + # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} + # + # Note: The following fields are mutually exclusive: `source_tag`, `source_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_path + # @return [::String] + # The Cloud Storage path to export the artifact to. Should start with the + # bucket name, and optionally have a directory path. Examples: + # `dst_bucket`, `dst_bucket/sub_dir`. + # Existing objects with the same path will be overwritten. + # @!attribute [rw] repository + # @return [::String] + # Required. The repository of the artifact to export. + # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} + class ExportArtifactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for exporting an artifact to a destination. + # @!attribute [rw] exported_version + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # The exported version. Should be the same as the request version with + # fingerprint resource name. + class ExportArtifactResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The LRO metadata for exporting an artifact. + # @!attribute [rw] exported_files + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ExportArtifactMetadata::ExportedFile>] + # The exported artifact files. + class ExportArtifactMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The exported artifact file. + # @!attribute [rw] gcs_object_path + # @return [::String] + # Cloud Storage Object path of the exported file. Examples: + # `dst_bucket/file1`, `dst_bucket/sub_dir/file1` + # @!attribute [rw] name + # @return [::String] + # Name of the exported artifact file. + # Format: `projects/p1/locations/us/repositories/repo1/files/file1` + # @!attribute [rw] hashes + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] + # The hashes of the file content. + class ExportedFile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb new file mode 100644 index 000000000000..e07c055ac9d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb @@ -0,0 +1,211 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A hash of file content. + # @!attribute [rw] type + # @return [::Google::Cloud::ArtifactRegistry::V1::Hash::HashType] + # The algorithm used to compute the hash value. + # @!attribute [rw] value + # @return [::String] + # The hash value. + class Hash + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The algorithm used to compute the hash. + module HashType + # Unspecified. + HASH_TYPE_UNSPECIFIED = 0 + + # SHA256 hash. + SHA256 = 1 + + # MD5 hash. + MD5 = 2 + + # Dirsum SHA256 hash. + DIRSUM_SHA256 = 3 + end + end + + # Files store content that is potentially associated with Packages or Versions. + # @!attribute [rw] name + # @return [::String] + # The name of the file, for example: + # `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. + # If the file ID part contains slashes, they are escaped. + # @!attribute [rw] size_bytes + # @return [::Integer] + # The size of the File in bytes. + # @!attribute [rw] hashes + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] + # The hashes of the file content. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the File was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the File was last updated. + # @!attribute [rw] owner + # @return [::String] + # The name of the Package or Version that owns this file, if any. + # @!attribute [r] fetch_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the last attempt to refresh the file's data was + # made. Only set when the repository is remote. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client specified annotations. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request to list files. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the repository whose files will be listed. For + # example: "projects/p1/locations/us-central1/repositories/repo1 + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to files with the name `my_file.txt` + # in project `my-project` in the `us-central` region, in repository + # `my-repo`, append the following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` + # + # To filter the results of your request to files owned by the version `1.0` + # in package `pkg1`, append the following filter expression to your request: + # + # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # + # To filter the results of your request to files with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to files with the annotation key-value pair + # [`external.link`:`https://example.com/my-file`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-file`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of files to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] order_by + # @return [::String] + # The field to order the results by. + class ListFilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing files. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::File>] + # The files returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of files, or empty if there are no + # more files to return. + class ListFilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a file. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the file to retrieve. + class GetFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a file. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the file to delete. + class DeleteFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a file. + # @!attribute [rw] file + # @return [::Google::Cloud::ArtifactRegistry::V1::File] + # Required. The File that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb new file mode 100644 index 000000000000..e851d178d658 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # GenericArtifact represents a generic artifact + # @!attribute [rw] name + # @return [::String] + # Resource name of the generic artifact. + # project, location, repository, package_id and version_id + # create a unique generic artifact. + # i.e. "projects/test-project/locations/us-west4/repositories/test-repo/ + # genericArtifacts/package_id:version_id" + # @!attribute [rw] version + # @return [::String] + # The version of the generic artifact. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Generic module is created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Generic module is updated. + class GenericArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb new file mode 100644 index 000000000000..ad71da265c27 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # GoModule represents a Go module. + # @!attribute [rw] name + # @return [::String] + # The resource name of a Go module. + # @!attribute [rw] version + # @return [::String] + # The version of the Go module. Must be a valid canonical version as defined + # in https://go.dev/ref/mod#glos-canonical-version. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Go module is created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Go module is updated. + class GoModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb new file mode 100644 index 000000000000..2b69b5b6bb0d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A detailed representation of a KFP artifact. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of the KFP artifact. Since users don't directly + # interact with this resource, the name will be derived from the associated + # version. For example, when version = ".../versions/sha256:abcdef...", the + # name will be ".../kfpArtifacts/sha256:abcdef...". + # @!attribute [rw] version + # @return [::String] + # The version associated with the KFP artifact. Must follow the Semantic + # Versioning standard. + class KfpArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb new file mode 100644 index 000000000000..b7e1ad069172 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # Packages are named collections of versions. + # @!attribute [rw] name + # @return [::String] + # The name of the package, for example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + # If the package ID part contains slashes, the slashes are escaped. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the package. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the package was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the package was last updated. This includes publishing a new + # version of the package. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client specified annotations. + class Package + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request to list packages. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose packages will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of packages to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to packages with the name + # `my-package` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` + # + # To filter the results of your request to packages with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request": + # + # * `"annotations.external_link:external_link_value"` + # + # To filter the results just for a specific annotation key `external_link`, + # append the following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to packages with the annotation key-value pair + # [`external.link`:`https://example.com/my-package`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-package`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to order the results by. + class ListPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing packages. + # @!attribute [rw] packages + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Package>] + # The packages returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of packages, or empty if there are no + # more packages to return. + class ListPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a package. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the package to retrieve. + class GetPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a package. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the package to delete. + class DeletePackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a package. + # @!attribute [rw] package + # @return [::Google::Cloud::ArtifactRegistry::V1::Package] + # The package that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdatePackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb new file mode 100644 index 000000000000..4f78625826fd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb @@ -0,0 +1,848 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # Artifact policy configuration for the repository contents. + # @!attribute [rw] id + # @return [::String] + # The user-provided ID of the upstream policy. + # @!attribute [rw] repository + # @return [::String] + # A reference to the repository resource, for example: + # `projects/p1/locations/us-central1/repositories/repo1`. + # @!attribute [rw] priority + # @return [::Integer] + # Entries with a greater priority value take precedence in the pull order. + class UpstreamPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. + # If multiple entries are set, all must be satisfied for the condition to be + # satisfied. + # @!attribute [rw] tag_state + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyCondition::TagState] + # Match versions by tag status. + # @!attribute [rw] tag_prefixes + # @return [::Array<::String>] + # Match versions by tag prefix. Applied on any prefix match. + # @!attribute [rw] version_name_prefixes + # @return [::Array<::String>] + # Match versions by version name prefix. Applied on any prefix match. + # @!attribute [rw] package_name_prefixes + # @return [::Array<::String>] + # Match versions by package prefix. Applied on any prefix match. + # @!attribute [rw] older_than + # @return [::Google::Protobuf::Duration] + # Match versions older than a duration. + # @!attribute [rw] newer_than + # @return [::Google::Protobuf::Duration] + # Match versions newer than a duration. + class CleanupPolicyCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Statuses applying to versions. + module TagState + # Tag status not specified. + TAG_STATE_UNSPECIFIED = 0 + + # Applies to tagged versions only. + TAGGED = 1 + + # Applies to untagged versions only. + UNTAGGED = 2 + + # Applies to all versions. + ANY = 3 + end + end + + # CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy + # for retaining a minimum number of versions. + # @!attribute [rw] package_name_prefixes + # @return [::Array<::String>] + # List of package name prefixes that will apply this rule. + # @!attribute [rw] keep_count + # @return [::Integer] + # Minimum number of versions to keep. + class CleanupPolicyMostRecentVersions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Artifact policy configuration for repository cleanup policies. + # @!attribute [rw] condition + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyCondition] + # Policy condition for matching versions. + # + # Note: The following fields are mutually exclusive: `condition`, `most_recent_versions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] most_recent_versions + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyMostRecentVersions] + # Policy condition for retaining a minimum number of versions. May only be + # specified with a Keep action. + # + # Note: The following fields are mutually exclusive: `most_recent_versions`, `condition`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # The user-provided ID of the cleanup policy. + # @!attribute [rw] action + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy::Action] + # Policy action. + class CleanupPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Action type for a cleanup policy. + module Action + # Action not specified. + ACTION_UNSPECIFIED = 0 + + # Delete action. + DELETE = 1 + + # Keep action. + KEEP = 2 + end + end + + # Virtual repository configuration. + # @!attribute [rw] upstream_policies + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::UpstreamPolicy>] + # Policies that configure the upstream artifacts distributed by the Virtual + # Repository. Upstream policies cannot be set on a standard repository. + class VirtualRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Remote repository configuration. + # @!attribute [rw] docker_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository] + # Specific settings for a Docker remote repository. + # + # Note: The following fields are mutually exclusive: `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] maven_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository] + # Specific settings for a Maven remote repository. + # + # Note: The following fields are mutually exclusive: `maven_repository`, `docker_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] npm_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository] + # Specific settings for an Npm remote repository. + # + # Note: The following fields are mutually exclusive: `npm_repository`, `docker_repository`, `maven_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] python_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository] + # Specific settings for a Python remote repository. + # + # Note: The following fields are mutually exclusive: `python_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] apt_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository] + # Specific settings for an Apt remote repository. + # + # Note: The following fields are mutually exclusive: `apt_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] yum_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository] + # Specific settings for a Yum remote repository. + # + # Note: The following fields are mutually exclusive: `yum_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] common_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::CommonRemoteRepository] + # Common remote repository settings. + # Used as the remote repository upstream URL. + # + # Note: The following fields are mutually exclusive: `common_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] description + # @return [::String] + # The description of the remote source. + # @!attribute [rw] upstream_credentials + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::UpstreamCredentials] + # Optional. The credentials used to access the remote repository. + # @!attribute [rw] disable_upstream_validation + # @return [::Boolean] + # Input only. A create/update remote repo option to avoid making a HEAD/GET + # request to validate a remote repo and any supplied upstream credentials. + class RemoteRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The credentials to access the remote repository. + # @!attribute [rw] username_password_credentials + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::UpstreamCredentials::UsernamePasswordCredentials] + # Use username and password to access the remote repository. + class UpstreamCredentials + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Username and password credentials. + # @!attribute [rw] username + # @return [::String] + # The username to access the remote repository. + # @!attribute [rw] password_secret_version + # @return [::String] + # The Secret Manager key version that holds the password to access the + # remote repository. Must be in the format of + # `projects/{project}/secrets/{secret}/versions/{version}`. + class UsernamePasswordCredentials + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a Docker remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository::PublicRepository] + # One of the publicly available Docker repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DockerRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the custom remote repository, for ex: + # "https://registry-1.docker.io". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Predefined list of publicly available Docker repositories like Docker + # Hub. + module PublicRepository + # Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0 + + # Docker Hub. + DOCKER_HUB = 1 + end + end + + # Configuration for a Maven remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository::PublicRepository] + # One of the publicly available Maven repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MavenRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.maven.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Predefined list of publicly available Maven repositories like Maven + # Central. + module PublicRepository + # Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0 + + # Maven Central. + MAVEN_CENTRAL = 1 + end + end + + # Configuration for a Npm remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository::PublicRepository] + # One of the publicly available Npm repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class NpmRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.npm.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Predefined list of publicly available NPM repositories like npmjs. + module PublicRepository + # Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0 + + # npmjs. + NPMJS = 1 + end + end + + # Configuration for a Python remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository::PublicRepository] + # One of the publicly available Python repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PythonRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.python.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Predefined list of publicly available Python repositories like PyPI.org. + module PublicRepository + # Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0 + + # PyPI. + PYPI = 1 + end + end + + # Configuration for an Apt remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::PublicRepository] + # One of the publicly available Apt repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AptRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Publicly available Apt repositories constructed from a common repository + # base and a custom repository path. + # @!attribute [rw] repository_base + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::PublicRepository::RepositoryBase] + # A common public repository base for Apt. + # @!attribute [rw] repository_path + # @return [::String] + # A custom field to define a path to a specific repository from the base. + class PublicRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Predefined list of publicly available repository bases for Apt. + module RepositoryBase + # Unspecified repository base. + REPOSITORY_BASE_UNSPECIFIED = 0 + + # Debian. + DEBIAN = 1 + + # Ubuntu LTS/Pro. + UBUNTU = 2 + + # Archived Debian. + DEBIAN_SNAPSHOT = 3 + end + end + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.apt.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a Yum remote repository. + # @!attribute [rw] public_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::PublicRepository] + # One of the publicly available Yum repositories supported by Artifact + # Registry. + # + # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_repository + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::CustomRepository] + # Customer-specified remote repository. + # + # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class YumRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Publicly available Yum repositories constructed from a common repository + # base and a custom repository path. + # @!attribute [rw] repository_base + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::PublicRepository::RepositoryBase] + # A common public repository base for Yum. + # @!attribute [rw] repository_path + # @return [::String] + # A custom field to define a path to a specific repository from the base. + class PublicRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Predefined list of publicly available repository bases for Yum. + module RepositoryBase + # Unspecified repository base. + REPOSITORY_BASE_UNSPECIFIED = 0 + + # CentOS. + CENTOS = 1 + + # CentOS Debug. + CENTOS_DEBUG = 2 + + # CentOS Vault. + CENTOS_VAULT = 3 + + # CentOS Stream. + CENTOS_STREAM = 4 + + # Rocky. + ROCKY = 5 + + # Fedora Extra Packages for Enterprise Linux (EPEL). + EPEL = 6 + end + end + + # Customer-specified publicly available remote repository. + # @!attribute [rw] uri + # @return [::String] + # An http/https uri reference to the upstream remote repository, for ex: + # "https://my.yum.registry/". + class CustomRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Common remote repository settings type. + # @!attribute [rw] uri + # @return [::String] + # Required. A common public repository base for remote repository. + class CommonRemoteRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A Repository for storing artifacts with a specific format. + # @!attribute [rw] maven_config + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::MavenRepositoryConfig] + # Maven repository config contains repository level configuration + # for the repositories of maven type. + # + # Note: The following fields are mutually exclusive: `maven_config`, `docker_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] docker_config + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::DockerRepositoryConfig] + # Docker repository config contains repository level configuration + # for the repositories of docker type. + # + # Note: The following fields are mutually exclusive: `docker_config`, `maven_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] virtual_repository_config + # @return [::Google::Cloud::ArtifactRegistry::V1::VirtualRepositoryConfig] + # Configuration specific for a Virtual Repository. + # + # Note: The following fields are mutually exclusive: `virtual_repository_config`, `remote_repository_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remote_repository_config + # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig] + # Configuration specific for a Remote Repository. + # + # Note: The following fields are mutually exclusive: `remote_repository_config`, `virtual_repository_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # The name of the repository, for example: + # `projects/p1/locations/us-central1/repositories/repo1`. For each location + # in a project, repository names must be unique. + # @!attribute [rw] format + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::Format] + # Optional. The format of packages that are stored in the repository. + # @!attribute [rw] description + # @return [::String] + # The user-provided description of the repository. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels with user-defined metadata. + # This field may contain up to 64 entries. Label keys and values may be no + # longer than 63 characters. Label keys must begin with a lowercase letter + # and may only contain lowercase letters, numeric characters, underscores, + # and dashes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the repository was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the repository was last updated. + # @!attribute [rw] kms_key_name + # @return [::String] + # The Cloud KMS resource name of the customer managed encryption key that's + # used to encrypt the contents of the Repository. Has the form: + # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + # This value may not be changed after the Repository has been created. + # @!attribute [rw] mode + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::Mode] + # Optional. The mode of the repository. + # @!attribute [rw] cleanup_policies + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy}] + # Optional. Cleanup policies for this repository. Cleanup policies indicate + # when certain package versions can be automatically deleted. Map keys are + # policy IDs supplied by users during policy creation. They must unique + # within a repository and be under 128 characters in length. + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. The size, in bytes, of all artifact storage in this + # repository. Repositories that are generally available or in public preview + # use this to calculate storage costs. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Whether or not this repository satisfies PZS. + # @!attribute [rw] cleanup_policy_dry_run + # @return [::Boolean] + # Optional. If true, the cleanup pipeline is prevented from deleting versions + # in this repository. + # @!attribute [rw] vulnerability_scanning_config + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig] + # Optional. Config and state for vulnerability scanning of resources within + # this Repository. + # @!attribute [rw] disallow_unspecified_mode + # @return [::Boolean] + # Optional. If this is true, an unspecified repo type will be treated as + # error rather than defaulting to standard. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Whether or not this repository satisfies PZI. + # @!attribute [r] registry_uri + # @return [::String] + # Output only. The repository endpoint, for example: + # `us-docker.pkg.dev/my-proj/my-repo`. + class Repository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # MavenRepositoryConfig is maven related repository details. + # Provides additional configuration details for repositories of the maven + # format type. + # @!attribute [rw] allow_snapshot_overwrites + # @return [::Boolean] + # The repository with this flag will allow publishing + # the same snapshot versions. + # @!attribute [rw] version_policy + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::MavenRepositoryConfig::VersionPolicy] + # Version policy defines the versions that the registry will accept. + class MavenRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VersionPolicy is the version policy for the repository. + module VersionPolicy + # VERSION_POLICY_UNSPECIFIED - the version policy is not defined. + # When the version policy is not defined, no validation is performed + # for the versions. + VERSION_POLICY_UNSPECIFIED = 0 + + # RELEASE - repository will accept only Release versions. + RELEASE = 1 + + # SNAPSHOT - repository will accept only Snapshot versions. + SNAPSHOT = 2 + end + end + + # DockerRepositoryConfig is docker related repository details. + # Provides additional configuration details for repositories of the docker + # format type. + # @!attribute [rw] immutable_tags + # @return [::Boolean] + # The repository which enabled this flag prevents all tags from being + # modified, moved or deleted. This does not prevent tags from being + # created. + class DockerRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config on whether to perform vulnerability scanning for resources in this + # repository, as well as output fields describing current state. + # @!attribute [rw] enablement_config + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig::EnablementConfig] + # Optional. Config for whether this repository has vulnerability scanning + # disabled. + # @!attribute [r] last_enable_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time this repository config was enabled. + # @!attribute [r] enablement_state + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig::EnablementState] + # Output only. State of feature enablement, combining repository enablement + # config and API enablement state. + # @!attribute [r] enablement_state_reason + # @return [::String] + # Output only. Reason for the repository state. + class VulnerabilityScanningConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Config for vulnerability scanning of resources in this repository. + module EnablementConfig + # Not set. This will be treated as INHERITED for Docker repositories and + # DISABLED for non-Docker repositories. + ENABLEMENT_CONFIG_UNSPECIFIED = 0 + + # Scanning is Enabled, but dependent on API enablement. + INHERITED = 1 + + # No automatic vulnerability scanning will be performed for this + # repository. + DISABLED = 2 + end + + # Describes the state of vulnerability scanning in this repository, + # including both repository enablement and API enablement. + module EnablementState + # Enablement state is unclear. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # Repository does not support vulnerability scanning. + SCANNING_UNSUPPORTED = 1 + + # Vulnerability scanning is disabled for this repository. + SCANNING_DISABLED = 2 + + # Vulnerability scanning is active for this repository. + SCANNING_ACTIVE = 3 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy] + class CleanupPoliciesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A package format. + module Format + # Unspecified package format. + FORMAT_UNSPECIFIED = 0 + + # Docker package format. + DOCKER = 1 + + # Maven package format. + MAVEN = 2 + + # NPM package format. + NPM = 3 + + # APT package format. + APT = 5 + + # YUM package format. + YUM = 6 + + # Python package format. + PYTHON = 8 + + # Kubeflow Pipelines package format. + KFP = 9 + + # Go package format. + GO = 10 + + # Generic package format. + GENERIC = 11 + + # Ruby package format. + RUBY = 12 + end + + # The mode configures the repository to serve artifacts from different + # sources. + module Mode + # Unspecified mode. + MODE_UNSPECIFIED = 0 + + # A standard repository storing artifacts. + STANDARD_REPOSITORY = 1 + + # A virtual repository to serve artifacts from one or more sources. + VIRTUAL_REPOSITORY = 2 + + # A remote repository to serve artifacts from a remote source. + REMOTE_REPOSITORY = 3 + end + end + + # The request to list repositories. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose repositories will be + # listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # + # Examples of using a filter: + # + # To filter the results of your request to repositories with the name + # `my-repo` in project `my-project` in the `us-central` region, append the + # following filter expression to your request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-*"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo"` + # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to order the results by. + class ListRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing repositories. + # @!attribute [rw] repositories + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Repository>] + # The repositories returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of repositories, or empty if there are + # no more repositories to return. + class ListRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the repository to retrieve. + class GetRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new repository. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource where the repository will be + # created. + # @!attribute [rw] repository_id + # @return [::String] + # Required. The repository id to use for this repository. + # @!attribute [rw] repository + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # Required. The repository to be created. + class CreateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a repository. + # @!attribute [rw] repository + # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] + # The repository that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the repository to delete. + class DeleteRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb new file mode 100644 index 000000000000..0bdb1d2172c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb @@ -0,0 +1,149 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A rule defines the deny or allow action of the operation it applies to and + # the conditions required for the rule to apply. You can set one rule for an + # entire repository and one rule for each package within. + # @!attribute [rw] name + # @return [::String] + # The name of the rule, for example: + # `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. + # @!attribute [rw] action + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule::Action] + # The action this rule takes. + # @!attribute [rw] operation + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule::Operation] + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # Optional. A CEL expression for conditions that must be met in order for the + # rule to apply. If not provided, the rule matches all objects. + # @!attribute [rw] package_id + # @return [::String] + # The package ID the rule applies to. + # If empty, this rule applies to all packages inside the repository. + class Rule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the action of the rule. + module Action + # Action not specified. + ACTION_UNSPECIFIED = 0 + + # Allow the operation. + ALLOW = 1 + + # Deny the operation. + DENY = 2 + end + + # The operation the rule applies to. + module Operation + # Operation not specified. + OPERATION_UNSPECIFIED = 0 + + # Download operation. + DOWNLOAD = 1 + end + end + + # The request to list rules. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent repository whose rules will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of rules to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing rules. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Rule>] + # The rules returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of rules, or empty if there are no + # more rules to return. + class ListRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a rule. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to retrieve. + class GetRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new rule. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource where the rule will be created. + # @!attribute [rw] rule_id + # @return [::String] + # The rule id to use for this repository. + # @!attribute [rw] rule + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # The rule to be created. + class CreateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a rule. + # @!attribute [rw] rule + # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] + # The rule that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a rule. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to delete. + class DeleteRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb new file mode 100644 index 000000000000..2ee4fa0cdea8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # Metadata type for longrunning-operations, currently empty. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb new file mode 100644 index 000000000000..a545ef0668e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # The Artifact Registry settings that apply to a Project. + # @!attribute [rw] name + # @return [::String] + # The name of the project's settings. + # + # Always of the form: + # projects/\\{project-id}/projectSettings + # + # In update request: never set + # In response: always set + # @!attribute [rw] legacy_redirection_state + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings::RedirectionState] + # The redirection state of the legacy repositories in this project. + # @!attribute [rw] pull_percent + # @return [::Integer] + # The percentage of pull traffic to redirect from GCR to AR when using + # partial redirection. + class ProjectSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible redirection states for legacy repositories. + module RedirectionState + # No redirection status has been set. + REDIRECTION_STATE_UNSPECIFIED = 0 + + # Redirection is disabled. + REDIRECTION_FROM_GCR_IO_DISABLED = 1 + + # Redirection is enabled. + REDIRECTION_FROM_GCR_IO_ENABLED = 2 + + # Redirection is enabled, and has been finalized so cannot be reverted. + REDIRECTION_FROM_GCR_IO_FINALIZED = 3 + + # Redirection is enabled and missing images are copied from GCR + REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING = 5 + + # Redirection is partially enabled and missing images are copied from GCR + REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING = 6 + end + end + + # Gets the redirection status for a project. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the projectSettings resource. + class GetProjectSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sets the settings of the project. + # @!attribute [rw] project_settings + # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] + # The project settings. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask to support partial updates. + class UpdateProjectSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb new file mode 100644 index 000000000000..a9a41f7a2b11 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # Tags point to a version and represent an alternative name that can be used + # to access the version. + # @!attribute [rw] name + # @return [::String] + # The name of the tag, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + # If the package part contains slashes, the slashes are escaped. + # The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else + # must be URL encoded. + # @!attribute [rw] version + # @return [::String] + # The name of the version the tag refers to, for example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` + # If the package or version ID parts contain slashes, the slashes are + # escaped. + class Tag + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list tags. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent package whose tags will be listed. + # For example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `version` + # + # Examples of using a filter: + # + # To filter the results of your request to tags with the name `my-tag` in + # package `my-package` in repository `my-repo` in project "`y-project` in + # the us-central region, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` + # + # To filter the results of your request to tags applied to the version + # `1.0` in package `my-package`, append the following filter expression to + # your request: + # + # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of tags to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListTagsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing tags. + # @!attribute [rw] tags + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # The tags returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of tags, or empty if there are no + # more tags to return. + class ListTagsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a tag. + # @!attribute [rw] name + # @return [::String] + # The name of the tag to retrieve. + class GetTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new tag. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the tag will be created. + # @!attribute [rw] tag_id + # @return [::String] + # The tag id to use for this repository. + # @!attribute [rw] tag + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # The tag to be created. + class CreateTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create or update a tag. + # @!attribute [rw] tag + # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] + # The tag that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a tag. + # @!attribute [rw] name + # @return [::String] + # The name of the tag to delete. + class DeleteTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb new file mode 100644 index 000000000000..9c9c3ee8a90f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb @@ -0,0 +1,237 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # The body of a version resource. A version resource represents a + # collection of components, such as files and other data. This may correspond + # to a version in many package management schemes. + # @!attribute [rw] name + # @return [::String] + # The name of the version, for example: + # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. + # If the package or version ID parts contain slashes, the slashes are + # escaped. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the version, as specified in its metadata. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the version was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the version was last updated. + # @!attribute [rw] related_tags + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Tag>] + # Output only. A list of related tags. Will contain up to 100 tags that + # reference this version. + # @!attribute [r] metadata + # @return [::Google::Protobuf::Struct] + # Output only. Repository-specific Metadata stored against this version. + # The fields returned are defined by the underlying repository-specific + # resource. Currently, the resources could be: + # {::Google::Cloud::ArtifactRegistry::V1::DockerImage DockerImage} + # {::Google::Cloud::ArtifactRegistry::V1::MavenArtifact MavenArtifact} + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client specified annotations. + # @!attribute [r] fingerprints + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] + # Output only. Immutable reference for the version, calculated based on the + # version's content. Currently we only support dirsum_sha256 hash algorithm. + # Additional hash algorithms may be added in the future. + class Version + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request to list versions. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource whose versions will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] view + # @return [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to order the results by. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. Filter + # rules are case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `annotations` + # + # Examples of using a filter: + # + # To filter the results of your request to versions with the name + # `my-version` in project `my-project` in the `us-central` region, in + # repository `my-repo`, append the following filter expression to your + # request: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` + # + # You can also use wildcards to match any number of characters before or + # after the value: + # + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` + # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` + # + # To filter the results of your request to versions with the annotation + # key-value pair [`external_link`: `external_link_value`], append the + # following filter expression to your request: + # + # * `"annotations.external_link:external_link_value"` + # + # To filter just for a specific annotation key `external_link`, append the + # following filter expression to your request: + # + # * `"annotations.external_link"` + # + # If the annotation key or value contains special characters, you can escape + # them by surrounding the value with backticks. For example, to filter the + # results of your request to versions with the annotation key-value pair + # [`external.link`:`https://example.com/my-version`], append the following + # filter expression to your request: + # + # * `` "annotations.`external.link`:`https://example.com/my-version`" `` + # + # You can also filter with annotations with a wildcard to + # match any number of characters before or after the value: + # + # * `` "annotations.*_link:`*example.com*`" `` + class ListVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing versions. + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Version>] + # The versions returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of versions, or empty if there are no + # more versions to return. + class ListVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a version. + # @!attribute [rw] name + # @return [::String] + # The name of the version to retrieve. + # @!attribute [rw] view + # @return [::Google::Cloud::ArtifactRegistry::V1::VersionView] + # The view that should be returned in the response. + class GetVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a version. + # @!attribute [rw] name + # @return [::String] + # The name of the version to delete. + # @!attribute [rw] force + # @return [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + class DeleteVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete multiple versions across a repository. + # @!attribute [rw] parent + # @return [::String] + # The name of the repository holding all requested versions. + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names of the versions to delete. + # The maximum number of versions deleted per batch is determined by the + # service and is dependent on the available resources in the region. + # @!attribute [rw] validate_only + # @return [::Boolean] + # If true, the request is performed without deleting data, following AIP-163. + class BatchDeleteVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata of an LRO from deleting multiple versions. + # @!attribute [rw] failed_versions + # @return [::Array<::String>] + # The versions the operation failed to delete. + class BatchDeleteVersionsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a version. + # @!attribute [rw] version + # @return [::Google::Cloud::ArtifactRegistry::V1::Version] + # Required. The Version that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The view, which determines what version information is returned in a + # response. + module VersionView + # The default / unset value. + # The API will default to the BASIC view. + VERSION_VIEW_UNSPECIFIED = 0 + + # Includes basic information about the version, but not any related tags. + BASIC = 1 + + # Include everything. + FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb new file mode 100644 index 000000000000..ddeb66c66eaa --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # The Artifact Registry VPC SC config that apply to a Project. + # @!attribute [rw] name + # @return [::String] + # The name of the project's VPC SC Config. + # + # Always of the form: + # projects/\\{projectID}/locations/\\{location}/vpcscConfig + # + # In update request: never set + # In response: always set + # @!attribute [rw] vpcsc_policy + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig::VPCSCPolicy] + # The project per location VPC SC policy that defines the VPC SC behavior for + # the Remote Repository (Allow/Deny). + class VPCSCConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VPCSCPolicy is the VPC SC policy for project and location. + module VPCSCPolicy + # VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined. + # When VPS SC policy is not defined - the Service will use the default + # behavior (VPCSC_DENY). + VPCSC_POLICY_UNSPECIFIED = 0 + + # VPCSC_DENY - repository will block the requests to the Upstreams for the + # Remote Repositories if the resource is in the perimeter. + DENY = 1 + + # VPCSC_ALLOW - repository will allow the requests to the Upstreams for the + # Remote Repositories if the resource is in the perimeter. + ALLOW = 2 + end + end + + # Gets the VPC SC config for a project. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the VPCSCConfig resource. + class GetVPCSCConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sets the VPCSC config of the project. + # @!attribute [rw] vpcsc_config + # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] + # The project config. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask to support partial updates. + class UpdateVPCSCConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb new file mode 100644 index 000000000000..dac974efbbdf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1 + # A detailed representation of a Yum artifact. + # @!attribute [r] name + # @return [::String] + # Output only. The Artifact Registry resource name of the artifact. + # @!attribute [r] package_name + # @return [::String] + # Output only. The yum package name of the artifact. + # @!attribute [r] package_type + # @return [::Google::Cloud::ArtifactRegistry::V1::YumArtifact::PackageType] + # Output only. An artifact is a binary or source package. + # @!attribute [r] architecture + # @return [::String] + # Output only. Operating system architecture of the artifact. + class YumArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Package type is either binary or source. + module PackageType + # Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0 + + # Binary package (.rpm). + BINARY = 1 + + # Source package (.srpm). + SOURCE = 2 + end + end + + # Google Cloud Storage location where the artifacts currently reside. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + # @!attribute [rw] use_wildcards + # @return [::Boolean] + # Supports URI wildcards for matching multiple objects from a single URI. + class ImportYumArtifactsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to import new yum artifacts. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource] + # Google Cloud Storage location where input content is located. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the artifacts will be imported. + class ImportYumArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error information explaining why a package was not imported. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource] + # Google Cloud Storage location requested. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The detailed error status. + class ImportYumArtifactsErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message from importing YUM artifacts. + # @!attribute [rw] yum_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::YumArtifact>] + # The yum artifacts imported. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsErrorInfo>] + # Detailed error info for packages that were not imported. + class ImportYumArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata for importing artifacts. + class ImportYumArtifactsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile new file mode 100644 index 000000000000..459cdcd60fe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-artifact_registry-v1", path: "../" +else + gem "google-cloud-artifact_registry-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb new file mode 100644 index 000000000000..3551d1fea5e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the batch_delete_versions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions. +# +def batch_delete_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new + + # Call the batch_delete_versions method. + result = client.batch_delete_versions request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb new file mode 100644 index 000000000000..faa2d06ad650 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the create_attachment call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment. +# +def create_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new + + # Call the create_attachment method. + result = client.create_attachment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb new file mode 100644 index 000000000000..da79982e2f09 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the create_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository. +# +def create_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new + + # Call the create_repository method. + result = client.create_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb new file mode 100644 index 000000000000..446cae77d141 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the create_rule call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule. +# +def create_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new + + # Call the create_rule method. + result = client.create_rule request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb new file mode 100644 index 000000000000..614917acd763 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the create_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag. +# +def create_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new + + # Call the create_tag method. + result = client.create_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb new file mode 100644 index 000000000000..a5a7848c4daa --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_attachment call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment. +# +def delete_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new + + # Call the delete_attachment method. + result = client.delete_attachment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb new file mode 100644 index 000000000000..fdcd3ccaa467 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_file call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file. +# +def delete_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new + + # Call the delete_file method. + result = client.delete_file request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb new file mode 100644 index 000000000000..5a655c2e4962 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package. +# +def delete_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new + + # Call the delete_package method. + result = client.delete_package request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb new file mode 100644 index 000000000000..640b18b6b3c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository. +# +def delete_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new + + # Call the delete_repository method. + result = client.delete_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb new file mode 100644 index 000000000000..558ed7cef6e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_rule call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule. +# +def delete_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new + + # Call the delete_rule method. + result = client.delete_rule request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb new file mode 100644 index 000000000000..91e16a183ca6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag. +# +def delete_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new + + # Call the delete_tag method. + result = client.delete_tag request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb new file mode 100644 index 000000000000..3eaddca23f51 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the delete_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version. +# +def delete_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new + + # Call the delete_version method. + result = client.delete_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb new file mode 100644 index 000000000000..5f1daba9d5a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the export_artifact call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact. +# +def export_artifact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new + + # Call the export_artifact method. + result = client.export_artifact request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb new file mode 100644 index 000000000000..b5b108c71355 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_attachment call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment. +# +def get_attachment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new + + # Call the get_attachment method. + result = client.get_attachment request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb new file mode 100644 index 000000000000..0ef05ed884cb --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_docker_image call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image. +# +def get_docker_image + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new + + # Call the get_docker_image method. + result = client.get_docker_image request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb new file mode 100644 index 000000000000..197816935c4b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_file call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file. +# +def get_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new + + # Call the get_file method. + result = client.get_file request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb new file mode 100644 index 000000000000..1afea8a55d98 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_iam_policy call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb new file mode 100644 index 000000000000..565ab113d0f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_maven_artifact call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact. +# +def get_maven_artifact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new + + # Call the get_maven_artifact method. + result = client.get_maven_artifact request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb new file mode 100644 index 000000000000..e3fb548ad087 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_npm_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package. +# +def get_npm_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new + + # Call the get_npm_package method. + result = client.get_npm_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb new file mode 100644 index 000000000000..e8bca8350df6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package. +# +def get_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new + + # Call the get_package method. + result = client.get_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb new file mode 100644 index 000000000000..cfb98bbd9209 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_project_settings call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings. +# +def get_project_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new + + # Call the get_project_settings method. + result = client.get_project_settings request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb new file mode 100644 index 000000000000..df5c6449c907 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_python_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package. +# +def get_python_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new + + # Call the get_python_package method. + result = client.get_python_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb new file mode 100644 index 000000000000..4919f715af65 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository. +# +def get_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new + + # Call the get_repository method. + result = client.get_repository request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb new file mode 100644 index 000000000000..64edea734465 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_rule call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule. +# +def get_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new + + # Call the get_rule method. + result = client.get_rule request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb new file mode 100644 index 000000000000..38020d4c9027 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag. +# +def get_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new + + # Call the get_tag method. + result = client.get_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb new file mode 100644 index 000000000000..ebfc4996d184 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version. +# +def get_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new + + # Call the get_version method. + result = client.get_version request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb new file mode 100644 index 000000000000..6396617d1fd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the get_vpcsc_config call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config. +# +def get_vpcsc_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new + + # Call the get_vpcsc_config method. + result = client.get_vpcsc_config request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb new file mode 100644 index 000000000000..1d1c19f659e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the import_apt_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts. +# +def import_apt_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new + + # Call the import_apt_artifacts method. + result = client.import_apt_artifacts request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb new file mode 100644 index 000000000000..3b576e4026b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the import_yum_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts. +# +def import_yum_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new + + # Call the import_yum_artifacts method. + result = client.import_yum_artifacts request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb new file mode 100644 index 000000000000..c0e7bcf3df0d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_attachments call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments. +# +def list_attachments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new + + # Call the list_attachments method. + result = client.list_attachments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb new file mode 100644 index 000000000000..f5ae43a24fcb --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_docker_images call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images. +# +def list_docker_images + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new + + # Call the list_docker_images method. + result = client.list_docker_images request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb new file mode 100644 index 000000000000..ef775fe14faa --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_files call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files. +# +def list_files + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new + + # Call the list_files method. + result = client.list_files request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb new file mode 100644 index 000000000000..9485dc527e7e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_maven_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts. +# +def list_maven_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new + + # Call the list_maven_artifacts method. + result = client.list_maven_artifacts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb new file mode 100644 index 000000000000..5139dde54193 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_npm_packages call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages. +# +def list_npm_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new + + # Call the list_npm_packages method. + result = client.list_npm_packages request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb new file mode 100644 index 000000000000..13c4c0a14971 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_packages call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages. +# +def list_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new + + # Call the list_packages method. + result = client.list_packages request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb new file mode 100644 index 000000000000..d87b40b2c0cf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_python_packages call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages. +# +def list_python_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new + + # Call the list_python_packages method. + result = client.list_python_packages request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb new file mode 100644 index 000000000000..097d7c46cbf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_repositories call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories. +# +def list_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new + + # Call the list_repositories method. + result = client.list_repositories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Repository. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb new file mode 100644 index 000000000000..0e2f6de5c8fe --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_rules call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules. +# +def list_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new + + # Call the list_rules method. + result = client.list_rules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb new file mode 100644 index 000000000000..0e0ed6c2658e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_tags call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags. +# +def list_tags + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new + + # Call the list_tags method. + result = client.list_tags request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb new file mode 100644 index 000000000000..4c0c49ab3fe0 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the list_versions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions. +# +def list_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new + + # Call the list_versions method. + result = client.list_versions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Version. + p item + end +end +# [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb new file mode 100644 index 000000000000..976e507f153a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the set_iam_policy call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb new file mode 100644 index 000000000000..df231fd7b342 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the test_iam_permissions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb new file mode 100644 index 000000000000..b45c4176571a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_file call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file. +# +def update_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new + + # Call the update_file method. + result = client.update_file request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb new file mode 100644 index 000000000000..39121b1eecdd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package. +# +def update_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new + + # Call the update_package method. + result = client.update_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb new file mode 100644 index 000000000000..fbc2f9584b3c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_project_settings call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings. +# +def update_project_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new + + # Call the update_project_settings method. + result = client.update_project_settings request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb new file mode 100644 index 000000000000..7831d02528b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository. +# +def update_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new + + # Call the update_repository method. + result = client.update_repository request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb new file mode 100644 index 000000000000..3304a6d9f6f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_rule call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule. +# +def update_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new + + # Call the update_rule method. + result = client.update_rule request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb new file mode 100644 index 000000000000..658e94dda101 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag. +# +def update_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new + + # Call the update_tag method. + result = client.update_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb new file mode 100644 index 000000000000..b1e1b1b96fea --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version. +# +def update_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new + + # Call the update_version method. + result = client.update_version request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb new file mode 100644 index 000000000000..2d206b7333ad --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] +require "google/cloud/artifact_registry/v1" + +## +# Snippet for the update_vpcsc_config call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config. +# +def update_vpcsc_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new + + # Call the update_vpcsc_config method. + result = client.update_vpcsc_config request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. + p result +end +# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json new file mode 100644 index 000000000000..5ee717882e69 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -0,0 +1,2015 @@ +{ + "client_library": { + "name": "google-cloud-artifact_registry-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.devtools.artifactregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync", + "title": "Snippet for the list_docker_images call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images.", + "file": "artifact_registry/list_docker_images.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_docker_images", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListDockerImages", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync", + "title": "Snippet for the get_docker_image call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image.", + "file": "artifact_registry/get_docker_image.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_docker_image", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::DockerImage", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetDockerImage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync", + "title": "Snippet for the list_maven_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts.", + "file": "artifact_registry/list_maven_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_maven_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListMavenArtifacts", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync", + "title": "Snippet for the get_maven_artifact call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact.", + "file": "artifact_registry/get_maven_artifact.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_maven_artifact", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::MavenArtifact", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetMavenArtifact", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync", + "title": "Snippet for the list_npm_packages call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages.", + "file": "artifact_registry/list_npm_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_npm_packages", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListNpmPackages", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync", + "title": "Snippet for the get_npm_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package.", + "file": "artifact_registry/get_npm_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_npm_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::NpmPackage", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetNpmPackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync", + "title": "Snippet for the list_python_packages call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages.", + "file": "artifact_registry/list_python_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_python_packages", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListPythonPackages", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync", + "title": "Snippet for the get_python_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package.", + "file": "artifact_registry/get_python_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_python_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::PythonPackage", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetPythonPackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync", + "title": "Snippet for the import_apt_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts.", + "file": "artifact_registry/import_apt_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_apt_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ImportAptArtifacts", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync", + "title": "Snippet for the import_yum_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts.", + "file": "artifact_registry/import_yum_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_yum_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ImportYumArtifacts", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync", + "title": "Snippet for the list_repositories call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories.", + "file": "artifact_registry/list_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_repositories", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListRepositories", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositories", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync", + "title": "Snippet for the get_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository.", + "file": "artifact_registry/get_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Repository", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetRepository", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync", + "title": "Snippet for the create_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository.", + "file": "artifact_registry/create_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateRepository", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync", + "title": "Snippet for the update_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository.", + "file": "artifact_registry/update_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Repository", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateRepository", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync", + "title": "Snippet for the delete_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository.", + "file": "artifact_registry/delete_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteRepository", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync", + "title": "Snippet for the list_packages call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages.", + "file": "artifact_registry/list_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_packages", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListPackages", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync", + "title": "Snippet for the get_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package.", + "file": "artifact_registry/get_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Package", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetPackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync", + "title": "Snippet for the delete_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package.", + "file": "artifact_registry/delete_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeletePackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync", + "title": "Snippet for the list_versions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions.", + "file": "artifact_registry/list_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_versions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListVersions", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync", + "title": "Snippet for the get_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version.", + "file": "artifact_registry/get_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Version", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetVersion", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync", + "title": "Snippet for the delete_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version.", + "file": "artifact_registry/delete_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteVersion", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync", + "title": "Snippet for the batch_delete_versions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions.", + "file": "artifact_registry/batch_delete_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_delete_versions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "BatchDeleteVersions", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync", + "title": "Snippet for the update_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version.", + "file": "artifact_registry/update_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Version", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateVersion", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync", + "title": "Snippet for the list_files call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files.", + "file": "artifact_registry/list_files.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_files", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListFiles", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync", + "title": "Snippet for the get_file call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file.", + "file": "artifact_registry/get_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_file", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::File", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetFile", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync", + "title": "Snippet for the delete_file call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file.", + "file": "artifact_registry/delete_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_file", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteFile", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFile", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync", + "title": "Snippet for the update_file call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file.", + "file": "artifact_registry/update_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_file", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::File", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateFile", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFile", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync", + "title": "Snippet for the list_tags call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags.", + "file": "artifact_registry/list_tags.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tags", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListTags", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync", + "title": "Snippet for the get_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag.", + "file": "artifact_registry/get_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetTag", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync", + "title": "Snippet for the create_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag.", + "file": "artifact_registry/create_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateTag", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync", + "title": "Snippet for the update_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag.", + "file": "artifact_registry/update_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateTag", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync", + "title": "Snippet for the delete_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag.", + "file": "artifact_registry/delete_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteTag", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync", + "title": "Snippet for the create_rule call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule.", + "file": "artifact_registry/create_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_rule", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateRule", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRule", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync", + "title": "Snippet for the list_rules call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules.", + "file": "artifact_registry/list_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rules", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListRules", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRules", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync", + "title": "Snippet for the get_rule call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule.", + "file": "artifact_registry/get_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rule", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetRule", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRule", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync", + "title": "Snippet for the update_rule call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule.", + "file": "artifact_registry/update_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rule", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateRule", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRule", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync", + "title": "Snippet for the delete_rule call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule.", + "file": "artifact_registry/delete_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_rule", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteRule", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRule", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy.", + "file": "artifact_registry/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy.", + "file": "artifact_registry/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions.", + "file": "artifact_registry/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync", + "title": "Snippet for the get_project_settings call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings.", + "file": "artifact_registry/get_project_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_project_settings", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ProjectSettings", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetProjectSettings", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync", + "title": "Snippet for the update_project_settings call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings.", + "file": "artifact_registry/update_project_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_project_settings", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ProjectSettings", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateProjectSettings", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync", + "title": "Snippet for the get_vpcsc_config call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config.", + "file": "artifact_registry/get_vpcsc_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vpcsc_config", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetVPCSCConfig", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync", + "title": "Snippet for the update_vpcsc_config call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config.", + "file": "artifact_registry/update_vpcsc_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vpcsc_config", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateVPCSCConfig", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync", + "title": "Snippet for the update_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package.", + "file": "artifact_registry/update_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Package", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdatePackage", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync", + "title": "Snippet for the list_attachments call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments.", + "file": "artifact_registry/list_attachments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_attachments", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListAttachments", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachments", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync", + "title": "Snippet for the get_attachment call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment.", + "file": "artifact_registry/get_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_attachment", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1::Attachment", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetAttachment", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachment", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync", + "title": "Snippet for the create_attachment call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment.", + "file": "artifact_registry/create_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_attachment", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateAttachment", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachment", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync", + "title": "Snippet for the delete_attachment call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment.", + "file": "artifact_registry/delete_attachment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_attachment", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteAttachment", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachment", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync", + "title": "Snippet for the export_artifact call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact.", + "file": "artifact_registry/export_artifact.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_artifact", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ExportArtifact", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifact", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb new file mode 100644 index 000000000000..b88fa033a980 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/devtools/artifactregistry/v1/service_pb" +require "google/devtools/artifactregistry/v1/service_services_pb" +require "google/cloud/artifact_registry/v1/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb new file mode 100644 index 000000000000..ee6f6455b726 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb @@ -0,0 +1,223 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/artifact_registry/v1/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.attachment_path project: "value0", location: "value1", repository: "value2", attachment: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/attachments/value3", path + end + end + + def test_docker_image_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.docker_image_path project: "value0", location: "value1", repository: "value2", docker_image: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/dockerImages/value3", path + end + end + + def test_file_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.file_path project: "value0", location: "value1", repository: "value2", file: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/files/value3", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_maven_artifact_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.maven_artifact_path project: "value0", location: "value1", repository: "value2", maven_artifact: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/mavenArtifacts/value3", path + end + end + + def test_npm_package_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.npm_package_path project: "value0", location: "value1", repository: "value2", npm_package: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/npmPackages/value3", path + end + end + + def test_package_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.package_path project: "value0", location: "value1", repository: "value2", package: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3", path + end + end + + def test_project_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_settings_path project: "value0" + assert_equal "projects/value0/projectSettings", path + end + end + + def test_python_package_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.python_package_path project: "value0", location: "value1", repository: "value2", python_package: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/pythonPackages/value3", path + end + end + + def test_repository_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.repository_path project: "value0", location: "value1", repository: "value2" + assert_equal "projects/value0/locations/value1/repositories/value2", path + end + end + + def test_rule_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rule_path project: "value0", location: "value1", repository: "value2", rule: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/rules/value3", path + end + end + + def test_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + end + end + + def test_tag_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tag_path project: "value0", location: "value1", repository: "value2", package: "value3", tag: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/tags/value4", path + end + end + + def test_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.version_path project: "value0", location: "value1", repository: "value2", package: "value3", version: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/versions/value4", path + end + end + + def test_vpcsc_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vpcsc_config_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/vpcscConfig", path + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb new file mode 100644 index 000000000000..9529929725eb --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb @@ -0,0 +1,2861 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/devtools/artifactregistry/v1/service_pb" +require "google/cloud/artifact_registry/v1/artifact_registry/rest" + + +class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_docker_images + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_docker_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_docker_images_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_docker_images_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_docker_images parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_docker_images ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_docker_images(::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_docker_images_client_stub.call_count + end + end + end + + def test_get_docker_image + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_docker_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_docker_image_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_docker_image_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_docker_image({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_docker_image name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_docker_image ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_docker_image({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_docker_image(::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_docker_image_client_stub.call_count + end + end + end + + def test_list_maven_artifacts + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_maven_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_maven_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_maven_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_maven_artifacts parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_maven_artifacts ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_maven_artifacts(::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_maven_artifacts_client_stub.call_count + end + end + end + + def test_get_maven_artifact + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_maven_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_maven_artifact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_maven_artifact_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_maven_artifact({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_maven_artifact name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_maven_artifact ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_maven_artifact({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_maven_artifact(::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_maven_artifact_client_stub.call_count + end + end + end + + def test_list_npm_packages + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_npm_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_npm_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_npm_packages_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_npm_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_npm_packages parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_npm_packages ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_npm_packages({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_npm_packages(::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_npm_packages_client_stub.call_count + end + end + end + + def test_get_npm_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_npm_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_npm_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_npm_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_npm_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_npm_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_npm_package ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_npm_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_npm_package(::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_npm_package_client_stub.call_count + end + end + end + + def test_list_python_packages + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_python_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_python_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_python_packages_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_python_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_python_packages parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_python_packages ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_python_packages({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_python_packages(::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_python_packages_client_stub.call_count + end + end + end + + def test_get_python_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_python_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_python_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_python_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_python_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_python_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_python_package ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_python_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_python_package(::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_python_package_client_stub.call_count + end + end + end + + def test_import_apt_artifacts + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_apt_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_apt_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_apt_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_apt_artifacts gcs_source: gcs_source, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_apt_artifacts_client_stub.call_count + end + end + end + + def test_import_yum_artifacts + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_yum_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_yum_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_yum_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_yum_artifacts gcs_source: gcs_source, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_yum_artifacts_client_stub.call_count + end + end + end + + def test_list_repositories + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_repositories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_repositories parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_repositories ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_repositories(::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_repositories_client_stub.call_count + end + end + end + + def test_get_repository + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Repository.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_repository({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_repository name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_repository ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_repository({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_repository(::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_repository_client_stub.call_count + end + end + end + + def test_create_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + repository_id = "hello world" + repository = {} + + create_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_repository parent: parent, repository_id: repository_id, repository: repository do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_repository ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_repository(::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_repository_client_stub.call_count + end + end + end + + def test_update_repository + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Repository.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + repository = {} + update_mask = {} + + update_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_repository({ repository: repository, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_repository repository: repository, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_repository ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_repository({ repository: repository, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_repository(::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_repository_client_stub.call_count + end + end + end + + def test_delete_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_repository({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_repository name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_repository ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_repository({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_repository(::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_repository_client_stub.call_count + end + end + end + + def test_list_packages + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_packages_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_packages parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_packages ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_packages(::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_packages_client_stub.call_count + end + end + end + + def test_get_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Package.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_package ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_package(::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_package_client_stub.call_count + end + end + end + + def test_delete_package + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_package ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_package(::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_package_client_stub.call_count + end + end + end + + def test_list_versions + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + order_by = "hello world" + filter = "hello world" + + list_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_versions ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_versions(::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_count + end + end + end + + def test_get_version + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Version.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + + get_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_version({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_version name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_version ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_version({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_version(::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_count + end + end + end + + def test_delete_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_version({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_version name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_version ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_version({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_version(::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_count + end + end + end + + def test_batch_delete_versions + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + validate_only = true + + batch_delete_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_batch_delete_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_delete_versions_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_delete_versions parent: parent, names: names, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_delete_versions ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_delete_versions(::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_delete_versions_client_stub.call_count + end + end + end + + def test_update_version + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Version.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + version = {} + update_mask = {} + + update_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_version({ version: version, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_version version: version, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_version ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_version({ version: version, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_version(::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_version_client_stub.call_count + end + end + end + + def test_list_files + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_files_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_files_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_files ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_files(::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_files_client_stub.call_count + end + end + end + + def test_get_file + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::File.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_file_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_file({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_file name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_file ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_file({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_file(::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_file_client_stub.call_count + end + end + end + + def test_delete_file + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_file_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_file({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_file name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_file ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_file({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_file(::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_file_client_stub.call_count + end + end + end + + def test_update_file + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::File.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + file = {} + update_mask = {} + + update_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_file_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_file({ file: file, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_file file: file, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_file ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_file({ file: file, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_file(::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_file_client_stub.call_count + end + end + end + + def test_list_tags + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_tags_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_tags_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tags_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tags parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tags ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_tags(::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tags_client_stub.call_count + end + end + end + + def test_get_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_tag({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_tag name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_tag ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_tag({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_tag(::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_tag_client_stub.call_count + end + end + end + + def test_create_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tag_id = "hello world" + tag = {} + + create_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_tag parent: parent, tag_id: tag_id, tag: tag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_tag ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_tag(::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_tag_client_stub.call_count + end + end + end + + def test_update_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + tag = {} + update_mask = {} + + update_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_tag({ tag: tag, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_tag tag: tag, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_tag ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_tag({ tag: tag, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_tag(::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_tag_client_stub.call_count + end + end + end + + def test_delete_tag + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_tag({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_tag name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_tag ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_tag({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_tag(::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_tag_client_stub.call_count + end + end + end + + def test_create_rule + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule_id = "hello world" + rule = {} + + create_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_rule({ parent: parent, rule_id: rule_id, rule: rule }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_rule parent: parent, rule_id: rule_id, rule: rule do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_rule ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_rule({ parent: parent, rule_id: rule_id, rule: rule }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_rule(::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_count + end + end + end + + def test_list_rules + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rules ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rules(::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rules_client_stub.call_count + end + end + end + + def test_get_rule + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rule ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rule(::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_count + end + end + end + + def test_update_rule + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rule = {} + update_mask = {} + + update_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_rule rule: rule, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_rule ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_rule(::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rule_client_stub.call_count + end + end + end + + def test_delete_rule + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_rule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_rule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_rule ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_rule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_rule(::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_get_project_settings + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_project_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_project_settings_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_project_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_project_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_project_settings ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_project_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_project_settings(::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_project_settings_client_stub.call_count + end + end + end + + def test_update_project_settings + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project_settings = {} + update_mask = {} + + update_project_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_project_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_project_settings_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_project_settings project_settings: project_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_project_settings ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_project_settings(::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_project_settings_client_stub.call_count + end + end + end + + def test_get_vpcsc_config + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_vpcsc_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_vpcsc_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_vpcsc_config_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_vpcsc_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_vpcsc_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_vpcsc_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_vpcsc_config_client_stub.call_count + end + end + end + + def test_update_vpcsc_config + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + vpcsc_config = {} + update_mask = {} + + update_vpcsc_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_vpcsc_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_vpcsc_config_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_vpcsc_config vpcsc_config: vpcsc_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_vpcsc_config_client_stub.call_count + end + end + end + + def test_update_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Package.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + package = {} + update_mask = {} + + update_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_package({ package: package, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_package package: package, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_package ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_package({ package: package, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_package(::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_package_client_stub.call_count + end + end + end + + def test_list_attachments + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_attachments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_attachments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_attachments_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_attachments({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_attachments parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_attachments ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_attachments({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_attachments(::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_attachments_client_stub.call_count + end + end + end + + def test_get_attachment + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1::Attachment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_attachment_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_attachment ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_attachment(::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_attachment_client_stub.call_count + end + end + end + + def test_create_attachment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + attachment_id = "hello world" + attachment = {} + + create_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_attachment_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_attachment parent: parent, attachment_id: attachment_id, attachment: attachment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_attachment ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_attachment(::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_attachment_client_stub.call_count + end + end + end + + def test_delete_attachment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_attachment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_attachment_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_attachment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_attachment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_attachment ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_attachment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_attachment(::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_attachment_client_stub.call_count + end + end + end + + def test_export_artifact + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + source_version = "hello world" + gcs_path = "hello world" + repository = "hello world" + + export_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_export_artifact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_artifact_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_artifact source_version: source_version, gcs_path: gcs_path, repository: repository do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_artifact ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_artifact(::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_artifact_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb new file mode 100644 index 000000000000..67a6a7cfdec9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb @@ -0,0 +1,3256 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/devtools/artifactregistry/v1/service_pb" +require "google/cloud/artifact_registry/v1/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_docker_images + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_docker_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_docker_images, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_docker_images_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_docker_images parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_docker_images ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_docker_images(::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_docker_images_client_stub.call_rpc_count + end + end + + def test_get_docker_image + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_docker_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_docker_image, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_docker_image_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_docker_image({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_docker_image name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_docker_image ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_docker_image({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_docker_image(::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_docker_image_client_stub.call_rpc_count + end + end + + def test_list_maven_artifacts + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_maven_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_maven_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_maven_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_maven_artifacts parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_maven_artifacts ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_maven_artifacts(::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_maven_artifacts_client_stub.call_rpc_count + end + end + + def test_get_maven_artifact + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_maven_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_maven_artifact, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_maven_artifact_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_maven_artifact({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_maven_artifact name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_maven_artifact ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_maven_artifact({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_maven_artifact(::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_maven_artifact_client_stub.call_rpc_count + end + end + + def test_list_npm_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_npm_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_npm_packages, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_npm_packages_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_npm_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_npm_packages parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_npm_packages ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_npm_packages({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_npm_packages(::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_npm_packages_client_stub.call_rpc_count + end + end + + def test_get_npm_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_npm_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_npm_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_npm_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_npm_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_npm_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_npm_package ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_npm_package({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_npm_package(::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_npm_package_client_stub.call_rpc_count + end + end + + def test_list_python_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_python_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_python_packages, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_python_packages_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_python_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_python_packages parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_python_packages ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_python_packages({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_python_packages(::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_python_packages_client_stub.call_rpc_count + end + end + + def test_get_python_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_python_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_python_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_python_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_python_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_python_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_python_package ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_python_package({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_python_package(::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_python_package_client_stub.call_rpc_count + end + end + + def test_import_apt_artifacts + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_apt_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_apt_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_apt_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_apt_artifacts gcs_source: gcs_source, parent: parent do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_apt_artifacts_client_stub.call_rpc_count + end + end + + def test_import_yum_artifacts + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_yum_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_yum_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_yum_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_yum_artifacts gcs_source: gcs_source, parent: parent do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_yum_artifacts_client_stub.call_rpc_count + end + end + + def test_list_repositories + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_repositories, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_repositories_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_repositories parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_repositories ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_repositories(::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_repositories_client_stub.call_rpc_count + end + end + + def test_get_repository + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Repository.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_repository({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_repository name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_repository ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_repository({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_repository(::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_repository_client_stub.call_rpc_count + end + end + + def test_create_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + repository_id = "hello world" + repository = {} + + create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["repository_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Repository), request["repository"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_repository parent: parent, repository_id: repository_id, repository: repository do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_repository ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_repository(::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_repository_client_stub.call_rpc_count + end + end + + def test_update_repository + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Repository.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + repository = {} + update_mask = {} + + update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Repository), request["repository"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_repository({ repository: repository, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_repository repository: repository, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_repository ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_repository({ repository: repository, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_repository(::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_repository_client_stub.call_rpc_count + end + end + + def test_delete_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_repository({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_repository name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_repository ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_repository({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_repository(::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_repository_client_stub.call_rpc_count + end + end + + def test_list_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_packages, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_packages_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_packages parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_packages ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_packages(::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_packages_client_stub.call_rpc_count + end + end + + def test_get_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Package.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_package ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_package({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_package(::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_package_client_stub.call_rpc_count + end + end + + def test_delete_package + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_package({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_package name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_package ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_package({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_package(::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_package_client_stub.call_rpc_count + end + end + + def test_list_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + order_by = "hello world" + filter = "hello world" + + list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_versions, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_versions_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_versions ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_versions(::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_rpc_count + end + end + + def test_get_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Version.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + + get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_version({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_version name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_version ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_version({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_version(::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_rpc_count + end + end + + def test_delete_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_version({ name: name, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_version name: name, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_version ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_version({ name: name, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_version(::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_rpc_count + end + end + + def test_batch_delete_versions + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + validate_only = true + + batch_delete_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_delete_versions, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_delete_versions_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_delete_versions parent: parent, names: names, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_delete_versions ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_delete_versions(::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_delete_versions_client_stub.call_rpc_count + end + end + + def test_update_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Version.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + version = {} + update_mask = {} + + update_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Version), request["version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_version({ version: version, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_version version: version, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_version ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_version({ version: version, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_version(::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_version_client_stub.call_rpc_count + end + end + + def test_list_files + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_files, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_files_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_files ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_files(::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_files_client_stub.call_rpc_count + end + end + + def test_get_file + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::File.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_file, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_file_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_file({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_file name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_file ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_file({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_file(::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_file_client_stub.call_rpc_count + end + end + + def test_delete_file + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_file, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_file_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_file({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_file name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_file ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_file({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_file(::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_file_client_stub.call_rpc_count + end + end + + def test_update_file + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::File.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + file = {} + update_mask = {} + + update_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_file, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::File), request["file"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_file_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_file({ file: file, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_file file: file, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_file ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_file({ file: file, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_file(::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_file_client_stub.call_rpc_count + end + end + + def test_list_tags + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_tags_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tags, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tags_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_tags parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_tags ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_tags(::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tags_client_stub.call_rpc_count + end + end + + def test_get_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_tag({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_tag name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_tag ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_tag({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_tag(::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_tag_client_stub.call_rpc_count + end + end + + def test_create_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tag_id = "hello world" + tag = {} + + create_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["tag_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Tag), request["tag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_tag parent: parent, tag_id: tag_id, tag: tag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_tag ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_tag(::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_tag_client_stub.call_rpc_count + end + end + + def test_update_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + tag = {} + update_mask = {} + + update_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Tag), request["tag"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_tag({ tag: tag, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_tag tag: tag, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_tag ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_tag({ tag: tag, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_tag(::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_tag_client_stub.call_rpc_count + end + end + + def test_delete_tag + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_tag({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_tag name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_tag ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_tag({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_tag(::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_tag_client_stub.call_rpc_count + end + end + + def test_create_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule_id = "hello world" + rule = {} + + create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_rule, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rule_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Rule), request["rule"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_rule_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_rule({ parent: parent, rule_id: rule_id, rule: rule }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_rule parent: parent, rule_id: rule_id, rule: rule do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_rule ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_rule({ parent: parent, rule_id: rule_id, rule: rule }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_rule(::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_rpc_count + end + end + + def test_list_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rules, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rules_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_rules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_rules ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_rules(::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_rules_client_stub.call_rpc_count + end + end + + def test_get_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rule, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rule_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rule ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rule({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_rule(::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_rpc_count + end + end + + def test_update_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + rule = {} + update_mask = {} + + update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rule, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Rule), request["rule"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rule_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_rule rule: rule, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_rule ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_rule({ rule: rule, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_rule(::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_rule_client_stub.call_rpc_count + end + end + + def test_delete_rule + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_rule, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_rule_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_rule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_rule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_rule ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_rule({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_rule(::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_get_project_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_project_settings, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_project_settings_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_project_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_project_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_project_settings ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_project_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_project_settings(::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_project_settings_client_stub.call_rpc_count + end + end + + def test_update_project_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + project_settings = {} + update_mask = {} + + update_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_project_settings, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings), request["project_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_project_settings_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_project_settings project_settings: project_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_project_settings ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_project_settings(::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_project_settings_client_stub.call_rpc_count + end + end + + def test_get_vpcsc_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_vpcsc_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vpcsc_config, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vpcsc_config_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_vpcsc_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_vpcsc_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_vpcsc_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_vpcsc_config_client_stub.call_rpc_count + end + end + + def test_update_vpcsc_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + vpcsc_config = {} + update_mask = {} + + update_vpcsc_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vpcsc_config, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig), request["vpcsc_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vpcsc_config_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_vpcsc_config vpcsc_config: vpcsc_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_vpcsc_config_client_stub.call_rpc_count + end + end + + def test_update_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Package.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + package = {} + update_mask = {} + + update_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Package), request["package"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_package({ package: package, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_package package: package, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_package ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_package({ package: package, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_package(::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_package_client_stub.call_rpc_count + end + end + + def test_list_attachments + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_attachments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_attachments, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_attachments_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_attachments({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_attachments parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_attachments ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_attachments({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_attachments(::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_attachments_client_stub.call_rpc_count + end + end + + def test_get_attachment + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Attachment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_attachment, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_attachment_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_attachment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_attachment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_attachment ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_attachment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_attachment(::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_attachment_client_stub.call_rpc_count + end + end + + def test_create_attachment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + attachment_id = "hello world" + attachment = {} + + create_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_attachment, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["attachment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Attachment), request["attachment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_attachment_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_attachment parent: parent, attachment_id: attachment_id, attachment: attachment do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_attachment ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_attachment(::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_attachment_client_stub.call_rpc_count + end + end + + def test_delete_attachment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_attachment, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_attachment_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_attachment({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_attachment name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_attachment ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_attachment({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_attachment(::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_attachment_client_stub.call_rpc_count + end + end + + def test_export_artifact + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + source_version = "hello world" + gcs_path = "hello world" + repository = "hello world" + + export_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_artifact, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, request + assert_equal "hello world", request["source_version"] + assert_equal :source_version, request.source_artifact + assert_equal "hello world", request["gcs_path"] + assert_equal :gcs_path, request.destination + assert_equal "hello world", request["repository"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_artifact_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_artifact source_version: source_version, gcs_path: gcs_path, repository: repository do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_artifact ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_artifact(::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_artifact_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json new file mode 100644 index 000000000000..7910a7e9b677 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "artifactregistry.googleapis.com", + "api_shortname": "artifactregistry", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest", + "distribution_name": "google-cloud-artifact_registry-v1beta2", + "is_cloud": true, + "language": "ruby", + "name": "artifactregistry", + "name_pretty": "Artifact Registry V1beta2 API", + "product_documentation": "https://cloud.google.com/artifact-registry/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ARTIFACT_REGISTRY", + "ruby-cloud-product-url": "https://cloud.google.com/artifact-registry/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml new file mode 100644 index 000000000000..6d12e8a99a67 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-artifact_registry-v1beta2.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-artifact_registry-v1beta2.rb" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts new file mode 100644 index 000000000000..577e906ef894 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Artifact Registry V1beta2 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md new file mode 100644 index 000000000000..658611b9d9e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-artifact_registry-v1beta2 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-artifact_registry-v1beta2 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/artifact_registry/v1beta2" + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/artifact_registry/v1beta2" + +::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-artifact_registry-v1beta2 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/artifact_registry/v1beta2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md new file mode 100644 index 000000000000..94ae812d7df2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Artifact Registry V1beta2 API + +Store and manage build artifacts in a scalable and integrated service built on Google infrastructure. + +Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Artifact Registry V1beta2 API. Most users should consider using +the main client gem, +[google-cloud-artifact_registry](https://rubygems.org/gems/google-cloud-artifact_registry). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-artifact_registry-v1beta2 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/artifact_registry/v1beta2" + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new +request = ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new # (request fields as keyword arguments...) +response = client.import_apt_artifacts request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/artifact-registry/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/artifact_registry/v1beta2" +require "logger" + +client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-artifact_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-artifact_registry-v1beta2`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-artifact_registry`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-artifact_registry-v1beta2`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile new file mode 100644 index 000000000000..1d749b6abb41 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-artifact_registry-v1beta2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ARTIFACT_REGISTRY_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ARTIFACT_REGISTRY_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ARTIFACT_REGISTRY_TEST_PROJECT=test123 ARTIFACT_REGISTRY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ARTIFACT_REGISTRY_PROJECT"] = project + ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] = project + ENV["ARTIFACT_REGISTRY_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-artifact_registry-v1beta2 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-artifact_registry-v1beta2 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-artifact_registry-v1beta2 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-artifact_registry-v1beta2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-artifact_registry-v1beta2" + header "google-cloud-artifact_registry-v1beta2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-artifact_registry-v1beta2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-artifact_registry-v1beta2 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-artifact_registry-v1beta2 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-artifact_registry-v1beta2 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json new file mode 100644 index 000000000000..478bacfc4ddd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json @@ -0,0 +1,143 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.devtools.artifactregistry.v1beta2", + "libraryPackage": "::Google::Cloud::ArtifactRegistry::V1beta2", + "services": { + "ArtifactRegistry": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client", + "rpcs": { + "ImportAptArtifacts": { + "methods": [ + "import_apt_artifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "import_yum_artifacts" + ] + }, + "ListRepositories": { + "methods": [ + "list_repositories" + ] + }, + "GetRepository": { + "methods": [ + "get_repository" + ] + }, + "CreateRepository": { + "methods": [ + "create_repository" + ] + }, + "UpdateRepository": { + "methods": [ + "update_repository" + ] + }, + "DeleteRepository": { + "methods": [ + "delete_repository" + ] + }, + "ListPackages": { + "methods": [ + "list_packages" + ] + }, + "GetPackage": { + "methods": [ + "get_package" + ] + }, + "DeletePackage": { + "methods": [ + "delete_package" + ] + }, + "ListVersions": { + "methods": [ + "list_versions" + ] + }, + "GetVersion": { + "methods": [ + "get_version" + ] + }, + "DeleteVersion": { + "methods": [ + "delete_version" + ] + }, + "ListFiles": { + "methods": [ + "list_files" + ] + }, + "GetFile": { + "methods": [ + "get_file" + ] + }, + "ListTags": { + "methods": [ + "list_tags" + ] + }, + "GetTag": { + "methods": [ + "get_tag" + ] + }, + "CreateTag": { + "methods": [ + "create_tag" + ] + }, + "UpdateTag": { + "methods": [ + "update_tag" + ] + }, + "DeleteTag": { + "methods": [ + "delete_tag" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "get_project_settings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "update_project_settings" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec new file mode 100644 index 000000000000..7af21b8ecad3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/artifact_registry/v1beta2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-artifact_registry-v1beta2" + gem.version = Google::Cloud::ArtifactRegistry::V1beta2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details." + gem.summary = "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb new file mode 100644 index 000000000000..42773d56b713 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/artifact_registry/v1beta2" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb new file mode 100644 index 000000000000..5a48465dc9de --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/artifact_registry/v1beta2/artifact_registry" +require "google/cloud/artifact_registry/v1beta2/version" + +module Google + module Cloud + module ArtifactRegistry + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/artifact_registry/v1beta2" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/artifact_registry/v1beta2" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module V1beta2 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta2", "_helpers.rb" +require "google/cloud/artifact_registry/v1beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb new file mode 100644 index 000000000000..de5f1fa1ee86 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/artifact_registry/v1beta2/version" + +require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/operations" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/client" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + ## + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/artifact_registry/v1beta2/artifact_registry" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module ArtifactRegistry + end + end + end + end +end + +helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb new file mode 100644 index 000000000000..cd41e2a04e6a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb @@ -0,0 +1,3002 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + ## + # Client for the ArtifactRegistry service. + # + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :artifact_registry_stub + + ## + # Configure the ArtifactRegistry Client class. + # + # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ArtifactRegistry clients + # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ArtifactRegistry", "V1beta2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_repositories.timeout = 30.0 + default_config.rpcs.list_repositories.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_repository.timeout = 30.0 + default_config.rpcs.get_repository.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_repository.timeout = 30.0 + + default_config.rpcs.update_repository.timeout = 30.0 + + default_config.rpcs.delete_repository.timeout = 30.0 + default_config.rpcs.delete_repository.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_packages.timeout = 30.0 + default_config.rpcs.list_packages.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_package.timeout = 30.0 + default_config.rpcs.get_package.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_package.timeout = 30.0 + default_config.rpcs.delete_package.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_versions.timeout = 30.0 + default_config.rpcs.list_versions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_version.timeout = 30.0 + default_config.rpcs.get_version.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_version.timeout = 30.0 + default_config.rpcs.delete_version.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_files.timeout = 30.0 + default_config.rpcs.list_files.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_file.timeout = 30.0 + default_config.rpcs.get_file.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tags.timeout = 30.0 + default_config.rpcs.list_tags.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_tag.timeout = 30.0 + default_config.rpcs.get_tag.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_tag.timeout = 30.0 + + default_config.rpcs.update_tag.timeout = 30.0 + + default_config.rpcs.delete_tag.timeout = 30.0 + default_config.rpcs.delete_tag.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 30.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.test_iam_permissions.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @artifact_registry_stub.universe_domain + end + + ## + # Create a new ArtifactRegistry client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ArtifactRegistry client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/devtools/artifactregistry/v1beta2/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @artifact_registry_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @artifact_registry_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @artifact_registry_stub.endpoint + config.universe_domain = @artifact_registry_stub.universe_domain + config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @artifact_registry_stub.logger + end + + # Service calls + + ## + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_apt_artifacts(request, options = nil) + # Pass arguments to `import_apt_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_apt_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new + # + # # Call the import_apt_artifacts method. + # result = client.import_apt_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_apt_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_apt_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_apt_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_yum_artifacts(request, options = nil) + # Pass arguments to `import_yum_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_yum_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new + # + # # Call the import_yum_artifacts method. + # result = client.import_yum_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_yum_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_yum_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_yum_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists repositories. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_repositories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose repositories will be listed. + # @param page_size [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new + # + # # Call the list_repositories method. + # result = client.list_repositories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Repository. + # p item + # end + # + def list_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_repositories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_repositories, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + # p result + # + def get_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_repository, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_repository(parent: nil, repository_id: nil, repository: nil) + # Pass arguments to `create_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the repository will be created. + # @param repository_id [::String] + # The repository id to use for this repository. + # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] + # The repository to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new + # + # # Call the create_repository method. + # result = client.create_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_repository(repository: nil, update_mask: nil) + # Pass arguments to `update_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] + # The repository that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + # p result + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.repository&.name + header_params["repository.name"] = request.repository.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_repository, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_repository(name: nil) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new + # + # # Call the delete_repository method. + # result = client.delete_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists packages. + # + # @overload list_packages(request, options = nil) + # Pass arguments to `list_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose packages will be listed. + # @param page_size [::Integer] + # The maximum number of packages to return. + # Maximum page size is 10,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new + # + # # Call the list_packages method. + # result = client.list_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. + # p item + # end + # + def list_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_packages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a package. + # + # @overload get_package(request, options = nil) + # Pass arguments to `get_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_package(name: nil) + # Pass arguments to `get_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the package to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new + # + # # Call the get_package method. + # result = client.get_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. + # p result + # + def get_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_package, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # + # @overload delete_package(request, options = nil) + # Pass arguments to `delete_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_package(name: nil) + # Pass arguments to `delete_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the package to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new + # + # # Call the delete_package method. + # result = client.delete_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_package.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists versions. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil) + # Pass arguments to `list_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose versions will be listed. + # @param page_size [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # @param order_by [::String] + # Optional. The field to order the results by. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_versions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a version + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the version to retrieve. + # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_version(name: nil, force: nil) + # Pass arguments to `delete_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the version to delete. + # @param force [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists files. + # + # @overload list_files(request, options = nil) + # Pass arguments to `list_files` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the repository whose files will be listed. For example: + # "projects/p1/locations/us-central1/repositories/repo1 + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # + # An example of using a filter: + # + # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + # ID starting with "a/b/". + # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + # Files owned by the version `1.0` in package `pkg1`. + # @param page_size [::Integer] + # The maximum number of files to return. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new + # + # # Call the list_files method. + # result = client.list_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. + # p item + # end + # + def list_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_files.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a file. + # + # @overload get_file(request, options = nil) + # Pass arguments to `get_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_file(name: nil) + # Pass arguments to `get_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the file to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new + # + # # Call the get_file method. + # result = client.get_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. + # p result + # + def get_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_file, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tags. + # + # @overload list_tags(request, options = nil) + # Pass arguments to `list_tags` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tags` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose tags will be listed. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `version` + # + # An example of using a filter: + # + # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + # --> Tags that are applied to the version `1.0` in package `pkg1`. + # @param page_size [::Integer] + # The maximum number of tags to return. Maximum page size is 10,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new + # + # # Call the list_tags method. + # result = client.list_tags request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p item + # end + # + def list_tags request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tags.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tags.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tags.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a tag. + # + # @overload get_tag(request, options = nil) + # Pass arguments to `get_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_tag(name: nil) + # Pass arguments to `get_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new + # + # # Call the get_tag method. + # result = client.get_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def get_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_tag, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a tag. + # + # @overload create_tag(request, options = nil) + # Pass arguments to `create_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_tag(parent: nil, tag_id: nil, tag: nil) + # Pass arguments to `create_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource where the tag will be created. + # @param tag_id [::String] + # The tag id to use for this repository. + # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] + # The tag to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new + # + # # Call the create_tag method. + # result = client.create_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def create_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :create_tag, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a tag. + # + # @overload update_tag(request, options = nil) + # Pass arguments to `update_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_tag(tag: nil, update_mask: nil) + # Pass arguments to `update_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] + # The tag that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new + # + # # Call the update_tag method. + # result = client.update_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def update_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.tag&.name + header_params["tag.name"] = request.tag.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_tag, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a tag. + # + # @overload delete_tag(request, options = nil) + # Pass arguments to `delete_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_tag(name: nil) + # Pass arguments to `delete_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new + # + # # Call the delete_tag method. + # result = client.delete_tag request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :delete_tag, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the IAM policy for a given resource. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for a given resource. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Tests if the caller has a list of permissions on a resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the Settings for the Project. + # + # @overload get_project_settings(request, options = nil) + # Pass arguments to `get_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_project_settings(name: nil) + # Pass arguments to `get_project_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the projectSettings resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new + # + # # Call the get_project_settings method. + # result = client.get_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + # p result + # + def get_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_project_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Settings for the Project. + # + # @overload update_project_settings(request, options = nil) + # Pass arguments to `update_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_project_settings(project_settings: nil, update_mask: nil) + # Pass arguments to `update_project_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash] + # The project settings. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new + # + # # Call the update_project_settings method. + # result = client.update_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + # p result + # + def update_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_project_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.project_settings&.name + header_params["project_settings.name"] = request.project_settings.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ArtifactRegistry API. + # + # This class represents the configuration for ArtifactRegistry, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # import_apt_artifacts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.import_apt_artifacts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.import_apt_artifacts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ArtifactRegistry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `import_apt_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_apt_artifacts + ## + # RPC-specific configuration for `import_yum_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_yum_artifacts + ## + # RPC-specific configuration for `list_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_repositories + ## + # RPC-specific configuration for `get_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :get_repository + ## + # RPC-specific configuration for `create_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :create_repository + ## + # RPC-specific configuration for `update_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :update_repository + ## + # RPC-specific configuration for `delete_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_repository + ## + # RPC-specific configuration for `list_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_packages + ## + # RPC-specific configuration for `get_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_package + ## + # RPC-specific configuration for `delete_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_package + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `list_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_files + ## + # RPC-specific configuration for `get_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file + ## + # RPC-specific configuration for `list_tags` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tags + ## + # RPC-specific configuration for `get_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tag + ## + # RPC-specific configuration for `create_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tag + ## + # RPC-specific configuration for `update_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tag + ## + # RPC-specific configuration for `delete_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tag + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `get_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_settings + ## + # RPC-specific configuration for `update_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_settings + + # @private + def initialize parent_rpcs = nil + import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts + @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config + import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts + @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config + list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories + @list_repositories = ::Gapic::Config::Method.new list_repositories_config + get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository + @get_repository = ::Gapic::Config::Method.new get_repository_config + create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository + @create_repository = ::Gapic::Config::Method.new create_repository_config + update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository + @update_repository = ::Gapic::Config::Method.new update_repository_config + delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository + @delete_repository = ::Gapic::Config::Method.new delete_repository_config + list_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages + @list_packages = ::Gapic::Config::Method.new list_packages_config + get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package + @get_package = ::Gapic::Config::Method.new get_package_config + delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package + @delete_package = ::Gapic::Config::Method.new delete_package_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files + @list_files = ::Gapic::Config::Method.new list_files_config + get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file + @get_file = ::Gapic::Config::Method.new get_file_config + list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags + @list_tags = ::Gapic::Config::Method.new list_tags_config + get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag + @get_tag = ::Gapic::Config::Method.new get_tag_config + create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag + @create_tag = ::Gapic::Config::Method.new create_tag_config + update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag + @update_tag = ::Gapic::Config::Method.new update_tag_config + delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag + @delete_tag = ::Gapic::Config::Method.new delete_tag_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings + @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config + update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings + @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb new file mode 100644 index 000000000000..bca5d7763a5e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + # Credentials for the ArtifactRegistry API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "ARTIFACT_REGISTRY_CREDENTIALS", + "ARTIFACT_REGISTRY_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ARTIFACT_REGISTRY_CREDENTIALS_JSON", + "ARTIFACT_REGISTRY_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb new file mode 100644 index 000000000000..8b3c92993a8f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ArtifactRegistry Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb new file mode 100644 index 000000000000..4b937ff38983 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + # Path helper methods for the ArtifactRegistry API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified ProjectSettings resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/projectSettings` + # + # @param project [String] + # + # @return [::String] + def project_settings_path project: + "projects/#{project}/projectSettings" + end + + ## + # Create a fully-qualified Repository resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # + # @return [::String] + def repository_path project:, location:, repository: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}" + end + + ## + # Create a fully-qualified Tag resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param package [String] + # @param tag [String] + # + # @return [::String] + def tag_path project:, location:, repository:, package:, tag: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb new file mode 100644 index 000000000000..4e4826632d6d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/artifact_registry/v1beta2/version" +require "google/cloud/artifact_registry/v1beta2/bindings_override" + +require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + ## + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module ArtifactRegistry + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb new file mode 100644 index 000000000000..3a6cd238f23a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb @@ -0,0 +1,2792 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + module Rest + ## + # REST client for the ArtifactRegistry service. + # + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :artifact_registry_stub + + ## + # Configure the ArtifactRegistry Client class. + # + # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ArtifactRegistry clients + # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ArtifactRegistry", "V1beta2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_repositories.timeout = 30.0 + default_config.rpcs.list_repositories.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_repository.timeout = 30.0 + default_config.rpcs.get_repository.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_repository.timeout = 30.0 + + default_config.rpcs.update_repository.timeout = 30.0 + + default_config.rpcs.delete_repository.timeout = 30.0 + default_config.rpcs.delete_repository.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_packages.timeout = 30.0 + default_config.rpcs.list_packages.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_package.timeout = 30.0 + default_config.rpcs.get_package.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_package.timeout = 30.0 + default_config.rpcs.delete_package.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_versions.timeout = 30.0 + default_config.rpcs.list_versions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_version.timeout = 30.0 + default_config.rpcs.get_version.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_version.timeout = 30.0 + default_config.rpcs.delete_version.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_files.timeout = 30.0 + default_config.rpcs.list_files.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_file.timeout = 30.0 + default_config.rpcs.get_file.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tags.timeout = 30.0 + default_config.rpcs.list_tags.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_tag.timeout = 30.0 + default_config.rpcs.get_tag.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_tag.timeout = 30.0 + + default_config.rpcs.update_tag.timeout = 30.0 + + default_config.rpcs.delete_tag.timeout = 30.0 + default_config.rpcs.delete_tag.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 30.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.test_iam_permissions.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @artifact_registry_stub.universe_domain + end + + ## + # Create a new ArtifactRegistry REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ArtifactRegistry client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @artifact_registry_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @artifact_registry_stub.endpoint + config.universe_domain = @artifact_registry_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @artifact_registry_stub.logger + end + + # Service calls + + ## + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_apt_artifacts(request, options = nil) + # Pass arguments to `import_apt_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_apt_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new + # + # # Call the import_apt_artifacts method. + # result = client.import_apt_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_apt_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_apt_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.import_apt_artifacts request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + # + # @overload import_yum_artifacts(request, options = nil) + # Pass arguments to `import_yum_artifacts` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_yum_artifacts(gcs_source: nil, parent: nil) + # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash] + # Google Cloud Storage location where input content is located. + # @param parent [::String] + # The name of the parent resource where the artifacts will be imported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new + # + # # Call the import_yum_artifacts method. + # result = client.import_yum_artifacts request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_yum_artifacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_yum_artifacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.import_yum_artifacts request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists repositories. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_repositories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource whose repositories will be listed. + # @param page_size [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new + # + # # Call the list_repositories method. + # result = client.list_repositories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Repository. + # p item + # end + # + def list_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_repositories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_repositories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_repositories, "repositories", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + # p result + # + def get_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_repository request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_repository(parent: nil, repository_id: nil, repository: nil) + # Pass arguments to `create_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource where the repository will be created. + # @param repository_id [::String] + # The repository id to use for this repository. + # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] + # The repository to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new + # + # # Call the create_repository method. + # result = client.create_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_repository(repository: nil, update_mask: nil) + # Pass arguments to `update_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] + # The repository that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + # p result + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_repository request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_repository(name: nil) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the repository to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new + # + # # Call the delete_repository method. + # result = client.delete_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists packages. + # + # @overload list_packages(request, options = nil) + # Pass arguments to `list_packages` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_packages(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_packages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose packages will be listed. + # @param page_size [::Integer] + # The maximum number of packages to return. + # Maximum page size is 10,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new + # + # # Call the list_packages method. + # result = client.list_packages request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. + # p item + # end + # + def list_packages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_packages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_packages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_packages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_packages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a package. + # + # @overload get_package(request, options = nil) + # Pass arguments to `get_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_package(name: nil) + # Pass arguments to `get_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the package to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new + # + # # Call the get_package method. + # result = client.get_package request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. + # p result + # + def get_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_package request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # + # @overload delete_package(request, options = nil) + # Pass arguments to `delete_package` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_package(name: nil) + # Pass arguments to `delete_package` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the package to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new + # + # # Call the delete_package method. + # result = client.delete_package request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_package request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_package.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_package.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_package.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_package request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists versions. + # + # @overload list_versions(request, options = nil) + # Pass arguments to `list_versions` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil) + # Pass arguments to `list_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose versions will be listed. + # @param page_size [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # @param order_by [::String] + # Optional. The field to order the results by. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new + # + # # Call the list_versions method. + # result = client.list_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Version. + # p item + # end + # + def list_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_versions, "versions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a version + # + # @overload get_version(request, options = nil) + # Pass arguments to `get_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_version(name: nil, view: nil) + # Pass arguments to `get_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the version to retrieve. + # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new + # + # # Call the get_version method. + # result = client.get_version request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. + # p result + # + def get_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # + # @overload delete_version(request, options = nil) + # Pass arguments to `delete_version` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_version(name: nil, force: nil) + # Pass arguments to `delete_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the version to delete. + # @param force [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new + # + # # Call the delete_version method. + # result = client.delete_version request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists files. + # + # @overload list_files(request, options = nil) + # Pass arguments to `list_files` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the repository whose files will be listed. For example: + # "projects/p1/locations/us-central1/repositories/repo1 + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # + # An example of using a filter: + # + # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + # ID starting with "a/b/". + # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + # Files owned by the version `1.0` in package `pkg1`. + # @param page_size [::Integer] + # The maximum number of files to return. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new + # + # # Call the list_files method. + # result = client.list_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. + # p item + # end + # + def list_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_files.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_files request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a file. + # + # @overload get_file(request, options = nil) + # Pass arguments to `get_file` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_file(name: nil) + # Pass arguments to `get_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the file to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new + # + # # Call the get_file method. + # result = client.get_file request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. + # p result + # + def get_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_file request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tags. + # + # @overload list_tags(request, options = nil) + # Pass arguments to `list_tags` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tags` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource whose tags will be listed. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `version` + # + # An example of using a filter: + # + # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + # --> Tags that are applied to the version `1.0` in package `pkg1`. + # @param page_size [::Integer] + # The maximum number of tags to return. Maximum page size is 10,000. + # @param page_token [::String] + # The next_page_token value returned from a previous list request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new + # + # # Call the list_tags method. + # result = client.list_tags request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p item + # end + # + def list_tags request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tags.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tags.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tags.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.list_tags request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a tag. + # + # @overload get_tag(request, options = nil) + # Pass arguments to `get_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_tag(name: nil) + # Pass arguments to `get_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new + # + # # Call the get_tag method. + # result = client.get_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def get_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_tag request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a tag. + # + # @overload create_tag(request, options = nil) + # Pass arguments to `create_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_tag(parent: nil, tag_id: nil, tag: nil) + # Pass arguments to `create_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the parent resource where the tag will be created. + # @param tag_id [::String] + # The tag id to use for this repository. + # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] + # The tag to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new + # + # # Call the create_tag method. + # result = client.create_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def create_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.create_tag request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a tag. + # + # @overload update_tag(request, options = nil) + # Pass arguments to `update_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_tag(tag: nil, update_mask: nil) + # Pass arguments to `update_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] + # The tag that replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new + # + # # Call the update_tag method. + # result = client.update_tag request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + # p result + # + def update_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_tag request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a tag. + # + # @overload delete_tag(request, options = nil) + # Pass arguments to `delete_tag` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_tag(name: nil) + # Pass arguments to `delete_tag` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the tag to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new + # + # # Call the delete_tag method. + # result = client.delete_tag request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tag request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_tag.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_tag.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.delete_tag request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the IAM policy for a given resource. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for a given resource. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Tests if the caller has a list of permissions on a resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the Settings for the Project. + # + # @overload get_project_settings(request, options = nil) + # Pass arguments to `get_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_project_settings(name: nil) + # Pass arguments to `get_project_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the projectSettings resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new + # + # # Call the get_project_settings method. + # result = client.get_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + # p result + # + def get_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_project_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.get_project_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Settings for the Project. + # + # @overload update_project_settings(request, options = nil) + # Pass arguments to `update_project_settings` via a request object, either of type + # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_project_settings(project_settings: nil, update_mask: nil) + # Pass arguments to `update_project_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash] + # The project settings. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask to support partial updates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/artifact_registry/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new + # + # # Call the update_project_settings method. + # result = client.update_project_settings request + # + # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + # p result + # + def update_project_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_project_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_project_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @artifact_registry_stub.update_project_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ArtifactRegistry REST API. + # + # This class represents the configuration for ArtifactRegistry REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # import_apt_artifacts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.import_apt_artifacts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.import_apt_artifacts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ArtifactRegistry API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `import_apt_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_apt_artifacts + ## + # RPC-specific configuration for `import_yum_artifacts` + # @return [::Gapic::Config::Method] + # + attr_reader :import_yum_artifacts + ## + # RPC-specific configuration for `list_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_repositories + ## + # RPC-specific configuration for `get_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :get_repository + ## + # RPC-specific configuration for `create_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :create_repository + ## + # RPC-specific configuration for `update_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :update_repository + ## + # RPC-specific configuration for `delete_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_repository + ## + # RPC-specific configuration for `list_packages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_packages + ## + # RPC-specific configuration for `get_package` + # @return [::Gapic::Config::Method] + # + attr_reader :get_package + ## + # RPC-specific configuration for `delete_package` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_package + ## + # RPC-specific configuration for `list_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_versions + ## + # RPC-specific configuration for `get_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_version + ## + # RPC-specific configuration for `delete_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_version + ## + # RPC-specific configuration for `list_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_files + ## + # RPC-specific configuration for `get_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file + ## + # RPC-specific configuration for `list_tags` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tags + ## + # RPC-specific configuration for `get_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tag + ## + # RPC-specific configuration for `create_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tag + ## + # RPC-specific configuration for `update_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tag + ## + # RPC-specific configuration for `delete_tag` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tag + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `get_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_settings + ## + # RPC-specific configuration for `update_project_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_settings + + # @private + def initialize parent_rpcs = nil + import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts + @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config + import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts + @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config + list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories + @list_repositories = ::Gapic::Config::Method.new list_repositories_config + get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository + @get_repository = ::Gapic::Config::Method.new get_repository_config + create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository + @create_repository = ::Gapic::Config::Method.new create_repository_config + update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository + @update_repository = ::Gapic::Config::Method.new update_repository_config + delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository + @delete_repository = ::Gapic::Config::Method.new delete_repository_config + list_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages + @list_packages = ::Gapic::Config::Method.new list_packages_config + get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package + @get_package = ::Gapic::Config::Method.new get_package_config + delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package + @delete_package = ::Gapic::Config::Method.new delete_package_config + list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions + @list_versions = ::Gapic::Config::Method.new list_versions_config + get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version + @get_version = ::Gapic::Config::Method.new get_version_config + delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version + @delete_version = ::Gapic::Config::Method.new delete_version_config + list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files + @list_files = ::Gapic::Config::Method.new list_files_config + get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file + @get_file = ::Gapic::Config::Method.new get_file_config + list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags + @list_tags = ::Gapic::Config::Method.new list_tags_config + get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag + @get_tag = ::Gapic::Config::Method.new get_tag_config + create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag + @create_tag = ::Gapic::Config::Method.new create_tag_config + update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag + @update_tag = ::Gapic::Config::Method.new update_tag_config + delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag + @delete_tag = ::Gapic::Config::Method.new delete_tag_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings + @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config + update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings + @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb new file mode 100644 index 000000000000..c5a1c00d8578 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ArtifactRegistry Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ArtifactRegistry Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb new file mode 100644 index 000000000000..bc5b22bf3093 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb @@ -0,0 +1,1615 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/devtools/artifactregistry/v1beta2/service_pb" + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + module Rest + ## + # REST service stub for the ArtifactRegistry service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the import_apt_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_apt_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_apt_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_apt_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_yum_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_yum_artifacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_yum_artifacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_yum_artifacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse] + # A result object deserialized from the server's reply + def list_repositories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_repositories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # A result object deserialized from the server's reply + def get_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # A result object deserialized from the server's reply + def update_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse] + # A result object deserialized from the server's reply + def list_packages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_packages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_packages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] + # A result object deserialized from the server's reply + def get_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_package request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_package_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_package", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse] + # A result object deserialized from the server's reply + def list_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] + # A result object deserialized from the server's reply + def get_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_files REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse] + # A result object deserialized from the server's reply + def list_files request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_files_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_files", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] + # A result object deserialized from the server's reply + def get_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::File.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tags REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse] + # A result object deserialized from the server's reply + def list_tags request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tags_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tags", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # A result object deserialized from the server's reply + def get_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # A result object deserialized from the server's reply + def create_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # A result object deserialized from the server's reply + def update_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_tag request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_tag", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # A result object deserialized from the server's reply + def get_project_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_project_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_project_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # A result object deserialized from the server's reply + def update_project_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_project_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_project_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the import_apt_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_apt_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/aptArtifacts:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_yum_artifacts REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_yum_artifacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/yumArtifacts:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_repositories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/repositories", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/repositories", + body: "repository", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta2/{repository.name}", + body: "repository", + matches: [ + ["repository.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_repository REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_packages REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_packages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/packages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_package REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_package_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_versions REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_version REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_files REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_files_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/files", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_file REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tags REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tags_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/tags", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/tags", + body: "tag", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta2/{tag.name}", + body: "tag", + matches: [ + ["tag.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_tag REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_tag_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_project_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/projectSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_project_settings REST call + # + # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_project_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta2/{project_settings.name}", + body: "project_settings", + matches: [ + ["project_settings.name", %r{^projects/[^/]+/projectSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb new file mode 100644 index 000000000000..51f57d10ff56 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module ArtifactRegistry + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/artifact_registry/v1beta2/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module V1beta2 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ArtifactRegistry"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta2/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb new file mode 100644 index 000000000000..d25e48a6eb93 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" +require "google/cloud/artifact_registry/v1beta2/bindings_override" +require "google/cloud/artifact_registry/v1beta2/version" + +module Google + module Cloud + module ArtifactRegistry + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/artifact_registry/v1beta2/rest" + # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new + # + module V1beta2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb new file mode 100644 index 000000000000..8a820cee0d3a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb new file mode 100644 index 000000000000..27134bb36c91 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/apt_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n;google/devtools/artifactregistry/v1beta2/apt_artifact.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xbf\x03\n\x0b\x41ptArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0cpackage_type\x18\x03 \x01(\x0e\x32\x41.google.devtools.artifactregistry.v1beta2.AptArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcomponent\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ontrol_file\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/AptArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}\"B\n\x1bImportAptArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x92\x01\n\x19ImportAptArtifactsRequest\x12[\n\ngcs_source\x18\x02 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa7\x01\n\x1bImportAptArtifactsErrorInfo\x12[\n\ngcs_source\x18\x01 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xc1\x01\n\x1aImportAptArtifactsResponse\x12L\n\rapt_artifacts\x18\x01 \x03(\x0b\x32\x35.google.devtools.artifactregistry.v1beta2.AptArtifact\x12U\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo\"\x1c\n\x1aImportAptArtifactsMetadataB\x94\x02\n,com.google.devtools.artifactregistry.v1beta2B\x10\x41ptArtifactProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + AptArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.AptArtifact").msgclass + AptArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType").enummodule + ImportAptArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource").msgclass + ImportAptArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest").msgclass + ImportAptArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo").msgclass + ImportAptArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse").msgclass + ImportAptArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb new file mode 100644 index 000000000000..a1cc80819447 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/file.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/devtools/artifactregistry/v1beta2/file.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x98\x01\n\x04Hash\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.devtools.artifactregistry.v1beta2.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\":\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\"\xd4\x02\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\x12>\n\x06hashes\x18\x04 \x03(\x0b\x32..google.devtools.artifactregistry.v1beta2.Hash\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05owner\x18\x07 \x01(\t:y\xea\x41v\n$artifactregistry.googleapis.com/File\x12Nprojects/{project}/locations/{location}/repositories/{repository}/files/{file}\"Y\n\x10ListFilesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x11ListFilesResponse\x12=\n\x05\x66iles\x18\x01 \x03(\x0b\x32..google.devtools.artifactregistry.v1beta2.File\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1e\n\x0eGetFileRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x8d\x02\n,com.google.devtools.artifactregistry.v1beta2B\tFileProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Hash").msgclass + Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Hash.HashType").enummodule + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.File").msgclass + ListFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListFilesRequest").msgclass + ListFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListFilesResponse").msgclass + GetFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetFileRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb new file mode 100644 index 000000000000..29552f5694d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/package.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/package.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x01\n\x07Package\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"L\n\x13ListPackagesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x14ListPackagesResponse\x12\x43\n\x08packages\x18\x01 \x03(\x0b\x32\x31.google.devtools.artifactregistry.v1beta2.Package\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"!\n\x11GetPackageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"$\n\x14\x44\x65letePackageRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cPackageProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Package").msgclass + ListPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListPackagesRequest").msgclass + ListPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListPackagesResponse").msgclass + GetPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetPackageRequest").msgclass + DeletePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeletePackageRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb new file mode 100644 index 000000000000..9c549297f124 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/repository.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/devtools/artifactregistry/v1beta2/repository.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x07\n\nRepository\x12\x62\n\x0cmaven_config\x18\t \x01(\x0b\x32J.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfigH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x06\x66ormat\x18\x02 \x01(\x0e\x32;.google.devtools.artifactregistry.v1beta2.Repository.Format\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12P\n\x06labels\x18\x04 \x03(\x0b\x32@.google.devtools.artifactregistry.v1beta2.Repository.LabelsEntry\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x1a\xf8\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12p\n\x0eversion_policy\x18\x02 \x01(\x0e\x32X.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_config\"\x84\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x7f\n\x18ListRepositoriesResponse\x12J\n\x0crepositories\x18\x01 \x03(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xbe\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x15\n\rrepository_id\x18\x02 \x01(\t\x12H\n\nrepository\x18\x03 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\"\x94\x01\n\x17UpdateRepositoryRequest\x12H\n\nrepository\x18\x01 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\x93\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0fRepositoryProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository").msgclass + Repository::MavenRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig").msgclass + Repository::MavenRepositoryConfig::VersionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy").enummodule + Repository::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.Format").enummodule + ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest").msgclass + ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse").msgclass + GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetRepositoryRequest").msgclass + CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest").msgclass + UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest").msgclass + DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb new file mode 100644 index 000000000000..e30893147e79 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/devtools/artifactregistry/v1beta2/apt_artifact_pb' +require 'google/devtools/artifactregistry/v1beta2/file_pb' +require 'google/devtools/artifactregistry/v1beta2/package_pb' +require 'google/devtools/artifactregistry/v1beta2/repository_pb' +require 'google/devtools/artifactregistry/v1beta2/settings_pb' +require 'google/devtools/artifactregistry/v1beta2/tag_pb' +require 'google/devtools/artifactregistry/v1beta2/version_pb' +require 'google/devtools/artifactregistry/v1beta2/yum_artifact_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/service.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a;google/devtools/artifactregistry/v1beta2/apt_artifact.proto\x1a\x33google/devtools/artifactregistry/v1beta2/file.proto\x1a\x36google/devtools/artifactregistry/v1beta2/package.proto\x1a\x39google/devtools/artifactregistry/v1beta2/repository.proto\x1a\x37google/devtools/artifactregistry/v1beta2/settings.proto\x1a\x32google/devtools/artifactregistry/v1beta2/tag.proto\x1a\x36google/devtools/artifactregistry/v1beta2/version.proto\x1a;google/devtools/artifactregistry/v1beta2/yum_artifact.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x13\n\x11OperationMetadata2\xe6/\n\x10\x41rtifactRegistry\x12\xdf\x02\n\x12ImportAptArtifacts\x12\x43.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x8a\x01\nCgoogle.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse\x12\x43google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata\x82\xd3\xe4\x93\x02P\"K/v1beta2/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import:\x01*\x12\xdf\x02\n\x12ImportYumArtifacts\x12\x43.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x8a\x01\nCgoogle.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse\x12\x43google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata\x82\xd3\xe4\x93\x02P\"K/v1beta2/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import:\x01*\x12\xe1\x01\n\x10ListRepositories\x12\x41.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest\x1a\x42.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta2/{parent=projects/*/locations/*}/repositories\x12\xcb\x01\n\rGetRepository\x12>.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest\x1a\x34.google.devtools.artifactregistry.v1beta2.Repository\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta2/{name=projects/*/locations/*/repositories/*}\x12\xd6\x02\n\x10\x43reateRepository\x12\x41.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41q\n3google.devtools.artifactregistry.v1beta2.Repository\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02\x43\"5/v1beta2/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xfa\x01\n\x10UpdateRepository\x12\x41.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest\x1a\x34.google.devtools.artifactregistry.v1beta2.Repository\"m\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02N2@/v1beta2/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x91\x02\n\x10\x44\x65leteRepository\x12\x41.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta2/{name=projects/*/locations/*/repositories/*}\x12\xe0\x01\n\x0cListPackages\x12=.google.devtools.artifactregistry.v1beta2.ListPackagesRequest\x1a>.google.devtools.artifactregistry.v1beta2.ListPackagesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages\x12\xcd\x01\n\nGetPackage\x12;.google.devtools.artifactregistry.v1beta2.GetPackageRequest\x1a\x31.google.devtools.artifactregistry.v1beta2.Package\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}\x12\x96\x02\n\rDeletePackage\x12>.google.devtools.artifactregistry.v1beta2.DeletePackageRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}\x12\xeb\x01\n\x0cListVersions\x12=.google.devtools.artifactregistry.v1beta2.ListVersionsRequest\x1a>.google.devtools.artifactregistry.v1beta2.ListVersionsResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions\x12\xd8\x01\n\nGetVersion\x12;.google.devtools.artifactregistry.v1beta2.GetVersionRequest\x1a\x31.google.devtools.artifactregistry.v1beta2.Version\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xa1\x02\n\rDeleteVersion\x12>.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02M*K/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xd4\x01\n\tListFiles\x12:.google.devtools.artifactregistry.v1beta2.ListFilesRequest\x1a;.google.devtools.artifactregistry.v1beta2.ListFilesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1beta2/{parent=projects/*/locations/*/repositories/*}/files\x12\xc2\x01\n\x07GetFile\x12\x38.google.devtools.artifactregistry.v1beta2.GetFileRequest\x1a..google.devtools.artifactregistry.v1beta2.File\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}\x12\xdb\x01\n\x08ListTags\x12\x39.google.devtools.artifactregistry.v1beta2.ListTagsRequest\x1a:.google.devtools.artifactregistry.v1beta2.ListTagsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags\x12\xc8\x01\n\x06GetTag\x12\x37.google.devtools.artifactregistry.v1beta2.GetTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xe0\x01\n\tCreateTag\x12:.google.devtools.artifactregistry.v1beta2.CreateTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"h\xda\x41\x11parent,tag,tag_id\x82\xd3\xe4\x93\x02N\"G/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags:\x03tag\x12\xe2\x01\n\tUpdateTag\x12:.google.devtools.artifactregistry.v1beta2.UpdateTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"j\xda\x41\x0ftag,update_mask\x82\xd3\xe4\x93\x02R2K/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}:\x03tag\x12\xb7\x01\n\tDeleteTag\x12:.google.devtools.artifactregistry.v1beta2.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I*G/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\x9c\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\x99\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"N\x82\xd3\xe4\x93\x02H\x12\x46/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xc2\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\xcf\x01\n\x12GetProjectSettings\x12\x43.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest\x1a\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1beta2/{name=projects/*/projectSettings}\x12\x90\x02\n\x15UpdateProjectSettings\x12\x46.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest\x1a\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\"t\xda\x41\x1cproject_settings,update_mask\x82\xd3\xe4\x93\x02O2;/v1beta2/{project_settings.name=projects/*/projectSettings}:\x10project_settings\x1a\x8c\x01\xca\x41\x1f\x61rtifactregistry.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cServiceProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb new file mode 100644 index 000000000000..aaa057d35013 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb @@ -0,0 +1,116 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/devtools/artifactregistry/v1beta2/service.proto for package 'Google.Cloud.ArtifactRegistry.V1beta2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/devtools/artifactregistry/v1beta2/service_pb' + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + module ArtifactRegistry + # The Artifact Registry API service. + # + # Artifact Registry is an artifact management system for storing artifacts + # from different package management systems. + # + # The resources managed by this API are: + # + # * Repositories, which group packages and their data. + # * Packages, which group versions and their tags. + # * Versions, which are specific forms of a package. + # * Tags, which represent alternative names for versions. + # * Files, which contain content and are optionally associated with a Package + # or Version. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.devtools.artifactregistry.v1beta2.ArtifactRegistry' + + # Imports Apt artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + rpc :ImportAptArtifacts, ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Google::Longrunning::Operation + # Imports Yum (RPM) artifacts. The returned Operation will complete once the + # resources are imported. Package, Version, and File resources are created + # based on the imported artifacts. Imported artifacts that conflict with + # existing resources are ignored. + rpc :ImportYumArtifacts, ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Google::Longrunning::Operation + # Lists repositories. + rpc :ListRepositories, ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse + # Gets a repository. + rpc :GetRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Repository + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + rpc :CreateRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Google::Longrunning::Operation + # Updates a repository. + rpc :UpdateRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Repository + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + rpc :DeleteRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Google::Longrunning::Operation + # Lists packages. + rpc :ListPackages, ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse + # Gets a package. + rpc :GetPackage, ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Package + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + rpc :DeletePackage, ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Google::Longrunning::Operation + # Lists versions. + rpc :ListVersions, ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse + # Gets a version + rpc :GetVersion, ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Version + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + rpc :DeleteVersion, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Google::Longrunning::Operation + # Lists files. + rpc :ListFiles, ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse + # Gets a file. + rpc :GetFile, ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::File + # Lists tags. + rpc :ListTags, ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse + # Gets a tag. + rpc :GetTag, ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag + # Creates a tag. + rpc :CreateTag, ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag + # Updates a tag. + rpc :UpdateTag, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag + # Deletes a tag. + rpc :DeleteTag, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Google::Protobuf::Empty + # Updates the IAM policy for a given resource. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the IAM policy for a given resource. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Tests if the caller has a list of permissions on a resource. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Retrieves the Settings for the Project. + rpc :GetProjectSettings, ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings + # Updates the Settings for the Project. + rpc :UpdateProjectSettings, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb new file mode 100644 index 000000000000..7dec3dc9290c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/settings.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n7google/devtools/artifactregistry/v1beta2/settings.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x91\x03\n\x0fProjectSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12l\n\x18legacy_redirection_state\x18\x02 \x01(\x0e\x32J.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState\"\xa7\x01\n\x10RedirectionState\x12!\n\x1dREDIRECTION_STATE_UNSPECIFIED\x10\x00\x12$\n REDIRECTION_FROM_GCR_IO_DISABLED\x10\x01\x12#\n\x1fREDIRECTION_FROM_GCR_IO_ENABLED\x10\x02\x12%\n!REDIRECTION_FROM_GCR_IO_FINALIZED\x10\x03:X\xea\x41U\n/artifactregistry.googleapis.com/ProjectSettings\x12\"projects/{project}/projectSettings\"b\n\x19GetProjectSettingsRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/artifactregistry.googleapis.com/ProjectSettings\"\xa4\x01\n\x1cUpdateProjectSettingsRequest\x12S\n\x10project_settings\x18\x02 \x01(\x0b\x32\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x91\x02\n,com.google.devtools.artifactregistry.v1beta2B\rSettingsProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + ProjectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ProjectSettings").msgclass + ProjectSettings::RedirectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState").enummodule + GetProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest").msgclass + UpdateProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb new file mode 100644 index 000000000000..658061a8e001 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/tag.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n2google/devtools/artifactregistry/v1beta2/tag.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:\x8a\x01\xea\x41\x86\x01\n#artifactregistry.googleapis.com/Tag\x12_projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}\"X\n\x0fListTagsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"h\n\x10ListTagsResponse\x12;\n\x04tags\x18\x01 \x03(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1d\n\rGetTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"n\n\x10\x43reateTagRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\x12:\n\x03tag\x18\x03 \x01(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\"\x7f\n\x10UpdateTagRequest\x12:\n\x03tag\x18\x01 \x01(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\" \n\x10\x44\x65leteTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x8c\x02\n,com.google.devtools.artifactregistry.v1beta2B\x08TagProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Tag").msgclass + ListTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListTagsRequest").msgclass + ListTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListTagsResponse").msgclass + GetTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetTagRequest").msgclass + CreateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.CreateTagRequest").msgclass + UpdateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateTagRequest").msgclass + DeleteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteTagRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb new file mode 100644 index 000000000000..e557d358711e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/version.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/devtools/artifactregistry/v1beta2/tag_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/version.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/devtools/artifactregistry/v1beta2/tag.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x03\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0crelated_tags\x18\x07 \x03(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03:\x96\x01\xea\x41\x92\x01\n\'artifactregistry.googleapis.com/Version\x12gprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}\"\xa8\x01\n\x13ListVersionsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x43\n\x04view\x18\x04 \x01(\x0e\x32\x35.google.devtools.artifactregistry.v1beta2.VersionView\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListVersionsResponse\x12\x43\n\x08versions\x18\x01 \x03(\x0b\x32\x31.google.devtools.artifactregistry.v1beta2.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"f\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.devtools.artifactregistry.v1beta2.VersionView\"3\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08*@\n\x0bVersionView\x12\x1c\n\x18VERSION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cVersionProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Version").msgclass + ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListVersionsRequest").msgclass + ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListVersionsResponse").msgclass + GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetVersionRequest").msgclass + DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteVersionRequest").msgclass + VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.VersionView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb new file mode 100644 index 000000000000..7391ace9af17 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/artifactregistry/v1beta2/yum_artifact.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n;google/devtools/artifactregistry/v1beta2/yum_artifact.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x8c\x03\n\x0bYumArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0cpackage_type\x18\x03 \x01(\x0e\x32\x41.google.devtools.artifactregistry.v1beta2.YumArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/YumArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}\"B\n\x1bImportYumArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x92\x01\n\x19ImportYumArtifactsRequest\x12[\n\ngcs_source\x18\x02 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa7\x01\n\x1bImportYumArtifactsErrorInfo\x12[\n\ngcs_source\x18\x01 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xc1\x01\n\x1aImportYumArtifactsResponse\x12L\n\ryum_artifacts\x18\x01 \x03(\x0b\x32\x35.google.devtools.artifactregistry.v1beta2.YumArtifact\x12U\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo\"\x1c\n\x1aImportYumArtifactsMetadataB\x94\x02\n,com.google.devtools.artifactregistry.v1beta2B\x10YumArtifactProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + YumArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.YumArtifact").msgclass + YumArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType").enummodule + ImportYumArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource").msgclass + ImportYumArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest").msgclass + ImportYumArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo").msgclass + ImportYumArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse").msgclass + ImportYumArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md new file mode 100644 index 000000000000..2d7f47c14fc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Artifact Registry V1beta2 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb new file mode 100644 index 000000000000..87bcf0a3806a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # A detailed representation of an Apt artifact. Information in the record + # is derived from the archive's control file. + # See https://www.debian.org/doc/debian-policy/ch-controlfields.html + # @!attribute [r] name + # @return [::String] + # Output only. The Artifact Registry resource name of the artifact. + # @!attribute [r] package_name + # @return [::String] + # Output only. The Apt package name of the artifact. + # @!attribute [r] package_type + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::AptArtifact::PackageType] + # Output only. An artifact is a binary or source package. + # @!attribute [r] architecture + # @return [::String] + # Output only. Operating system architecture of the artifact. + # @!attribute [r] component + # @return [::String] + # Output only. Repository component of the artifact. + # @!attribute [r] control_file + # @return [::String] + # Output only. Contents of the artifact's control metadata file. + class AptArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Package type is either binary or source. + module PackageType + # Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0 + + # Binary package. + BINARY = 1 + + # Source package. + SOURCE = 2 + end + end + + # Google Cloud Storage location where the artifacts currently reside. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + # @!attribute [rw] use_wildcards + # @return [::Boolean] + # Supports URI wildcards for matching multiple objects from a single URI. + class ImportAptArtifactsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to import new apt artifacts. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource] + # Google Cloud Storage location where input content is located. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the artifacts will be imported. + class ImportAptArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error information explaining why a package was not imported. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource] + # Google Cloud Storage location requested. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The detailed error status. + class ImportAptArtifactsErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message from importing APT artifacts. + # @!attribute [rw] apt_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::AptArtifact>] + # The Apt artifacts imported. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsErrorInfo>] + # Detailed error info for artifacts that were not imported. + class ImportAptArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata for importing artifacts. + class ImportAptArtifactsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb new file mode 100644 index 000000000000..b01bb4f451a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # A hash of file content. + # @!attribute [rw] type + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Hash::HashType] + # The algorithm used to compute the hash value. + # @!attribute [rw] value + # @return [::String] + # The hash value. + class Hash + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The algorithm used to compute the hash. + module HashType + # Unspecified. + HASH_TYPE_UNSPECIFIED = 0 + + # SHA256 hash. + SHA256 = 1 + + # MD5 hash. + MD5 = 2 + end + end + + # Files store content that is potentially associated with Packages or Versions. + # @!attribute [rw] name + # @return [::String] + # The name of the file, for example: + # "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". + # If the file ID part contains slashes, they are escaped. + # @!attribute [rw] size_bytes + # @return [::Integer] + # The size of the File in bytes. + # @!attribute [rw] hashes + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Hash>] + # The hashes of the file content. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the File was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the File was last updated. + # @!attribute [rw] owner + # @return [::String] + # The name of the Package or Version that owns this file, if any. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list files. + # @!attribute [rw] parent + # @return [::String] + # The name of the repository whose files will be listed. For example: + # "projects/p1/locations/us-central1/repositories/repo1 + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `owner` + # + # An example of using a filter: + # + # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + # ID starting with "a/b/". + # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + # Files owned by the version `1.0` in package `pkg1`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of files to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListFilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing files. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::File>] + # The files returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of files, or empty if there are no + # more files to return. + class ListFilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a file. + # @!attribute [rw] name + # @return [::String] + # The name of the file to retrieve. + class GetFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb new file mode 100644 index 000000000000..24ee1b9b6dc3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb @@ -0,0 +1,93 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # Packages are named collections of versions. + # @!attribute [rw] name + # @return [::String] + # The name of the package, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". + # @!attribute [rw] display_name + # @return [::String] + # The display name of the package. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the package was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the package was last updated. This includes publishing a new + # version of the package. + class Package + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list packages. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource whose packages will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of packages to return. + # Maximum page size is 10,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListPackagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing packages. + # @!attribute [rw] packages + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] + # The packages returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of packages, or empty if there are no + # more packages to return. + class ListPackagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a package. + # @!attribute [rw] name + # @return [::String] + # The name of the package to retrieve. + class GetPackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a package. + # @!attribute [rw] name + # @return [::String] + # The name of the package to delete. + class DeletePackageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb new file mode 100644 index 000000000000..30184abcdddf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb @@ -0,0 +1,202 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # A Repository for storing artifacts with a specific format. + # @!attribute [rw] maven_config + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::MavenRepositoryConfig] + # Maven repository config contains repository level configuration + # for the repositories of maven type. + # @!attribute [rw] name + # @return [::String] + # The name of the repository, for example: + # "projects/p1/locations/us-central1/repositories/repo1". + # @!attribute [rw] format + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::Format] + # The format of packages that are stored in the repository. + # @!attribute [rw] description + # @return [::String] + # The user-provided description of the repository. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels with user-defined metadata. + # This field may contain up to 64 entries. Label keys and values may be no + # longer than 63 characters. Label keys must begin with a lowercase letter + # and may only contain lowercase letters, numeric characters, underscores, + # and dashes. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the repository was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the repository was last updated. + # @!attribute [rw] kms_key_name + # @return [::String] + # The Cloud KMS resource name of the customer managed encryption key that’s + # used to encrypt the contents of the Repository. Has the form: + # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + # This value may not be changed after the Repository has been created. + class Repository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # MavenRepositoryConfig is maven related repository details. + # Provides additional configuration details for repositories of the maven + # format type. + # @!attribute [rw] allow_snapshot_overwrites + # @return [::Boolean] + # The repository with this flag will allow publishing + # the same snapshot versions. + # @!attribute [rw] version_policy + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::MavenRepositoryConfig::VersionPolicy] + # Version policy defines the versions that the registry will accept. + class MavenRepositoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VersionPolicy is the version policy for the repository. + module VersionPolicy + # VERSION_POLICY_UNSPECIFIED - the version policy is not defined. + # When the version policy is not defined, no validation is performed + # for the versions. + VERSION_POLICY_UNSPECIFIED = 0 + + # RELEASE - repository will accept only Release versions. + RELEASE = 1 + + # SNAPSHOT - repository will accept only Snapshot versions. + SNAPSHOT = 2 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A package format. + module Format + # Unspecified package format. + FORMAT_UNSPECIFIED = 0 + + # Docker package format. + DOCKER = 1 + + # Maven package format. + MAVEN = 2 + + # NPM package format. + NPM = 3 + + # APT package format. + APT = 5 + + # YUM package format. + YUM = 6 + + # Python package format. + PYTHON = 8 + end + end + + # The request to list repositories. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource whose repositories will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of repositories to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing repositories. + # @!attribute [rw] repositories + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] + # The repositories returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of repositories, or empty if there are + # no more repositories to return. + class ListRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the repository to retrieve. + class GetRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new repository. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource where the repository will be created. + # @!attribute [rw] repository_id + # @return [::String] + # The repository id to use for this repository. + # @!attribute [rw] repository + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # The repository to be created. + class CreateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a repository. + # @!attribute [rw] repository + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] + # The repository that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the repository to delete. + class DeleteRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb new file mode 100644 index 000000000000..cf0245f23a64 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # Metadata type for longrunning-operations, currently empty. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb new file mode 100644 index 000000000000..b2fdc4b27fd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # The Artifact Registry settings that apply to a Project. + # @!attribute [rw] name + # @return [::String] + # The name of the project's settings. + # + # Always of the form: + # projects/\\{project-id}/projectSettings + # + # In update request: never set + # In response: always set + # @!attribute [rw] legacy_redirection_state + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings::RedirectionState] + # The redirection state of the legacy repositories in this project. + class ProjectSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible redirection states for legacy repositories. + module RedirectionState + # No redirection status has been set. + REDIRECTION_STATE_UNSPECIFIED = 0 + + # Redirection is disabled. + REDIRECTION_FROM_GCR_IO_DISABLED = 1 + + # Redirection is enabled. + REDIRECTION_FROM_GCR_IO_ENABLED = 2 + + # Redirection is enabled, and has been finalized so cannot be reverted. + REDIRECTION_FROM_GCR_IO_FINALIZED = 3 + end + end + + # Gets the redirection status for a project. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the projectSettings resource. + class GetProjectSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sets the settings of the project. + # @!attribute [rw] project_settings + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] + # The project settings. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask to support partial updates. + class UpdateProjectSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb new file mode 100644 index 000000000000..2a6ea04aff2a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # Tags point to a version and represent an alternative name that can be used + # to access the version. + # @!attribute [rw] name + # @return [::String] + # The name of the tag, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + # If the package part contains slashes, the slashes are escaped. + # The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else + # must be URL encoded. + # @!attribute [rw] version + # @return [::String] + # The name of the version the tag refers to, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" + # If the package or version ID parts contain slashes, the slashes are + # escaped. + class Tag + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list tags. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource whose tags will be listed. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `version` + # + # An example of using a filter: + # + # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + # --> Tags that are applied to the version `1.0` in package `pkg1`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of tags to return. Maximum page size is 10,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + class ListTagsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing tags. + # @!attribute [rw] tags + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # The tags returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of tags, or empty if there are no + # more tags to return. + class ListTagsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a tag. + # @!attribute [rw] name + # @return [::String] + # The name of the tag to retrieve. + class GetTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a new tag. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the tag will be created. + # @!attribute [rw] tag_id + # @return [::String] + # The tag id to use for this repository. + # @!attribute [rw] tag + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # The tag to be created. + class CreateTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create or update a tag. + # @!attribute [rw] tag + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] + # The tag that replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a tag. + # @!attribute [rw] name + # @return [::String] + # The name of the tag to delete. + class DeleteTagRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb new file mode 100644 index 000000000000..51bc9a408b69 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # The body of a version resource. A version resource represents a + # collection of components, such as files and other data. This may correspond + # to a version in many package management schemes. + # @!attribute [rw] name + # @return [::String] + # The name of the version, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1". + # If the package or version ID parts contain slashes, the slashes are + # escaped. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the version, as specified in its metadata. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the version was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the version was last updated. + # @!attribute [rw] related_tags + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] + # Output only. A list of related tags. Will contain up to 100 tags that + # reference this version. + # @!attribute [r] metadata + # @return [::Google::Protobuf::Struct] + # Output only. Repository-specific Metadata stored against this version. + # The fields returned are defined by the underlying repository-specific + # resource. Currently, the only resource in use is + # [DockerImage][google.devtools.artifactregistry.v1.DockerImage] + class Version + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list versions. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource whose versions will be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of versions to return. Maximum page size is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous list request, if any. + # @!attribute [rw] view + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to order the results by. + class ListVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from listing versions. + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] + # The versions returned. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of versions, or empty if there are no + # more versions to return. + class ListVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to retrieve a version. + # @!attribute [rw] name + # @return [::String] + # The name of the version to retrieve. + # @!attribute [rw] view + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] + # The view that should be returned in the response. + class GetVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a version. + # @!attribute [rw] name + # @return [::String] + # The name of the version to delete. + # @!attribute [rw] force + # @return [::Boolean] + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + class DeleteVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The view, which determines what version information is returned in a + # response. + module VersionView + # The default / unset value. + # The API will default to the BASIC view. + VERSION_VIEW_UNSPECIFIED = 0 + + # Includes basic information about the version, but not any related tags. + BASIC = 1 + + # Include everything. + FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb new file mode 100644 index 000000000000..1bf31d939f3d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ArtifactRegistry + module V1beta2 + # A detailed representation of a Yum artifact. + # @!attribute [r] name + # @return [::String] + # Output only. The Artifact Registry resource name of the artifact. + # @!attribute [r] package_name + # @return [::String] + # Output only. The yum package name of the artifact. + # @!attribute [r] package_type + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::YumArtifact::PackageType] + # Output only. An artifact is a binary or source package. + # @!attribute [r] architecture + # @return [::String] + # Output only. Operating system architecture of the artifact. + class YumArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Package type is either binary or source. + module PackageType + # Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0 + + # Binary package (.rpm). + BINARY = 1 + + # Source package (.srpm). + SOURCE = 2 + end + end + + # Google Cloud Storage location where the artifacts currently reside. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + # @!attribute [rw] use_wildcards + # @return [::Boolean] + # Supports URI wildcards for matching multiple objects from a single URI. + class ImportYumArtifactsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to import new yum artifacts. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource] + # Google Cloud Storage location where input content is located. + # @!attribute [rw] parent + # @return [::String] + # The name of the parent resource where the artifacts will be imported. + class ImportYumArtifactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error information explaining why a package was not imported. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource] + # Google Cloud Storage location requested. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The detailed error status. + class ImportYumArtifactsErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message from importing YUM artifacts. + # @!attribute [rw] yum_artifacts + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::YumArtifact>] + # The yum artifacts imported. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsErrorInfo>] + # Detailed error info for artifacts that were not imported. + class ImportYumArtifactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata for importing artifacts. + class ImportYumArtifactsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile new file mode 100644 index 000000000000..6aaca3591deb --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-artifact_registry-v1beta2", path: "../" +else + gem "google-cloud-artifact_registry-v1beta2" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb new file mode 100644 index 000000000000..b4aec628bdf3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the create_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository. +# +def create_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new + + # Call the create_repository method. + result = client.create_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb new file mode 100644 index 000000000000..ea333cf7fe5d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the create_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag. +# +def create_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new + + # Call the create_tag method. + result = client.create_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb new file mode 100644 index 000000000000..3a5fe36a176f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the delete_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package. +# +def delete_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new + + # Call the delete_package method. + result = client.delete_package request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb new file mode 100644 index 000000000000..9d4a02cbddc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the delete_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository. +# +def delete_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new + + # Call the delete_repository method. + result = client.delete_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb new file mode 100644 index 000000000000..f712c0a18063 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the delete_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag. +# +def delete_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new + + # Call the delete_tag method. + result = client.delete_tag request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb new file mode 100644 index 000000000000..1240bb6fbb67 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the delete_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version. +# +def delete_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new + + # Call the delete_version method. + result = client.delete_version request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb new file mode 100644 index 000000000000..b69d234386f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_file call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file. +# +def get_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new + + # Call the get_file method. + result = client.get_file request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb new file mode 100644 index 000000000000..75c9dd1f58a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_iam_policy call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb new file mode 100644 index 000000000000..24c3dd6d088f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_package call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package. +# +def get_package + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new + + # Call the get_package method. + result = client.get_package request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb new file mode 100644 index 000000000000..1504ae352b97 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_project_settings call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings. +# +def get_project_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new + + # Call the get_project_settings method. + result = client.get_project_settings request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb new file mode 100644 index 000000000000..6b62a92d27cf --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository. +# +def get_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new + + # Call the get_repository method. + result = client.get_repository request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb new file mode 100644 index 000000000000..227f1cb970c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag. +# +def get_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new + + # Call the get_tag method. + result = client.get_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb new file mode 100644 index 000000000000..053bede11d21 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the get_version call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version. +# +def get_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new + + # Call the get_version method. + result = client.get_version request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb new file mode 100644 index 000000000000..749491500cbe --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the import_apt_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts. +# +def import_apt_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new + + # Call the import_apt_artifacts method. + result = client.import_apt_artifacts request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb new file mode 100644 index 000000000000..b177cea98dc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the import_yum_artifacts call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts. +# +def import_yum_artifacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new + + # Call the import_yum_artifacts method. + result = client.import_yum_artifacts request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb new file mode 100644 index 000000000000..0cccd6b55a02 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_files call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files. +# +def list_files + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new + + # Call the list_files method. + result = client.list_files request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb new file mode 100644 index 000000000000..3d5971af0c9d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_packages call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages. +# +def list_packages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new + + # Call the list_packages method. + result = client.list_packages request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb new file mode 100644 index 000000000000..b371d20afeb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_repositories call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories. +# +def list_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new + + # Call the list_repositories method. + result = client.list_repositories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Repository. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb new file mode 100644 index 000000000000..ba98059582c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_tags call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags. +# +def list_tags + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new + + # Call the list_tags method. + result = client.list_tags request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb new file mode 100644 index 000000000000..f1ec20f158bd --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the list_versions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions. +# +def list_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new + + # Call the list_versions method. + result = client.list_versions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Version. + p item + end +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb new file mode 100644 index 000000000000..dca645f107d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the set_iam_policy call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb new file mode 100644 index 000000000000..7990b39f1d6a --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the test_iam_permissions call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb new file mode 100644 index 000000000000..0aca5331f573 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the update_project_settings call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings. +# +def update_project_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new + + # Call the update_project_settings method. + result = client.update_project_settings request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb new file mode 100644 index 000000000000..b49bb58893ec --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the update_repository call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository. +# +def update_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new + + # Call the update_repository method. + result = client.update_repository request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb new file mode 100644 index 000000000000..477573a098df --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] +require "google/cloud/artifact_registry/v1beta2" + +## +# Snippet for the update_tag call in the ArtifactRegistry service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag. +# +def update_tag + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new + + # Call the update_tag method. + result = client.update_tag request + + # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. + p result +end +# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json new file mode 100644 index 000000000000..344fe59d344c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json @@ -0,0 +1,1015 @@ +{ + "client_library": { + "name": "google-cloud-artifact_registry-v1beta2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.devtools.artifactregistry.v1beta2", + "version": "v1beta2" + } + ] + }, + "snippets": [ + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync", + "title": "Snippet for the import_apt_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts.", + "file": "artifact_registry/import_apt_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_apt_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ImportAptArtifacts", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync", + "title": "Snippet for the import_yum_artifacts call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts.", + "file": "artifact_registry/import_yum_artifacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_yum_artifacts", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ImportYumArtifacts", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync", + "title": "Snippet for the list_repositories call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories.", + "file": "artifact_registry/list_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_repositories", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListRepositories", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync", + "title": "Snippet for the get_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository.", + "file": "artifact_registry/get_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Repository", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetRepository", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync", + "title": "Snippet for the create_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository.", + "file": "artifact_registry/create_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateRepository", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync", + "title": "Snippet for the update_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository.", + "file": "artifact_registry/update_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Repository", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateRepository", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync", + "title": "Snippet for the delete_repository call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository.", + "file": "artifact_registry/delete_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_repository", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteRepository", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync", + "title": "Snippet for the list_packages call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages.", + "file": "artifact_registry/list_packages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_packages", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListPackages", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync", + "title": "Snippet for the get_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package.", + "file": "artifact_registry/get_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Package", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetPackage", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync", + "title": "Snippet for the delete_package call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package.", + "file": "artifact_registry/delete_package.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_package", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeletePackage", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync", + "title": "Snippet for the list_versions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions.", + "file": "artifact_registry/list_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_versions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListVersions", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync", + "title": "Snippet for the get_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version.", + "file": "artifact_registry/get_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Version", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetVersion", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync", + "title": "Snippet for the delete_version call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version.", + "file": "artifact_registry/delete_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_version", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteVersion", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync", + "title": "Snippet for the list_files call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files.", + "file": "artifact_registry/list_files.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_files", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListFiles", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync", + "title": "Snippet for the get_file call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file.", + "file": "artifact_registry/get_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_file", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::File", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetFile", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync", + "title": "Snippet for the list_tags call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags.", + "file": "artifact_registry/list_tags.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tags", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "ListTags", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync", + "title": "Snippet for the get_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag.", + "file": "artifact_registry/get_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetTag", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync", + "title": "Snippet for the create_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag.", + "file": "artifact_registry/create_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "CreateTag", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync", + "title": "Snippet for the update_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag.", + "file": "artifact_registry/update_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateTag", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync", + "title": "Snippet for the delete_tag call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag.", + "file": "artifact_registry/delete_tag.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_tag", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "DeleteTag", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy.", + "file": "artifact_registry/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy.", + "file": "artifact_registry/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions.", + "file": "artifact_registry/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync", + "title": "Snippet for the get_project_settings call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings.", + "file": "artifact_registry/get_project_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_project_settings", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "GetProjectSettings", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync", + "title": "Snippet for the update_project_settings call in the ArtifactRegistry service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings.", + "file": "artifact_registry/update_project_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_project_settings", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings", + "client": { + "short_name": "ArtifactRegistry::Client", + "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" + }, + "method": { + "short_name": "UpdateProjectSettings", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings", + "service": { + "short_name": "ArtifactRegistry", + "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb new file mode 100644 index 000000000000..947e460b617b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/devtools/artifactregistry/v1beta2/service_services_pb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb new file mode 100644 index 000000000000..81fee8ae756c --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/artifact_registry/v1beta2/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_project_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_settings_path project: "value0" + assert_equal "projects/value0/projectSettings", path + end + end + + def test_repository_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.repository_path project: "value0", location: "value1", repository: "value2" + assert_equal "projects/value0/locations/value1/repositories/value2", path + end + end + + def test_tag_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tag_path project: "value0", location: "value1", repository: "value2", package: "value3", tag: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/tags/value4", path + end + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb new file mode 100644 index 000000000000..8c55356954ee --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb @@ -0,0 +1,1478 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" + + +class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_import_apt_artifacts + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_apt_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_apt_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_apt_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_apt_artifacts gcs_source: gcs_source, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_apt_artifacts_client_stub.call_count + end + end + end + + def test_import_yum_artifacts + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_yum_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_yum_artifacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_yum_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_yum_artifacts gcs_source: gcs_source, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_yum_artifacts_client_stub.call_count + end + end + end + + def test_list_repositories + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_repositories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_repositories parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_repositories ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_repositories(::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_repositories_client_stub.call_count + end + end + end + + def test_get_repository + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_repository({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_repository name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_repository ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_repository({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_repository(::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_repository_client_stub.call_count + end + end + end + + def test_create_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + repository_id = "hello world" + repository = {} + + create_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_repository parent: parent, repository_id: repository_id, repository: repository do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_repository ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_repository(::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_repository_client_stub.call_count + end + end + end + + def test_update_repository + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + repository = {} + update_mask = {} + + update_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_repository({ repository: repository, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_repository repository: repository, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_repository ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_repository({ repository: repository, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_repository(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_repository_client_stub.call_count + end + end + end + + def test_delete_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_repository({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_repository name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_repository ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_repository({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_repository(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_repository_client_stub.call_count + end + end + end + + def test_list_packages + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_packages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_packages_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_packages parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_packages ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_packages({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_packages(::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_packages_client_stub.call_count + end + end + end + + def test_get_package + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_package ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_package(::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_package_client_stub.call_count + end + end + end + + def test_delete_package + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_package_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_package({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_package name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_package ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_package({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_package(::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_package_client_stub.call_count + end + end + end + + def test_list_versions + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + order_by = "hello world" + + list_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_versions ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_versions(::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_count + end + end + end + + def test_get_version + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + + get_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_version({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_version name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_version ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_version({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_version(::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_count + end + end + end + + def test_delete_version + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_version({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_version name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_version ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_version({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_version(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_count + end + end + end + + def test_list_files + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_files_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_files_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_files ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_files(::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_files_client_stub.call_count + end + end + end + + def test_get_file + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::File.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_file_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_file({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_file name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_file ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_file({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_file(::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_file_client_stub.call_count + end + end + end + + def test_list_tags + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_tags_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_tags_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tags_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tags parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tags ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_tags(::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tags_client_stub.call_count + end + end + end + + def test_get_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_tag({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_tag name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_tag ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_tag({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_tag(::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_tag_client_stub.call_count + end + end + end + + def test_create_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tag_id = "hello world" + tag = {} + + create_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_tag parent: parent, tag_id: tag_id, tag: tag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_tag ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_tag(::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_tag_client_stub.call_count + end + end + end + + def test_update_tag + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + tag = {} + update_mask = {} + + update_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_tag({ tag: tag, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_tag tag: tag, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_tag ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_tag({ tag: tag, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_tag(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_tag_client_stub.call_count + end + end + end + + def test_delete_tag + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_tag_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_tag({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_tag name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_tag ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_tag({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_tag(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_tag_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_get_project_settings + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_project_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_project_settings_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_project_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_project_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_project_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_project_settings_client_stub.call_count + end + end + end + + def test_update_project_settings + # Create test objects. + client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project_settings = {} + update_mask = {} + + update_project_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_project_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_project_settings_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_project_settings project_settings: project_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_project_settings_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb new file mode 100644 index 000000000000..2bc1a81812d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb @@ -0,0 +1,1683 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/devtools/artifactregistry/v1beta2/service_pb" +require "google/cloud/artifact_registry/v1beta2/artifact_registry" + +class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_import_apt_artifacts + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_apt_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_apt_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_apt_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_apt_artifacts gcs_source: gcs_source, parent: parent do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_apt_artifacts_client_stub.call_rpc_count + end + end + + def test_import_yum_artifacts + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + + import_yum_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_yum_artifacts, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_yum_artifacts_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_yum_artifacts gcs_source: gcs_source, parent: parent do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_yum_artifacts_client_stub.call_rpc_count + end + end + + def test_list_repositories + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_repositories, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_repositories_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_repositories parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_repositories ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_repositories(::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_repositories_client_stub.call_rpc_count + end + end + + def test_get_repository + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_repository({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_repository name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_repository ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_repository({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_repository(::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_repository_client_stub.call_rpc_count + end + end + + def test_create_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + repository_id = "hello world" + repository = {} + + create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["repository_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Repository), request["repository"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_repository parent: parent, repository_id: repository_id, repository: repository do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_repository ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_repository(::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_repository_client_stub.call_rpc_count + end + end + + def test_update_repository + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + repository = {} + update_mask = {} + + update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Repository), request["repository"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_repository({ repository: repository, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_repository repository: repository, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_repository ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_repository({ repository: repository, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_repository(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_repository_client_stub.call_rpc_count + end + end + + def test_delete_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_repository, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_repository_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_repository({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_repository name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_repository ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_repository({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_repository(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_repository_client_stub.call_rpc_count + end + end + + def test_list_packages + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_packages, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_packages_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_packages parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_packages ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_packages({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_packages(::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_packages_client_stub.call_rpc_count + end + end + + def test_get_package + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_package({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_package name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_package ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_package({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_package(::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_package_client_stub.call_rpc_count + end + end + + def test_delete_package + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_package, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_package_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_package({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_package name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_package ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_package({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_package(::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_package_client_stub.call_rpc_count + end + end + + def test_list_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + order_by = "hello world" + + list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_versions, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_versions_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_versions ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_versions(::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_versions_client_stub.call_rpc_count + end + end + + def test_get_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :VERSION_VIEW_UNSPECIFIED + + get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_version({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_version name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_version ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_version({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_version(::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_version_client_stub.call_rpc_count + end + end + + def test_delete_version + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_version, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_version_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_version({ name: name, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_version name: name, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_version ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_version({ name: name, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_version(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_version_client_stub.call_rpc_count + end + end + + def test_list_files + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_files, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_files_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_files ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_files(::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_files_client_stub.call_rpc_count + end + end + + def test_get_file + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::File.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_file, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_file_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_file({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_file name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_file ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_file({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_file(::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_file_client_stub.call_rpc_count + end + end + + def test_list_tags + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_tags_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tags, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tags_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_tags parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_tags ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_tags(::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tags_client_stub.call_rpc_count + end + end + + def test_get_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_tag({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_tag name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_tag ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_tag({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_tag(::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_tag_client_stub.call_rpc_count + end + end + + def test_create_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tag_id = "hello world" + tag = {} + + create_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["tag_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Tag), request["tag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_tag parent: parent, tag_id: tag_id, tag: tag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_tag ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_tag(::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_tag_client_stub.call_rpc_count + end + end + + def test_update_tag + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + tag = {} + update_mask = {} + + update_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Tag), request["tag"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_tag({ tag: tag, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_tag tag: tag, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_tag ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_tag({ tag: tag, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_tag(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_tag_client_stub.call_rpc_count + end + end + + def test_delete_tag + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_tag, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_tag_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_tag({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_tag name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_tag ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_tag({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_tag(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_tag_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_get_project_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_project_settings, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_project_settings_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_project_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_project_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_project_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_project_settings_client_stub.call_rpc_count + end + end + + def test_update_project_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + project_settings = {} + update_mask = {} + + update_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_project_settings, name + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings), request["project_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_project_settings_client_stub do + # Create client + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_project_settings project_settings: project_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_project_settings_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-asset-v1/.gitignore b/owl-bot-staging/google-cloud-asset-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-asset-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-asset-v1/.repo-metadata.json new file mode 100644 index 000000000000..7def6cd22bee --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudasset.googleapis.com", + "api_shortname": "cloudasset", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest", + "distribution_name": "google-cloud-asset-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudasset", + "name_pretty": "Cloud Asset V1 API", + "product_documentation": "https://cloud.google.com/asset-inventory/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "A metadata inventory service that allows you to view, monitor, and analyze all your GCP and Anthos assets across projects and services. Note that google-cloud-asset-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-asset instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ASSET", + "ruby-cloud-product-url": "https://cloud.google.com/asset-inventory/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-asset-v1/.rubocop.yml b/owl-bot-staging/google-cloud-asset-v1/.rubocop.yml new file mode 100644 index 000000000000..bc19046e2ec5 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-asset-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-asset-v1.rb" diff --git a/owl-bot-staging/google-cloud-asset-v1/.toys.rb b/owl-bot-staging/google-cloud-asset-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/.yardopts b/owl-bot-staging/google-cloud-asset-v1/.yardopts new file mode 100644 index 000000000000..3b0824309194 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Asset 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-asset-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-asset-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..3b34e30c6704 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-asset-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-asset-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/asset/v1" + +client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/asset/v1" + +::Google::Cloud::Asset::V1::AssetService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Asset::V1::AssetService::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-asset-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/asset/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Asset::V1::AssetService::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-asset-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-asset-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-asset-v1/Gemfile b/owl-bot-staging/google-cloud-asset-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/Gemfile @@ -0,0 +1,14 @@ +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-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-asset-v1/LICENSE.md b/owl-bot-staging/google-cloud-asset-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/README.md b/owl-bot-staging/google-cloud-asset-v1/README.md new file mode 100644 index 000000000000..c5eb207100ca --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Asset V1 API + +The Cloud Asset API manages the history and inventory of Google Cloud resources. + +A metadata inventory service that allows you to view, monitor, and analyze all your GCP and Anthos assets across projects and services. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Asset V1 API. Most users should consider using +the main client gem, +[google-cloud-asset](https://rubygems.org/gems/google-cloud-asset). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-asset-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/cloudasset.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/asset/v1" + +client = ::Google::Cloud::Asset::V1::AssetService::Client.new +request = ::Google::Cloud::Asset::V1::ExportAssetsRequest.new # (request fields as keyword arguments...) +response = client.export_assets request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/asset-inventory/) +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/asset/v1" +require "logger" + +client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-asset`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-asset-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-asset`. +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-asset-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-asset-v1/Rakefile b/owl-bot-staging/google-cloud-asset-v1/Rakefile new file mode 100644 index 000000000000..96313e76c5a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ASSET_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ASSET_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ASSET_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 ASSET_TEST_PROJECT=test123 ASSET_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/asset/v1/asset_service/credentials" + ::Google::Cloud::Asset::V1::AssetService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ASSET_PROJECT"] = project + ENV["ASSET_TEST_PROJECT"] = project + ENV["ASSET_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-asset-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-asset-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-asset-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-asset-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-asset-v1" + header "google-cloud-asset-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-asset-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-asset-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-asset-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-asset-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-asset-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-asset-v1/gapic_metadata.json new file mode 100644 index 000000000000..8aa482a92f45 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/gapic_metadata.json @@ -0,0 +1,133 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.asset.v1", + "libraryPackage": "::Google::Cloud::Asset::V1", + "services": { + "AssetService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Asset::V1::AssetService::Client", + "rpcs": { + "ExportAssets": { + "methods": [ + "export_assets" + ] + }, + "ListAssets": { + "methods": [ + "list_assets" + ] + }, + "BatchGetAssetsHistory": { + "methods": [ + "batch_get_assets_history" + ] + }, + "CreateFeed": { + "methods": [ + "create_feed" + ] + }, + "GetFeed": { + "methods": [ + "get_feed" + ] + }, + "ListFeeds": { + "methods": [ + "list_feeds" + ] + }, + "UpdateFeed": { + "methods": [ + "update_feed" + ] + }, + "DeleteFeed": { + "methods": [ + "delete_feed" + ] + }, + "SearchAllResources": { + "methods": [ + "search_all_resources" + ] + }, + "SearchAllIamPolicies": { + "methods": [ + "search_all_iam_policies" + ] + }, + "AnalyzeIamPolicy": { + "methods": [ + "analyze_iam_policy" + ] + }, + "AnalyzeIamPolicyLongrunning": { + "methods": [ + "analyze_iam_policy_longrunning" + ] + }, + "AnalyzeMove": { + "methods": [ + "analyze_move" + ] + }, + "QueryAssets": { + "methods": [ + "query_assets" + ] + }, + "CreateSavedQuery": { + "methods": [ + "create_saved_query" + ] + }, + "GetSavedQuery": { + "methods": [ + "get_saved_query" + ] + }, + "ListSavedQueries": { + "methods": [ + "list_saved_queries" + ] + }, + "UpdateSavedQuery": { + "methods": [ + "update_saved_query" + ] + }, + "DeleteSavedQuery": { + "methods": [ + "delete_saved_query" + ] + }, + "BatchGetEffectiveIamPolicies": { + "methods": [ + "batch_get_effective_iam_policies" + ] + }, + "AnalyzeOrgPolicies": { + "methods": [ + "analyze_org_policies" + ] + }, + "AnalyzeOrgPolicyGovernedContainers": { + "methods": [ + "analyze_org_policy_governed_containers" + ] + }, + "AnalyzeOrgPolicyGovernedAssets": { + "methods": [ + "analyze_org_policy_governed_assets" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-asset-v1/google-cloud-asset-v1.gemspec b/owl-bot-staging/google-cloud-asset-v1/google-cloud-asset-v1.gemspec new file mode 100644 index 000000000000..1d813d0834b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/google-cloud-asset-v1.gemspec @@ -0,0 +1,31 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/asset/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-asset-v1" + gem.version = Google::Cloud::Asset::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "A metadata inventory service that allows you to view, monitor, and analyze all your GCP and Anthos assets across projects and services. Note that google-cloud-asset-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-asset instead. See the readme for more details." + gem.summary = "The Cloud Asset API manages the history and inventory of Google Cloud resources." + 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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-os_config-v1", "> 0.0", "< 2.a" + gem.add_dependency "google-identity-access_context_manager-v1", "> 0.0", "< 2.a" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google-cloud-asset-v1.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google-cloud-asset-v1.rb new file mode 100644 index 000000000000..14598cf10234 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google-cloud-asset-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/asset/v1" diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1.rb new file mode 100644 index 000000000000..a02ac2ba74fb --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/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/asset/v1/asset_service" +require "google/cloud/asset/v1/version" + +module Google + module Cloud + module Asset + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/asset/v1" + # client = ::Google::Cloud::Asset::V1::AssetService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/asset/v1" + # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/asset/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_enrichment_resourceowners_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_enrichment_resourceowners_pb.rb new file mode 100644 index 000000000000..728884b914b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_enrichment_resourceowners_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/asset/v1/asset_enrichment_resourceowners.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/cloud/asset/v1/asset_enrichment_resourceowners.proto\x12\x15google.cloud.asset.v1\")\n\x0eResourceOwners\x12\x17\n\x0fresource_owners\x18\x01 \x03(\tB\xa2\x01\n\x19\x63om.google.cloud.asset.v1B\"AssetEnrichmentResourceownersProtoP\x01Z/cloud.google.com/go/asset/apiv1/assetpb;assetpb\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Asset + module V1 + ResourceOwners = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ResourceOwners").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service.rb new file mode 100644 index 000000000000..0ee9cc0080ea --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/asset/v1/version" + +require "google/cloud/asset/v1/asset_service/credentials" +require "google/cloud/asset/v1/asset_service/paths" +require "google/cloud/asset/v1/asset_service/operations" +require "google/cloud/asset/v1/asset_service/client" +require "google/cloud/asset/v1/asset_service/rest" + +module Google + module Cloud + module Asset + module V1 + ## + # Asset service definition. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/asset/v1/asset_service" + # client = ::Google::Cloud::Asset::V1::AssetService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/asset/v1/asset_service/rest" + # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + module AssetService + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_service", "helpers.rb" +require "google/cloud/asset/v1/asset_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb new file mode 100644 index 000000000000..78ae3db04cd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb @@ -0,0 +1,3484 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/asset/v1/asset_service_pb" + +module Google + module Cloud + module Asset + module V1 + module AssetService + ## + # Client for the AssetService service. + # + # Asset service definition. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudasset.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_service_stub + + ## + # Configure the AssetService Client class. + # + # See {::Google::Cloud::Asset::V1::AssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetService clients + # ::Google::Cloud::Asset::V1::AssetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Asset", "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.export_assets.timeout = 60.0 + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.batch_get_assets_history.timeout = 60.0 + default_config.rpcs.batch_get_assets_history.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_feed.timeout = 60.0 + + default_config.rpcs.get_feed.timeout = 60.0 + default_config.rpcs.get_feed.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_feeds.timeout = 60.0 + default_config.rpcs.list_feeds.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_feed.timeout = 60.0 + + default_config.rpcs.delete_feed.timeout = 60.0 + default_config.rpcs.delete_feed.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_all_resources.timeout = 30.0 + default_config.rpcs.search_all_resources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_all_iam_policies.timeout = 30.0 + default_config.rpcs.search_all_iam_policies.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.analyze_iam_policy.timeout = 300.0 + default_config.rpcs.analyze_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.analyze_iam_policy_longrunning.timeout = 60.0 + + default_config.rpcs.query_assets.timeout = 200.0 + default_config.rpcs.query_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_saved_query.timeout = 60.0 + + default_config.rpcs.get_saved_query.timeout = 60.0 + default_config.rpcs.get_saved_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_saved_queries.timeout = 60.0 + default_config.rpcs.list_saved_queries.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_saved_query.timeout = 60.0 + + default_config.rpcs.delete_saved_query.timeout = 60.0 + default_config.rpcs.delete_saved_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.batch_get_effective_iam_policies.timeout = 300.0 + default_config.rpcs.batch_get_effective_iam_policies.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.analyze_org_policies.timeout = 60.0 + default_config.rpcs.analyze_org_policies.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.analyze_org_policy_governed_containers.timeout = 60.0 + default_config.rpcs.analyze_org_policy_governed_containers.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.analyze_org_policy_governed_assets.timeout = 60.0 + default_config.rpcs.analyze_org_policy_governed_assets.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 AssetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Asset::V1::AssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_service_stub.universe_domain + end + + ## + # Create a new AssetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed 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/asset/v1/asset_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 + + @asset_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Asset::V1::AssetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Asset::V1::AssetService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_service_stub.logger + end + + # Service calls + + ## + # Exports assets with time and resource types to a given Cloud Storage + # location/BigQuery table. For Cloud Storage location destinations, the + # output format is newline-delimited JSON. Each line represents a + # {::Google::Cloud::Asset::V1::Asset google.cloud.asset.v1.Asset} in the JSON + # format; for BigQuery table destinations, the output table stores the fields + # in asset Protobuf as columns. This API implements the + # {::Google::Longrunning::Operation google.longrunning.Operation} API, which + # allows you to keep track of the export. We recommend intervals of at least + # 2 seconds with exponential retry to poll the export operation result. For + # regular-size resource parent, the export operation usually finishes within + # 5 minutes. + # + # @overload export_assets(request, options = nil) + # Pass arguments to `export_assets` via a request object, either of type + # {::Google::Cloud::Asset::V1::ExportAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, output_config: nil, relationship_types: nil) + # Pass arguments to `export_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative name of the root asset. This can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"), + # or a folder number (such as "folders/123"). + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Timestamp to take an asset snapshot. This can only be set to a timestamp + # between the current time and the current time minus 35 days (inclusive). + # If not specified, the current time will be used. Due to delays in resource + # data collection and indexing, there is a volatile window during which + # running the same query may get different results. + # @param asset_types [::Array<::String>] + # A list of asset types to take a snapshot for. For example: + # "compute.googleapis.com/Disk". + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # + # If specified, only matching assets will be returned, otherwise, it will + # snapshot all asset types. See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types. + # @param content_type [::Google::Cloud::Asset::V1::ContentType] + # Asset content type. If not specified, no content but the asset name will be + # returned. + # @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # @param relationship_types [::Array<::String>] + # A list of relationship types to export, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it snapshots specified relationships. It returns an error if + # any of the [relationship_types] doesn't belong to the supported + # relationship types of the [asset_types] or if any of the [asset_types] + # doesn't belong to the source types of the [relationship_types]. + # * Otherwise: + # it snapshots the supported relationships for all [asset_types] or returns + # an error if any of the [asset_types] has no relationship support. + # An unspecified asset types field means all supported asset_types. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + # supported asset types and relationship types. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::ExportAssetsRequest.new + # + # # Call the export_assets method. + # result = client.export_assets request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ExportAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :export_assets, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 assets with time and resource types and returns paged results in + # response. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Asset::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, relationship_types: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization, folder, or project the assets belong + # to. Format: "organizations/[organization-number]" (such as + # "organizations/123"), "projects/[project-id]" (such as + # "projects/my-project-id"), "projects/[project-number]" (such as + # "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Timestamp to take an asset snapshot. This can only be set to a timestamp + # between the current time and the current time minus 35 days (inclusive). + # If not specified, the current time will be used. Due to delays in resource + # data collection and indexing, there is a volatile window during which + # running the same query may get different results. + # @param asset_types [::Array<::String>] + # A list of asset types to take a snapshot for. For example: + # "compute.googleapis.com/Disk". + # + # Regular expression is also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # + # If specified, only matching assets will be returned, otherwise, it will + # snapshot all asset types. See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types. + # @param content_type [::Google::Cloud::Asset::V1::ContentType] + # Asset content type. If not specified, no content but the asset name will + # be returned. + # @param page_size [::Integer] + # The maximum number of assets to be returned in a single response. Default + # is 100, minimum is 1, and maximum is 1000. + # @param page_token [::String] + # The `next_page_token` returned from the previous `ListAssetsResponse`, or + # unspecified for the first `ListAssetsRequest`. It is a continuation of a + # prior `ListAssets` call, and the API should return the next page of assets. + # @param relationship_types [::Array<::String>] + # A list of relationship types to output, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it snapshots specified relationships. It returns an error if + # any of the [relationship_types] doesn't belong to the supported + # relationship types of the [asset_types] or if any of the [asset_types] + # doesn't belong to the source types of the [relationship_types]. + # * Otherwise: + # it snapshots the supported relationships for all [asset_types] or returns + # an error if any of the [asset_types] has no relationship support. + # An unspecified asset types field means all supported asset_types. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types and relationship types. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Asset::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :list_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @asset_service_stub, :list_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Batch gets the update history of assets that overlap a time window. + # For IAM_POLICY content, this API outputs history when the asset and its + # attached IAM POLICY both exist. This can create gaps in the output history. + # Otherwise, this API outputs history with asset in both non-delete or + # deleted status. + # If a specified asset does not exist, this API returns an INVALID_ARGUMENT + # error. + # + # @overload batch_get_assets_history(request, options = nil) + # Pass arguments to `batch_get_assets_history` via a request object, either of type + # {::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assets_history(parent: nil, asset_names: nil, content_type: nil, read_time_window: nil, relationship_types: nil) + # Pass arguments to `batch_get_assets_history` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative name of the root asset. It can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id")", or a project number (such as "projects/12345"). + # @param asset_names [::Array<::String>] + # A list of the full names of the assets. + # See: https://cloud.google.com/asset-inventory/docs/resource-name-format + # Example: + # + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + # + # The request becomes a no-op if the asset name list is empty, and the max + # size of the asset name list is 100 in one request. + # @param content_type [::Google::Cloud::Asset::V1::ContentType] + # Optional. The content type. + # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash] + # Optional. The time window for the asset history. Both start_time and + # end_time are optional and if set, it must be after the current time minus + # 35 days. If end_time is not set, it is default to current timestamp. + # If start_time is not set, the snapshot of the assets at end_time will be + # returned. The returned results contain all temporal assets whose time + # window overlap with read_time_window. + # @param relationship_types [::Array<::String>] + # Optional. A list of relationship types to output, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it outputs specified relationships' history on the [asset_names]. It + # returns an error if any of the [relationship_types] doesn't belong to the + # supported relationship types of the [asset_names] or if any of the + # [asset_names]'s types doesn't belong to the source types of the + # [relationship_types]. + # * Otherwise: + # it outputs the supported relationships' history on the [asset_names] or + # returns an error if any of the [asset_names]'s types has no relationship + # support. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + # supported asset types and relationship types. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new + # + # # Call the batch_get_assets_history method. + # result = client.batch_get_assets_history request + # + # # The returned object is of type Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse. + # p result + # + def batch_get_assets_history request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest + + # Converts hash and nil to 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_assets_history.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_get_assets_history.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_get_assets_history.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :batch_get_assets_history, request, 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 feed in a parent project/folder/organization to listen to its + # asset updates. + # + # @overload create_feed(request, options = nil) + # Pass arguments to `create_feed` via a request object, either of type + # {::Google::Cloud::Asset::V1::CreateFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::CreateFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_feed(parent: nil, feed_id: nil, feed: nil) + # Pass arguments to `create_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project/folder/organization where this feed + # should be created in. It can only be an organization number (such as + # "organizations/123"), a folder number (such as "folders/123"), a project ID + # (such as "projects/my-project-id"), or a project number (such as + # "projects/12345"). + # @param feed_id [::String] + # Required. This is the client-assigned asset feed identifier and it needs to + # be unique under a specific parent project/folder/organization. + # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash] + # Required. The feed details. The field `name` must be empty and it will be + # generated in the format of: projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::CreateFeedRequest.new + # + # # Call the create_feed method. + # result = client.create_feed request + # + # # The returned object is of type Google::Cloud::Asset::V1::Feed. + # p result + # + def create_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateFeedRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_feed.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :create_feed, request, 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 details about an asset feed. + # + # @overload get_feed(request, options = nil) + # Pass arguments to `get_feed` via a request object, either of type + # {::Google::Cloud::Asset::V1::GetFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::GetFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_feed(name: nil) + # Pass arguments to `get_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Feed and it must be in the format of: + # projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::GetFeedRequest.new + # + # # Call the get_feed method. + # result = client.get_feed request + # + # # The returned object is of type Google::Cloud::Asset::V1::Feed. + # p result + # + def get_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetFeedRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_feed.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :get_feed, request, 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 asset feeds in a parent project/folder/organization. + # + # @overload list_feeds(request, options = nil) + # Pass arguments to `list_feeds` via a request object, either of type + # {::Google::Cloud::Asset::V1::ListFeedsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::ListFeedsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_feeds(parent: nil) + # Pass arguments to `list_feeds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project/folder/organization whose feeds are to be + # listed. It can only be using project/folder/organization number (such as + # "folders/12345")", or a project ID (such as "projects/my-project-id"). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::ListFeedsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::ListFeedsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::ListFeedsRequest.new + # + # # Call the list_feeds method. + # result = client.list_feeds request + # + # # The returned object is of type Google::Cloud::Asset::V1::ListFeedsResponse. + # p result + # + def list_feeds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListFeedsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_feeds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_feeds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_feeds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :list_feeds, request, 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 asset feed configuration. + # + # @overload update_feed(request, options = nil) + # Pass arguments to `update_feed` via a request object, either of type + # {::Google::Cloud::Asset::V1::UpdateFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_feed(feed: nil, update_mask: nil) + # Pass arguments to `update_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash] + # Required. The new values of feed details. It must match an existing feed + # and the field `name` must be in the format of: + # projects/project_number/feeds/feed_id or + # folders/folder_number/feeds/feed_id or + # organizations/organization_number/feeds/feed_id. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Only updates the `feed` fields indicated by this mask. + # The field mask must not be empty, and it must not contain fields that + # are immutable or only set by the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::UpdateFeedRequest.new + # + # # Call the update_feed method. + # result = client.update_feed request + # + # # The returned object is of type Google::Cloud::Asset::V1::Feed. + # p result + # + def update_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateFeedRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.feed&.name + header_params["feed.name"] = request.feed.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_feed.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :update_feed, request, 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 asset feed. + # + # @overload delete_feed(request, options = nil) + # Pass arguments to `delete_feed` via a request object, either of type + # {::Google::Cloud::Asset::V1::DeleteFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_feed(name: nil) + # Pass arguments to `delete_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the feed and it must be in the format of: + # projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::DeleteFeedRequest.new + # + # # Call the delete_feed method. + # result = client.delete_feed request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteFeedRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_feed.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :delete_feed, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches all Google Cloud resources within the specified scope, such as a + # project, folder, or organization. The caller must be granted the + # `cloudasset.assets.searchAllResources` permission on the desired scope, + # otherwise the request will be rejected. + # + # @overload search_all_resources(request, options = nil) + # Pass arguments to `search_all_resources` via a request object, either of type + # {::Google::Cloud::Asset::V1::SearchAllResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::SearchAllResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_all_resources(scope: nil, query: nil, asset_types: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) + # Pass arguments to `search_all_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 scope [::String] + # Required. A scope can be a project, a folder, or an organization. The + # search is limited to the resources within the `scope`. The caller must be + # granted the + # [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + # permission on the desired scope. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param query [::String] + # Optional. The query statement. See [how to construct a + # query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + # for more information. If not specified or empty, it will search all the + # resources within the specified `scope`. + # + # Examples: + # + # * `name:Important` to find Google Cloud resources whose name contains + # `Important` as a word. + # * `name=Important` to find the Google Cloud resource whose name is exactly + # `Important`. + # * `displayName:Impor*` to find Google Cloud resources whose display name + # contains `Impor` as a prefix of any word in the field. + # * `location:us-west*` to find Google Cloud resources whose location + # contains both `us` and `west` as prefixes. + # * `labels:prod` to find Google Cloud resources whose labels contain `prod` + # as a key or value. + # * `labels.env:prod` to find Google Cloud resources that have a label `env` + # and its value is `prod`. + # * `labels.env:*` to find Google Cloud resources that have a label `env`. + # * `tagKeys:env` to find Google Cloud resources that have directly + # attached tags where the + # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) + # contains `env`. + # * `tagValues:prod*` to find Google Cloud resources that have directly + # attached tags where the + # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # contains a word prefixed by `prod`. + # * `tagValueIds=tagValues/123` to find Google Cloud resources that have + # directly attached tags where the + # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # is exactly `tagValues/123`. + # * `effectiveTagKeys:env` to find Google Cloud resources that have + # directly attached or inherited tags where the + # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) + # contains `env`. + # * `effectiveTagValues:prod*` to find Google Cloud resources that have + # directly attached or inherited tags where the + # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # contains a word prefixed by `prod`. + # * `effectiveTagValueIds=tagValues/123` to find Google Cloud resources that + # have directly attached or inherited tags where the + # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # is exactly `tagValues/123`. + # * `kmsKey:key` to find Google Cloud resources encrypted with a + # customer-managed encryption key whose name contains `key` as a word. This + # field is deprecated. Use the `kmsKeys` field to retrieve Cloud KMS + # key information. + # * `kmsKeys:key` to find Google Cloud resources encrypted with + # customer-managed encryption keys whose name contains the word `key`. + # * `relationships:instance-group-1` to find Google Cloud resources that have + # relationships with `instance-group-1` in the related resource name. + # * `relationships:INSTANCE_TO_INSTANCEGROUP` to find Compute Engine + # instances that have relationships of type `INSTANCE_TO_INSTANCEGROUP`. + # * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find + # Compute Engine instances that have relationships with `instance-group-1` + # in the Compute Engine instance group resource name, for relationship type + # `INSTANCE_TO_INSTANCEGROUP`. + # * `sccSecurityMarks.key=value` to find Cloud resources that are attached + # with security marks whose key is `key` and value is `value`. + # * `sccSecurityMarks.key:*` to find Cloud resources that are attached with + # security marks whose key is `key`. + # * `state:ACTIVE` to find Google Cloud resources whose state contains + # `ACTIVE` as a word. + # * `NOT state:ACTIVE` to find Google Cloud resources whose state doesn't + # contain `ACTIVE` as a word. + # * `createTime<1609459200` to find Google Cloud resources that were created + # before `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of + # `2021-01-01 00:00:00 UTC` in seconds. + # * `updateTime>1609459200` to find Google Cloud resources that were updated + # after `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of + # `2021-01-01 00:00:00 UTC` in seconds. + # * `Important` to find Google Cloud resources that contain `Important` as a + # word in any of the searchable fields. + # * `Impor*` to find Google Cloud resources that contain `Impor` as a prefix + # of any word in any of the searchable fields. + # * `Important location:(us-west1 OR global)` to find Google Cloud + # resources that contain `Important` as a word in any of the searchable + # fields and are also located in the `us-west1` region or the `global` + # location. + # @param asset_types [::Array<::String>] + # Optional. A list of asset types that this request searches for. If empty, + # it will search all the asset types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # @param page_size [::Integer] + # Optional. The page size for search result pagination. Page size is capped + # at 500 even if a larger value is given. If set to zero or a negative value, + # server will pick an appropriate default. Returned results may be fewer than + # requested. When this happens, there could be more results as long as + # `next_page_token` is returned. + # @param page_token [::String] + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. `page_token` must be the value of + # `next_page_token` from the previous response. The values of all other + # method parameters, must be identical to those in the previous call. + # @param order_by [::String] + # Optional. A comma-separated list of fields specifying the sorting order of + # the results. The default order is ascending. Add " DESC" after the field + # name to indicate descending order. Redundant space characters are ignored. + # Example: "location DESC, name". + # Only the following fields in the response are sortable: + # + # * name + # * assetType + # * project + # * displayName + # * description + # * location + # * createTime + # * updateTime + # * state + # * parentFullResourceName + # * parentAssetType + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A comma-separated list of fields that you want returned in the + # results. The following fields are returned by default if not specified: + # + # * `name` + # * `assetType` + # * `project` + # * `folders` + # * `organization` + # * `displayName` + # * `description` + # * `location` + # * `labels` + # * `tags` + # * `effectiveTags` + # * `networkTags` + # * `kmsKeys` + # * `createTime` + # * `updateTime` + # * `state` + # * `additionalAttributes` + # * `parentFullResourceName` + # * `parentAssetType` + # + # Some fields of large size, such as `versionedResources`, + # `attachedResources`, `effectiveTags` etc., are not returned by default, but + # you can specify them in the `read_mask` parameter if you want to include + # them. If `"*"` is specified, all [available + # fields](https://cloud.google.com/asset-inventory/docs/reference/rest/v1/TopLevel/searchAllResources#resourcesearchresult) + # are returned. + # Examples: `"name,location"`, `"name,versionedResources"`, `"*"`. + # Any invalid field path will trigger INVALID_ARGUMENT error. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::SearchAllResourcesRequest.new + # + # # Call the search_all_resources method. + # result = client.search_all_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::Asset::V1::ResourceSearchResult. + # p item + # end + # + def search_all_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_all_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::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_all_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_all_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :search_all_resources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @asset_service_stub, :search_all_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 + + ## + # Searches all IAM policies within the specified scope, such as a project, + # folder, or organization. The caller must be granted the + # `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, + # otherwise the request will be rejected. + # + # @overload search_all_iam_policies(request, options = nil) + # Pass arguments to `search_all_iam_policies` via a request object, either of type + # {::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_all_iam_policies(scope: nil, query: nil, page_size: nil, page_token: nil, asset_types: nil, order_by: nil) + # Pass arguments to `search_all_iam_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 scope [::String] + # Required. A scope can be a project, a folder, or an organization. The + # search is limited to the IAM policies within the `scope`. The caller must + # be granted the + # [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + # permission on the desired scope. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param query [::String] + # Optional. The query statement. See [how to construct a + # query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + # for more information. If not specified or empty, it will search all the + # IAM policies within the specified `scope`. Note that the query string is + # compared against each IAM policy binding, including its principals, + # roles, and IAM conditions. The returned IAM policies will only + # contain the bindings that match your query. To learn more about the IAM + # policy structure, see the [IAM policy + # documentation](https://cloud.google.com/iam/help/allow-policies/structure). + # + # Examples: + # + # * `policy:amy@gmail.com` to find IAM policy bindings that specify user + # "amy@gmail.com". + # * `policy:roles/compute.admin` to find IAM policy bindings that specify + # the Compute Admin role. + # * `policy:comp*` to find IAM policy bindings that contain "comp" as a + # prefix of any word in the binding. + # * `policy.role.permissions:storage.buckets.update` to find IAM policy + # bindings that specify a role containing "storage.buckets.update" + # permission. Note that if callers don't have `iam.roles.get` access to a + # role's included permissions, policy bindings that specify this role will + # be dropped from the search results. + # * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + # role containing "upd" as a prefix of any word in the role permission. + # Note that if callers don't have `iam.roles.get` access to a role's + # included permissions, policy bindings that specify this role will be + # dropped from the search results. + # * `resource:organizations/123456` to find IAM policy bindings + # that are set on "organizations/123456". + # * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + # find IAM policy bindings that are set on the project named "myproject". + # * `Important` to find IAM policy bindings that contain "Important" as a + # word in any of the searchable fields (except for the included + # permissions). + # * `resource:(instance1 OR instance2) policy:amy` to find + # IAM policy bindings that are set on resources "instance1" or + # "instance2" and also specify user "amy". + # * `roles:roles/compute.admin` to find IAM policy bindings that specify the + # Compute Admin role. + # * `memberTypes:user` to find IAM policy bindings that contain the + # principal type "user". + # @param page_size [::Integer] + # Optional. The page size for search result pagination. Page size is capped + # at 500 even if a larger value is given. If set to zero or a negative value, + # server will pick an appropriate default. Returned results may be fewer than + # requested. When this happens, there could be more results as long as + # `next_page_token` is returned. + # @param page_token [::String] + # Optional. If present, retrieve the next batch of results from the preceding + # call to this method. `page_token` must be the value of `next_page_token` + # from the previous response. The values of all other method parameters must + # be identical to those in the previous call. + # @param asset_types [::Array<::String>] + # Optional. A list of asset types that the IAM policies are attached to. If + # empty, it will search the IAM policies that are attached to all the asset + # types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots IAM policies attached to asset type + # starts with "compute.googleapis.com". + # * ".*Instance" snapshots IAM policies attached to asset type ends with + # "Instance". + # * ".*Instance.*" snapshots IAM policies attached to asset type contains + # "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # @param order_by [::String] + # Optional. A comma-separated list of fields specifying the sorting order of + # the results. The default order is ascending. Add " DESC" after the field + # name to indicate descending order. Redundant space characters are ignored. + # Example: "assetType DESC, resource". + # Only singular primitive fields in the response are sortable: + # * resource + # * assetType + # * project + # All the other fields such as repeated fields (e.g., `folders`) and + # non-primitive fields (e.g., `policy`) are not supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new + # + # # Call the search_all_iam_policies method. + # result = client.search_all_iam_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::Cloud::Asset::V1::IamPolicySearchResult. + # p item + # end + # + def search_all_iam_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_all_iam_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::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_all_iam_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_all_iam_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :search_all_iam_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @asset_service_stub, :search_all_iam_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 + + ## + # Analyzes IAM policies to answer which identities have what accesses on + # which resources. + # + # @overload analyze_iam_policy(request, options = nil) + # Pass arguments to `analyze_iam_policy` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload analyze_iam_policy(analysis_query: nil, saved_analysis_query: nil, execution_timeout: nil) + # Pass arguments to `analyze_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 analysis_query [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery, ::Hash] + # Required. The request query. + # @param saved_analysis_query [::String] + # Optional. The name of a saved query, which must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # + # If both `analysis_query` and `saved_analysis_query` are provided, they + # will be merged together with the `saved_analysis_query` as base and + # the `analysis_query` as overrides. For more details of the merge behavior, + # refer to the + # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) + # page. + # + # Note that you cannot override primitive fields with default value, such as + # 0 or empty string, etc., because we use proto3, which doesn't support field + # presence yet. + # @param execution_timeout [::Google::Protobuf::Duration, ::Hash] + # Optional. Amount of time executable has to complete. See JSON + # representation of + # [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + # + # If this field is set with a value less than the RPC deadline, and the + # execution of your query hasn't finished in the specified + # execution timeout, you will get a response with partial result. + # Otherwise, your query's execution will continue until the RPC deadline. + # If it's not finished until then, you will get a DEADLINE_EXCEEDED error. + # + # Default is empty. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new + # + # # Call the analyze_iam_policy method. + # result = client.analyze_iam_policy request + # + # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse. + # p result + # + def analyze_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.analyze_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.analysis_query&.scope + header_params["analysis_query.scope"] = request.analysis_query.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.analyze_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.analyze_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :analyze_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 + + ## + # Analyzes IAM policies asynchronously to answer which identities have what + # accesses on which resources, and writes the analysis results to a Google + # Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + # output format is the JSON format that represents a + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse AnalyzeIamPolicyResponse}. + # This method implements the + # {::Google::Longrunning::Operation google.longrunning.Operation}, which allows + # you to track the operation status. We recommend intervals of at least 2 + # seconds with exponential backoff retry to poll the operation result. The + # metadata contains the metadata for the long-running operation. + # + # @overload analyze_iam_policy_longrunning(request, options = nil) + # Pass arguments to `analyze_iam_policy_longrunning` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload analyze_iam_policy_longrunning(analysis_query: nil, saved_analysis_query: nil, output_config: nil) + # Pass arguments to `analyze_iam_policy_longrunning` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param analysis_query [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery, ::Hash] + # Required. The request query. + # @param saved_analysis_query [::String] + # Optional. The name of a saved query, which must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # + # If both `analysis_query` and `saved_analysis_query` are provided, they + # will be merged together with the `saved_analysis_query` as base and + # the `analysis_query` as overrides. For more details of the merge behavior, + # refer to the + # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) + # doc. + # + # Note that you cannot override primitive fields with default value, such as + # 0 or empty string, etc., because we use proto3, which doesn't support field + # presence yet. + # @param output_config [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new + # + # # Call the analyze_iam_policy_longrunning method. + # result = client.analyze_iam_policy_longrunning request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def analyze_iam_policy_longrunning request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.analyze_iam_policy_longrunning.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.analysis_query&.scope + header_params["analysis_query.scope"] = request.analysis_query.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.analyze_iam_policy_longrunning.timeout, + metadata: metadata, + retry_policy: @config.rpcs.analyze_iam_policy_longrunning.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :analyze_iam_policy_longrunning, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyze moving a resource to a specified destination without kicking off + # the actual move. The analysis is best effort depending on the user's + # permissions of viewing different hierarchical policies and configurations. + # The policies and configuration are subject to change before the actual + # resource migration takes place. + # + # @overload analyze_move(request, options = nil) + # Pass arguments to `analyze_move` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeMoveRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeMoveRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload analyze_move(resource: nil, destination_parent: nil, view: nil) + # Pass arguments to `analyze_move` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # Required. Name of the resource to perform the analysis against. + # Only Google Cloud projects are supported as of today. Hence, this can only + # be a project ID (such as "projects/my-project-id") or a project number + # (such as "projects/12345"). + # @param destination_parent [::String] + # Required. Name of the Google Cloud folder or organization to reparent the + # target resource. The analysis will be performed against hypothetically + # moving the resource to this specified destination parent. This can only be + # a folder number (such as "folders/123") or an organization number (such as + # "organizations/123"). + # @param view [::Google::Cloud::Asset::V1::AnalyzeMoveRequest::AnalysisView] + # Analysis view indicating what information should be included in the + # analysis response. If unspecified, the default view is FULL. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeMoveRequest.new + # + # # Call the analyze_move method. + # result = client.analyze_move request + # + # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeMoveResponse. + # p result + # + def analyze_move request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeMoveRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.analyze_move.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-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.analyze_move.timeout, + metadata: metadata, + retry_policy: @config.rpcs.analyze_move.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :analyze_move, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Issue a job that queries assets using a SQL statement compatible with + # [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + # + # If the query execution finishes within timeout and there's no pagination, + # the full query results will be returned in the `QueryAssetsResponse`. + # + # Otherwise, full query results can be obtained by issuing extra requests + # with the `job_reference` from the a previous `QueryAssets` call. + # + # Note, the query result has approximately 10 GB limitation enforced by + # [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). + # Queries return larger results will result in errors. + # + # @overload query_assets(request, options = nil) + # Pass arguments to `query_assets` via a request object, either of type + # {::Google::Cloud::Asset::V1::QueryAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_assets(parent: nil, statement: nil, job_reference: nil, page_size: nil, page_token: nil, timeout: nil, read_time_window: nil, read_time: nil, output_config: nil) + # Pass arguments to `query_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative name of the root asset. This can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"), + # or a folder number (such as "folders/123"). + # + # Only assets belonging to the `parent` will be returned. + # @param statement [::String] + # Optional. A SQL statement that's compatible with [BigQuery + # SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + # + # Note: The following parameters are mutually exclusive: `statement`, `job_reference`. 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 job_reference [::String] + # Optional. Reference to the query job, which is from the + # `QueryAssetsResponse` of previous `QueryAssets` call. + # + # Note: The following parameters are mutually exclusive: `job_reference`, `statement`. 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 page_size [::Integer] + # Optional. The maximum number of rows to return in the results. Responses + # are limited to 10 MB and 1000 rows. + # + # By default, the maximum row count is 1000. When the byte or row count limit + # is reached, the rest of the query results will be paginated. + # + # The field will be ignored when [output_config] is specified. + # @param page_token [::String] + # Optional. A page token received from previous `QueryAssets`. + # + # The field will be ignored when [output_config] is specified. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # Optional. Specifies the maximum amount of time that the client is willing + # to wait for the query to complete. By default, this limit is 5 min for the + # first query, and 1 minute for the following queries. If the query is + # complete, the `done` field in the `QueryAssetsResponse` is true, otherwise + # false. + # + # Like BigQuery [jobs.query + # API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) + # The call is not guaranteed to wait for the specified timeout; it typically + # returns after around 200 seconds (200,000 milliseconds), even if the query + # is not complete. + # + # The field will be ignored when [output_config] is specified. + # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash] + # Optional. [start_time] is required. [start_time] must be less than + # [end_time] Defaults [end_time] to now if [start_time] is set and + # [end_time] isn't. Maximum permitted time range is 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time_window`, `read_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 read_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. Queries cloud assets as they appeared at the specified point in + # time. + # + # Note: The following parameters are mutually exclusive: `read_time`, `read_time_window`. 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 output_config [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig, ::Hash] + # Optional. Destination where the query results will be saved. + # + # When this field is specified, the query results won't be saved in the + # [QueryAssetsResponse.query_result]. Instead + # [QueryAssetsResponse.output_config] will be set. + # + # Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used + # to check the status of the query job when passed to a following + # [QueryAssets] API call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::QueryAssetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::QueryAssetsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::QueryAssetsRequest.new + # + # # Call the query_assets method. + # result = client.query_assets request + # + # # The returned object is of type Google::Cloud::Asset::V1::QueryAssetsResponse. + # p result + # + def query_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::QueryAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.query_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.query_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :query_assets, request, 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 saved query in a parent project/folder/organization. + # + # @overload create_saved_query(request, options = nil) + # Pass arguments to `create_saved_query` via a request object, either of type + # {::Google::Cloud::Asset::V1::CreateSavedQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::CreateSavedQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_saved_query(parent: nil, saved_query: nil, saved_query_id: nil) + # Pass arguments to `create_saved_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 parent [::String] + # Required. The name of the project/folder/organization where this + # saved_query should be created in. It can only be an organization number + # (such as "organizations/123"), a folder number (such as "folders/123"), a + # project ID (such as "projects/my-project-id"), or a project number (such as + # "projects/12345"). + # @param saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash] + # Required. The saved_query details. The `name` field must be empty as it + # will be generated based on the parent and saved_query_id. + # @param saved_query_id [::String] + # Required. The ID to use for the saved query, which must be unique in the + # specified parent. It will become the final component of the saved query's + # resource name. + # + # This value should be 4-63 characters, and valid characters + # are `[a-z][0-9]-`. + # + # Notice that this field is required in the saved query creation, and the + # `name` field of the `saved_query` will be ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::CreateSavedQueryRequest.new + # + # # Call the create_saved_query method. + # result = client.create_saved_query request + # + # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + # p result + # + def create_saved_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateSavedQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_saved_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_saved_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_saved_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :create_saved_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 + + ## + # Gets details about a saved query. + # + # @overload get_saved_query(request, options = nil) + # Pass arguments to `get_saved_query` via a request object, either of type + # {::Google::Cloud::Asset::V1::GetSavedQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::GetSavedQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_saved_query(name: nil) + # Pass arguments to `get_saved_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 name [::String] + # Required. The name of the saved query and it must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::GetSavedQueryRequest.new + # + # # Call the get_saved_query method. + # result = client.get_saved_query request + # + # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + # p result + # + def get_saved_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetSavedQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_saved_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_saved_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_saved_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :get_saved_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 + + ## + # Lists all saved queries in a parent project/folder/organization. + # + # @overload list_saved_queries(request, options = nil) + # Pass arguments to `list_saved_queries` via a request object, either of type + # {::Google::Cloud::Asset::V1::ListSavedQueriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::ListSavedQueriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_saved_queries(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_saved_queries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project/folder/organization whose savedQueries are to + # be listed. It can only be using project/folder/organization number (such as + # "folders/12345")", or a project ID (such as "projects/my-project-id"). + # @param filter [::String] + # Optional. The expression to filter resources. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. When `AND` and `OR` are both used in the + # expression, parentheses must be appropriately used to group the + # combinations. The expression may also contain regular expressions. + # + # See https://google.aip.dev/160 for more information on the grammar. + # @param page_size [::Integer] + # Optional. The maximum number of saved queries to return per page. The + # service may return fewer than this value. If unspecified, at most 50 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 `ListSavedQueries` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListSavedQueries` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::SavedQuery>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::SavedQuery>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::ListSavedQueriesRequest.new + # + # # Call the list_saved_queries method. + # result = client.list_saved_queries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Asset::V1::SavedQuery. + # p item + # end + # + def list_saved_queries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListSavedQueriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_saved_queries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_saved_queries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_saved_queries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :list_saved_queries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @asset_service_stub, :list_saved_queries, request, response, 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 saved query. + # + # @overload update_saved_query(request, options = nil) + # Pass arguments to `update_saved_query` via a request object, either of type + # {::Google::Cloud::Asset::V1::UpdateSavedQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::UpdateSavedQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_saved_query(saved_query: nil, update_mask: nil) + # Pass arguments to `update_saved_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 saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash] + # Required. The saved query to update. + # + # The saved query's `name` field is used to identify the one to update, + # which has format as below: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new + # + # # Call the update_saved_query method. + # result = client.update_saved_query request + # + # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + # p result + # + def update_saved_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_saved_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.saved_query&.name + header_params["saved_query.name"] = request.saved_query.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_saved_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_saved_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :update_saved_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 + + ## + # Deletes a saved query. + # + # @overload delete_saved_query(request, options = nil) + # Pass arguments to `delete_saved_query` via a request object, either of type + # {::Google::Cloud::Asset::V1::DeleteSavedQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::DeleteSavedQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_saved_query(name: nil) + # Pass arguments to `delete_saved_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 name [::String] + # Required. The name of the saved query to delete. It must be in the format + # of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new + # + # # Call the delete_saved_query method. + # result = client.delete_saved_query request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_saved_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_saved_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_saved_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_saved_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :delete_saved_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 + + ## + # Gets effective IAM policies for a batch of resources. + # + # @overload batch_get_effective_iam_policies(request, options = nil) + # Pass arguments to `batch_get_effective_iam_policies` via a request object, either of type + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_effective_iam_policies(scope: nil, names: nil) + # Pass arguments to `batch_get_effective_iam_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 scope [::String] + # Required. Only IAM policies on or below the scope will be returned. + # + # This can only be an organization number (such as "organizations/123"), a + # folder number (such as "folders/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"). + # + # To know how to get organization ID, visit [here + # ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # + # To know how to get folder or project ID, visit [here + # ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). + # @param names [::Array<::String>] + # Required. The names refer to the [full_resource_names] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the asset types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + # A maximum of 20 resources' effective policies can be retrieved in a batch. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new + # + # # Call the batch_get_effective_iam_policies method. + # result = client.batch_get_effective_iam_policies request + # + # # The returned object is of type Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse. + # p result + # + def batch_get_effective_iam_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest + + # Converts hash and nil to 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_effective_iam_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::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_get_effective_iam_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_get_effective_iam_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :batch_get_effective_iam_policies, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyzes organization policies under a scope. + # + # @overload analyze_org_policies(request, options = nil) + # Pass arguments to `analyze_org_policies` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload analyze_org_policies(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `analyze_org_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 scope [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param constraint [::String] + # Required. The name of the constraint to analyze organization policies for. + # The response only contains analyzed organization policies for the provided + # constraint. + # @param filter [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results}. + # Filtering is currently available for bare literal values and the following + # fields: + # * consolidated_policy.attached_resource + # * consolidated_policy.rules.enforce + # + # When filtering by a specific field, the only supported operator is `=`. + # For example, filtering by + # consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" + # will return all the Organization Policy results attached to "folders/001". + # @param page_size [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results} + # will contain 20 items with a maximum of 200. + # @param page_token [::String] + # The pagination token to retrieve the next page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new + # + # # Call the analyze_org_policies method. + # result = client.analyze_org_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::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult. + # p item + # end + # + def analyze_org_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.analyze_org_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::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.analyze_org_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.analyze_org_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :analyze_org_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @asset_service_stub, :analyze_org_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 + + ## + # Analyzes organization policies governed containers (projects, folders or + # organization) under a scope. + # + # @overload analyze_org_policy_governed_containers(request, options = nil) + # Pass arguments to `analyze_org_policy_governed_containers` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload analyze_org_policy_governed_containers(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `analyze_org_policy_governed_containers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param scope [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. The output containers will + # also be limited to the ones governed by those in-scope organization + # policies. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param constraint [::String] + # Required. The name of the constraint to analyze governed containers for. + # The analysis only contains organization policies for the provided + # constraint. + # @param filter [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers}. + # Filtering is currently available for bare literal values and the following + # fields: + # * parent + # * consolidated_policy.rules.enforce + # + # When filtering by a specific field, the only supported operator is `=`. + # For example, filtering by + # parent="//cloudresourcemanager.googleapis.com/folders/001" + # will return all the containers under "folders/001". + # @param page_size [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers} + # will contain 100 items with a maximum of 200. + # @param page_token [::String] + # The pagination token to retrieve the next page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new + # + # # Call the analyze_org_policy_governed_containers method. + # result = client.analyze_org_policy_governed_containers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer. + # p item + # end + # + def analyze_org_policy_governed_containers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.analyze_org_policy_governed_containers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.analyze_org_policy_governed_containers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.analyze_org_policy_governed_containers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :analyze_org_policy_governed_containers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @asset_service_stub, :analyze_org_policy_governed_containers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyzes organization policies governed assets (Google Cloud resources or + # policies) under a scope. This RPC supports custom constraints and the + # following canned constraints: + # + # * constraints/ainotebooks.accessMode + # * constraints/ainotebooks.disableFileDownloads + # * constraints/ainotebooks.disableRootAccess + # * constraints/ainotebooks.disableTerminal + # * constraints/ainotebooks.environmentOptions + # * constraints/ainotebooks.requireAutoUpgradeSchedule + # * constraints/ainotebooks.restrictVpcNetworks + # * constraints/compute.disableGuestAttributesAccess + # * constraints/compute.disableInstanceDataAccessApis + # * constraints/compute.disableNestedVirtualization + # * constraints/compute.disableSerialPortAccess + # * constraints/compute.disableSerialPortLogging + # * constraints/compute.disableVpcExternalIpv6 + # * constraints/compute.requireOsLogin + # * constraints/compute.requireShieldedVm + # * constraints/compute.restrictLoadBalancerCreationForTypes + # * constraints/compute.restrictProtocolForwardingCreationForTypes + # * constraints/compute.restrictXpnProjectLienRemoval + # * constraints/compute.setNewProjectDefaultToZonalDNSOnly + # * constraints/compute.skipDefaultNetworkCreation + # * constraints/compute.trustedImageProjects + # * constraints/compute.vmCanIpForward + # * constraints/compute.vmExternalIpAccess + # * constraints/gcp.detailedAuditLoggingMode + # * constraints/gcp.resourceLocations + # * constraints/iam.allowedPolicyMemberDomains + # * constraints/iam.automaticIamGrantsForDefaultServiceAccounts + # * constraints/iam.disableServiceAccountCreation + # * constraints/iam.disableServiceAccountKeyCreation + # * constraints/iam.disableServiceAccountKeyUpload + # * constraints/iam.restrictCrossProjectServiceAccountLienRemoval + # * constraints/iam.serviceAccountKeyExpiryHours + # * constraints/resourcemanager.accessBoundaries + # * constraints/resourcemanager.allowedExportDestinations + # * constraints/sql.restrictAuthorizedNetworks + # * constraints/sql.restrictNoncompliantDiagnosticDataAccess + # * constraints/sql.restrictNoncompliantResourceCreation + # * constraints/sql.restrictPublicIp + # * constraints/storage.publicAccessPrevention + # * constraints/storage.restrictAuthTypes + # * constraints/storage.uniformBucketLevelAccess + # + # This RPC only returns either resources of types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # or IAM policies. + # + # @overload analyze_org_policy_governed_assets(request, options = nil) + # Pass arguments to `analyze_org_policy_governed_assets` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload analyze_org_policy_governed_assets(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `analyze_org_policy_governed_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param scope [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. The output assets will + # also be limited to the ones governed by those in-scope organization + # policies. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param constraint [::String] + # Required. The name of the constraint to analyze governed assets for. The + # analysis only contains analyzed organization policies for the provided + # constraint. + # @param filter [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets}. + # + # For governed resources, filtering is currently available for bare literal + # values and the following fields: + # * governed_resource.project + # * governed_resource.folders + # * consolidated_policy.rules.enforce + # When filtering by `governed_resource.project` or + # `consolidated_policy.rules.enforce`, the only supported operator is `=`. + # When filtering by `governed_resource.folders`, the supported operators + # are `=` and `:`. + # For example, filtering by `governed_resource.project="projects/12345678"` + # will return all the governed resources under "projects/12345678", + # including the project itself if applicable. + # + # For governed IAM policies, filtering is currently available for bare + # literal values and the following fields: + # * governed_iam_policy.project + # * governed_iam_policy.folders + # * consolidated_policy.rules.enforce + # When filtering by `governed_iam_policy.project` or + # `consolidated_policy.rules.enforce`, the only supported operator is `=`. + # When filtering by `governed_iam_policy.folders`, the supported operators + # are `=` and `:`. + # For example, filtering by `governed_iam_policy.folders:"folders/12345678"` + # will return all the governed IAM policies under "folders/001". + # @param page_size [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets} + # will contain 100 items with a maximum of 200. + # @param page_token [::String] + # The pagination token to retrieve the next page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new + # + # # Call the analyze_org_policy_governed_assets method. + # result = client.analyze_org_policy_governed_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset. + # p item + # end + # + def analyze_org_policy_governed_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.analyze_org_policy_governed_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.analyze_org_policy_governed_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.analyze_org_policy_governed_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :analyze_org_policy_governed_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @asset_service_stub, :analyze_org_policy_governed_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssetService API. + # + # This class represents the configuration for AssetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Asset::V1::AssetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # export_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Asset::V1::AssetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.export_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.export_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::Asset::V1::AssetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudasset.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `export_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :export_assets + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `batch_get_assets_history` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_assets_history + ## + # RPC-specific configuration for `create_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :create_feed + ## + # RPC-specific configuration for `get_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :get_feed + ## + # RPC-specific configuration for `list_feeds` + # @return [::Gapic::Config::Method] + # + attr_reader :list_feeds + ## + # RPC-specific configuration for `update_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :update_feed + ## + # RPC-specific configuration for `delete_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_feed + ## + # RPC-specific configuration for `search_all_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :search_all_resources + ## + # RPC-specific configuration for `search_all_iam_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :search_all_iam_policies + ## + # RPC-specific configuration for `analyze_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_iam_policy + ## + # RPC-specific configuration for `analyze_iam_policy_longrunning` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_iam_policy_longrunning + ## + # RPC-specific configuration for `analyze_move` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_move + ## + # RPC-specific configuration for `query_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :query_assets + ## + # RPC-specific configuration for `create_saved_query` + # @return [::Gapic::Config::Method] + # + attr_reader :create_saved_query + ## + # RPC-specific configuration for `get_saved_query` + # @return [::Gapic::Config::Method] + # + attr_reader :get_saved_query + ## + # RPC-specific configuration for `list_saved_queries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_saved_queries + ## + # RPC-specific configuration for `update_saved_query` + # @return [::Gapic::Config::Method] + # + attr_reader :update_saved_query + ## + # RPC-specific configuration for `delete_saved_query` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_saved_query + ## + # RPC-specific configuration for `batch_get_effective_iam_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_effective_iam_policies + ## + # RPC-specific configuration for `analyze_org_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_org_policies + ## + # RPC-specific configuration for `analyze_org_policy_governed_containers` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_org_policy_governed_containers + ## + # RPC-specific configuration for `analyze_org_policy_governed_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_org_policy_governed_assets + + # @private + def initialize parent_rpcs = nil + export_assets_config = parent_rpcs.export_assets if parent_rpcs.respond_to? :export_assets + @export_assets = ::Gapic::Config::Method.new export_assets_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + batch_get_assets_history_config = parent_rpcs.batch_get_assets_history if parent_rpcs.respond_to? :batch_get_assets_history + @batch_get_assets_history = ::Gapic::Config::Method.new batch_get_assets_history_config + create_feed_config = parent_rpcs.create_feed if parent_rpcs.respond_to? :create_feed + @create_feed = ::Gapic::Config::Method.new create_feed_config + get_feed_config = parent_rpcs.get_feed if parent_rpcs.respond_to? :get_feed + @get_feed = ::Gapic::Config::Method.new get_feed_config + list_feeds_config = parent_rpcs.list_feeds if parent_rpcs.respond_to? :list_feeds + @list_feeds = ::Gapic::Config::Method.new list_feeds_config + update_feed_config = parent_rpcs.update_feed if parent_rpcs.respond_to? :update_feed + @update_feed = ::Gapic::Config::Method.new update_feed_config + delete_feed_config = parent_rpcs.delete_feed if parent_rpcs.respond_to? :delete_feed + @delete_feed = ::Gapic::Config::Method.new delete_feed_config + search_all_resources_config = parent_rpcs.search_all_resources if parent_rpcs.respond_to? :search_all_resources + @search_all_resources = ::Gapic::Config::Method.new search_all_resources_config + search_all_iam_policies_config = parent_rpcs.search_all_iam_policies if parent_rpcs.respond_to? :search_all_iam_policies + @search_all_iam_policies = ::Gapic::Config::Method.new search_all_iam_policies_config + analyze_iam_policy_config = parent_rpcs.analyze_iam_policy if parent_rpcs.respond_to? :analyze_iam_policy + @analyze_iam_policy = ::Gapic::Config::Method.new analyze_iam_policy_config + analyze_iam_policy_longrunning_config = parent_rpcs.analyze_iam_policy_longrunning if parent_rpcs.respond_to? :analyze_iam_policy_longrunning + @analyze_iam_policy_longrunning = ::Gapic::Config::Method.new analyze_iam_policy_longrunning_config + analyze_move_config = parent_rpcs.analyze_move if parent_rpcs.respond_to? :analyze_move + @analyze_move = ::Gapic::Config::Method.new analyze_move_config + query_assets_config = parent_rpcs.query_assets if parent_rpcs.respond_to? :query_assets + @query_assets = ::Gapic::Config::Method.new query_assets_config + create_saved_query_config = parent_rpcs.create_saved_query if parent_rpcs.respond_to? :create_saved_query + @create_saved_query = ::Gapic::Config::Method.new create_saved_query_config + get_saved_query_config = parent_rpcs.get_saved_query if parent_rpcs.respond_to? :get_saved_query + @get_saved_query = ::Gapic::Config::Method.new get_saved_query_config + list_saved_queries_config = parent_rpcs.list_saved_queries if parent_rpcs.respond_to? :list_saved_queries + @list_saved_queries = ::Gapic::Config::Method.new list_saved_queries_config + update_saved_query_config = parent_rpcs.update_saved_query if parent_rpcs.respond_to? :update_saved_query + @update_saved_query = ::Gapic::Config::Method.new update_saved_query_config + delete_saved_query_config = parent_rpcs.delete_saved_query if parent_rpcs.respond_to? :delete_saved_query + @delete_saved_query = ::Gapic::Config::Method.new delete_saved_query_config + batch_get_effective_iam_policies_config = parent_rpcs.batch_get_effective_iam_policies if parent_rpcs.respond_to? :batch_get_effective_iam_policies + @batch_get_effective_iam_policies = ::Gapic::Config::Method.new batch_get_effective_iam_policies_config + analyze_org_policies_config = parent_rpcs.analyze_org_policies if parent_rpcs.respond_to? :analyze_org_policies + @analyze_org_policies = ::Gapic::Config::Method.new analyze_org_policies_config + analyze_org_policy_governed_containers_config = parent_rpcs.analyze_org_policy_governed_containers if parent_rpcs.respond_to? :analyze_org_policy_governed_containers + @analyze_org_policy_governed_containers = ::Gapic::Config::Method.new analyze_org_policy_governed_containers_config + analyze_org_policy_governed_assets_config = parent_rpcs.analyze_org_policy_governed_assets if parent_rpcs.respond_to? :analyze_org_policy_governed_assets + @analyze_org_policy_governed_assets = ::Gapic::Config::Method.new analyze_org_policy_governed_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/credentials.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/credentials.rb new file mode 100644 index 000000000000..0df5128ff644 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Asset + module V1 + module AssetService + # Credentials for the AssetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "ASSET_CREDENTIALS", + "ASSET_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ASSET_CREDENTIALS_JSON", + "ASSET_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-asset-v1/lib/google/cloud/asset/v1/asset_service/operations.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/operations.rb new file mode 100644 index 000000000000..0a39c88f5206 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Asset + module V1 + module AssetService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudasset.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssetService 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 AssetService 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::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Asset::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudasset.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/paths.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/paths.rb new file mode 100644 index 000000000000..5c49ad154545 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/paths.rb @@ -0,0 +1,179 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Asset + module V1 + module AssetService + # Path helper methods for the AssetService API. + module Paths + ## + # Create a fully-qualified Feed resource string. + # + # @overload feed_path(project:, feed:) + # The resource will be in the following format: + # + # `projects/{project}/feeds/{feed}` + # + # @param project [String] + # @param feed [String] + # + # @overload feed_path(folder:, feed:) + # The resource will be in the following format: + # + # `folders/{folder}/feeds/{feed}` + # + # @param folder [String] + # @param feed [String] + # + # @overload feed_path(organization:, feed:) + # The resource will be in the following format: + # + # `organizations/{organization}/feeds/{feed}` + # + # @param organization [String] + # @param feed [String] + # + # @return [::String] + def feed_path **args + resources = { + "feed:project" => (proc do |project:, feed:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/feeds/#{feed}" + end), + "feed:folder" => (proc do |folder:, feed:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/feeds/#{feed}" + end), + "feed:organization" => (proc do |organization:, feed:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/feeds/#{feed}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Folder resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}` + # + # @param folder [String] + # + # @return [::String] + def folder_path folder: + "folders/#{folder}" + end + + ## + # Create a fully-qualified 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 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 SavedQuery resource string. + # + # @overload saved_query_path(project:, saved_query:) + # The resource will be in the following format: + # + # `projects/{project}/savedQueries/{saved_query}` + # + # @param project [String] + # @param saved_query [String] + # + # @overload saved_query_path(folder:, saved_query:) + # The resource will be in the following format: + # + # `folders/{folder}/savedQueries/{saved_query}` + # + # @param folder [String] + # @param saved_query [String] + # + # @overload saved_query_path(organization:, saved_query:) + # The resource will be in the following format: + # + # `organizations/{organization}/savedQueries/{saved_query}` + # + # @param organization [String] + # @param saved_query [String] + # + # @return [::String] + def saved_query_path **args + resources = { + "project:saved_query" => (proc do |project:, saved_query:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/savedQueries/#{saved_query}" + end), + "folder:saved_query" => (proc do |folder:, saved_query:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/savedQueries/#{saved_query}" + end), + "organization:saved_query" => (proc do |organization:, saved_query:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/savedQueries/#{saved_query}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest.rb new file mode 100644 index 000000000000..abe60059c622 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/asset/v1/version" + +require "google/cloud/asset/v1/asset_service/credentials" +require "google/cloud/asset/v1/asset_service/paths" +require "google/cloud/asset/v1/asset_service/rest/operations" +require "google/cloud/asset/v1/asset_service/rest/client" + +module Google + module Cloud + module Asset + module V1 + ## + # Asset service definition. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/asset/v1/asset_service/rest" + # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + module AssetService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/asset/v1/asset_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb new file mode 100644 index 000000000000..1a1b0888a7d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb @@ -0,0 +1,3280 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/asset/v1/asset_service_pb" +require "google/cloud/asset/v1/asset_service/rest/service_stub" + +module Google + module Cloud + module Asset + module V1 + module AssetService + module Rest + ## + # REST client for the AssetService service. + # + # Asset service definition. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudasset.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_service_stub + + ## + # Configure the AssetService Client class. + # + # See {::Google::Cloud::Asset::V1::AssetService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetService clients + # ::Google::Cloud::Asset::V1::AssetService::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", "Asset", "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.export_assets.timeout = 60.0 + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.batch_get_assets_history.timeout = 60.0 + default_config.rpcs.batch_get_assets_history.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_feed.timeout = 60.0 + + default_config.rpcs.get_feed.timeout = 60.0 + default_config.rpcs.get_feed.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_feeds.timeout = 60.0 + default_config.rpcs.list_feeds.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_feed.timeout = 60.0 + + default_config.rpcs.delete_feed.timeout = 60.0 + default_config.rpcs.delete_feed.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_all_resources.timeout = 30.0 + default_config.rpcs.search_all_resources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.search_all_iam_policies.timeout = 30.0 + default_config.rpcs.search_all_iam_policies.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.analyze_iam_policy.timeout = 300.0 + default_config.rpcs.analyze_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.analyze_iam_policy_longrunning.timeout = 60.0 + + default_config.rpcs.query_assets.timeout = 200.0 + default_config.rpcs.query_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_saved_query.timeout = 60.0 + + default_config.rpcs.get_saved_query.timeout = 60.0 + default_config.rpcs.get_saved_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_saved_queries.timeout = 60.0 + default_config.rpcs.list_saved_queries.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_saved_query.timeout = 60.0 + + default_config.rpcs.delete_saved_query.timeout = 60.0 + default_config.rpcs.delete_saved_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.batch_get_effective_iam_policies.timeout = 300.0 + default_config.rpcs.batch_get_effective_iam_policies.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.analyze_org_policies.timeout = 60.0 + default_config.rpcs.analyze_org_policies.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.analyze_org_policy_governed_containers.timeout = 60.0 + default_config.rpcs.analyze_org_policy_governed_containers.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.analyze_org_policy_governed_assets.timeout = 60.0 + default_config.rpcs.analyze_org_policy_governed_assets.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 AssetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Asset::V1::AssetService::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 + @asset_service_stub.universe_domain + end + + ## + # Create a new AssetService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetService 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::Asset::V1::AssetService::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 + + @asset_service_stub = ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @asset_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Asset::V1::AssetService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_service_stub.logger + end + + # Service calls + + ## + # Exports assets with time and resource types to a given Cloud Storage + # location/BigQuery table. For Cloud Storage location destinations, the + # output format is newline-delimited JSON. Each line represents a + # {::Google::Cloud::Asset::V1::Asset google.cloud.asset.v1.Asset} in the JSON + # format; for BigQuery table destinations, the output table stores the fields + # in asset Protobuf as columns. This API implements the + # {::Google::Longrunning::Operation google.longrunning.Operation} API, which + # allows you to keep track of the export. We recommend intervals of at least + # 2 seconds with exponential retry to poll the export operation result. For + # regular-size resource parent, the export operation usually finishes within + # 5 minutes. + # + # @overload export_assets(request, options = nil) + # Pass arguments to `export_assets` via a request object, either of type + # {::Google::Cloud::Asset::V1::ExportAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, output_config: nil, relationship_types: nil) + # Pass arguments to `export_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative name of the root asset. This can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"), + # or a folder number (such as "folders/123"). + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Timestamp to take an asset snapshot. This can only be set to a timestamp + # between the current time and the current time minus 35 days (inclusive). + # If not specified, the current time will be used. Due to delays in resource + # data collection and indexing, there is a volatile window during which + # running the same query may get different results. + # @param asset_types [::Array<::String>] + # A list of asset types to take a snapshot for. For example: + # "compute.googleapis.com/Disk". + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # + # If specified, only matching assets will be returned, otherwise, it will + # snapshot all asset types. See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types. + # @param content_type [::Google::Cloud::Asset::V1::ContentType] + # Asset content type. If not specified, no content but the asset name will be + # returned. + # @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # @param relationship_types [::Array<::String>] + # A list of relationship types to export, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it snapshots specified relationships. It returns an error if + # any of the [relationship_types] doesn't belong to the supported + # relationship types of the [asset_types] or if any of the [asset_types] + # doesn't belong to the source types of the [relationship_types]. + # * Otherwise: + # it snapshots the supported relationships for all [asset_types] or returns + # an error if any of the [asset_types] has no relationship support. + # An unspecified asset types field means all supported asset_types. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + # supported asset types and relationship types. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::ExportAssetsRequest.new + # + # # Call the export_assets method. + # result = client.export_assets request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ExportAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.export_assets request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 assets with time and resource types and returns paged results in + # response. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Asset::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, relationship_types: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization, folder, or project the assets belong + # to. Format: "organizations/[organization-number]" (such as + # "organizations/123"), "projects/[project-id]" (such as + # "projects/my-project-id"), "projects/[project-number]" (such as + # "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Timestamp to take an asset snapshot. This can only be set to a timestamp + # between the current time and the current time minus 35 days (inclusive). + # If not specified, the current time will be used. Due to delays in resource + # data collection and indexing, there is a volatile window during which + # running the same query may get different results. + # @param asset_types [::Array<::String>] + # A list of asset types to take a snapshot for. For example: + # "compute.googleapis.com/Disk". + # + # Regular expression is also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # + # If specified, only matching assets will be returned, otherwise, it will + # snapshot all asset types. See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types. + # @param content_type [::Google::Cloud::Asset::V1::ContentType] + # Asset content type. If not specified, no content but the asset name will + # be returned. + # @param page_size [::Integer] + # The maximum number of assets to be returned in a single response. Default + # is 100, minimum is 1, and maximum is 1000. + # @param page_token [::String] + # The `next_page_token` returned from the previous `ListAssetsResponse`, or + # unspecified for the first `ListAssetsRequest`. It is a continuation of a + # prior `ListAssets` call, and the API should return the next page of assets. + # @param relationship_types [::Array<::String>] + # A list of relationship types to output, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it snapshots specified relationships. It returns an error if + # any of the [relationship_types] doesn't belong to the supported + # relationship types of the [asset_types] or if any of the [asset_types] + # doesn't belong to the source types of the [relationship_types]. + # * Otherwise: + # it snapshots the supported relationships for all [asset_types] or returns + # an error if any of the [asset_types] has no relationship support. + # An unspecified asset types field means all supported asset_types. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types and relationship types. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Asset::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.list_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :list_assets, "assets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Batch gets the update history of assets that overlap a time window. + # For IAM_POLICY content, this API outputs history when the asset and its + # attached IAM POLICY both exist. This can create gaps in the output history. + # Otherwise, this API outputs history with asset in both non-delete or + # deleted status. + # If a specified asset does not exist, this API returns an INVALID_ARGUMENT + # error. + # + # @overload batch_get_assets_history(request, options = nil) + # Pass arguments to `batch_get_assets_history` via a request object, either of type + # {::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assets_history(parent: nil, asset_names: nil, content_type: nil, read_time_window: nil, relationship_types: nil) + # Pass arguments to `batch_get_assets_history` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative name of the root asset. It can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id")", or a project number (such as "projects/12345"). + # @param asset_names [::Array<::String>] + # A list of the full names of the assets. + # See: https://cloud.google.com/asset-inventory/docs/resource-name-format + # Example: + # + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + # + # The request becomes a no-op if the asset name list is empty, and the max + # size of the asset name list is 100 in one request. + # @param content_type [::Google::Cloud::Asset::V1::ContentType] + # Optional. The content type. + # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash] + # Optional. The time window for the asset history. Both start_time and + # end_time are optional and if set, it must be after the current time minus + # 35 days. If end_time is not set, it is default to current timestamp. + # If start_time is not set, the snapshot of the assets at end_time will be + # returned. The returned results contain all temporal assets whose time + # window overlap with read_time_window. + # @param relationship_types [::Array<::String>] + # Optional. A list of relationship types to output, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it outputs specified relationships' history on the [asset_names]. It + # returns an error if any of the [relationship_types] doesn't belong to the + # supported relationship types of the [asset_names] or if any of the + # [asset_names]'s types doesn't belong to the source types of the + # [relationship_types]. + # * Otherwise: + # it outputs the supported relationships' history on the [asset_names] or + # returns an error if any of the [asset_names]'s types has no relationship + # support. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + # supported asset types and relationship types. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new + # + # # Call the batch_get_assets_history method. + # result = client.batch_get_assets_history request + # + # # The returned object is of type Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse. + # p result + # + def batch_get_assets_history request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest + + # Converts hash and nil to an 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_assets_history.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_assets_history.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_get_assets_history.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.batch_get_assets_history request, 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 feed in a parent project/folder/organization to listen to its + # asset updates. + # + # @overload create_feed(request, options = nil) + # Pass arguments to `create_feed` via a request object, either of type + # {::Google::Cloud::Asset::V1::CreateFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::CreateFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_feed(parent: nil, feed_id: nil, feed: nil) + # Pass arguments to `create_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project/folder/organization where this feed + # should be created in. It can only be an organization number (such as + # "organizations/123"), a folder number (such as "folders/123"), a project ID + # (such as "projects/my-project-id"), or a project number (such as + # "projects/12345"). + # @param feed_id [::String] + # Required. This is the client-assigned asset feed identifier and it needs to + # be unique under a specific parent project/folder/organization. + # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash] + # Required. The feed details. The field `name` must be empty and it will be + # generated in the format of: projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::CreateFeedRequest.new + # + # # Call the create_feed method. + # result = client.create_feed request + # + # # The returned object is of type Google::Cloud::Asset::V1::Feed. + # p result + # + def create_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateFeedRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_feed.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.create_feed request, 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 details about an asset feed. + # + # @overload get_feed(request, options = nil) + # Pass arguments to `get_feed` via a request object, either of type + # {::Google::Cloud::Asset::V1::GetFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::GetFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_feed(name: nil) + # Pass arguments to `get_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Feed and it must be in the format of: + # projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::GetFeedRequest.new + # + # # Call the get_feed method. + # result = client.get_feed request + # + # # The returned object is of type Google::Cloud::Asset::V1::Feed. + # p result + # + def get_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetFeedRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_feed.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.get_feed request, 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 asset feeds in a parent project/folder/organization. + # + # @overload list_feeds(request, options = nil) + # Pass arguments to `list_feeds` via a request object, either of type + # {::Google::Cloud::Asset::V1::ListFeedsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::ListFeedsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_feeds(parent: nil) + # Pass arguments to `list_feeds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project/folder/organization whose feeds are to be + # listed. It can only be using project/folder/organization number (such as + # "folders/12345")", or a project ID (such as "projects/my-project-id"). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::ListFeedsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::ListFeedsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::ListFeedsRequest.new + # + # # Call the list_feeds method. + # result = client.list_feeds request + # + # # The returned object is of type Google::Cloud::Asset::V1::ListFeedsResponse. + # p result + # + def list_feeds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListFeedsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_feeds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_feeds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_feeds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.list_feeds request, 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 asset feed configuration. + # + # @overload update_feed(request, options = nil) + # Pass arguments to `update_feed` via a request object, either of type + # {::Google::Cloud::Asset::V1::UpdateFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_feed(feed: nil, update_mask: nil) + # Pass arguments to `update_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash] + # Required. The new values of feed details. It must match an existing feed + # and the field `name` must be in the format of: + # projects/project_number/feeds/feed_id or + # folders/folder_number/feeds/feed_id or + # organizations/organization_number/feeds/feed_id. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Only updates the `feed` fields indicated by this mask. + # The field mask must not be empty, and it must not contain fields that + # are immutable or only set by the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::UpdateFeedRequest.new + # + # # Call the update_feed method. + # result = client.update_feed request + # + # # The returned object is of type Google::Cloud::Asset::V1::Feed. + # p result + # + def update_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateFeedRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_feed.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.update_feed request, 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 asset feed. + # + # @overload delete_feed(request, options = nil) + # Pass arguments to `delete_feed` via a request object, either of type + # {::Google::Cloud::Asset::V1::DeleteFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_feed(name: nil) + # Pass arguments to `delete_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the feed and it must be in the format of: + # projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::DeleteFeedRequest.new + # + # # Call the delete_feed method. + # result = client.delete_feed request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteFeedRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_feed.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.delete_feed request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches all Google Cloud resources within the specified scope, such as a + # project, folder, or organization. The caller must be granted the + # `cloudasset.assets.searchAllResources` permission on the desired scope, + # otherwise the request will be rejected. + # + # @overload search_all_resources(request, options = nil) + # Pass arguments to `search_all_resources` via a request object, either of type + # {::Google::Cloud::Asset::V1::SearchAllResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::SearchAllResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_all_resources(scope: nil, query: nil, asset_types: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) + # Pass arguments to `search_all_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 scope [::String] + # Required. A scope can be a project, a folder, or an organization. The + # search is limited to the resources within the `scope`. The caller must be + # granted the + # [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + # permission on the desired scope. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param query [::String] + # Optional. The query statement. See [how to construct a + # query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + # for more information. If not specified or empty, it will search all the + # resources within the specified `scope`. + # + # Examples: + # + # * `name:Important` to find Google Cloud resources whose name contains + # `Important` as a word. + # * `name=Important` to find the Google Cloud resource whose name is exactly + # `Important`. + # * `displayName:Impor*` to find Google Cloud resources whose display name + # contains `Impor` as a prefix of any word in the field. + # * `location:us-west*` to find Google Cloud resources whose location + # contains both `us` and `west` as prefixes. + # * `labels:prod` to find Google Cloud resources whose labels contain `prod` + # as a key or value. + # * `labels.env:prod` to find Google Cloud resources that have a label `env` + # and its value is `prod`. + # * `labels.env:*` to find Google Cloud resources that have a label `env`. + # * `tagKeys:env` to find Google Cloud resources that have directly + # attached tags where the + # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) + # contains `env`. + # * `tagValues:prod*` to find Google Cloud resources that have directly + # attached tags where the + # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # contains a word prefixed by `prod`. + # * `tagValueIds=tagValues/123` to find Google Cloud resources that have + # directly attached tags where the + # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # is exactly `tagValues/123`. + # * `effectiveTagKeys:env` to find Google Cloud resources that have + # directly attached or inherited tags where the + # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) + # contains `env`. + # * `effectiveTagValues:prod*` to find Google Cloud resources that have + # directly attached or inherited tags where the + # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # contains a word prefixed by `prod`. + # * `effectiveTagValueIds=tagValues/123` to find Google Cloud resources that + # have directly attached or inherited tags where the + # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # is exactly `tagValues/123`. + # * `kmsKey:key` to find Google Cloud resources encrypted with a + # customer-managed encryption key whose name contains `key` as a word. This + # field is deprecated. Use the `kmsKeys` field to retrieve Cloud KMS + # key information. + # * `kmsKeys:key` to find Google Cloud resources encrypted with + # customer-managed encryption keys whose name contains the word `key`. + # * `relationships:instance-group-1` to find Google Cloud resources that have + # relationships with `instance-group-1` in the related resource name. + # * `relationships:INSTANCE_TO_INSTANCEGROUP` to find Compute Engine + # instances that have relationships of type `INSTANCE_TO_INSTANCEGROUP`. + # * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find + # Compute Engine instances that have relationships with `instance-group-1` + # in the Compute Engine instance group resource name, for relationship type + # `INSTANCE_TO_INSTANCEGROUP`. + # * `sccSecurityMarks.key=value` to find Cloud resources that are attached + # with security marks whose key is `key` and value is `value`. + # * `sccSecurityMarks.key:*` to find Cloud resources that are attached with + # security marks whose key is `key`. + # * `state:ACTIVE` to find Google Cloud resources whose state contains + # `ACTIVE` as a word. + # * `NOT state:ACTIVE` to find Google Cloud resources whose state doesn't + # contain `ACTIVE` as a word. + # * `createTime<1609459200` to find Google Cloud resources that were created + # before `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of + # `2021-01-01 00:00:00 UTC` in seconds. + # * `updateTime>1609459200` to find Google Cloud resources that were updated + # after `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of + # `2021-01-01 00:00:00 UTC` in seconds. + # * `Important` to find Google Cloud resources that contain `Important` as a + # word in any of the searchable fields. + # * `Impor*` to find Google Cloud resources that contain `Impor` as a prefix + # of any word in any of the searchable fields. + # * `Important location:(us-west1 OR global)` to find Google Cloud + # resources that contain `Important` as a word in any of the searchable + # fields and are also located in the `us-west1` region or the `global` + # location. + # @param asset_types [::Array<::String>] + # Optional. A list of asset types that this request searches for. If empty, + # it will search all the asset types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # @param page_size [::Integer] + # Optional. The page size for search result pagination. Page size is capped + # at 500 even if a larger value is given. If set to zero or a negative value, + # server will pick an appropriate default. Returned results may be fewer than + # requested. When this happens, there could be more results as long as + # `next_page_token` is returned. + # @param page_token [::String] + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. `page_token` must be the value of + # `next_page_token` from the previous response. The values of all other + # method parameters, must be identical to those in the previous call. + # @param order_by [::String] + # Optional. A comma-separated list of fields specifying the sorting order of + # the results. The default order is ascending. Add " DESC" after the field + # name to indicate descending order. Redundant space characters are ignored. + # Example: "location DESC, name". + # Only the following fields in the response are sortable: + # + # * name + # * assetType + # * project + # * displayName + # * description + # * location + # * createTime + # * updateTime + # * state + # * parentFullResourceName + # * parentAssetType + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A comma-separated list of fields that you want returned in the + # results. The following fields are returned by default if not specified: + # + # * `name` + # * `assetType` + # * `project` + # * `folders` + # * `organization` + # * `displayName` + # * `description` + # * `location` + # * `labels` + # * `tags` + # * `effectiveTags` + # * `networkTags` + # * `kmsKeys` + # * `createTime` + # * `updateTime` + # * `state` + # * `additionalAttributes` + # * `parentFullResourceName` + # * `parentAssetType` + # + # Some fields of large size, such as `versionedResources`, + # `attachedResources`, `effectiveTags` etc., are not returned by default, but + # you can specify them in the `read_mask` parameter if you want to include + # them. If `"*"` is specified, all [available + # fields](https://cloud.google.com/asset-inventory/docs/reference/rest/v1/TopLevel/searchAllResources#resourcesearchresult) + # are returned. + # Examples: `"name,location"`, `"name,versionedResources"`, `"*"`. + # Any invalid field path will trigger INVALID_ARGUMENT error. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::SearchAllResourcesRequest.new + # + # # Call the search_all_resources method. + # result = client.search_all_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::Asset::V1::ResourceSearchResult. + # p item + # end + # + def search_all_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_all_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::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_all_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_all_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.search_all_resources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :search_all_resources, "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 + + ## + # Searches all IAM policies within the specified scope, such as a project, + # folder, or organization. The caller must be granted the + # `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, + # otherwise the request will be rejected. + # + # @overload search_all_iam_policies(request, options = nil) + # Pass arguments to `search_all_iam_policies` via a request object, either of type + # {::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_all_iam_policies(scope: nil, query: nil, page_size: nil, page_token: nil, asset_types: nil, order_by: nil) + # Pass arguments to `search_all_iam_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 scope [::String] + # Required. A scope can be a project, a folder, or an organization. The + # search is limited to the IAM policies within the `scope`. The caller must + # be granted the + # [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + # permission on the desired scope. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param query [::String] + # Optional. The query statement. See [how to construct a + # query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + # for more information. If not specified or empty, it will search all the + # IAM policies within the specified `scope`. Note that the query string is + # compared against each IAM policy binding, including its principals, + # roles, and IAM conditions. The returned IAM policies will only + # contain the bindings that match your query. To learn more about the IAM + # policy structure, see the [IAM policy + # documentation](https://cloud.google.com/iam/help/allow-policies/structure). + # + # Examples: + # + # * `policy:amy@gmail.com` to find IAM policy bindings that specify user + # "amy@gmail.com". + # * `policy:roles/compute.admin` to find IAM policy bindings that specify + # the Compute Admin role. + # * `policy:comp*` to find IAM policy bindings that contain "comp" as a + # prefix of any word in the binding. + # * `policy.role.permissions:storage.buckets.update` to find IAM policy + # bindings that specify a role containing "storage.buckets.update" + # permission. Note that if callers don't have `iam.roles.get` access to a + # role's included permissions, policy bindings that specify this role will + # be dropped from the search results. + # * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + # role containing "upd" as a prefix of any word in the role permission. + # Note that if callers don't have `iam.roles.get` access to a role's + # included permissions, policy bindings that specify this role will be + # dropped from the search results. + # * `resource:organizations/123456` to find IAM policy bindings + # that are set on "organizations/123456". + # * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + # find IAM policy bindings that are set on the project named "myproject". + # * `Important` to find IAM policy bindings that contain "Important" as a + # word in any of the searchable fields (except for the included + # permissions). + # * `resource:(instance1 OR instance2) policy:amy` to find + # IAM policy bindings that are set on resources "instance1" or + # "instance2" and also specify user "amy". + # * `roles:roles/compute.admin` to find IAM policy bindings that specify the + # Compute Admin role. + # * `memberTypes:user` to find IAM policy bindings that contain the + # principal type "user". + # @param page_size [::Integer] + # Optional. The page size for search result pagination. Page size is capped + # at 500 even if a larger value is given. If set to zero or a negative value, + # server will pick an appropriate default. Returned results may be fewer than + # requested. When this happens, there could be more results as long as + # `next_page_token` is returned. + # @param page_token [::String] + # Optional. If present, retrieve the next batch of results from the preceding + # call to this method. `page_token` must be the value of `next_page_token` + # from the previous response. The values of all other method parameters must + # be identical to those in the previous call. + # @param asset_types [::Array<::String>] + # Optional. A list of asset types that the IAM policies are attached to. If + # empty, it will search the IAM policies that are attached to all the asset + # types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots IAM policies attached to asset type + # starts with "compute.googleapis.com". + # * ".*Instance" snapshots IAM policies attached to asset type ends with + # "Instance". + # * ".*Instance.*" snapshots IAM policies attached to asset type contains + # "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # @param order_by [::String] + # Optional. A comma-separated list of fields specifying the sorting order of + # the results. The default order is ascending. Add " DESC" after the field + # name to indicate descending order. Redundant space characters are ignored. + # Example: "assetType DESC, resource". + # Only singular primitive fields in the response are sortable: + # * resource + # * assetType + # * project + # All the other fields such as repeated fields (e.g., `folders`) and + # non-primitive fields (e.g., `policy`) are not supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new + # + # # Call the search_all_iam_policies method. + # result = client.search_all_iam_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::Cloud::Asset::V1::IamPolicySearchResult. + # p item + # end + # + def search_all_iam_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_all_iam_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::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_all_iam_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_all_iam_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.search_all_iam_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :search_all_iam_policies, "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 + + ## + # Analyzes IAM policies to answer which identities have what accesses on + # which resources. + # + # @overload analyze_iam_policy(request, options = nil) + # Pass arguments to `analyze_iam_policy` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload analyze_iam_policy(analysis_query: nil, saved_analysis_query: nil, execution_timeout: nil) + # Pass arguments to `analyze_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 analysis_query [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery, ::Hash] + # Required. The request query. + # @param saved_analysis_query [::String] + # Optional. The name of a saved query, which must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # + # If both `analysis_query` and `saved_analysis_query` are provided, they + # will be merged together with the `saved_analysis_query` as base and + # the `analysis_query` as overrides. For more details of the merge behavior, + # refer to the + # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) + # page. + # + # Note that you cannot override primitive fields with default value, such as + # 0 or empty string, etc., because we use proto3, which doesn't support field + # presence yet. + # @param execution_timeout [::Google::Protobuf::Duration, ::Hash] + # Optional. Amount of time executable has to complete. See JSON + # representation of + # [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + # + # If this field is set with a value less than the RPC deadline, and the + # execution of your query hasn't finished in the specified + # execution timeout, you will get a response with partial result. + # Otherwise, your query's execution will continue until the RPC deadline. + # If it's not finished until then, you will get a DEADLINE_EXCEEDED error. + # + # Default is empty. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new + # + # # Call the analyze_iam_policy method. + # result = client.analyze_iam_policy request + # + # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse. + # p result + # + def analyze_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.analyze_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.analyze_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.analyze_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.analyze_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 + + ## + # Analyzes IAM policies asynchronously to answer which identities have what + # accesses on which resources, and writes the analysis results to a Google + # Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + # output format is the JSON format that represents a + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse AnalyzeIamPolicyResponse}. + # This method implements the + # {::Google::Longrunning::Operation google.longrunning.Operation}, which allows + # you to track the operation status. We recommend intervals of at least 2 + # seconds with exponential backoff retry to poll the operation result. The + # metadata contains the metadata for the long-running operation. + # + # @overload analyze_iam_policy_longrunning(request, options = nil) + # Pass arguments to `analyze_iam_policy_longrunning` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload analyze_iam_policy_longrunning(analysis_query: nil, saved_analysis_query: nil, output_config: nil) + # Pass arguments to `analyze_iam_policy_longrunning` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param analysis_query [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery, ::Hash] + # Required. The request query. + # @param saved_analysis_query [::String] + # Optional. The name of a saved query, which must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # + # If both `analysis_query` and `saved_analysis_query` are provided, they + # will be merged together with the `saved_analysis_query` as base and + # the `analysis_query` as overrides. For more details of the merge behavior, + # refer to the + # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) + # doc. + # + # Note that you cannot override primitive fields with default value, such as + # 0 or empty string, etc., because we use proto3, which doesn't support field + # presence yet. + # @param output_config [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new + # + # # Call the analyze_iam_policy_longrunning method. + # result = client.analyze_iam_policy_longrunning request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def analyze_iam_policy_longrunning request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.analyze_iam_policy_longrunning.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.analyze_iam_policy_longrunning.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.analyze_iam_policy_longrunning.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.analyze_iam_policy_longrunning request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyze moving a resource to a specified destination without kicking off + # the actual move. The analysis is best effort depending on the user's + # permissions of viewing different hierarchical policies and configurations. + # The policies and configuration are subject to change before the actual + # resource migration takes place. + # + # @overload analyze_move(request, options = nil) + # Pass arguments to `analyze_move` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeMoveRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeMoveRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload analyze_move(resource: nil, destination_parent: nil, view: nil) + # Pass arguments to `analyze_move` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # Required. Name of the resource to perform the analysis against. + # Only Google Cloud projects are supported as of today. Hence, this can only + # be a project ID (such as "projects/my-project-id") or a project number + # (such as "projects/12345"). + # @param destination_parent [::String] + # Required. Name of the Google Cloud folder or organization to reparent the + # target resource. The analysis will be performed against hypothetically + # moving the resource to this specified destination parent. This can only be + # a folder number (such as "folders/123") or an organization number (such as + # "organizations/123"). + # @param view [::Google::Cloud::Asset::V1::AnalyzeMoveRequest::AnalysisView] + # Analysis view indicating what information should be included in the + # analysis response. If unspecified, the default view is FULL. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeMoveRequest.new + # + # # Call the analyze_move method. + # result = client.analyze_move request + # + # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeMoveResponse. + # p result + # + def analyze_move request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeMoveRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.analyze_move.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.analyze_move.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.analyze_move.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.analyze_move request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Issue a job that queries assets using a SQL statement compatible with + # [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + # + # If the query execution finishes within timeout and there's no pagination, + # the full query results will be returned in the `QueryAssetsResponse`. + # + # Otherwise, full query results can be obtained by issuing extra requests + # with the `job_reference` from the a previous `QueryAssets` call. + # + # Note, the query result has approximately 10 GB limitation enforced by + # [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). + # Queries return larger results will result in errors. + # + # @overload query_assets(request, options = nil) + # Pass arguments to `query_assets` via a request object, either of type + # {::Google::Cloud::Asset::V1::QueryAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_assets(parent: nil, statement: nil, job_reference: nil, page_size: nil, page_token: nil, timeout: nil, read_time_window: nil, read_time: nil, output_config: nil) + # Pass arguments to `query_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative name of the root asset. This can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"), + # or a folder number (such as "folders/123"). + # + # Only assets belonging to the `parent` will be returned. + # @param statement [::String] + # Optional. A SQL statement that's compatible with [BigQuery + # SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + # + # Note: The following parameters are mutually exclusive: `statement`, `job_reference`. 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 job_reference [::String] + # Optional. Reference to the query job, which is from the + # `QueryAssetsResponse` of previous `QueryAssets` call. + # + # Note: The following parameters are mutually exclusive: `job_reference`, `statement`. 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 page_size [::Integer] + # Optional. The maximum number of rows to return in the results. Responses + # are limited to 10 MB and 1000 rows. + # + # By default, the maximum row count is 1000. When the byte or row count limit + # is reached, the rest of the query results will be paginated. + # + # The field will be ignored when [output_config] is specified. + # @param page_token [::String] + # Optional. A page token received from previous `QueryAssets`. + # + # The field will be ignored when [output_config] is specified. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # Optional. Specifies the maximum amount of time that the client is willing + # to wait for the query to complete. By default, this limit is 5 min for the + # first query, and 1 minute for the following queries. If the query is + # complete, the `done` field in the `QueryAssetsResponse` is true, otherwise + # false. + # + # Like BigQuery [jobs.query + # API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) + # The call is not guaranteed to wait for the specified timeout; it typically + # returns after around 200 seconds (200,000 milliseconds), even if the query + # is not complete. + # + # The field will be ignored when [output_config] is specified. + # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash] + # Optional. [start_time] is required. [start_time] must be less than + # [end_time] Defaults [end_time] to now if [start_time] is set and + # [end_time] isn't. Maximum permitted time range is 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time_window`, `read_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 read_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. Queries cloud assets as they appeared at the specified point in + # time. + # + # Note: The following parameters are mutually exclusive: `read_time`, `read_time_window`. 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 output_config [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig, ::Hash] + # Optional. Destination where the query results will be saved. + # + # When this field is specified, the query results won't be saved in the + # [QueryAssetsResponse.query_result]. Instead + # [QueryAssetsResponse.output_config] will be set. + # + # Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used + # to check the status of the query job when passed to a following + # [QueryAssets] API call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::QueryAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::QueryAssetsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::QueryAssetsRequest.new + # + # # Call the query_assets method. + # result = client.query_assets request + # + # # The returned object is of type Google::Cloud::Asset::V1::QueryAssetsResponse. + # p result + # + def query_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::QueryAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.query_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.query_assets request, 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 saved query in a parent project/folder/organization. + # + # @overload create_saved_query(request, options = nil) + # Pass arguments to `create_saved_query` via a request object, either of type + # {::Google::Cloud::Asset::V1::CreateSavedQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::CreateSavedQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_saved_query(parent: nil, saved_query: nil, saved_query_id: nil) + # Pass arguments to `create_saved_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 parent [::String] + # Required. The name of the project/folder/organization where this + # saved_query should be created in. It can only be an organization number + # (such as "organizations/123"), a folder number (such as "folders/123"), a + # project ID (such as "projects/my-project-id"), or a project number (such as + # "projects/12345"). + # @param saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash] + # Required. The saved_query details. The `name` field must be empty as it + # will be generated based on the parent and saved_query_id. + # @param saved_query_id [::String] + # Required. The ID to use for the saved query, which must be unique in the + # specified parent. It will become the final component of the saved query's + # resource name. + # + # This value should be 4-63 characters, and valid characters + # are `[a-z][0-9]-`. + # + # Notice that this field is required in the saved query creation, and the + # `name` field of the `saved_query` will be ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::CreateSavedQueryRequest.new + # + # # Call the create_saved_query method. + # result = client.create_saved_query request + # + # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + # p result + # + def create_saved_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateSavedQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_saved_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::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_saved_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_saved_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.create_saved_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 + + ## + # Gets details about a saved query. + # + # @overload get_saved_query(request, options = nil) + # Pass arguments to `get_saved_query` via a request object, either of type + # {::Google::Cloud::Asset::V1::GetSavedQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::GetSavedQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_saved_query(name: nil) + # Pass arguments to `get_saved_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 name [::String] + # Required. The name of the saved query and it must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::GetSavedQueryRequest.new + # + # # Call the get_saved_query method. + # result = client.get_saved_query request + # + # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + # p result + # + def get_saved_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetSavedQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_saved_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::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_saved_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_saved_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.get_saved_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 + + ## + # Lists all saved queries in a parent project/folder/organization. + # + # @overload list_saved_queries(request, options = nil) + # Pass arguments to `list_saved_queries` via a request object, either of type + # {::Google::Cloud::Asset::V1::ListSavedQueriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::ListSavedQueriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_saved_queries(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_saved_queries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project/folder/organization whose savedQueries are to + # be listed. It can only be using project/folder/organization number (such as + # "folders/12345")", or a project ID (such as "projects/my-project-id"). + # @param filter [::String] + # Optional. The expression to filter resources. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. When `AND` and `OR` are both used in the + # expression, parentheses must be appropriately used to group the + # combinations. The expression may also contain regular expressions. + # + # See https://google.aip.dev/160 for more information on the grammar. + # @param page_size [::Integer] + # Optional. The maximum number of saved queries to return per page. The + # service may return fewer than this value. If unspecified, at most 50 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 `ListSavedQueries` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListSavedQueries` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::SavedQuery>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::SavedQuery>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::ListSavedQueriesRequest.new + # + # # Call the list_saved_queries method. + # result = client.list_saved_queries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Asset::V1::SavedQuery. + # p item + # end + # + def list_saved_queries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListSavedQueriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_saved_queries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_saved_queries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_saved_queries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.list_saved_queries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :list_saved_queries, "saved_queries", request, result, 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 saved query. + # + # @overload update_saved_query(request, options = nil) + # Pass arguments to `update_saved_query` via a request object, either of type + # {::Google::Cloud::Asset::V1::UpdateSavedQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::UpdateSavedQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_saved_query(saved_query: nil, update_mask: nil) + # Pass arguments to `update_saved_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 saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash] + # Required. The saved query to update. + # + # The saved query's `name` field is used to identify the one to update, + # which has format as below: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new + # + # # Call the update_saved_query method. + # result = client.update_saved_query request + # + # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + # p result + # + def update_saved_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_saved_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::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_saved_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_saved_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.update_saved_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 + + ## + # Deletes a saved query. + # + # @overload delete_saved_query(request, options = nil) + # Pass arguments to `delete_saved_query` via a request object, either of type + # {::Google::Cloud::Asset::V1::DeleteSavedQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::DeleteSavedQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_saved_query(name: nil) + # Pass arguments to `delete_saved_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 name [::String] + # Required. The name of the saved query to delete. It must be in the format + # of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new + # + # # Call the delete_saved_query method. + # result = client.delete_saved_query request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_saved_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_saved_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::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_saved_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_saved_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.delete_saved_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 + + ## + # Gets effective IAM policies for a batch of resources. + # + # @overload batch_get_effective_iam_policies(request, options = nil) + # Pass arguments to `batch_get_effective_iam_policies` via a request object, either of type + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_effective_iam_policies(scope: nil, names: nil) + # Pass arguments to `batch_get_effective_iam_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 scope [::String] + # Required. Only IAM policies on or below the scope will be returned. + # + # This can only be an organization number (such as "organizations/123"), a + # folder number (such as "folders/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"). + # + # To know how to get organization ID, visit [here + # ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # + # To know how to get folder or project ID, visit [here + # ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). + # @param names [::Array<::String>] + # Required. The names refer to the [full_resource_names] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the asset types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + # A maximum of 20 resources' effective policies can be retrieved in a batch. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new + # + # # Call the batch_get_effective_iam_policies method. + # result = client.batch_get_effective_iam_policies request + # + # # The returned object is of type Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse. + # p result + # + def batch_get_effective_iam_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest + + # Converts hash and nil to an 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_effective_iam_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::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_effective_iam_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_get_effective_iam_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.batch_get_effective_iam_policies request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyzes organization policies under a scope. + # + # @overload analyze_org_policies(request, options = nil) + # Pass arguments to `analyze_org_policies` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload analyze_org_policies(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `analyze_org_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 scope [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param constraint [::String] + # Required. The name of the constraint to analyze organization policies for. + # The response only contains analyzed organization policies for the provided + # constraint. + # @param filter [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results}. + # Filtering is currently available for bare literal values and the following + # fields: + # * consolidated_policy.attached_resource + # * consolidated_policy.rules.enforce + # + # When filtering by a specific field, the only supported operator is `=`. + # For example, filtering by + # consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" + # will return all the Organization Policy results attached to "folders/001". + # @param page_size [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results} + # will contain 20 items with a maximum of 200. + # @param page_token [::String] + # The pagination token to retrieve the next page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new + # + # # Call the analyze_org_policies method. + # result = client.analyze_org_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::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult. + # p item + # end + # + def analyze_org_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.analyze_org_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::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.analyze_org_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.analyze_org_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.analyze_org_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :analyze_org_policies, "org_policy_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 + + ## + # Analyzes organization policies governed containers (projects, folders or + # organization) under a scope. + # + # @overload analyze_org_policy_governed_containers(request, options = nil) + # Pass arguments to `analyze_org_policy_governed_containers` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload analyze_org_policy_governed_containers(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `analyze_org_policy_governed_containers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param scope [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. The output containers will + # also be limited to the ones governed by those in-scope organization + # policies. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param constraint [::String] + # Required. The name of the constraint to analyze governed containers for. + # The analysis only contains organization policies for the provided + # constraint. + # @param filter [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers}. + # Filtering is currently available for bare literal values and the following + # fields: + # * parent + # * consolidated_policy.rules.enforce + # + # When filtering by a specific field, the only supported operator is `=`. + # For example, filtering by + # parent="//cloudresourcemanager.googleapis.com/folders/001" + # will return all the containers under "folders/001". + # @param page_size [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers} + # will contain 100 items with a maximum of 200. + # @param page_token [::String] + # The pagination token to retrieve the next page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new + # + # # Call the analyze_org_policy_governed_containers method. + # result = client.analyze_org_policy_governed_containers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer. + # p item + # end + # + def analyze_org_policy_governed_containers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.analyze_org_policy_governed_containers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.analyze_org_policy_governed_containers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.analyze_org_policy_governed_containers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.analyze_org_policy_governed_containers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :analyze_org_policy_governed_containers, "governed_containers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyzes organization policies governed assets (Google Cloud resources or + # policies) under a scope. This RPC supports custom constraints and the + # following canned constraints: + # + # * constraints/ainotebooks.accessMode + # * constraints/ainotebooks.disableFileDownloads + # * constraints/ainotebooks.disableRootAccess + # * constraints/ainotebooks.disableTerminal + # * constraints/ainotebooks.environmentOptions + # * constraints/ainotebooks.requireAutoUpgradeSchedule + # * constraints/ainotebooks.restrictVpcNetworks + # * constraints/compute.disableGuestAttributesAccess + # * constraints/compute.disableInstanceDataAccessApis + # * constraints/compute.disableNestedVirtualization + # * constraints/compute.disableSerialPortAccess + # * constraints/compute.disableSerialPortLogging + # * constraints/compute.disableVpcExternalIpv6 + # * constraints/compute.requireOsLogin + # * constraints/compute.requireShieldedVm + # * constraints/compute.restrictLoadBalancerCreationForTypes + # * constraints/compute.restrictProtocolForwardingCreationForTypes + # * constraints/compute.restrictXpnProjectLienRemoval + # * constraints/compute.setNewProjectDefaultToZonalDNSOnly + # * constraints/compute.skipDefaultNetworkCreation + # * constraints/compute.trustedImageProjects + # * constraints/compute.vmCanIpForward + # * constraints/compute.vmExternalIpAccess + # * constraints/gcp.detailedAuditLoggingMode + # * constraints/gcp.resourceLocations + # * constraints/iam.allowedPolicyMemberDomains + # * constraints/iam.automaticIamGrantsForDefaultServiceAccounts + # * constraints/iam.disableServiceAccountCreation + # * constraints/iam.disableServiceAccountKeyCreation + # * constraints/iam.disableServiceAccountKeyUpload + # * constraints/iam.restrictCrossProjectServiceAccountLienRemoval + # * constraints/iam.serviceAccountKeyExpiryHours + # * constraints/resourcemanager.accessBoundaries + # * constraints/resourcemanager.allowedExportDestinations + # * constraints/sql.restrictAuthorizedNetworks + # * constraints/sql.restrictNoncompliantDiagnosticDataAccess + # * constraints/sql.restrictNoncompliantResourceCreation + # * constraints/sql.restrictPublicIp + # * constraints/storage.publicAccessPrevention + # * constraints/storage.restrictAuthTypes + # * constraints/storage.uniformBucketLevelAccess + # + # This RPC only returns either resources of types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # or IAM policies. + # + # @overload analyze_org_policy_governed_assets(request, options = nil) + # Pass arguments to `analyze_org_policy_governed_assets` via a request object, either of type + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload analyze_org_policy_governed_assets(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `analyze_org_policy_governed_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param scope [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. The output assets will + # also be limited to the ones governed by those in-scope organization + # policies. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param constraint [::String] + # Required. The name of the constraint to analyze governed assets for. The + # analysis only contains analyzed organization policies for the provided + # constraint. + # @param filter [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets}. + # + # For governed resources, filtering is currently available for bare literal + # values and the following fields: + # * governed_resource.project + # * governed_resource.folders + # * consolidated_policy.rules.enforce + # When filtering by `governed_resource.project` or + # `consolidated_policy.rules.enforce`, the only supported operator is `=`. + # When filtering by `governed_resource.folders`, the supported operators + # are `=` and `:`. + # For example, filtering by `governed_resource.project="projects/12345678"` + # will return all the governed resources under "projects/12345678", + # including the project itself if applicable. + # + # For governed IAM policies, filtering is currently available for bare + # literal values and the following fields: + # * governed_iam_policy.project + # * governed_iam_policy.folders + # * consolidated_policy.rules.enforce + # When filtering by `governed_iam_policy.project` or + # `consolidated_policy.rules.enforce`, the only supported operator is `=`. + # When filtering by `governed_iam_policy.folders`, the supported operators + # are `=` and `:`. + # For example, filtering by `governed_iam_policy.folders:"folders/12345678"` + # will return all the governed IAM policies under "folders/001". + # @param page_size [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets} + # will contain 100 items with a maximum of 200. + # @param page_token [::String] + # The pagination token to retrieve the next page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/asset/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new + # + # # Call the analyze_org_policy_governed_assets method. + # result = client.analyze_org_policy_governed_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset. + # p item + # end + # + def analyze_org_policy_governed_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.analyze_org_policy_governed_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.analyze_org_policy_governed_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.analyze_org_policy_governed_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.analyze_org_policy_governed_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :analyze_org_policy_governed_assets, "governed_assets", request, result, 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 AssetService REST API. + # + # This class represents the configuration for AssetService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Asset::V1::AssetService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # export_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Asset::V1::AssetService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.export_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.export_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudasset.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AssetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `export_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :export_assets + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `batch_get_assets_history` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_assets_history + ## + # RPC-specific configuration for `create_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :create_feed + ## + # RPC-specific configuration for `get_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :get_feed + ## + # RPC-specific configuration for `list_feeds` + # @return [::Gapic::Config::Method] + # + attr_reader :list_feeds + ## + # RPC-specific configuration for `update_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :update_feed + ## + # RPC-specific configuration for `delete_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_feed + ## + # RPC-specific configuration for `search_all_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :search_all_resources + ## + # RPC-specific configuration for `search_all_iam_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :search_all_iam_policies + ## + # RPC-specific configuration for `analyze_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_iam_policy + ## + # RPC-specific configuration for `analyze_iam_policy_longrunning` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_iam_policy_longrunning + ## + # RPC-specific configuration for `analyze_move` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_move + ## + # RPC-specific configuration for `query_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :query_assets + ## + # RPC-specific configuration for `create_saved_query` + # @return [::Gapic::Config::Method] + # + attr_reader :create_saved_query + ## + # RPC-specific configuration for `get_saved_query` + # @return [::Gapic::Config::Method] + # + attr_reader :get_saved_query + ## + # RPC-specific configuration for `list_saved_queries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_saved_queries + ## + # RPC-specific configuration for `update_saved_query` + # @return [::Gapic::Config::Method] + # + attr_reader :update_saved_query + ## + # RPC-specific configuration for `delete_saved_query` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_saved_query + ## + # RPC-specific configuration for `batch_get_effective_iam_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_effective_iam_policies + ## + # RPC-specific configuration for `analyze_org_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_org_policies + ## + # RPC-specific configuration for `analyze_org_policy_governed_containers` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_org_policy_governed_containers + ## + # RPC-specific configuration for `analyze_org_policy_governed_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_org_policy_governed_assets + + # @private + def initialize parent_rpcs = nil + export_assets_config = parent_rpcs.export_assets if parent_rpcs.respond_to? :export_assets + @export_assets = ::Gapic::Config::Method.new export_assets_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + batch_get_assets_history_config = parent_rpcs.batch_get_assets_history if parent_rpcs.respond_to? :batch_get_assets_history + @batch_get_assets_history = ::Gapic::Config::Method.new batch_get_assets_history_config + create_feed_config = parent_rpcs.create_feed if parent_rpcs.respond_to? :create_feed + @create_feed = ::Gapic::Config::Method.new create_feed_config + get_feed_config = parent_rpcs.get_feed if parent_rpcs.respond_to? :get_feed + @get_feed = ::Gapic::Config::Method.new get_feed_config + list_feeds_config = parent_rpcs.list_feeds if parent_rpcs.respond_to? :list_feeds + @list_feeds = ::Gapic::Config::Method.new list_feeds_config + update_feed_config = parent_rpcs.update_feed if parent_rpcs.respond_to? :update_feed + @update_feed = ::Gapic::Config::Method.new update_feed_config + delete_feed_config = parent_rpcs.delete_feed if parent_rpcs.respond_to? :delete_feed + @delete_feed = ::Gapic::Config::Method.new delete_feed_config + search_all_resources_config = parent_rpcs.search_all_resources if parent_rpcs.respond_to? :search_all_resources + @search_all_resources = ::Gapic::Config::Method.new search_all_resources_config + search_all_iam_policies_config = parent_rpcs.search_all_iam_policies if parent_rpcs.respond_to? :search_all_iam_policies + @search_all_iam_policies = ::Gapic::Config::Method.new search_all_iam_policies_config + analyze_iam_policy_config = parent_rpcs.analyze_iam_policy if parent_rpcs.respond_to? :analyze_iam_policy + @analyze_iam_policy = ::Gapic::Config::Method.new analyze_iam_policy_config + analyze_iam_policy_longrunning_config = parent_rpcs.analyze_iam_policy_longrunning if parent_rpcs.respond_to? :analyze_iam_policy_longrunning + @analyze_iam_policy_longrunning = ::Gapic::Config::Method.new analyze_iam_policy_longrunning_config + analyze_move_config = parent_rpcs.analyze_move if parent_rpcs.respond_to? :analyze_move + @analyze_move = ::Gapic::Config::Method.new analyze_move_config + query_assets_config = parent_rpcs.query_assets if parent_rpcs.respond_to? :query_assets + @query_assets = ::Gapic::Config::Method.new query_assets_config + create_saved_query_config = parent_rpcs.create_saved_query if parent_rpcs.respond_to? :create_saved_query + @create_saved_query = ::Gapic::Config::Method.new create_saved_query_config + get_saved_query_config = parent_rpcs.get_saved_query if parent_rpcs.respond_to? :get_saved_query + @get_saved_query = ::Gapic::Config::Method.new get_saved_query_config + list_saved_queries_config = parent_rpcs.list_saved_queries if parent_rpcs.respond_to? :list_saved_queries + @list_saved_queries = ::Gapic::Config::Method.new list_saved_queries_config + update_saved_query_config = parent_rpcs.update_saved_query if parent_rpcs.respond_to? :update_saved_query + @update_saved_query = ::Gapic::Config::Method.new update_saved_query_config + delete_saved_query_config = parent_rpcs.delete_saved_query if parent_rpcs.respond_to? :delete_saved_query + @delete_saved_query = ::Gapic::Config::Method.new delete_saved_query_config + batch_get_effective_iam_policies_config = parent_rpcs.batch_get_effective_iam_policies if parent_rpcs.respond_to? :batch_get_effective_iam_policies + @batch_get_effective_iam_policies = ::Gapic::Config::Method.new batch_get_effective_iam_policies_config + analyze_org_policies_config = parent_rpcs.analyze_org_policies if parent_rpcs.respond_to? :analyze_org_policies + @analyze_org_policies = ::Gapic::Config::Method.new analyze_org_policies_config + analyze_org_policy_governed_containers_config = parent_rpcs.analyze_org_policy_governed_containers if parent_rpcs.respond_to? :analyze_org_policy_governed_containers + @analyze_org_policy_governed_containers = ::Gapic::Config::Method.new analyze_org_policy_governed_containers_config + analyze_org_policy_governed_assets_config = parent_rpcs.analyze_org_policy_governed_assets if parent_rpcs.respond_to? :analyze_org_policy_governed_assets + @analyze_org_policy_governed_assets = ::Gapic::Config::Method.new analyze_org_policy_governed_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/operations.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/operations.rb new file mode 100644 index 000000000000..68df16330170 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Asset + module V1 + module AssetService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudasset.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssetService 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 AssetService 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::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Asset::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudasset.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + 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/[^/]+(?:/.*)?$}, 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(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb new file mode 100644 index 000000000000..60cd7c6699ef --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb @@ -0,0 +1,1491 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/asset/v1/asset_service_pb" + +module Google + module Cloud + module Asset + module V1 + module AssetService + module Rest + ## + # REST service stub for the AssetService 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 export_assets REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::ExportAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::ListAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::ListAssetsResponse] + # A result object deserialized from the server's reply + def list_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_get_assets_history REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] + # A result object deserialized from the server's reply + def batch_get_assets_history request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_assets_history_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_assets_history", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse.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_feed REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::CreateFeedRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # A result object deserialized from the server's reply + def create_feed request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_feed_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_feed", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::Feed.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_feed REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::GetFeedRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # A result object deserialized from the server's reply + def get_feed request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_feed_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_feed", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::Feed.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_feeds REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::ListFeedsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::ListFeedsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::ListFeedsResponse] + # A result object deserialized from the server's reply + def list_feeds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_feeds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_feeds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::ListFeedsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_feed REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::UpdateFeedRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::Feed] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::Feed] + # A result object deserialized from the server's reply + def update_feed request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_feed_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_feed", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::Feed.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_feed REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::DeleteFeedRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_feed request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_feed_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_feed", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_all_resources REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::SearchAllResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::SearchAllResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::SearchAllResourcesResponse] + # A result object deserialized from the server's reply + def search_all_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_all_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: "search_all_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::SearchAllResourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_all_iam_policies REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse] + # A result object deserialized from the server's reply + def search_all_iam_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_all_iam_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: "search_all_iam_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the analyze_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] + # A result object deserialized from the server's reply + def analyze_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_analyze_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: "analyze_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the analyze_iam_policy_longrunning REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def analyze_iam_policy_longrunning request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_analyze_iam_policy_longrunning_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "analyze_iam_policy_longrunning", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the analyze_move REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeMoveRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] + # A result object deserialized from the server's reply + def analyze_move request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_analyze_move_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "analyze_move", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::AnalyzeMoveResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the query_assets REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::QueryAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::QueryAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::QueryAssetsResponse] + # A result object deserialized from the server's reply + def query_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "query_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::QueryAssetsResponse.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_saved_query REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::CreateSavedQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # A result object deserialized from the server's reply + def create_saved_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_saved_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: "create_saved_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::SavedQuery.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_saved_query REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::GetSavedQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # A result object deserialized from the server's reply + def get_saved_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_saved_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: "get_saved_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::SavedQuery.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_saved_queries REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::ListSavedQueriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::ListSavedQueriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::ListSavedQueriesResponse] + # A result object deserialized from the server's reply + def list_saved_queries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_saved_queries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_saved_queries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::ListSavedQueriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_saved_query REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::UpdateSavedQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # A result object deserialized from the server's reply + def update_saved_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_saved_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: "update_saved_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::SavedQuery.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_saved_query REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::DeleteSavedQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_saved_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_saved_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: "delete_saved_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 batch_get_effective_iam_policies REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] + # A result object deserialized from the server's reply + def batch_get_effective_iam_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_effective_iam_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: "batch_get_effective_iam_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the analyze_org_policies REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse] + # A result object deserialized from the server's reply + def analyze_org_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_analyze_org_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: "analyze_org_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the analyze_org_policy_governed_containers REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse] + # A result object deserialized from the server's reply + def analyze_org_policy_governed_containers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_analyze_org_policy_governed_containers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "analyze_org_policy_governed_containers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the analyze_org_policy_governed_assets REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse] + # A result object deserialized from the server's reply + def analyze_org_policy_governed_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_analyze_org_policy_governed_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "analyze_org_policy_governed_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the export_assets REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::ExportAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:exportAssets", + body: "*", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_get_assets_history REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest] + # 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_assets_history_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:batchGetAssetsHistory", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_feed REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::CreateFeedRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_feed_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/feeds", + body: "*", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_feed REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::GetFeedRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_feed_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^[^/]+/[^/]+/feeds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_feeds REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::ListFeedsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_feeds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/feeds", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_feed REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::UpdateFeedRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_feed_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{feed.name}", + body: "*", + matches: [ + ["feed.name", %r{^[^/]+/[^/]+/feeds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_feed REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::DeleteFeedRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_feed_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^[^/]+/[^/]+/feeds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_all_resources REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::SearchAllResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_all_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{scope}:searchAllResources", + matches: [ + ["scope", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_all_iam_policies REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_all_iam_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{scope}:searchAllIamPolicies", + matches: [ + ["scope", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the analyze_iam_policy REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_analyze_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{analysis_query.scope}:analyzeIamPolicy", + matches: [ + ["analysis_query.scope", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the analyze_iam_policy_longrunning REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_analyze_iam_policy_longrunning_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{analysis_query.scope}:analyzeIamPolicyLongrunning", + body: "*", + matches: [ + ["analysis_query.scope", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the analyze_move REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeMoveRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_analyze_move_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:analyzeMove", + matches: [ + ["resource", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the query_assets REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::QueryAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:queryAssets", + body: "*", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_saved_query REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::CreateSavedQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_saved_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/savedQueries", + body: "saved_query", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_saved_query REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::GetSavedQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_saved_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^[^/]+/[^/]+/savedQueries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_saved_queries REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::ListSavedQueriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_saved_queries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/savedQueries", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_saved_query REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::UpdateSavedQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_saved_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{saved_query.name}", + body: "saved_query", + matches: [ + ["saved_query.name", %r{^[^/]+/[^/]+/savedQueries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_saved_query REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::DeleteSavedQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_saved_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^[^/]+/[^/]+/savedQueries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_get_effective_iam_policies REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest] + # 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_effective_iam_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{scope}/effectiveIamPolicies:batchGet", + matches: [ + ["scope", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the analyze_org_policies REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_analyze_org_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{scope}:analyzeOrgPolicies", + matches: [ + ["scope", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the analyze_org_policy_governed_containers REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_analyze_org_policy_governed_containers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{scope}:analyzeOrgPolicyGovernedContainers", + matches: [ + ["scope", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the analyze_org_policy_governed_assets REST call + # + # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_analyze_org_policy_governed_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{scope}:analyzeOrgPolicyGovernedAssets", + matches: [ + ["scope", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_pb.rb new file mode 100644 index 000000000000..5d049db618f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_pb.rb @@ -0,0 +1,125 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/asset/v1/asset_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/asset/v1/assets_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n)google/cloud/asset/v1/asset_service.proto\x12\x15google.cloud.asset.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/cloud/asset/v1/assets.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/expr.proto\"[\n#AnalyzeIamPolicyLongrunningMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xa9\x02\n\x13\x45xportAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32\".google.cloud.asset.v1.ContentType\x12?\n\routput_config\x18\x05 \x01(\x0b\x32#.google.cloud.asset.v1.OutputConfigB\x03\xe0\x41\x02\x12\x1a\n\x12relationship_types\x18\x06 \x03(\t\"\xbd\x01\n\x14\x45xportAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\routput_config\x18\x02 \x01(\x0b\x32#.google.cloud.asset.v1.OutputConfig\x12:\n\routput_result\x18\x03 \x01(\x0b\x32#.google.cloud.asset.v1.OutputResult\"\x8d\x02\n\x11ListAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32\".google.cloud.asset.v1.ContentType\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\x12\x1a\n\x12relationship_types\x18\x07 \x03(\t\"\x8a\x01\n\x12ListAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x06\x61ssets\x18\x02 \x03(\x0b\x32\x1c.google.cloud.asset.v1.Asset\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\x8e\x02\n\x1c\x42\x61tchGetAssetsHistoryRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12=\n\x0c\x63ontent_type\x18\x03 \x01(\x0e\x32\".google.cloud.asset.v1.ContentTypeB\x03\xe0\x41\x01\x12@\n\x10read_time_window\x18\x04 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindowB\x03\xe0\x41\x01\x12\x1f\n\x12relationship_types\x18\x05 \x03(\tB\x03\xe0\x41\x01\"U\n\x1d\x42\x61tchGetAssetsHistoryResponse\x12\x34\n\x06\x61ssets\x18\x01 \x03(\x0b\x32$.google.cloud.asset.v1.TemporalAsset\"n\n\x11\x43reateFeedRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x66\x65\x65\x64_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12.\n\x04\x66\x65\x65\x64\x18\x03 \x01(\x0b\x32\x1b.google.cloud.asset.v1.FeedB\x03\xe0\x41\x02\"F\n\x0eGetFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed\"\'\n\x10ListFeedsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"?\n\x11ListFeedsResponse\x12*\n\x05\x66\x65\x65\x64s\x18\x01 \x03(\x0b\x32\x1b.google.cloud.asset.v1.Feed\"y\n\x11UpdateFeedRequest\x12.\n\x04\x66\x65\x65\x64\x18\x01 \x01(\x0b\x32\x1b.google.cloud.asset.v1.FeedB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"I\n\x11\x44\x65leteFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed\"\xab\x01\n\x0cOutputConfig\x12@\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32%.google.cloud.asset.v1.GcsDestinationH\x00\x12J\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32*.google.cloud.asset.v1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"V\n\x0cOutputResult\x12<\n\ngcs_result\x18\x01 \x01(\x0b\x32&.google.cloud.asset.v1.GcsOutputResultH\x00\x42\x08\n\x06result\"\x1f\n\x0fGcsOutputResult\x12\x0c\n\x04uris\x18\x01 \x03(\t\"C\n\x0eGcsDestination\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x12\x14\n\nuri_prefix\x18\x02 \x01(\tH\x00\x42\x0c\n\nobject_uri\"\xb4\x01\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\x12<\n\x0epartition_spec\x18\x04 \x01(\x0b\x32$.google.cloud.asset.v1.PartitionSpec\x12&\n\x1eseparate_tables_per_asset_type\x18\x05 \x01(\x08\"\xa9\x01\n\rPartitionSpec\x12H\n\rpartition_key\x18\x01 \x01(\x0e\x32\x31.google.cloud.asset.v1.PartitionSpec.PartitionKey\"N\n\x0cPartitionKey\x12\x1d\n\x19PARTITION_KEY_UNSPECIFIED\x10\x00\x12\r\n\tREAD_TIME\x10\x01\x12\x10\n\x0cREQUEST_TIME\x10\x02\"\"\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t\"i\n\x10\x46\x65\x65\x64OutputConfig\x12\x46\n\x12pubsub_destination\x18\x01 \x01(\x0b\x32(.google.cloud.asset.v1.PubsubDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x9d\x03\n\x04\x46\x65\x65\x64\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32\".google.cloud.asset.v1.ContentType\x12H\n\x12\x66\x65\x65\x64_output_config\x18\x05 \x01(\x0b\x32\'.google.cloud.asset.v1.FeedOutputConfigB\x03\xe0\x41\x02\x12$\n\tcondition\x18\x06 \x01(\x0b\x32\x11.google.type.Expr\x12\x1a\n\x12relationship_types\x18\x07 \x03(\t:\x91\x01\xea\x41\x8d\x01\n\x1e\x63loudasset.googleapis.com/Feed\x12\x1fprojects/{project}/feeds/{feed}\x12\x1d\x66olders/{folder}/feeds/{feed}\x12)organizations/{organization}/feeds/{feed} \x01\"\xd9\x01\n\x19SearchAllResourcesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\tread_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n\x1aSearchAllResourcesResponse\x12<\n\x07results\x18\x01 \x03(\x0b\x32+.google.cloud.asset.v1.ResourceSearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x1bSearchAllIamPoliciesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x07 \x01(\tB\x03\xe0\x41\x01\"v\n\x1cSearchAllIamPoliciesResponse\x12=\n\x07results\x18\x01 \x03(\x0b\x32,.google.cloud.asset.v1.IamPolicySearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc6\x07\n\x16IamPolicyAnalysisQuery\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12^\n\x11resource_selector\x18\x02 \x01(\x0b\x32>.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorB\x03\xe0\x41\x01\x12^\n\x11identity_selector\x18\x03 \x01(\x0b\x32>.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorB\x03\xe0\x41\x01\x12Z\n\x0f\x61\x63\x63\x65ss_selector\x18\x04 \x01(\x0b\x32<.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorB\x03\xe0\x41\x01\x12K\n\x07options\x18\x05 \x01(\x0b\x32\x35.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsB\x03\xe0\x41\x01\x12^\n\x11\x63ondition_context\x18\x06 \x01(\x0b\x32>.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextB\x03\xe0\x41\x01\x1a\x33\n\x10ResourceSelector\x12\x1f\n\x12\x66ull_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a)\n\x10IdentitySelector\x12\x15\n\x08identity\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a>\n\x0e\x41\x63\x63\x65ssSelector\x12\x12\n\x05roles\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0bpermissions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\xd8\x01\n\x07Options\x12\x1a\n\rexpand_groups\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x65xpand_roles\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x65xpand_resources\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15output_resource_edges\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12output_group_edges\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x32\n%analyze_service_account_impersonation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1aT\n\x10\x43onditionContext\x12\x31\n\x0b\x61\x63\x63\x65ss_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\r\n\x0bTimeContext\"\xc3\x01\n\x17\x41nalyzeIamPolicyRequest\x12J\n\x0e\x61nalysis_query\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisQueryB\x03\xe0\x41\x02\x12!\n\x14saved_analysis_query\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x39\n\x11\x65xecution_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\x8a\x04\n\x18\x41nalyzeIamPolicyResponse\x12X\n\rmain_analysis\x18\x01 \x01(\x0b\x32\x41.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis\x12q\n&service_account_impersonation_analysis\x18\x02 \x03(\x0b\x32\x41.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis\x12\x16\n\x0e\x66ully_explored\x18\x03 \x01(\x08\x1a\x88\x02\n\x11IamPolicyAnalysis\x12\x45\n\x0e\x61nalysis_query\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisQuery\x12H\n\x10\x61nalysis_results\x18\x02 \x03(\x0b\x32..google.cloud.asset.v1.IamPolicyAnalysisResult\x12\x16\n\x0e\x66ully_explored\x18\x03 \x01(\x08\x12J\n\x13non_critical_errors\x18\x05 \x03(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisState\"\xb4\x04\n\x1dIamPolicyAnalysisOutputConfig\x12^\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x43.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationH\x00\x12h\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32H.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationH\x00\x1a\"\n\x0eGcsDestination\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x95\x02\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0ctable_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12l\n\rpartition_key\x18\x03 \x01(\x0e\x32U.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey\x12\x1e\n\x11write_disposition\x18\x04 \x01(\tB\x03\xe0\x41\x01\"?\n\x0cPartitionKey\x12\x1d\n\x19PARTITION_KEY_UNSPECIFIED\x10\x00\x12\x10\n\x0cREQUEST_TIME\x10\x01\x42\r\n\x0b\x64\x65stination\"\xe5\x01\n\"AnalyzeIamPolicyLongrunningRequest\x12J\n\x0e\x61nalysis_query\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisQueryB\x03\xe0\x41\x02\x12!\n\x14saved_analysis_query\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12P\n\routput_config\x18\x02 \x01(\x0b\x32\x34.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigB\x03\xe0\x41\x02\"%\n#AnalyzeIamPolicyLongrunningResponse\"\xb7\x05\n\nSavedQuery\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x07\x63reator\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0clast_updater\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12=\n\x06labels\x18\x07 \x03(\x0b\x32-.google.cloud.asset.v1.SavedQuery.LabelsEntry\x12?\n\x07\x63ontent\x18\x08 \x01(\x0b\x32..google.cloud.asset.v1.SavedQuery.QueryContent\x1as\n\x0cQueryContent\x12R\n\x19iam_policy_analysis_query\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisQueryH\x00\x42\x0f\n\rquery_content\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbf\x01\xea\x41\xbb\x01\n$cloudasset.googleapis.com/SavedQuery\x12-projects/{project}/savedQueries/{saved_query}\x12+folders/{folder}/savedQueries/{saved_query}\x12\x37organizations/{organization}/savedQueries/{saved_query}\"\xb1\x01\n\x17\x43reateSavedQueryRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudasset.googleapis.com/SavedQuery\x12;\n\x0bsaved_query\x18\x02 \x01(\x0b\x32!.google.cloud.asset.v1.SavedQueryB\x03\xe0\x41\x02\x12\x1b\n\x0esaved_query_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"R\n\x14GetSavedQueryRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudasset.googleapis.com/SavedQuery\"\x9d\x01\n\x17ListSavedQueriesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudasset.googleapis.com/SavedQuery\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\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\"m\n\x18ListSavedQueriesResponse\x12\x38\n\rsaved_queries\x18\x01 \x03(\x0b\x32!.google.cloud.asset.v1.SavedQuery\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n\x17UpdateSavedQueryRequest\x12;\n\x0bsaved_query\x18\x01 \x01(\x0b\x32!.google.cloud.asset.v1.SavedQueryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"U\n\x17\x44\x65leteSavedQueryRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudasset.googleapis.com/SavedQuery\"\x8c\x02\n\x12\x41nalyzeMoveRequest\x12\x45\n\x08resource\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12%\n\x12\x64\x65stination_parent\x18\x02 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x44\n\x04view\x18\x03 \x01(\x0e\x32\x36.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView\"B\n\x0c\x41nalysisView\x12\x1d\n\x19\x41NALYSIS_VIEW_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\"Q\n\x13\x41nalyzeMoveResponse\x12:\n\rmove_analysis\x18\x01 \x03(\x0b\x32#.google.cloud.asset.v1.MoveAnalysis\"\x92\x01\n\x0cMoveAnalysis\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12=\n\x08\x61nalysis\x18\x02 \x01(\x0b\x32).google.cloud.asset.v1.MoveAnalysisResultH\x00\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"~\n\x12MoveAnalysisResult\x12\x33\n\x08\x62lockers\x18\x01 \x03(\x0b\x32!.google.cloud.asset.v1.MoveImpact\x12\x33\n\x08warnings\x18\x02 \x03(\x0b\x32!.google.cloud.asset.v1.MoveImpact\"\x1c\n\nMoveImpact\x12\x0e\n\x06\x64\x65tail\x18\x01 \x01(\t\"\xd7\x01\n\x17QueryAssetsOutputConfig\x12`\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32\x42.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination\x1aZ\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x11write_disposition\x18\x03 \x01(\t\"\xbe\x03\n\x12QueryAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12\x18\n\tstatement\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1c\n\rjob_reference\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\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\x12/\n\x07timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x42\n\x10read_time_window\x18\x07 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindowB\x03\xe0\x41\x01H\x01\x12\x34\n\tread_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x01\x12J\n\routput_config\x18\t \x01(\x0b\x32..google.cloud.asset.v1.QueryAssetsOutputConfigB\x03\xe0\x41\x01\x42\x07\n\x05queryB\x06\n\x04time\"\xf0\x01\n\x13QueryAssetsResponse\x12\x15\n\rjob_reference\x18\x01 \x01(\t\x12\x0c\n\x04\x64one\x18\x02 \x01(\x08\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12:\n\x0cquery_result\x18\x04 \x01(\x0b\x32\".google.cloud.asset.v1.QueryResultH\x00\x12G\n\routput_config\x18\x05 \x01(\x0b\x32..google.cloud.asset.v1.QueryAssetsOutputConfigH\x00\x42\n\n\x08response\"\x95\x01\n\x0bQueryResult\x12%\n\x04rows\x18\x01 \x03(\x0b\x32\x17.google.protobuf.Struct\x12\x32\n\x06schema\x18\x02 \x01(\x0b\x32\".google.cloud.asset.v1.TableSchema\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_rows\x18\x04 \x01(\x03\"F\n\x0bTableSchema\x12\x37\n\x06\x66ields\x18\x01 \x03(\x0b\x32\'.google.cloud.asset.v1.TableFieldSchema\"v\n\x10TableFieldSchema\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04mode\x18\x03 \x01(\t\x12\x37\n\x06\x66ields\x18\x04 \x03(\x0b\x32\'.google.cloud.asset.v1.TableFieldSchema\"Y\n#BatchGetEffectiveIamPoliciesRequest\x12\x18\n\x05scope\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\x12\x01*\x12\x18\n\x05names\x18\x03 \x03(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\"\xfe\x02\n$BatchGetEffectiveIamPoliciesResponse\x12\x66\n\x0epolicy_results\x18\x02 \x03(\x0b\x32N.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy\x1a\xed\x01\n\x12\x45\x66\x66\x65\x63tiveIamPolicy\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12k\n\x08policies\x18\x02 \x03(\x0b\x32Y.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo\x1aN\n\nPolicyInfo\x12\x19\n\x11\x61ttached_resource\x18\x01 \x01(\t\x12%\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy\"\xfc\x03\n\x11\x41nalyzerOrgPolicy\x12\x19\n\x11\x61ttached_resource\x18\x01 \x01(\t\x12\x18\n\x10\x61pplied_resource\x18\x05 \x01(\t\x12<\n\x05rules\x18\x02 \x03(\x0b\x32-.google.cloud.asset.v1.AnalyzerOrgPolicy.Rule\x12\x1b\n\x13inherit_from_parent\x18\x03 \x01(\x08\x12\r\n\x05reset\x18\x04 \x01(\x08\x1a\xc7\x02\n\x04Rule\x12L\n\x06values\x18\x03 \x01(\x0b\x32:.google.cloud.asset.v1.AnalyzerOrgPolicy.Rule.StringValuesH\x00\x12\x13\n\tallow_all\x18\x04 \x01(\x08H\x00\x12\x12\n\x08\x64\x65ny_all\x18\x05 \x01(\x08H\x00\x12\x11\n\x07\x65nforce\x18\x06 \x01(\x08H\x00\x12$\n\tcondition\x18\x07 \x01(\x0b\x32\x11.google.type.Expr\x12H\n\x14\x63ondition_evaluation\x18\x08 \x01(\x0b\x32*.google.cloud.asset.v1.ConditionEvaluation\x1a=\n\x0cStringValues\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x12\x15\n\rdenied_values\x18\x02 \x03(\tB\x06\n\x04kind\"\xb4\n\n\x1b\x41nalyzerOrgPolicyConstraint\x12\x62\n\x19google_defined_constraint\x18\x01 \x01(\x0b\x32=.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.ConstraintH\x00\x12`\n\x11\x63ustom_constraint\x18\x02 \x01(\x0b\x32\x43.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraintH\x00\x1a\xbf\x04\n\nConstraint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12k\n\x12\x63onstraint_default\x18\x04 \x01(\x0e\x32O.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.ConstraintDefault\x12g\n\x0flist_constraint\x18\x05 \x01(\x0b\x32L.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.ListConstraintH\x00\x12m\n\x12\x62oolean_constraint\x18\x06 \x01(\x0b\x32O.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.BooleanConstraintH\x00\x1a=\n\x0eListConstraint\x12\x13\n\x0bsupports_in\x18\x01 \x01(\x08\x12\x16\n\x0esupports_under\x18\x02 \x01(\x08\x1a\x13\n\x11\x42ooleanConstraint\"L\n\x11\x43onstraintDefault\x12\"\n\x1e\x43ONSTRAINT_DEFAULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x42\x11\n\x0f\x63onstraint_type\x1a\xf3\x03\n\x10\x43ustomConstraint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0eresource_types\x18\x02 \x03(\t\x12\x64\n\x0cmethod_types\x18\x03 \x03(\x0e\x32N.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType\x12\x11\n\tcondition\x18\x04 \x01(\t\x12\x63\n\x0b\x61\x63tion_type\x18\x05 \x01(\x0e\x32N.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\"p\n\nMethodType\x12\x1b\n\x17METHOD_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x12\x10\n\x0cREMOVE_GRANT\x10\x04\x12\x0f\n\x0bGOVERN_TAGS\x10\x05\">\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x42\x17\n\x15\x63onstraint_definition\"\x92\x01\n\x19\x41nalyzeOrgPoliciesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nconstraint\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\npage_token\x18\x05 \x01(\tB\x0c\n\n_page_size\"\xb0\x03\n\x1a\x41nalyzeOrgPoliciesResponse\x12]\n\x12org_policy_results\x18\x01 \x03(\x0b\x32\x41.google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.OrgPolicyResult\x12\x46\n\nconstraint\x18\x02 \x01(\x0b\x32\x32.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x1a\xd1\x01\n\x0fOrgPolicyResult\x12\x45\n\x13\x63onsolidated_policy\x18\x01 \x01(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12?\n\rpolicy_bundle\x18\x02 \x03(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12\x0f\n\x07project\x18\x03 \x01(\t\x12\x0f\n\x07\x66olders\x18\x04 \x03(\t\x12\x14\n\x0corganization\x18\x05 \x01(\t\"\xa2\x01\n)AnalyzeOrgPolicyGovernedContainersRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nconstraint\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\npage_token\x18\x05 \x01(\tB\x0c\n\n_page_size\"\xc5\x04\n*AnalyzeOrgPolicyGovernedContainersResponse\x12p\n\x13governed_containers\x18\x01 \x03(\x0b\x32S.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer\x12\x46\n\nconstraint\x18\x02 \x01(\x0b\x32\x32.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x1a\xc3\x02\n\x11GovernedContainer\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x45\n\x13\x63onsolidated_policy\x18\x03 \x01(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12?\n\rpolicy_bundle\x18\x04 \x03(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12\x0f\n\x07project\x18\x05 \x01(\t\x12\x0f\n\x07\x66olders\x18\x06 \x03(\t\x12\x14\n\x0corganization\x18\x07 \x01(\t\x12\x42\n\x0e\x65\x66\x66\x65\x63tive_tags\x18\x08 \x03(\x0b\x32*.google.cloud.asset.v1.EffectiveTagDetails\"\x9e\x01\n%AnalyzeOrgPolicyGovernedAssetsRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nconstraint\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\npage_token\x18\x05 \x01(\tB\x0c\n\n_page_size\"\xed\x07\n&AnalyzeOrgPolicyGovernedAssetsResponse\x12\x64\n\x0fgoverned_assets\x18\x01 \x03(\x0b\x32K.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset\x12\x46\n\nconstraint\x18\x02 \x01(\x0b\x32\x32.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x1a\xce\x01\n\x10GovernedResource\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x0f\n\x07project\x18\x05 \x01(\t\x12\x0f\n\x07\x66olders\x18\x06 \x03(\t\x12\x14\n\x0corganization\x18\x07 \x01(\t\x12\x12\n\nasset_type\x18\x08 \x01(\t\x12\x42\n\x0e\x65\x66\x66\x65\x63tive_tags\x18\t \x03(\x0b\x32*.google.cloud.asset.v1.EffectiveTagDetails\x1a\xa1\x01\n\x11GovernedIamPolicy\x12\x19\n\x11\x61ttached_resource\x18\x01 \x01(\t\x12%\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12\x0f\n\x07project\x18\x05 \x01(\t\x12\x0f\n\x07\x66olders\x18\x06 \x03(\t\x12\x14\n\x0corganization\x18\x07 \x01(\t\x12\x12\n\nasset_type\x18\x08 \x01(\t\x1a\x86\x03\n\rGovernedAsset\x12k\n\x11governed_resource\x18\x01 \x01(\x0b\x32N.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResourceH\x00\x12n\n\x13governed_iam_policy\x18\x02 \x01(\x0b\x32O.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedIamPolicyH\x00\x12\x45\n\x13\x63onsolidated_policy\x18\x03 \x01(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12?\n\rpolicy_bundle\x18\x04 \x03(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicyB\x10\n\x0egoverned_asset*\x90\x01\n\x0b\x43ontentType\x12\x1c\n\x18\x43ONTENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOURCE\x10\x01\x12\x0e\n\nIAM_POLICY\x10\x02\x12\x0e\n\nORG_POLICY\x10\x04\x12\x11\n\rACCESS_POLICY\x10\x05\x12\x10\n\x0cOS_INVENTORY\x10\x06\x12\x10\n\x0cRELATIONSHIP\x10\x07\x32\xd1 \n\x0c\x41ssetService\x12\xde\x01\n\x0c\x45xportAssets\x12*.google.cloud.asset.v1.ExportAssetsRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41W\n*google.cloud.asset.v1.ExportAssetsResponse\x12)google.cloud.asset.v1.ExportAssetsRequest\x82\xd3\xe4\x93\x02\"\"\x1d/v1/{parent=*/*}:exportAssets:\x01*\x12\x8b\x01\n\nListAssets\x12(.google.cloud.asset.v1.ListAssetsRequest\x1a).google.cloud.asset.v1.ListAssetsResponse\"(\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{parent=*/*}/assets\x12\xb2\x01\n\x15\x42\x61tchGetAssetsHistory\x12\x33.google.cloud.asset.v1.BatchGetAssetsHistoryRequest\x1a\x34.google.cloud.asset.v1.BatchGetAssetsHistoryResponse\".\x82\xd3\xe4\x93\x02(\x12&/v1/{parent=*/*}:batchGetAssetsHistory\x12\x7f\n\nCreateFeed\x12(.google.cloud.asset.v1.CreateFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed\"*\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1b\"\x16/v1/{parent=*/*}/feeds:\x01*\x12t\n\x07GetFeed\x12%.google.cloud.asset.v1.GetFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed\"%\xda\x41\x04name\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{name=*/*/feeds/*}\x12\x87\x01\n\tListFeeds\x12\'.google.cloud.asset.v1.ListFeedsRequest\x1a(.google.cloud.asset.v1.ListFeedsResponse\"\'\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{parent=*/*}/feeds\x12\x82\x01\n\nUpdateFeed\x12(.google.cloud.asset.v1.UpdateFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed\"-\xda\x41\x04\x66\x65\x65\x64\x82\xd3\xe4\x93\x02 2\x1b/v1/{feed.name=*/*/feeds/*}:\x01*\x12u\n\nDeleteFeed\x12(.google.cloud.asset.v1.DeleteFeedRequest\x1a\x16.google.protobuf.Empty\"%\xda\x41\x04name\x82\xd3\xe4\x93\x02\x18*\x16/v1/{name=*/*/feeds/*}\x12\xbf\x01\n\x12SearchAllResources\x12\x30.google.cloud.asset.v1.SearchAllResourcesRequest\x1a\x31.google.cloud.asset.v1.SearchAllResourcesResponse\"D\xda\x41\x17scope,query,asset_types\x82\xd3\xe4\x93\x02$\x12\"/v1/{scope=*/*}:searchAllResources\x12\xbb\x01\n\x14SearchAllIamPolicies\x12\x32.google.cloud.asset.v1.SearchAllIamPoliciesRequest\x1a\x33.google.cloud.asset.v1.SearchAllIamPoliciesResponse\":\xda\x41\x0bscope,query\x82\xd3\xe4\x93\x02&\x12$/v1/{scope=*/*}:searchAllIamPolicies\x12\xac\x01\n\x10\x41nalyzeIamPolicy\x12..google.cloud.asset.v1.AnalyzeIamPolicyRequest\x1a/.google.cloud.asset.v1.AnalyzeIamPolicyResponse\"7\x82\xd3\xe4\x93\x02\x31\x12//v1/{analysis_query.scope=*/*}:analyzeIamPolicy\x12\xb8\x02\n\x1b\x41nalyzeIamPolicyLongrunning\x12\x39.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41v\n9google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse\x12\x39google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata\x82\xd3\xe4\x93\x02?\":/v1/{analysis_query.scope=*/*}:analyzeIamPolicyLongrunning:\x01*\x12\x8c\x01\n\x0b\x41nalyzeMove\x12).google.cloud.asset.v1.AnalyzeMoveRequest\x1a*.google.cloud.asset.v1.AnalyzeMoveResponse\"&\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{resource=*/*}:analyzeMove\x12\x8d\x01\n\x0bQueryAssets\x12).google.cloud.asset.v1.QueryAssetsRequest\x1a*.google.cloud.asset.v1.QueryAssetsResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/v1/{parent=*/*}:queryAssets:\x01*\x12\xbd\x01\n\x10\x43reateSavedQuery\x12..google.cloud.asset.v1.CreateSavedQueryRequest\x1a!.google.cloud.asset.v1.SavedQuery\"V\xda\x41!parent,saved_query,saved_query_id\x82\xd3\xe4\x93\x02,\"\x1d/v1/{parent=*/*}/savedQueries:\x0bsaved_query\x12\x8d\x01\n\rGetSavedQuery\x12+.google.cloud.asset.v1.GetSavedQueryRequest\x1a!.google.cloud.asset.v1.SavedQuery\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=*/*/savedQueries/*}\x12\xa3\x01\n\x10ListSavedQueries\x12..google.cloud.asset.v1.ListSavedQueriesRequest\x1a/.google.cloud.asset.v1.ListSavedQueriesResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=*/*}/savedQueries\x12\xbf\x01\n\x10UpdateSavedQuery\x12..google.cloud.asset.v1.UpdateSavedQueryRequest\x1a!.google.cloud.asset.v1.SavedQuery\"X\xda\x41\x17saved_query,update_mask\x82\xd3\xe4\x93\x02\x38\x32)/v1/{saved_query.name=*/*/savedQueries/*}:\x0bsaved_query\x12\x88\x01\n\x10\x44\x65leteSavedQuery\x12..google.cloud.asset.v1.DeleteSavedQueryRequest\x1a\x16.google.protobuf.Empty\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=*/*/savedQueries/*}\x12\xce\x01\n\x1c\x42\x61tchGetEffectiveIamPolicies\x12:.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest\x1a;.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{scope=*/*}/effectiveIamPolicies:batchGet\x12\xbf\x01\n\x12\x41nalyzeOrgPolicies\x12\x30.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest\x1a\x31.google.cloud.asset.v1.AnalyzeOrgPoliciesResponse\"D\xda\x41\x17scope,constraint,filter\x82\xd3\xe4\x93\x02$\x12\"/v1/{scope=*/*}:analyzeOrgPolicies\x12\xff\x01\n\"AnalyzeOrgPolicyGovernedContainers\x12@.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest\x1a\x41.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse\"T\xda\x41\x17scope,constraint,filter\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{scope=*/*}:analyzeOrgPolicyGovernedContainers\x12\xef\x01\n\x1e\x41nalyzeOrgPolicyGovernedAssets\x12<.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest\x1a=.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse\"P\xda\x41\x17scope,constraint,filter\x82\xd3\xe4\x93\x02\x30\x12./v1/{scope=*/*}:analyzeOrgPolicyGovernedAssets\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x01\n\x19\x63om.google.cloud.asset.v1B\x11\x41ssetServiceProtoP\x01Z/cloud.google.com/go/asset/apiv1/assetpb;assetpb\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Asset + module V1 + AnalyzeIamPolicyLongrunningMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata").msgclass + ExportAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ExportAssetsRequest").msgclass + ExportAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ExportAssetsResponse").msgclass + ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListAssetsRequest").msgclass + ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListAssetsResponse").msgclass + BatchGetAssetsHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetAssetsHistoryRequest").msgclass + BatchGetAssetsHistoryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetAssetsHistoryResponse").msgclass + CreateFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.CreateFeedRequest").msgclass + GetFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GetFeedRequest").msgclass + ListFeedsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListFeedsRequest").msgclass + ListFeedsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListFeedsResponse").msgclass + UpdateFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.UpdateFeedRequest").msgclass + DeleteFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.DeleteFeedRequest").msgclass + OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.OutputConfig").msgclass + OutputResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.OutputResult").msgclass + GcsOutputResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsOutputResult").msgclass + GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsDestination").msgclass + BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BigQueryDestination").msgclass + PartitionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PartitionSpec").msgclass + PartitionSpec::PartitionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PartitionSpec.PartitionKey").enummodule + PubsubDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PubsubDestination").msgclass + FeedOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.FeedOutputConfig").msgclass + Feed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Feed").msgclass + SearchAllResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllResourcesRequest").msgclass + SearchAllResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllResourcesResponse").msgclass + SearchAllIamPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllIamPoliciesRequest").msgclass + SearchAllIamPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllIamPoliciesResponse").msgclass + IamPolicyAnalysisQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery").msgclass + IamPolicyAnalysisQuery::ResourceSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector").msgclass + IamPolicyAnalysisQuery::IdentitySelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector").msgclass + IamPolicyAnalysisQuery::AccessSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector").msgclass + IamPolicyAnalysisQuery::Options = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.Options").msgclass + IamPolicyAnalysisQuery::ConditionContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext").msgclass + AnalyzeIamPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyRequest").msgclass + AnalyzeIamPolicyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyResponse").msgclass + AnalyzeIamPolicyResponse::IamPolicyAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis").msgclass + IamPolicyAnalysisOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisOutputConfig").msgclass + IamPolicyAnalysisOutputConfig::GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination").msgclass + IamPolicyAnalysisOutputConfig::BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination").msgclass + IamPolicyAnalysisOutputConfig::BigQueryDestination::PartitionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey").enummodule + AnalyzeIamPolicyLongrunningRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest").msgclass + AnalyzeIamPolicyLongrunningResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse").msgclass + SavedQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SavedQuery").msgclass + SavedQuery::QueryContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SavedQuery.QueryContent").msgclass + CreateSavedQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.CreateSavedQueryRequest").msgclass + GetSavedQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GetSavedQueryRequest").msgclass + ListSavedQueriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListSavedQueriesRequest").msgclass + ListSavedQueriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListSavedQueriesResponse").msgclass + UpdateSavedQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.UpdateSavedQueryRequest").msgclass + DeleteSavedQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.DeleteSavedQueryRequest").msgclass + AnalyzeMoveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeMoveRequest").msgclass + AnalyzeMoveRequest::AnalysisView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView").enummodule + AnalyzeMoveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeMoveResponse").msgclass + MoveAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveAnalysis").msgclass + MoveAnalysisResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveAnalysisResult").msgclass + MoveImpact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveImpact").msgclass + QueryAssetsOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsOutputConfig").msgclass + QueryAssetsOutputConfig::BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination").msgclass + QueryAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsRequest").msgclass + QueryAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsResponse").msgclass + QueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryResult").msgclass + TableSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TableSchema").msgclass + TableFieldSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TableFieldSchema").msgclass + BatchGetEffectiveIamPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest").msgclass + BatchGetEffectiveIamPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse").msgclass + BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy").msgclass + BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo").msgclass + AnalyzerOrgPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicy").msgclass + AnalyzerOrgPolicy::Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicy.Rule").msgclass + AnalyzerOrgPolicy::Rule::StringValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicy.Rule.StringValues").msgclass + AnalyzerOrgPolicyConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint").msgclass + AnalyzerOrgPolicyConstraint::Constraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint").msgclass + AnalyzerOrgPolicyConstraint::Constraint::ListConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.ListConstraint").msgclass + AnalyzerOrgPolicyConstraint::Constraint::BooleanConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.BooleanConstraint").msgclass + AnalyzerOrgPolicyConstraint::Constraint::ConstraintDefault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.ConstraintDefault").enummodule + AnalyzerOrgPolicyConstraint::CustomConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint").msgclass + AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType").enummodule + AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType").enummodule + AnalyzeOrgPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPoliciesRequest").msgclass + AnalyzeOrgPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPoliciesResponse").msgclass + AnalyzeOrgPoliciesResponse::OrgPolicyResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.OrgPolicyResult").msgclass + AnalyzeOrgPolicyGovernedContainersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest").msgclass + AnalyzeOrgPolicyGovernedContainersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse").msgclass + AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer").msgclass + AnalyzeOrgPolicyGovernedAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest").msgclass + AnalyzeOrgPolicyGovernedAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse").msgclass + AnalyzeOrgPolicyGovernedAssetsResponse::GovernedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource").msgclass + AnalyzeOrgPolicyGovernedAssetsResponse::GovernedIamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedIamPolicy").msgclass + AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset").msgclass + ContentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ContentType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_services_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_services_pb.rb new file mode 100644 index 000000000000..8b4c8e2e63e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_services_pb.rb @@ -0,0 +1,187 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/asset/v1/asset_service.proto for package 'google.cloud.asset.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/asset/v1/asset_service_pb' + +module Google + module Cloud + module Asset + module V1 + module AssetService + # Asset service definition. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.asset.v1.AssetService' + + # Exports assets with time and resource types to a given Cloud Storage + # location/BigQuery table. For Cloud Storage location destinations, the + # output format is newline-delimited JSON. Each line represents a + # [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON + # format; for BigQuery table destinations, the output table stores the fields + # in asset Protobuf as columns. This API implements the + # [google.longrunning.Operation][google.longrunning.Operation] API, which + # allows you to keep track of the export. We recommend intervals of at least + # 2 seconds with exponential retry to poll the export operation result. For + # regular-size resource parent, the export operation usually finishes within + # 5 minutes. + rpc :ExportAssets, ::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Google::Longrunning::Operation + # Lists assets with time and resource types and returns paged results in + # response. + rpc :ListAssets, ::Google::Cloud::Asset::V1::ListAssetsRequest, ::Google::Cloud::Asset::V1::ListAssetsResponse + # Batch gets the update history of assets that overlap a time window. + # For IAM_POLICY content, this API outputs history when the asset and its + # attached IAM POLICY both exist. This can create gaps in the output history. + # Otherwise, this API outputs history with asset in both non-delete or + # deleted status. + # If a specified asset does not exist, this API returns an INVALID_ARGUMENT + # error. + rpc :BatchGetAssetsHistory, ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse + # Creates a feed in a parent project/folder/organization to listen to its + # asset updates. + rpc :CreateFeed, ::Google::Cloud::Asset::V1::CreateFeedRequest, ::Google::Cloud::Asset::V1::Feed + # Gets details about an asset feed. + rpc :GetFeed, ::Google::Cloud::Asset::V1::GetFeedRequest, ::Google::Cloud::Asset::V1::Feed + # Lists all asset feeds in a parent project/folder/organization. + rpc :ListFeeds, ::Google::Cloud::Asset::V1::ListFeedsRequest, ::Google::Cloud::Asset::V1::ListFeedsResponse + # Updates an asset feed configuration. + rpc :UpdateFeed, ::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Google::Cloud::Asset::V1::Feed + # Deletes an asset feed. + rpc :DeleteFeed, ::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Google::Protobuf::Empty + # Searches all Google Cloud resources within the specified scope, such as a + # project, folder, or organization. The caller must be granted the + # `cloudasset.assets.searchAllResources` permission on the desired scope, + # otherwise the request will be rejected. + rpc :SearchAllResources, ::Google::Cloud::Asset::V1::SearchAllResourcesRequest, ::Google::Cloud::Asset::V1::SearchAllResourcesResponse + # Searches all IAM policies within the specified scope, such as a project, + # folder, or organization. The caller must be granted the + # `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, + # otherwise the request will be rejected. + rpc :SearchAllIamPolicies, ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse + # Analyzes IAM policies to answer which identities have what accesses on + # which resources. + rpc :AnalyzeIamPolicy, ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest, ::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse + # Analyzes IAM policies asynchronously to answer which identities have what + # accesses on which resources, and writes the analysis results to a Google + # Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + # output format is the JSON format that represents a + # [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + # This method implements the + # [google.longrunning.Operation][google.longrunning.Operation], which allows + # you to track the operation status. We recommend intervals of at least 2 + # seconds with exponential backoff retry to poll the operation result. The + # metadata contains the metadata for the long-running operation. + rpc :AnalyzeIamPolicyLongrunning, ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest, ::Google::Longrunning::Operation + # Analyze moving a resource to a specified destination without kicking off + # the actual move. The analysis is best effort depending on the user's + # permissions of viewing different hierarchical policies and configurations. + # The policies and configuration are subject to change before the actual + # resource migration takes place. + rpc :AnalyzeMove, ::Google::Cloud::Asset::V1::AnalyzeMoveRequest, ::Google::Cloud::Asset::V1::AnalyzeMoveResponse + # Issue a job that queries assets using a SQL statement compatible with + # [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + # + # If the query execution finishes within timeout and there's no pagination, + # the full query results will be returned in the `QueryAssetsResponse`. + # + # Otherwise, full query results can be obtained by issuing extra requests + # with the `job_reference` from the a previous `QueryAssets` call. + # + # Note, the query result has approximately 10 GB limitation enforced by + # [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). + # Queries return larger results will result in errors. + rpc :QueryAssets, ::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Google::Cloud::Asset::V1::QueryAssetsResponse + # Creates a saved query in a parent project/folder/organization. + rpc :CreateSavedQuery, ::Google::Cloud::Asset::V1::CreateSavedQueryRequest, ::Google::Cloud::Asset::V1::SavedQuery + # Gets details about a saved query. + rpc :GetSavedQuery, ::Google::Cloud::Asset::V1::GetSavedQueryRequest, ::Google::Cloud::Asset::V1::SavedQuery + # Lists all saved queries in a parent project/folder/organization. + rpc :ListSavedQueries, ::Google::Cloud::Asset::V1::ListSavedQueriesRequest, ::Google::Cloud::Asset::V1::ListSavedQueriesResponse + # Updates a saved query. + rpc :UpdateSavedQuery, ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest, ::Google::Cloud::Asset::V1::SavedQuery + # Deletes a saved query. + rpc :DeleteSavedQuery, ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest, ::Google::Protobuf::Empty + # Gets effective IAM policies for a batch of resources. + rpc :BatchGetEffectiveIamPolicies, ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest, ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse + # Analyzes organization policies under a scope. + rpc :AnalyzeOrgPolicies, ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest, ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse + # Analyzes organization policies governed containers (projects, folders or + # organization) under a scope. + rpc :AnalyzeOrgPolicyGovernedContainers, ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest, ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse + # Analyzes organization policies governed assets (Google Cloud resources or + # policies) under a scope. This RPC supports custom constraints and the + # following canned constraints: + # + # * constraints/ainotebooks.accessMode + # * constraints/ainotebooks.disableFileDownloads + # * constraints/ainotebooks.disableRootAccess + # * constraints/ainotebooks.disableTerminal + # * constraints/ainotebooks.environmentOptions + # * constraints/ainotebooks.requireAutoUpgradeSchedule + # * constraints/ainotebooks.restrictVpcNetworks + # * constraints/compute.disableGuestAttributesAccess + # * constraints/compute.disableInstanceDataAccessApis + # * constraints/compute.disableNestedVirtualization + # * constraints/compute.disableSerialPortAccess + # * constraints/compute.disableSerialPortLogging + # * constraints/compute.disableVpcExternalIpv6 + # * constraints/compute.requireOsLogin + # * constraints/compute.requireShieldedVm + # * constraints/compute.restrictLoadBalancerCreationForTypes + # * constraints/compute.restrictProtocolForwardingCreationForTypes + # * constraints/compute.restrictXpnProjectLienRemoval + # * constraints/compute.setNewProjectDefaultToZonalDNSOnly + # * constraints/compute.skipDefaultNetworkCreation + # * constraints/compute.trustedImageProjects + # * constraints/compute.vmCanIpForward + # * constraints/compute.vmExternalIpAccess + # * constraints/gcp.detailedAuditLoggingMode + # * constraints/gcp.resourceLocations + # * constraints/iam.allowedPolicyMemberDomains + # * constraints/iam.automaticIamGrantsForDefaultServiceAccounts + # * constraints/iam.disableServiceAccountCreation + # * constraints/iam.disableServiceAccountKeyCreation + # * constraints/iam.disableServiceAccountKeyUpload + # * constraints/iam.restrictCrossProjectServiceAccountLienRemoval + # * constraints/iam.serviceAccountKeyExpiryHours + # * constraints/resourcemanager.accessBoundaries + # * constraints/resourcemanager.allowedExportDestinations + # * constraints/sql.restrictAuthorizedNetworks + # * constraints/sql.restrictNoncompliantDiagnosticDataAccess + # * constraints/sql.restrictNoncompliantResourceCreation + # * constraints/sql.restrictPublicIp + # * constraints/storage.publicAccessPrevention + # * constraints/storage.restrictAuthTypes + # * constraints/storage.uniformBucketLevelAccess + # + # This RPC only returns either resources of types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # or IAM policies. + rpc :AnalyzeOrgPolicyGovernedAssets, ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest, ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/assets_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/assets_pb.rb new file mode 100644 index 000000000000..41e7a438191f --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/assets_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/asset/v1/assets.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/asset/v1/asset_enrichment_resourceowners_pb' +require 'google/cloud/orgpolicy/v1/orgpolicy_pb' +require 'google/cloud/osconfig/v1/inventory_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/service_perimeter_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/code_pb' + + +descriptor_data = "\n\"google/cloud/asset/v1/assets.proto\x12\x15google.cloud.asset.v1\x1a\x19google/api/resource.proto\x1a;google/cloud/asset/v1/asset_enrichment_resourceowners.proto\x1a)google/cloud/orgpolicy/v1/orgpolicy.proto\x1a(google/cloud/osconfig/v1/inventory.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15google/rpc/code.proto\"\xf5\x02\n\rTemporalAsset\x12\x31\n\x06window\x18\x01 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindow\x12\x0f\n\x07\x64\x65leted\x18\x02 \x01(\x08\x12+\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x1c.google.cloud.asset.v1.Asset\x12O\n\x11prior_asset_state\x18\x04 \x01(\x0e\x32\x34.google.cloud.asset.v1.TemporalAsset.PriorAssetState\x12\x31\n\x0bprior_asset\x18\x05 \x01(\x0b\x32\x1c.google.cloud.asset.v1.Asset\"o\n\x0fPriorAssetState\x12!\n\x1dPRIOR_ASSET_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRESENT\x10\x01\x12\x0b\n\x07INVALID\x10\x02\x12\x12\n\x0e\x44OES_NOT_EXIST\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04\"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0f\x41ssetEnrichment\x12@\n\x0fresource_owners\x18\x07 \x01(\x0b\x32%.google.cloud.asset.v1.ResourceOwnersH\x00\x42\x10\n\x0e\x45nrichmentData\"\xf3\x05\n\x05\x41sset\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.asset.v1.Resource\x12)\n\niam_policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12\x35\n\norg_policy\x18\x06 \x03(\x0b\x32!.google.cloud.orgpolicy.v1.Policy\x12N\n\raccess_policy\x18\x07 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyH\x00\x12L\n\x0c\x61\x63\x63\x65ss_level\x18\x08 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelH\x00\x12V\n\x11service_perimeter\x18\t \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterH\x00\x12\x39\n\x0cos_inventory\x18\x0c \x01(\x0b\x32#.google.cloud.osconfig.v1.Inventory\x12@\n\x0erelated_assets\x18\r \x01(\x0b\x32$.google.cloud.asset.v1.RelatedAssetsB\x02\x18\x01\x12:\n\rrelated_asset\x18\x0f \x01(\x0b\x32#.google.cloud.asset.v1.RelatedAsset\x12\x11\n\tancestors\x18\n \x03(\t:\'\xea\x41$\n\x1f\x63loudasset.googleapis.com/Asset\x12\x01*B\x17\n\x15\x61\x63\x63\x65ss_context_policy\"\xb2\x01\n\x08Resource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x1e\n\x16\x64iscovery_document_uri\x18\x02 \x01(\t\x12\x16\n\x0e\x64iscovery_name\x18\x03 \x01(\t\x12\x14\n\x0cresource_url\x18\x04 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12%\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08location\x18\x08 \x01(\t\"\x98\x01\n\rRelatedAssets\x12N\n\x17relationship_attributes\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.RelationshipAttributes\x12\x33\n\x06\x61ssets\x18\x02 \x03(\x0b\x32#.google.cloud.asset.v1.RelatedAsset:\x02\x18\x01\"v\n\x16RelationshipAttributes\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x1c\n\x14source_resource_type\x18\x01 \x01(\t\x12\x1c\n\x14target_resource_type\x18\x02 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t:\x02\x18\x01\"\x85\x01\n\x0cRelatedAsset\x12\x33\n\x05\x61sset\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x63loudasset.googleapis.com/Asset\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x11\n\tancestors\x18\x03 \x03(\t\x12\x19\n\x11relationship_type\x18\x04 \x01(\t\"\xa1\x01\n\x03Tag\x12\x14\n\x07tag_key\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntag_key_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\ttag_value\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0ctag_value_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\n\n\x08_tag_keyB\r\n\x0b_tag_key_idB\x0c\n\n_tag_valueB\x0f\n\r_tag_value_id\"\x7f\n\x13\x45\x66\x66\x65\x63tiveTagDetails\x12\x1e\n\x11\x61ttached_resource\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x32\n\x0e\x65\x66\x66\x65\x63tive_tags\x18\x02 \x03(\x0b\x32\x1a.google.cloud.asset.v1.TagB\x14\n\x12_attached_resource\"\x97\n\n\x14ResourceSearchResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x0f\n\x07project\x18\x03 \x01(\t\x12\x0f\n\x07\x66olders\x18\x11 \x03(\t\x12\x14\n\x0corganization\x18\x12 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12G\n\x06labels\x18\x07 \x03(\x0b\x32\x37.google.cloud.asset.v1.ResourceSearchResult.LabelsEntry\x12\x14\n\x0cnetwork_tags\x18\x08 \x03(\t\x12\x13\n\x07kms_key\x18\n \x01(\tB\x02\x18\x01\x12\x10\n\x08kms_keys\x18\x1c \x03(\t\x12/\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05state\x18\r \x01(\t\x12\x36\n\x15\x61\x64\x64itional_attributes\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12!\n\x19parent_full_resource_name\x18\x13 \x01(\t\x12\x45\n\x13versioned_resources\x18\x10 \x03(\x0b\x32(.google.cloud.asset.v1.VersionedResource\x12\x43\n\x12\x61ttached_resources\x18\x14 \x03(\x0b\x32\'.google.cloud.asset.v1.AttachedResource\x12U\n\rrelationships\x18\x15 \x03(\x0b\x32>.google.cloud.asset.v1.ResourceSearchResult.RelationshipsEntry\x12\x14\n\x08tag_keys\x18\x17 \x03(\tB\x02\x18\x01\x12\x16\n\ntag_values\x18\x19 \x03(\tB\x02\x18\x01\x12\x19\n\rtag_value_ids\x18\x1a \x03(\tB\x02\x18\x01\x12(\n\x04tags\x18\x1d \x03(\x0b\x32\x1a.google.cloud.asset.v1.Tag\x12\x42\n\x0e\x65\x66\x66\x65\x63tive_tags\x18\x1e \x03(\x0b\x32*.google.cloud.asset.v1.EffectiveTagDetails\x12;\n\x0b\x65nrichments\x18\x1f \x03(\x0b\x32&.google.cloud.asset.v1.AssetEnrichment\x12\x19\n\x11parent_asset_type\x18g \x01(\t\x12]\n\x12scc_security_marks\x18 \x03(\x0b\x32\x41.google.cloud.asset.v1.ResourceSearchResult.SccSecurityMarksEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a]\n\x12RelationshipsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.asset.v1.RelatedResources:\x02\x38\x01\x1a\x37\n\x15SccSecurityMarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"O\n\x11VersionedResource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12)\n\x08resource\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"m\n\x10\x41ttachedResource\x12\x12\n\nasset_type\x18\x01 \x01(\t\x12\x45\n\x13versioned_resources\x18\x03 \x03(\x0b\x32(.google.cloud.asset.v1.VersionedResource\"U\n\x10RelatedResources\x12\x41\n\x11related_resources\x18\x01 \x03(\x0b\x32&.google.cloud.asset.v1.RelatedResource\"A\n\x0fRelatedResource\x12\x12\n\nasset_type\x18\x01 \x01(\t\x12\x1a\n\x12\x66ull_resource_name\x18\x02 \x01(\t\"\x8f\x04\n\x15IamPolicySearchResult\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x05 \x01(\t\x12\x0f\n\x07project\x18\x02 \x01(\t\x12\x0f\n\x07\x66olders\x18\x06 \x03(\t\x12\x14\n\x0corganization\x18\x07 \x01(\t\x12%\n\x06policy\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12M\n\x0b\x65xplanation\x18\x04 \x01(\x0b\x32\x38.google.cloud.asset.v1.IamPolicySearchResult.Explanation\x1a\xa1\x02\n\x0b\x45xplanation\x12m\n\x13matched_permissions\x18\x01 \x03(\x0b\x32P.google.cloud.asset.v1.IamPolicySearchResult.Explanation.MatchedPermissionsEntry\x1a\"\n\x0bPermissions\x12\x13\n\x0bpermissions\x18\x01 \x03(\t\x1a\x7f\n\x17MatchedPermissionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12S\n\x05value\x18\x02 \x01(\x0b\x32\x44.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions:\x02\x38\x01\"G\n\x16IamPolicyAnalysisState\x12\x1e\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x10.google.rpc.Code\x12\r\n\x05\x63\x61use\x18\x02 \x01(\t\"\xc6\x01\n\x13\x43onditionEvaluation\x12T\n\x10\x65valuation_value\x18\x01 \x01(\x0e\x32:.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue\"Y\n\x0f\x45valuationValue\x12 \n\x1c\x45VALUATION_VALUE_UNSPECIFIED\x10\x00\x12\x08\n\x04TRUE\x10\x01\x12\t\n\x05\x46\x41LSE\x10\x02\x12\x0f\n\x0b\x43ONDITIONAL\x10\x03\"\xab\t\n\x17IamPolicyAnalysisResult\x12#\n\x1b\x61ttached_resource_full_name\x18\x01 \x01(\t\x12+\n\x0biam_binding\x18\x02 \x01(\x0b\x32\x16.google.iam.v1.Binding\x12^\n\x14\x61\x63\x63\x65ss_control_lists\x18\x03 \x03(\x0b\x32@.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList\x12R\n\ridentity_list\x18\x04 \x01(\x0b\x32;.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList\x12\x16\n\x0e\x66ully_explored\x18\x05 \x01(\x08\x1am\n\x08Resource\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12\x45\n\x0e\x61nalysis_state\x18\x02 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisState\x1a\x85\x01\n\x06\x41\x63\x63\x65ss\x12\x0e\n\x04role\x18\x01 \x01(\tH\x00\x12\x14\n\npermission\x18\x02 \x01(\tH\x00\x12\x45\n\x0e\x61nalysis_state\x18\x03 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisStateB\x0e\n\x0coneof_access\x1a_\n\x08Identity\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0e\x61nalysis_state\x18\x02 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisState\x1a\x30\n\x04\x45\x64ge\x12\x13\n\x0bsource_node\x18\x01 \x01(\t\x12\x13\n\x0btarget_node\x18\x02 \x01(\t\x1a\xbf\x02\n\x11\x41\x63\x63\x65ssControlList\x12J\n\tresources\x18\x01 \x03(\x0b\x32\x37.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource\x12G\n\x08\x61\x63\x63\x65sses\x18\x02 \x03(\x0b\x32\x35.google.cloud.asset.v1.IamPolicyAnalysisResult.Access\x12K\n\x0eresource_edges\x18\x03 \x03(\x0b\x32\x33.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge\x12H\n\x14\x63ondition_evaluation\x18\x04 \x01(\x0b\x32*.google.cloud.asset.v1.ConditionEvaluation\x1a\xa5\x01\n\x0cIdentityList\x12K\n\nidentities\x18\x01 \x03(\x0b\x32\x37.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity\x12H\n\x0bgroup_edges\x18\x02 \x03(\x0b\x32\x33.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeB\x8a\x01\n\x19\x63om.google.cloud.asset.v1B\nAssetProtoP\x01Z/cloud.google.com/go/asset/apiv1/assetpb;assetpb\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Asset + module V1 + TemporalAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TemporalAsset").msgclass + TemporalAsset::PriorAssetState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TemporalAsset.PriorAssetState").enummodule + TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TimeWindow").msgclass + AssetEnrichment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AssetEnrichment").msgclass + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Asset").msgclass + Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Resource").msgclass + RelatedAssets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelatedAssets").msgclass + RelationshipAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelationshipAttributes").msgclass + RelatedAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelatedAsset").msgclass + Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Tag").msgclass + EffectiveTagDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.EffectiveTagDetails").msgclass + ResourceSearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ResourceSearchResult").msgclass + VersionedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.VersionedResource").msgclass + AttachedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AttachedResource").msgclass + RelatedResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelatedResources").msgclass + RelatedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelatedResource").msgclass + IamPolicySearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult").msgclass + IamPolicySearchResult::Explanation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult.Explanation").msgclass + IamPolicySearchResult::Explanation::Permissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions").msgclass + IamPolicyAnalysisState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisState").msgclass + ConditionEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ConditionEvaluation").msgclass + ConditionEvaluation::EvaluationValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ConditionEvaluation.EvaluationValue").enummodule + IamPolicyAnalysisResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult").msgclass + IamPolicyAnalysisResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.Resource").msgclass + IamPolicyAnalysisResult::Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.Access").msgclass + IamPolicyAnalysisResult::Identity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.Identity").msgclass + IamPolicyAnalysisResult::Edge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.Edge").msgclass + IamPolicyAnalysisResult::AccessControlList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList").msgclass + IamPolicyAnalysisResult::IdentityList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/rest.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/rest.rb new file mode 100644 index 000000000000..c4e70181fe84 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/asset/v1/asset_service/rest" +require "google/cloud/asset/v1/version" + +module Google + module Cloud + module Asset + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/asset/v1/rest" + # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb new file mode 100644 index 000000000000..282474cc9d81 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/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 Asset + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb new file mode 100644 index 000000000000..0a6ae7993bbc --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/orgpolicy/v1/orgpolicy.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/cloud/orgpolicy/v1/orgpolicy.proto\x12\x19google.cloud.orgpolicy.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8b\x05\n\x06Policy\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x12\n\nconstraint\x18\x02 \x01(\t\x12\x0c\n\x04\x65tag\x18\x03 \x01(\x0c\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0blist_policy\x18\x05 \x01(\x0b\x32,.google.cloud.orgpolicy.v1.Policy.ListPolicyH\x00\x12I\n\x0e\x62oolean_policy\x18\x06 \x01(\x0b\x32/.google.cloud.orgpolicy.v1.Policy.BooleanPolicyH\x00\x12K\n\x0frestore_default\x18\x07 \x01(\x0b\x32\x30.google.cloud.orgpolicy.v1.Policy.RestoreDefaultH\x00\x1a\xfb\x01\n\nListPolicy\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x12\x15\n\rdenied_values\x18\x02 \x03(\t\x12J\n\nall_values\x18\x03 \x01(\x0e\x32\x36.google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues\x12\x17\n\x0fsuggested_value\x18\x04 \x01(\t\x12\x1b\n\x13inherit_from_parent\x18\x05 \x01(\x08\"<\n\tAllValues\x12\x1a\n\x16\x41LL_VALUES_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x1a!\n\rBooleanPolicy\x12\x10\n\x08\x65nforced\x18\x01 \x01(\x08\x1a\x10\n\x0eRestoreDefaultB\r\n\x0bpolicy_typeB\xc5\x01\n\x1d\x63om.google.cloud.orgpolicy.v1B\x0eOrgPolicyProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv1/orgpolicypb;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V1\xca\x02\x19Google\\Cloud\\OrgPolicy\\V1\xea\x02\x1cGoogle::Cloud::OrgPolicy::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module OrgPolicy + module V1 + Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy").msgclass + Policy::ListPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.ListPolicy").msgclass + Policy::ListPolicy::AllValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues").enummodule + Policy::BooleanPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.BooleanPolicy").msgclass + Policy::RestoreDefault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.RestoreDefault").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-asset-v1/proto_docs/README.md new file mode 100644 index 000000000000..c6111b54d269 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Asset 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-asset-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/cloud/asset/v1/asset_enrichment_resourceowners.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_enrichment_resourceowners.rb new file mode 100644 index 000000000000..802ee1c375c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_enrichment_resourceowners.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Asset + module V1 + # The resource owners information. + # @!attribute [rw] resource_owners + # @return [::Array<::String>] + # List of resource owners. + class ResourceOwners + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_service.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_service.rb new file mode 100644 index 000000000000..b63a2feb2db6 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_service.rb @@ -0,0 +1,2646 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Asset + module V1 + # Represents the metadata of the longrunning operation for the + # AnalyzeIamPolicyLongrunning RPC. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + class AnalyzeIamPolicyLongrunningMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Export asset request. + # @!attribute [rw] parent + # @return [::String] + # Required. The relative name of the root asset. This can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"), + # or a folder number (such as "folders/123"). + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp to take an asset snapshot. This can only be set to a timestamp + # between the current time and the current time minus 35 days (inclusive). + # If not specified, the current time will be used. Due to delays in resource + # data collection and indexing, there is a volatile window during which + # running the same query may get different results. + # @!attribute [rw] asset_types + # @return [::Array<::String>] + # A list of asset types to take a snapshot for. For example: + # "compute.googleapis.com/Disk". + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # + # If specified, only matching assets will be returned, otherwise, it will + # snapshot all asset types. See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types. + # @!attribute [rw] content_type + # @return [::Google::Cloud::Asset::V1::ContentType] + # Asset content type. If not specified, no content but the asset name will be + # returned. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Asset::V1::OutputConfig] + # Required. Output configuration indicating where the results will be output + # to. + # @!attribute [rw] relationship_types + # @return [::Array<::String>] + # A list of relationship types to export, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it snapshots specified relationships. It returns an error if + # any of the [relationship_types] doesn't belong to the supported + # relationship types of the [asset_types] or if any of the [asset_types] + # doesn't belong to the source types of the [relationship_types]. + # * Otherwise: + # it snapshots the supported relationships for all [asset_types] or returns + # an error if any of the [asset_types] has no relationship support. + # An unspecified asset types field means all supported asset_types. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + # supported asset types and relationship types. + class ExportAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The export asset response. This message is returned by the + # google.longrunning.Operations.GetOperation + # method in the returned + # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} + # field. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time the snapshot was taken. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Asset::V1::OutputConfig] + # Output configuration indicating where the results were output to. + # @!attribute [rw] output_result + # @return [::Google::Cloud::Asset::V1::OutputResult] + # Output result indicating where the assets were exported to. For example, a + # set of actual Cloud Storage object URIs where the assets are exported to. + # The URIs can be different from what [output_config] has specified, as the + # service will split the output object into multiple ones once it exceeds a + # single Cloud Storage object limit. + class ExportAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListAssets request. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the organization, folder, or project the assets belong + # to. Format: "organizations/[organization-number]" (such as + # "organizations/123"), "projects/[project-id]" (such as + # "projects/my-project-id"), "projects/[project-number]" (such as + # "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp to take an asset snapshot. This can only be set to a timestamp + # between the current time and the current time minus 35 days (inclusive). + # If not specified, the current time will be used. Due to delays in resource + # data collection and indexing, there is a volatile window during which + # running the same query may get different results. + # @!attribute [rw] asset_types + # @return [::Array<::String>] + # A list of asset types to take a snapshot for. For example: + # "compute.googleapis.com/Disk". + # + # Regular expression is also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # + # If specified, only matching assets will be returned, otherwise, it will + # snapshot all asset types. See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types. + # @!attribute [rw] content_type + # @return [::Google::Cloud::Asset::V1::ContentType] + # Asset content type. If not specified, no content but the asset name will + # be returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of assets to be returned in a single response. Default + # is 100, minimum is 1, and maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # The `next_page_token` returned from the previous `ListAssetsResponse`, or + # unspecified for the first `ListAssetsRequest`. It is a continuation of a + # prior `ListAssets` call, and the API should return the next page of assets. + # @!attribute [rw] relationship_types + # @return [::Array<::String>] + # A list of relationship types to output, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it snapshots specified relationships. It returns an error if + # any of the [relationship_types] doesn't belong to the supported + # relationship types of the [asset_types] or if any of the [asset_types] + # doesn't belong to the source types of the [relationship_types]. + # * Otherwise: + # it snapshots the supported relationships for all [asset_types] or returns + # an error if any of the [asset_types] has no relationship support. + # An unspecified asset types field means all supported asset_types. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types and relationship types. + class ListAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListAssets response. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time the snapshot was taken. + # @!attribute [rw] assets + # @return [::Array<::Google::Cloud::Asset::V1::Asset>] + # Assets. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results. It expires 72 hours after the + # page token for the first page is generated. Set to empty if there are no + # remaining results. + class ListAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Batch get assets history request. + # @!attribute [rw] parent + # @return [::String] + # Required. The relative name of the root asset. It can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id")", or a project number (such as "projects/12345"). + # @!attribute [rw] asset_names + # @return [::Array<::String>] + # A list of the full names of the assets. + # See: https://cloud.google.com/asset-inventory/docs/resource-name-format + # Example: + # + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + # + # The request becomes a no-op if the asset name list is empty, and the max + # size of the asset name list is 100 in one request. + # @!attribute [rw] content_type + # @return [::Google::Cloud::Asset::V1::ContentType] + # Optional. The content type. + # @!attribute [rw] read_time_window + # @return [::Google::Cloud::Asset::V1::TimeWindow] + # Optional. The time window for the asset history. Both start_time and + # end_time are optional and if set, it must be after the current time minus + # 35 days. If end_time is not set, it is default to current timestamp. + # If start_time is not set, the snapshot of the assets at end_time will be + # returned. The returned results contain all temporal assets whose time + # window overlap with read_time_window. + # @!attribute [rw] relationship_types + # @return [::Array<::String>] + # Optional. A list of relationship types to output, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it outputs specified relationships' history on the [asset_names]. It + # returns an error if any of the [relationship_types] doesn't belong to the + # supported relationship types of the [asset_names] or if any of the + # [asset_names]'s types doesn't belong to the source types of the + # [relationship_types]. + # * Otherwise: + # it outputs the supported relationships' history on the [asset_names] or + # returns an error if any of the [asset_names]'s types has no relationship + # support. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + # supported asset types and relationship types. + class BatchGetAssetsHistoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Batch get assets history response. + # @!attribute [rw] assets + # @return [::Array<::Google::Cloud::Asset::V1::TemporalAsset>] + # A list of assets with valid time windows. + class BatchGetAssetsHistoryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create asset feed request. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project/folder/organization where this feed + # should be created in. It can only be an organization number (such as + # "organizations/123"), a folder number (such as "folders/123"), a project ID + # (such as "projects/my-project-id"), or a project number (such as + # "projects/12345"). + # @!attribute [rw] feed_id + # @return [::String] + # Required. This is the client-assigned asset feed identifier and it needs to + # be unique under a specific parent project/folder/organization. + # @!attribute [rw] feed + # @return [::Google::Cloud::Asset::V1::Feed] + # Required. The feed details. The field `name` must be empty and it will be + # generated in the format of: projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + class CreateFeedRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get asset feed request. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Feed and it must be in the format of: + # projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + class GetFeedRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List asset feeds request. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project/folder/organization whose feeds are to be + # listed. It can only be using project/folder/organization number (such as + # "folders/12345")", or a project ID (such as "projects/my-project-id"). + class ListFeedsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] feeds + # @return [::Array<::Google::Cloud::Asset::V1::Feed>] + # A list of feeds. + class ListFeedsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update asset feed request. + # @!attribute [rw] feed + # @return [::Google::Cloud::Asset::V1::Feed] + # Required. The new values of feed details. It must match an existing feed + # and the field `name` must be in the format of: + # projects/project_number/feeds/feed_id or + # folders/folder_number/feeds/feed_id or + # organizations/organization_number/feeds/feed_id. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Only updates the `feed` fields indicated by this mask. + # The field mask must not be empty, and it must not contain fields that + # are immutable or only set by the server. + class UpdateFeedRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The name of the feed and it must be in the format of: + # projects/project_number/feeds/feed_id + # folders/folder_number/feeds/feed_id + # organizations/organization_number/feeds/feed_id + class DeleteFeedRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for export assets destination. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::Asset::V1::GcsDestination] + # Destination on Cloud Storage. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::Asset::V1::BigQueryDestination] + # Destination on BigQuery. The output table stores the fields in asset + # Protobuf as columns in BigQuery. + # + # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class OutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output result of export assets. + # @!attribute [rw] gcs_result + # @return [::Google::Cloud::Asset::V1::GcsOutputResult] + # Export result on Cloud Storage. + class OutputResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud Storage output result. + # @!attribute [rw] uris + # @return [::Array<::String>] + # List of URIs of the Cloud Storage objects. Example: + # "gs://bucket_name/object_name". + class GcsOutputResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud Storage location. + # @!attribute [rw] uri + # @return [::String] + # The URI of the Cloud Storage object. It's the same URI that is used by + # gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + # Editing Object + # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + # for more information. + # + # If the specified Cloud Storage object already exists and there is no + # [hold](https://cloud.google.com/storage/docs/object-holds), it will be + # overwritten with the exported result. + # + # Note: The following fields are mutually exclusive: `uri`, `uri_prefix`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uri_prefix + # @return [::String] + # The URI prefix of all generated Cloud Storage objects. Example: + # "gs://bucket_name/object_name_prefix". Each object URI is in format: + # "gs://bucket_name/object_name_prefix// and only + # contains assets for that type. starts from 0. Example: + # "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is + # the first shard of output objects containing all + # compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be + # returned if file with the same name "gs://bucket_name/object_name_prefix" + # already exists. + # + # Note: The following fields are mutually exclusive: `uri_prefix`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A BigQuery destination for exporting assets to. + # @!attribute [rw] dataset + # @return [::String] + # Required. The BigQuery dataset in format + # "projects/projectId/datasets/datasetId", to which the snapshot result + # should be exported. If this dataset does not exist, the export call returns + # an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets` + # determines the + # [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema) + # of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also + # influences the schema. + # @!attribute [rw] table + # @return [::String] + # Required. The BigQuery table to which the snapshot result should be + # written. If this table does not exist, a new table with the given name + # will be created. + # @!attribute [rw] force + # @return [::Boolean] + # If the destination table already exists and this flag is `TRUE`, the + # table will be overwritten by the contents of assets snapshot. If the flag + # is `FALSE` or unset and the destination table already exists, the export + # call returns an INVALID_ARGUMEMT error. + # @!attribute [rw] partition_spec + # @return [::Google::Cloud::Asset::V1::PartitionSpec] + # [partition_spec] determines whether to export to partitioned table(s) and + # how to partition the data. + # + # If [partition_spec] is unset or [partition_spec.partition_key] is unset or + # `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to + # non-partitioned table(s). [force] will decide whether to overwrite existing + # table(s). + # + # If [partition_spec] is specified. First, the snapshot results will be + # written to partitioned table(s) with two additional timestamp columns, + # readTime and requestTime, one of which will be the partition key. Secondly, + # in the case when any destination table already exists, it will first try to + # update existing table's schema as necessary by appending additional + # columns. Then, if [force] is `TRUE`, the corresponding partition will be + # overwritten by the snapshot results (data in different partitions will + # remain intact); if [force] is unset or `FALSE`, it will append the data. An + # error will be returned if the schema update or data appension fails. + # @!attribute [rw] separate_tables_per_asset_type + # @return [::Boolean] + # If this flag is `TRUE`, the snapshot results will be written to one or + # multiple tables, each of which contains results of one asset type. The + # [force] and [partition_spec] fields will apply to each of them. + # + # Field [table] will be concatenated with "_" and the asset type names (see + # https://cloud.google.com/asset-inventory/docs/supported-asset-types for + # supported asset types) to construct per-asset-type table names, in which + # all non-alphanumeric characters like "." and "/" will be substituted by + # "_". Example: if field [table] is "mytable" and snapshot results + # contain "storage.googleapis.com/Bucket" assets, the corresponding table + # name will be "mytable_storage_googleapis_com_Bucket". If any of these + # tables does not exist, a new table with the concatenated name will be + # created. + # + # When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of + # each table will include RECORD-type columns mapped to the nested fields in + # the Asset.resource.data field of that asset type (up to the 15 nested level + # BigQuery supports + # (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The + # fields in >15 nested levels will be stored in JSON format string as a child + # column of its parent RECORD column. + # + # If error occurs when exporting to any table, the whole export call will + # return an error but the export results that already succeed will persist. + # Example: if exporting to table_type_A succeeds when exporting to + # table_type_B fails during one export call, the results in table_type_A will + # persist and there will not be partial results persisting in a table. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifications of BigQuery partitioned table as export destination. + # @!attribute [rw] partition_key + # @return [::Google::Cloud::Asset::V1::PartitionSpec::PartitionKey] + # The partition key for BigQuery partitioned table. + class PartitionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This enum is used to determine the partition key column when exporting + # assets to BigQuery partitioned table(s). Note that, if the partition key is + # a timestamp column, the actual partition is based on its date value + # (expressed in UTC. see details in + # https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables). + module PartitionKey + # Unspecified partition key. If used, it means using non-partitioned table. + PARTITION_KEY_UNSPECIFIED = 0 + + # The time when the snapshot is taken. If specified as partition key, the + # result table(s) is partitioned by the additional timestamp column, + # readTime. If [read_time] in ExportAssetsRequest is specified, the + # readTime column's value will be the same as it. Otherwise, its value will + # be the current time that is used to take the snapshot. + READ_TIME = 1 + + # The time when the request is received and started to be processed. If + # specified as partition key, the result table(s) is partitioned by the + # requestTime column, an additional timestamp column representing when the + # request was received. + REQUEST_TIME = 2 + end + end + + # A Pub/Sub destination. + # @!attribute [rw] topic + # @return [::String] + # The name of the Pub/Sub topic to publish to. + # Example: `projects/PROJECT_ID/topics/TOPIC_ID`. + class PubsubDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for asset feed destination. + # @!attribute [rw] pubsub_destination + # @return [::Google::Cloud::Asset::V1::PubsubDestination] + # Destination on Pub/Sub. + class FeedOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An asset feed used to export asset updates to a destinations. + # An asset feed filter controls what updates are exported. + # The asset feed must be created within a project, organization, or + # folder. Supported destinations are: + # Pub/Sub topics. + # @!attribute [rw] name + # @return [::String] + # Required. The format will be + # projects/\\{project_number}/feeds/\\{client-assigned_feed_identifier} or + # folders/\\{folder_number}/feeds/\\{client-assigned_feed_identifier} or + # organizations/\\{organization_number}/feeds/\\{client-assigned_feed_identifier} + # + # The client-assigned feed identifier must be unique within the parent + # project/folder/organization. + # @!attribute [rw] asset_names + # @return [::Array<::String>] + # A list of the full names of the assets to receive updates. You must specify + # either or both of asset_names and asset_types. Only asset updates matching + # specified asset_names or asset_types are exported to the feed. + # Example: + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + # For a list of the full names for supported asset types, see [Resource + # name format](/asset-inventory/docs/resource-name-format). + # @!attribute [rw] asset_types + # @return [::Array<::String>] + # A list of types of the assets to receive updates. You must specify either + # or both of asset_names and asset_types. Only asset updates matching + # specified asset_names or asset_types are exported to the feed. + # Example: `"compute.googleapis.com/Disk"` + # + # For a list of all supported asset types, see + # [Supported asset types](/asset-inventory/docs/supported-asset-types). + # @!attribute [rw] content_type + # @return [::Google::Cloud::Asset::V1::ContentType] + # Asset content type. If not specified, no content but the asset name and + # type will be returned. + # @!attribute [rw] feed_output_config + # @return [::Google::Cloud::Asset::V1::FeedOutputConfig] + # Required. Feed output configuration defining where the asset updates are + # published to. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # A condition which determines whether an asset update should be published. + # If specified, an asset will be returned only when the expression evaluates + # to true. + # When set, `expression` field in the `Expr` must be a valid [CEL expression] + # (https://github.com/google/cel-spec) on a TemporalAsset with name + # `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted + # == true") will only publish Asset deletions. Other fields of `Expr` are + # optional. + # + # See our [user + # guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition) + # for detailed instructions. + # @!attribute [rw] relationship_types + # @return [::Array<::String>] + # A list of relationship types to output, for example: + # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + # content_type=RELATIONSHIP. + # * If specified: + # it outputs specified relationship updates on the [asset_names] or the + # [asset_types]. It returns an error if any of the [relationship_types] + # doesn't belong to the supported relationship types of the [asset_names] or + # [asset_types], or any of the [asset_names] or the [asset_types] doesn't + # belong to the source types of the [relationship_types]. + # * Otherwise: + # it outputs the supported relationships of the types of [asset_names] and + # [asset_types] or returns an error if any of the [asset_names] or the + # [asset_types] has no replationship support. + # See [Introduction to Cloud Asset + # Inventory](https://cloud.google.com/asset-inventory/docs/overview) + # for all supported asset types and relationship types. + class Feed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Search all resources request. + # @!attribute [rw] scope + # @return [::String] + # Required. A scope can be a project, a folder, or an organization. The + # search is limited to the resources within the `scope`. The caller must be + # granted the + # [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + # permission on the desired scope. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @!attribute [rw] query + # @return [::String] + # Optional. The query statement. See [how to construct a + # query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + # for more information. If not specified or empty, it will search all the + # resources within the specified `scope`. + # + # Examples: + # + # * `name:Important` to find Google Cloud resources whose name contains + # `Important` as a word. + # * `name=Important` to find the Google Cloud resource whose name is exactly + # `Important`. + # * `displayName:Impor*` to find Google Cloud resources whose display name + # contains `Impor` as a prefix of any word in the field. + # * `location:us-west*` to find Google Cloud resources whose location + # contains both `us` and `west` as prefixes. + # * `labels:prod` to find Google Cloud resources whose labels contain `prod` + # as a key or value. + # * `labels.env:prod` to find Google Cloud resources that have a label `env` + # and its value is `prod`. + # * `labels.env:*` to find Google Cloud resources that have a label `env`. + # * `tagKeys:env` to find Google Cloud resources that have directly + # attached tags where the + # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) + # contains `env`. + # * `tagValues:prod*` to find Google Cloud resources that have directly + # attached tags where the + # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # contains a word prefixed by `prod`. + # * `tagValueIds=tagValues/123` to find Google Cloud resources that have + # directly attached tags where the + # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # is exactly `tagValues/123`. + # * `effectiveTagKeys:env` to find Google Cloud resources that have + # directly attached or inherited tags where the + # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) + # contains `env`. + # * `effectiveTagValues:prod*` to find Google Cloud resources that have + # directly attached or inherited tags where the + # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # contains a word prefixed by `prod`. + # * `effectiveTagValueIds=tagValues/123` to find Google Cloud resources that + # have directly attached or inherited tags where the + # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) + # is exactly `tagValues/123`. + # * `kmsKey:key` to find Google Cloud resources encrypted with a + # customer-managed encryption key whose name contains `key` as a word. This + # field is deprecated. Use the `kmsKeys` field to retrieve Cloud KMS + # key information. + # * `kmsKeys:key` to find Google Cloud resources encrypted with + # customer-managed encryption keys whose name contains the word `key`. + # * `relationships:instance-group-1` to find Google Cloud resources that have + # relationships with `instance-group-1` in the related resource name. + # * `relationships:INSTANCE_TO_INSTANCEGROUP` to find Compute Engine + # instances that have relationships of type `INSTANCE_TO_INSTANCEGROUP`. + # * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find + # Compute Engine instances that have relationships with `instance-group-1` + # in the Compute Engine instance group resource name, for relationship type + # `INSTANCE_TO_INSTANCEGROUP`. + # * `sccSecurityMarks.key=value` to find Cloud resources that are attached + # with security marks whose key is `key` and value is `value`. + # * `sccSecurityMarks.key:*` to find Cloud resources that are attached with + # security marks whose key is `key`. + # * `state:ACTIVE` to find Google Cloud resources whose state contains + # `ACTIVE` as a word. + # * `NOT state:ACTIVE` to find Google Cloud resources whose state doesn't + # contain `ACTIVE` as a word. + # * `createTime<1609459200` to find Google Cloud resources that were created + # before `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of + # `2021-01-01 00:00:00 UTC` in seconds. + # * `updateTime>1609459200` to find Google Cloud resources that were updated + # after `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of + # `2021-01-01 00:00:00 UTC` in seconds. + # * `Important` to find Google Cloud resources that contain `Important` as a + # word in any of the searchable fields. + # * `Impor*` to find Google Cloud resources that contain `Impor` as a prefix + # of any word in any of the searchable fields. + # * `Important location:(us-west1 OR global)` to find Google Cloud + # resources that contain `Important` as a word in any of the searchable + # fields and are also located in the `us-west1` region or the `global` + # location. + # @!attribute [rw] asset_types + # @return [::Array<::String>] + # Optional. A list of asset types that this request searches for. If empty, + # it will search all the asset types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots resources whose asset type starts + # with "compute.googleapis.com". + # * ".*Instance" snapshots resources whose asset type ends with "Instance". + # * ".*Instance.*" snapshots resources whose asset type contains "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The page size for search result pagination. Page size is capped + # at 500 even if a larger value is given. If set to zero or a negative value, + # server will pick an appropriate default. Returned results may be fewer than + # requested. When this happens, there could be more results as long as + # `next_page_token` is returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. `page_token` must be the value of + # `next_page_token` from the previous response. The values of all other + # method parameters, must be identical to those in the previous call. + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields specifying the sorting order of + # the results. The default order is ascending. Add " DESC" after the field + # name to indicate descending order. Redundant space characters are ignored. + # Example: "location DESC, name". + # Only the following fields in the response are sortable: + # + # * name + # * assetType + # * project + # * displayName + # * description + # * location + # * createTime + # * updateTime + # * state + # * parentFullResourceName + # * parentAssetType + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. A comma-separated list of fields that you want returned in the + # results. The following fields are returned by default if not specified: + # + # * `name` + # * `assetType` + # * `project` + # * `folders` + # * `organization` + # * `displayName` + # * `description` + # * `location` + # * `labels` + # * `tags` + # * `effectiveTags` + # * `networkTags` + # * `kmsKeys` + # * `createTime` + # * `updateTime` + # * `state` + # * `additionalAttributes` + # * `parentFullResourceName` + # * `parentAssetType` + # + # Some fields of large size, such as `versionedResources`, + # `attachedResources`, `effectiveTags` etc., are not returned by default, but + # you can specify them in the `read_mask` parameter if you want to include + # them. If `"*"` is specified, all [available + # fields](https://cloud.google.com/asset-inventory/docs/reference/rest/v1/TopLevel/searchAllResources#resourcesearchresult) + # are returned. + # Examples: `"name,location"`, `"name,versionedResources"`, `"*"`. + # Any invalid field path will trigger INVALID_ARGUMENT error. + class SearchAllResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Search all resources response. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Asset::V1::ResourceSearchResult>] + # A list of Resources that match the search query. It contains the resource + # standard metadata information. + # @!attribute [rw] next_page_token + # @return [::String] + # If there are more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + class SearchAllResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Search all IAM policies request. + # @!attribute [rw] scope + # @return [::String] + # Required. A scope can be a project, a folder, or an organization. The + # search is limited to the IAM policies within the `scope`. The caller must + # be granted the + # [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + # permission on the desired scope. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @!attribute [rw] query + # @return [::String] + # Optional. The query statement. See [how to construct a + # query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + # for more information. If not specified or empty, it will search all the + # IAM policies within the specified `scope`. Note that the query string is + # compared against each IAM policy binding, including its principals, + # roles, and IAM conditions. The returned IAM policies will only + # contain the bindings that match your query. To learn more about the IAM + # policy structure, see the [IAM policy + # documentation](https://cloud.google.com/iam/help/allow-policies/structure). + # + # Examples: + # + # * `policy:amy@gmail.com` to find IAM policy bindings that specify user + # "amy@gmail.com". + # * `policy:roles/compute.admin` to find IAM policy bindings that specify + # the Compute Admin role. + # * `policy:comp*` to find IAM policy bindings that contain "comp" as a + # prefix of any word in the binding. + # * `policy.role.permissions:storage.buckets.update` to find IAM policy + # bindings that specify a role containing "storage.buckets.update" + # permission. Note that if callers don't have `iam.roles.get` access to a + # role's included permissions, policy bindings that specify this role will + # be dropped from the search results. + # * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + # role containing "upd" as a prefix of any word in the role permission. + # Note that if callers don't have `iam.roles.get` access to a role's + # included permissions, policy bindings that specify this role will be + # dropped from the search results. + # * `resource:organizations/123456` to find IAM policy bindings + # that are set on "organizations/123456". + # * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + # find IAM policy bindings that are set on the project named "myproject". + # * `Important` to find IAM policy bindings that contain "Important" as a + # word in any of the searchable fields (except for the included + # permissions). + # * `resource:(instance1 OR instance2) policy:amy` to find + # IAM policy bindings that are set on resources "instance1" or + # "instance2" and also specify user "amy". + # * `roles:roles/compute.admin` to find IAM policy bindings that specify the + # Compute Admin role. + # * `memberTypes:user` to find IAM policy bindings that contain the + # principal type "user". + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The page size for search result pagination. Page size is capped + # at 500 even if a larger value is given. If set to zero or a negative value, + # server will pick an appropriate default. Returned results may be fewer than + # requested. When this happens, there could be more results as long as + # `next_page_token` is returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. If present, retrieve the next batch of results from the preceding + # call to this method. `page_token` must be the value of `next_page_token` + # from the previous response. The values of all other method parameters must + # be identical to those in the previous call. + # @!attribute [rw] asset_types + # @return [::Array<::String>] + # Optional. A list of asset types that the IAM policies are attached to. If + # empty, it will search the IAM policies that are attached to all the asset + # types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # + # Regular expressions are also supported. For example: + # + # * "compute.googleapis.com.*" snapshots IAM policies attached to asset type + # starts with "compute.googleapis.com". + # * ".*Instance" snapshots IAM policies attached to asset type ends with + # "Instance". + # * ".*Instance.*" snapshots IAM policies attached to asset type contains + # "Instance". + # + # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + # regular expression syntax. If the regular expression does not match any + # supported asset type, an INVALID_ARGUMENT error will be returned. + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields specifying the sorting order of + # the results. The default order is ascending. Add " DESC" after the field + # name to indicate descending order. Redundant space characters are ignored. + # Example: "assetType DESC, resource". + # Only singular primitive fields in the response are sortable: + # * resource + # * assetType + # * project + # All the other fields such as repeated fields (e.g., `folders`) and + # non-primitive fields (e.g., `policy`) are not supported. + class SearchAllIamPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Search all IAM policies response. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicySearchResult>] + # A list of IAM policies that match the search query. Related information + # such as the associated resource is returned along with the policy. + # @!attribute [rw] next_page_token + # @return [::String] + # Set if there are more results than those appearing in this response; to get + # the next set of results, call this method again, using this value as the + # `page_token`. + class SearchAllIamPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # IAM policy analysis query message. + # @!attribute [rw] scope + # @return [::String] + # Required. The relative name of the root asset. Only resources and IAM + # policies within the scope will be analyzed. + # + # This can only be an organization number (such as "organizations/123"), a + # folder number (such as "folders/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"). + # + # To know how to get organization ID, visit [here + # ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # + # To know how to get folder or project ID, visit [here + # ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). + # @!attribute [rw] resource_selector + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ResourceSelector] + # Optional. Specifies a resource for analysis. + # @!attribute [rw] identity_selector + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::IdentitySelector] + # Optional. Specifies an identity for analysis. + # @!attribute [rw] access_selector + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::AccessSelector] + # Optional. Specifies roles or permissions for analysis. This is optional. + # @!attribute [rw] options + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options] + # Optional. The query options. + # @!attribute [rw] condition_context + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ConditionContext] + # Optional. The hypothetical context for IAM conditions evaluation. + class IamPolicyAnalysisQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the resource to analyze for access policies, which may be set + # directly on the resource, or on ancestors such as organizations, folders or + # projects. + # @!attribute [rw] full_resource_name + # @return [::String] + # Required. The [full resource name] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of a resource of [supported resource + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). + class ResourceSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies an identity for which to determine resource access, based on + # roles assigned either directly to them or to the groups they belong to, + # directly or indirectly. + # @!attribute [rw] identity + # @return [::String] + # Required. The identity appear in the form of principals in + # [IAM policy + # binding](https://cloud.google.com/iam/reference/rest/v1/Binding). + # + # The examples of supported forms are: + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com". + # + # Notice that wildcard characters (such as * and ?) are not supported. + # You must give a specific identity. + class IdentitySelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies roles and/or permissions to analyze, to determine both the + # identities possessing them and the resources they control. If multiple + # values are specified, results will include roles or permissions matching + # any of them. The total number of roles and permissions should be equal or + # less than 10. + # @!attribute [rw] roles + # @return [::Array<::String>] + # Optional. The roles to appear in result. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # Optional. The permissions to appear in result. + class AccessSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains query options. + # @!attribute [rw] expand_groups + # @return [::Boolean] + # Optional. If true, the identities section of the result will expand any + # Google groups appearing in an IAM policy binding. + # + # If + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery#identity_selector IamPolicyAnalysisQuery.identity_selector} + # is specified, the identity in the result will be determined by the + # selector, and this flag is not allowed to set. + # + # If true, the default max expansion per group is 1000 for + # AssetService.AnalyzeIamPolicy][]. + # + # Default is false. + # @!attribute [rw] expand_roles + # @return [::Boolean] + # Optional. If true, the access section of result will expand any roles + # appearing in IAM policy bindings to include their permissions. + # + # If + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery#access_selector IamPolicyAnalysisQuery.access_selector} + # is specified, the access section of the result will be determined by the + # selector, and this flag is not allowed to set. + # + # Default is false. + # @!attribute [rw] expand_resources + # @return [::Boolean] + # Optional. If true and + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery#resource_selector IamPolicyAnalysisQuery.resource_selector} + # is not specified, the resource section of the result will expand any + # resource attached to an IAM policy to include resources lower in the + # resource hierarchy. + # + # For example, if the request analyzes for which resources user A has + # permission P, and the results include an IAM policy with P on a Google + # Cloud folder, the results will also include resources in that folder with + # permission P. + # + # If true and + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery#resource_selector IamPolicyAnalysisQuery.resource_selector} + # is specified, the resource section of the result will expand the + # specified resource to include resources lower in the resource hierarchy. + # Only project or lower resources are supported. Folder and organization + # resources cannot be used together with this option. + # + # For example, if the request analyzes for which users have permission P on + # a Google Cloud project with this option enabled, the results will include + # all users who have permission P on that project or any lower resource. + # + # If true, the default max expansion per resource is 1000 for + # AssetService.AnalyzeIamPolicy][] and 100000 for + # AssetService.AnalyzeIamPolicyLongrunning][]. + # + # Default is false. + # @!attribute [rw] output_resource_edges + # @return [::Boolean] + # Optional. If true, the result will output the relevant parent/child + # relationships between resources. Default is false. + # @!attribute [rw] output_group_edges + # @return [::Boolean] + # Optional. If true, the result will output the relevant membership + # relationships between groups and other groups, and between groups and + # principals. Default is false. + # @!attribute [rw] analyze_service_account_impersonation + # @return [::Boolean] + # Optional. If true, the response will include access analysis from + # identities to resources via service account impersonation. This is a very + # expensive operation, because many derived queries will be executed. We + # highly recommend you use + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning AssetService.AnalyzeIamPolicyLongrunning} + # RPC instead. + # + # For example, if the request analyzes for which resources user A has + # permission P, and there's an IAM policy states user A has + # iam.serviceAccounts.getAccessToken permission to a service account SA, + # and there's another IAM policy states service account SA has permission P + # to a Google Cloud folder F, then user A potentially has access to the + # Google Cloud folder F. And those advanced analysis results will be + # included in + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse#service_account_impersonation_analysis AnalyzeIamPolicyResponse.service_account_impersonation_analysis}. + # + # Another example, if the request analyzes for who has + # permission P to a Google Cloud folder F, and there's an IAM policy states + # user A has iam.serviceAccounts.actAs permission to a service account SA, + # and there's another IAM policy states service account SA has permission P + # to the Google Cloud folder F, then user A potentially has access to the + # Google Cloud folder F. And those advanced analysis results will be + # included in + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse#service_account_impersonation_analysis AnalyzeIamPolicyResponse.service_account_impersonation_analysis}. + # + # Only the following permissions are considered in this analysis: + # + # * `iam.serviceAccounts.actAs` + # * `iam.serviceAccounts.signBlob` + # * `iam.serviceAccounts.signJwt` + # * `iam.serviceAccounts.getAccessToken` + # * `iam.serviceAccounts.getOpenIdToken` + # * `iam.serviceAccounts.implicitDelegation` + # + # Default is false. + class Options + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The IAM conditions context. + # @!attribute [rw] access_time + # @return [::Google::Protobuf::Timestamp] + # The hypothetical access timestamp to evaluate IAM conditions. Note that + # this value must not be earlier than the current time; otherwise, an + # INVALID_ARGUMENT error will be returned. + class ConditionContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A request message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy AssetService.AnalyzeIamPolicy}. + # @!attribute [rw] analysis_query + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery] + # Required. The request query. + # @!attribute [rw] saved_analysis_query + # @return [::String] + # Optional. The name of a saved query, which must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # + # If both `analysis_query` and `saved_analysis_query` are provided, they + # will be merged together with the `saved_analysis_query` as base and + # the `analysis_query` as overrides. For more details of the merge behavior, + # refer to the + # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) + # page. + # + # Note that you cannot override primitive fields with default value, such as + # 0 or empty string, etc., because we use proto3, which doesn't support field + # presence yet. + # @!attribute [rw] execution_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Amount of time executable has to complete. See JSON + # representation of + # [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + # + # If this field is set with a value less than the RPC deadline, and the + # execution of your query hasn't finished in the specified + # execution timeout, you will get a response with partial result. + # Otherwise, your query's execution will continue until the RPC deadline. + # If it's not finished until then, you will get a DEADLINE_EXCEEDED error. + # + # Default is empty. + class AnalyzeIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy AssetService.AnalyzeIamPolicy}. + # @!attribute [rw] main_analysis + # @return [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse::IamPolicyAnalysis] + # The main analysis that matches the original request. + # @!attribute [rw] service_account_impersonation_analysis + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse::IamPolicyAnalysis>] + # The service account impersonation analysis if + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options#analyze_service_account_impersonation IamPolicyAnalysisQuery.Options.analyze_service_account_impersonation} + # is enabled. + # @!attribute [rw] fully_explored + # @return [::Boolean] + # Represents whether all entries in the + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse#main_analysis main_analysis} + # and + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse#service_account_impersonation_analysis service_account_impersonation_analysis} + # have been fully explored to answer the query in the request. + class AnalyzeIamPolicyResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An analysis message to group the query and results. + # @!attribute [rw] analysis_query + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery] + # The analysis query. + # @!attribute [rw] analysis_results + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult>] + # A list of + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult IamPolicyAnalysisResult} + # that matches the analysis query, or empty if no result is found. + # @!attribute [rw] fully_explored + # @return [::Boolean] + # Represents whether all entries in the + # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse::IamPolicyAnalysis#analysis_results analysis_results} + # have been fully explored to answer the query. + # @!attribute [rw] non_critical_errors + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisState>] + # A list of non-critical errors happened during the query handling. + class IamPolicyAnalysis + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Output configuration for export IAM policy analysis destination. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig::GcsDestination] + # Destination on Cloud Storage. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig::BigQueryDestination] + # Destination on BigQuery. + # + # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class IamPolicyAnalysisOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A Cloud Storage location. + # @!attribute [rw] uri + # @return [::String] + # Required. The URI of the Cloud Storage object. It's the same URI that is + # used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + # Editing Object + # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + # for more information. + # + # If the specified Cloud Storage object already exists and there is no + # [hold](https://cloud.google.com/storage/docs/object-holds), it will be + # overwritten with the analysis result. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A BigQuery destination. + # @!attribute [rw] dataset + # @return [::String] + # Required. The BigQuery dataset in format + # "projects/projectId/datasets/datasetId", to which the analysis results + # should be exported. If this dataset does not exist, the export call will + # return an INVALID_ARGUMENT error. + # @!attribute [rw] table_prefix + # @return [::String] + # Required. The prefix of the BigQuery tables to which the analysis results + # will be written. Tables will be created based on this table_prefix if not + # exist: + # * _analysis table will contain export operation's metadata. + # * _analysis_result will contain all the + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult IamPolicyAnalysisResult}. + # When [partition_key] is specified, both tables will be partitioned based + # on the [partition_key]. + # @!attribute [rw] partition_key + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig::BigQueryDestination::PartitionKey] + # The partition key for BigQuery partitioned table. + # @!attribute [rw] write_disposition + # @return [::String] + # Optional. Specifies the action that occurs if the destination table or + # partition already exists. The following values are supported: + # + # * WRITE_TRUNCATE: If the table or partition already exists, BigQuery + # overwrites the entire table or all the partitions data. + # * WRITE_APPEND: If the table or partition already exists, BigQuery + # appends the data to the table or the latest partition. + # * WRITE_EMPTY: If the table already exists and contains data, an error is + # returned. + # + # The default value is WRITE_APPEND. Each action is atomic and only occurs + # if BigQuery is able to complete the job successfully. Details are at + # https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This enum determines the partition key column for the bigquery tables. + # Partitioning can improve query performance and reduce query cost by + # filtering partitions. Refer to + # https://cloud.google.com/bigquery/docs/partitioned-tables for details. + module PartitionKey + # Unspecified partition key. Tables won't be partitioned using this + # option. + PARTITION_KEY_UNSPECIFIED = 0 + + # The time when the request is received. If specified as partition key, + # the result table(s) is partitioned by the RequestTime column, an + # additional timestamp column representing when the request was received. + REQUEST_TIME = 1 + end + end + end + + # A request message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning AssetService.AnalyzeIamPolicyLongrunning}. + # @!attribute [rw] analysis_query + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery] + # Required. The request query. + # @!attribute [rw] saved_analysis_query + # @return [::String] + # Optional. The name of a saved query, which must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # + # If both `analysis_query` and `saved_analysis_query` are provided, they + # will be merged together with the `saved_analysis_query` as base and + # the `analysis_query` as overrides. For more details of the merge behavior, + # refer to the + # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) + # doc. + # + # Note that you cannot override primitive fields with default value, such as + # 0 or empty string, etc., because we use proto3, which doesn't support field + # presence yet. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig] + # Required. Output configuration indicating where the results will be output + # to. + class AnalyzeIamPolicyLongrunningRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning AssetService.AnalyzeIamPolicyLongrunning}. + class AnalyzeIamPolicyLongrunningResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A saved query which can be shared with others or used later. + # @!attribute [rw] name + # @return [::String] + # The resource name of the saved query. The format must be: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # @!attribute [rw] description + # @return [::String] + # The description of this saved query. This value should be fewer than 255 + # characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The create time of this saved query. + # @!attribute [r] creator + # @return [::String] + # Output only. The account's email address who has created this saved query. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update time of this saved query. + # @!attribute [r] last_updater + # @return [::String] + # Output only. The account's email address who has updated this saved query + # most recently. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels applied on the resource. + # This value should not contain more than 10 entries. The key and value of + # each entry must be non-empty and fewer than 64 characters. + # @!attribute [rw] content + # @return [::Google::Cloud::Asset::V1::SavedQuery::QueryContent] + # The query content. + class SavedQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The query content. + # @!attribute [rw] iam_policy_analysis_query + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery] + # An IAM Policy Analysis query, which could be used in + # the + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy AssetService.AnalyzeIamPolicy} + # RPC or the + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning AssetService.AnalyzeIamPolicyLongrunning} + # RPC. + class QueryContent + 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 + + # Request to create a saved query. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project/folder/organization where this + # saved_query should be created in. It can only be an organization number + # (such as "organizations/123"), a folder number (such as "folders/123"), a + # project ID (such as "projects/my-project-id"), or a project number (such as + # "projects/12345"). + # @!attribute [rw] saved_query + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # Required. The saved_query details. The `name` field must be empty as it + # will be generated based on the parent and saved_query_id. + # @!attribute [rw] saved_query_id + # @return [::String] + # Required. The ID to use for the saved query, which must be unique in the + # specified parent. It will become the final component of the saved query's + # resource name. + # + # This value should be 4-63 characters, and valid characters + # are `[a-z][0-9]-`. + # + # Notice that this field is required in the saved query creation, and the + # `name` field of the `saved_query` will be ignored. + class CreateSavedQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a saved query. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the saved query and it must be in the format of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + class GetSavedQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list saved queries. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project/folder/organization whose savedQueries are to + # be listed. It can only be using project/folder/organization number (such as + # "folders/12345")", or a project ID (such as "projects/my-project-id"). + # @!attribute [rw] filter + # @return [::String] + # Optional. The expression to filter resources. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. When `AND` and `OR` are both used in the + # expression, parentheses must be appropriately used to group the + # combinations. The expression may also contain regular expressions. + # + # See https://google.aip.dev/160 for more information on the grammar. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of saved queries to return per page. The + # service may return fewer than this value. If unspecified, at most 50 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 `ListSavedQueries` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListSavedQueries` must + # match the call that provided the page token. + class ListSavedQueriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of listing saved queries. + # @!attribute [rw] saved_queries + # @return [::Array<::Google::Cloud::Asset::V1::SavedQuery>] + # A list of savedQueries. + # @!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 ListSavedQueriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a saved query. + # @!attribute [rw] saved_query + # @return [::Google::Cloud::Asset::V1::SavedQuery] + # Required. The saved query to update. + # + # The saved query's `name` field is used to identify the one to update, + # which has format as below: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdateSavedQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a saved query. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the saved query to delete. It must be in the format + # of: + # + # * projects/project_number/savedQueries/saved_query_id + # * folders/folder_number/savedQueries/saved_query_id + # * organizations/organization_number/savedQueries/saved_query_id + class DeleteSavedQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for performing resource move analysis. + # @!attribute [rw] resource + # @return [::String] + # Required. Name of the resource to perform the analysis against. + # Only Google Cloud projects are supported as of today. Hence, this can only + # be a project ID (such as "projects/my-project-id") or a project number + # (such as "projects/12345"). + # @!attribute [rw] destination_parent + # @return [::String] + # Required. Name of the Google Cloud folder or organization to reparent the + # target resource. The analysis will be performed against hypothetically + # moving the resource to this specified destination parent. This can only be + # a folder number (such as "folders/123") or an organization number (such as + # "organizations/123"). + # @!attribute [rw] view + # @return [::Google::Cloud::Asset::V1::AnalyzeMoveRequest::AnalysisView] + # Analysis view indicating what information should be included in the + # analysis response. If unspecified, the default view is FULL. + class AnalyzeMoveRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # View enum for supporting partial analysis responses. + module AnalysisView + # The default/unset value. + # The API will default to the FULL view. + ANALYSIS_VIEW_UNSPECIFIED = 0 + + # Full analysis including all level of impacts of the specified resource + # move. + FULL = 1 + + # Basic analysis only including blockers which will prevent the specified + # resource move at runtime. + BASIC = 2 + end + end + + # The response message for resource move analysis. + # @!attribute [rw] move_analysis + # @return [::Array<::Google::Cloud::Asset::V1::MoveAnalysis>] + # The list of analyses returned from performing the intended resource move + # analysis. The analysis is grouped by different Google Cloud services. + class AnalyzeMoveResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message to group the analysis information. + # @!attribute [rw] display_name + # @return [::String] + # The user friendly display name of the analysis. E.g. IAM, organization + # policy etc. + # @!attribute [rw] analysis + # @return [::Google::Cloud::Asset::V1::MoveAnalysisResult] + # Analysis result of moving the target resource. + # + # Note: The following fields are mutually exclusive: `analysis`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Description of error encountered when performing the analysis. + # + # Note: The following fields are mutually exclusive: `error`, `analysis`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MoveAnalysis + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An analysis result including blockers and warnings. + # @!attribute [rw] blockers + # @return [::Array<::Google::Cloud::Asset::V1::MoveImpact>] + # Blocking information that would prevent the target resource from moving + # to the specified destination at runtime. + # @!attribute [rw] warnings + # @return [::Array<::Google::Cloud::Asset::V1::MoveImpact>] + # Warning information indicating that moving the target resource to the + # specified destination might be unsafe. This can include important policy + # information and configuration changes, but will not block moves at runtime. + class MoveAnalysisResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message to group impacts of moving the target resource. + # @!attribute [rw] detail + # @return [::String] + # User friendly impact detail in a free form message. + class MoveImpact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration query assets. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig::BigQueryDestination] + # BigQuery destination where the query results will be saved. + class QueryAssetsOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # BigQuery destination. + # @!attribute [rw] dataset + # @return [::String] + # Required. The BigQuery dataset where the query results will be saved. It + # has the format of "projects/\\{projectId}/datasets/\\{datasetId}". + # @!attribute [rw] table + # @return [::String] + # Required. The BigQuery table where the query results will be saved. If + # this table does not exist, a new table with the given name will be + # created. + # @!attribute [rw] write_disposition + # @return [::String] + # Specifies the action that occurs if the destination table or partition + # already exists. The following values are supported: + # + # * WRITE_TRUNCATE: If the table or partition already exists, BigQuery + # overwrites the entire table or all the partitions data. + # * WRITE_APPEND: If the table or partition already exists, BigQuery + # appends the data to the table or the latest partition. + # * WRITE_EMPTY: If the table already exists and contains data, a + # 'duplicate' error is returned in the job result. + # + # The default value is WRITE_EMPTY. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # QueryAssets request. + # @!attribute [rw] parent + # @return [::String] + # Required. The relative name of the root asset. This can only be an + # organization number (such as "organizations/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"), + # or a folder number (such as "folders/123"). + # + # Only assets belonging to the `parent` will be returned. + # @!attribute [rw] statement + # @return [::String] + # Optional. A SQL statement that's compatible with [BigQuery + # SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + # + # Note: The following fields are mutually exclusive: `statement`, `job_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] job_reference + # @return [::String] + # Optional. Reference to the query job, which is from the + # `QueryAssetsResponse` of previous `QueryAssets` call. + # + # Note: The following fields are mutually exclusive: `job_reference`, `statement`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of rows to return in the results. Responses + # are limited to 10 MB and 1000 rows. + # + # By default, the maximum row count is 1000. When the byte or row count limit + # is reached, the rest of the query results will be paginated. + # + # The field will be ignored when [output_config] is specified. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token received from previous `QueryAssets`. + # + # The field will be ignored when [output_config] is specified. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the maximum amount of time that the client is willing + # to wait for the query to complete. By default, this limit is 5 min for the + # first query, and 1 minute for the following queries. If the query is + # complete, the `done` field in the `QueryAssetsResponse` is true, otherwise + # false. + # + # Like BigQuery [jobs.query + # API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) + # The call is not guaranteed to wait for the specified timeout; it typically + # returns after around 200 seconds (200,000 milliseconds), even if the query + # is not complete. + # + # The field will be ignored when [output_config] is specified. + # @!attribute [rw] read_time_window + # @return [::Google::Cloud::Asset::V1::TimeWindow] + # Optional. [start_time] is required. [start_time] must be less than + # [end_time] Defaults [end_time] to now if [start_time] is set and + # [end_time] isn't. Maximum permitted time range is 7 days. + # + # Note: The following fields are mutually exclusive: `read_time_window`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Queries cloud assets as they appeared at the specified point in + # time. + # + # Note: The following fields are mutually exclusive: `read_time`, `read_time_window`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig] + # Optional. Destination where the query results will be saved. + # + # When this field is specified, the query results won't be saved in the + # [QueryAssetsResponse.query_result]. Instead + # [QueryAssetsResponse.output_config] will be set. + # + # Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used + # to check the status of the query job when passed to a following + # [QueryAssets] API call. + class QueryAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # QueryAssets response. + # @!attribute [rw] job_reference + # @return [::String] + # Reference to a query job. + # @!attribute [rw] done + # @return [::Boolean] + # The query response, which can be either an `error` or a valid `response`. + # + # If `done` == `false` and the query result is being saved in an output, the + # output_config field will be set. + # If `done` == `true`, exactly one of + # `error`, `query_result` or `output_config` will be set. + # [done] is unset unless the [QueryAssetsResponse] contains a + # [QueryAssetsResponse.job_reference]. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Error status. + # + # Note: The following fields are mutually exclusive: `error`, `query_result`, `output_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] query_result + # @return [::Google::Cloud::Asset::V1::QueryResult] + # Result of the query. + # + # Note: The following fields are mutually exclusive: `query_result`, `error`, `output_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig] + # Output configuration, which indicates that instead of being returned in + # an API response on the fly, the query result will be saved in a specific + # output. + # + # Note: The following fields are mutually exclusive: `output_config`, `error`, `query_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class QueryAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Execution results of the query. + # + # The result is formatted as rows represented by BigQuery compatible [schema]. + # When pagination is necessary, it will contains the page token to retrieve + # the results of following pages. + # @!attribute [rw] rows + # @return [::Array<::Google::Protobuf::Struct>] + # Each row hold a query result in the format of `Struct`. + # @!attribute [rw] schema + # @return [::Google::Cloud::Asset::V1::TableSchema] + # Describes the format of the [rows]. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of the results. + # @!attribute [rw] total_rows + # @return [::Integer] + # Total rows of the whole query results. + class QueryResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BigQuery Compatible table schema. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Asset::V1::TableFieldSchema>] + # Describes the fields in a table. + class TableSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A field in TableSchema. + # @!attribute [rw] field + # @return [::String] + # The field name. The name must contain only letters (a-z, A-Z), + # numbers (0-9), or underscores (_), and must start with a letter or + # underscore. The maximum length is 128 characters. + # @!attribute [rw] type + # @return [::String] + # The field data type. Possible values include + # * STRING + # * BYTES + # * INTEGER + # * FLOAT + # * BOOLEAN + # * TIMESTAMP + # * DATE + # * TIME + # * DATETIME + # * GEOGRAPHY, + # * NUMERIC, + # * BIGNUMERIC, + # * RECORD + # (where RECORD indicates that the field contains a nested schema). + # @!attribute [rw] mode + # @return [::String] + # The field mode. Possible values include NULLABLE, REQUIRED and + # REPEATED. The default value is NULLABLE. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Asset::V1::TableFieldSchema>] + # Describes the nested schema fields if the type property is set + # to RECORD. + class TableFieldSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request message for + # {::Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies AssetService.BatchGetEffectiveIamPolicies}. + # @!attribute [rw] scope + # @return [::String] + # Required. Only IAM policies on or below the scope will be returned. + # + # This can only be an organization number (such as "organizations/123"), a + # folder number (such as "folders/123"), a project ID (such as + # "projects/my-project-id"), or a project number (such as "projects/12345"). + # + # To know how to get organization ID, visit [here + # ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # + # To know how to get folder or project ID, visit [here + # ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names refer to the [full_resource_names] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the asset types [supported by search + # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + # A maximum of 20 resources' effective policies can be retrieved in a batch. + class BatchGetEffectiveIamPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response message for + # {::Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies AssetService.BatchGetEffectiveIamPolicies}. + # @!attribute [rw] policy_results + # @return [::Array<::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy>] + # The effective policies for a batch of resources. Note that the results + # order is the same as the order of + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest#names BatchGetEffectiveIamPoliciesRequest.names}. + # When a resource does not have any effective IAM policies, its corresponding + # policy_result will contain empty + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#policies EffectiveIamPolicy.policies}. + class BatchGetEffectiveIamPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The effective IAM policies on one resource. + # @!attribute [rw] full_resource_name + # @return [::String] + # The [full_resource_name] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) + # for which the + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#policies policies} + # are computed. This is one of the + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest#names BatchGetEffectiveIamPoliciesRequest.names} + # the caller provides in the request. + # @!attribute [rw] policies + # @return [::Array<::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo>] + # The effective policies for the + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#full_resource_name full_resource_name}. + # + # These policies include the policy set on the + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#full_resource_name full_resource_name} + # and those set on its parents and ancestors up to the + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest#scope BatchGetEffectiveIamPoliciesRequest.scope}. + # Note that these policies are not filtered according to the resource type + # of the + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#full_resource_name full_resource_name}. + # + # These policies are hierarchically ordered by + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#attached_resource PolicyInfo.attached_resource} + # starting from + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#full_resource_name full_resource_name} + # itself to its parents and ancestors, such that policies[i]'s + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#attached_resource PolicyInfo.attached_resource} + # is the child of policies[i+1]'s + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#attached_resource PolicyInfo.attached_resource}, + # if policies[i+1] exists. + class EffectiveIamPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The IAM policy and its attached resource. + # @!attribute [rw] attached_resource + # @return [::String] + # The full resource name the + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#policy policy} + # is directly attached to. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # The IAM policy that's directly attached to the + # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#attached_resource attached_resource}. + class PolicyInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # This organization policy message is a modified version of the one defined in + # the Organization Policy system. This message contains several fields defined + # in the original organization policy with some new fields for analysis + # purpose. + # @!attribute [rw] attached_resource + # @return [::String] + # The [full resource name] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of + # an organization/folder/project resource where this organization policy is + # set. + # + # Notice that some type of constraints are defined with default policy. This + # field will be empty for them. + # @!attribute [rw] applied_resource + # @return [::String] + # The [full resource name] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of + # an organization/folder/project resource where this organization policy + # applies to. + # + # For any user defined org policies, this field has the same value as + # the [attached_resource] field. Only for default policy, this field has + # the different value. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicy::Rule>] + # List of rules for this organization policy. + # @!attribute [rw] inherit_from_parent + # @return [::Boolean] + # If `inherit_from_parent` is true, Rules set higher up in the + # hierarchy (up to the closest root) are inherited and present in the + # effective policy. If it is false, then no rules are inherited, and this + # policy becomes the effective root for evaluation. + # @!attribute [rw] reset + # @return [::Boolean] + # Ignores policies set above this resource and restores the default behavior + # of the constraint at this resource. + # This field can be set in policies for either list or boolean + # constraints. If set, `rules` must be empty and `inherit_from_parent` + # must be set to false. + class AnalyzerOrgPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This rule message is a customized version of the one defined in the + # Organization Policy system. In addition to the fields defined in the + # original organization policy, it contains additional field(s) under + # specific circumstances to support analysis results. + # @!attribute [rw] values + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicy::Rule::StringValues] + # List of values to be used for this policy rule. This field can be set + # only in policies for list constraints. + # + # Note: The following fields are mutually exclusive: `values`, `allow_all`, `deny_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] allow_all + # @return [::Boolean] + # Setting this to true means that all values are allowed. This field can + # be set only in Policies for list constraints. + # + # Note: The following fields are mutually exclusive: `allow_all`, `values`, `deny_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deny_all + # @return [::Boolean] + # Setting this to true means that all values are denied. This field can + # be set only in Policies for list constraints. + # + # Note: The following fields are mutually exclusive: `deny_all`, `values`, `allow_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] enforce + # @return [::Boolean] + # If `true`, then the `Policy` is enforced. If `false`, then any + # configuration is acceptable. + # This field can be set only in Policies for boolean constraints. + # + # Note: The following fields are mutually exclusive: `enforce`, `values`, `allow_all`, `deny_all`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The evaluating condition for this rule. + # @!attribute [rw] condition_evaluation + # @return [::Google::Cloud::Asset::V1::ConditionEvaluation] + # The condition evaluation result for this rule. + # Only populated if it meets all the following criteria: + # + # * There is a + # {::Google::Cloud::Asset::V1::AnalyzerOrgPolicy::Rule#condition condition} + # defined for this rule. + # * This rule is within + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer#consolidated_policy AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.consolidated_policy}, + # or + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset#consolidated_policy AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.consolidated_policy} + # when the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset} + # has + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset#governed_resource AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.governed_resource}. + class Rule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The string values for the list constraints. + # @!attribute [rw] allowed_values + # @return [::Array<::String>] + # List of values allowed at this resource. + # @!attribute [rw] denied_values + # @return [::Array<::String>] + # List of values denied at this resource. + class StringValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # The organization policy constraint definition. + # @!attribute [rw] google_defined_constraint + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::Constraint] + # The definition of the canned constraint defined by Google. + # + # Note: The following fields are mutually exclusive: `google_defined_constraint`, `custom_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_constraint + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint] + # The definition of the custom constraint. + # + # Note: The following fields are mutually exclusive: `custom_constraint`, `google_defined_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AnalyzerOrgPolicyConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The definition of a constraint. + # @!attribute [rw] name + # @return [::String] + # The unique name of the constraint. Format of the name should be + # * `constraints/{constraint_name}` + # + # For example, `constraints/compute.disableSerialPortAccess`. + # @!attribute [rw] display_name + # @return [::String] + # The human readable name of the constraint. + # @!attribute [rw] description + # @return [::String] + # Detailed description of what this `Constraint` controls as well as how + # and where it is enforced. + # @!attribute [rw] constraint_default + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::Constraint::ConstraintDefault] + # The evaluation behavior of this constraint in the absence of 'Policy'. + # @!attribute [rw] list_constraint + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::Constraint::ListConstraint] + # Defines this constraint as being a ListConstraint. + # + # Note: The following fields are mutually exclusive: `list_constraint`, `boolean_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] boolean_constraint + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::Constraint::BooleanConstraint] + # Defines this constraint as being a BooleanConstraint. + # + # Note: The following fields are mutually exclusive: `boolean_constraint`, `list_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Constraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A `Constraint` that allows or disallows a list of string values, which + # are configured by an organization's policy administrator with a `Policy`. + # @!attribute [rw] supports_in + # @return [::Boolean] + # Indicates whether values grouped into categories can be used in + # `Policy.allowed_values` and `Policy.denied_values`. For example, + # `"in:Python"` would match any value in the 'Python' group. + # @!attribute [rw] supports_under + # @return [::Boolean] + # Indicates whether subtrees of Cloud Resource Manager resource hierarchy + # can be used in `Policy.allowed_values` and `Policy.denied_values`. For + # example, `"under:folders/123"` would match any resource under the + # 'folders/123' folder. + class ListConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `Constraint` that is either enforced or not. + # + # For example a constraint `constraints/compute.disableSerialPortAccess`. + # If it is enforced on a VM instance, serial port connections will not be + # opened to that instance. + class BooleanConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the default behavior in the absence of any `Policy` for the + # `Constraint`. This must not be `CONSTRAINT_DEFAULT_UNSPECIFIED`. + module ConstraintDefault + # This is only used for distinguishing unset values and should never be + # used. + CONSTRAINT_DEFAULT_UNSPECIFIED = 0 + + # Indicate that all values are allowed for list constraints. + # Indicate that enforcement is off for boolean constraints. + ALLOW = 1 + + # Indicate that all values are denied for list constraints. + # Indicate that enforcement is on for boolean constraints. + DENY = 2 + end + end + + # The definition of a custom constraint. + # @!attribute [rw] name + # @return [::String] + # Name of the constraint. This is unique within the organization. Format of + # the name should be + # * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` + # + # Example : + # "organizations/123/customConstraints/custom.createOnlyE2TypeVms" + # @!attribute [rw] resource_types + # @return [::Array<::String>] + # The Resource Instance type on which this policy applies to. Format will + # be of the form : "/" Example: + # * `compute.googleapis.com/Instance`. + # @!attribute [rw] method_types + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType>] + # All the operations being applied for this constraint. + # @!attribute [rw] condition + # @return [::String] + # Organization Policy condition/expression. For example: + # `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or, + # `resource.management.auto_upgrade == true` + # @!attribute [rw] action_type + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType] + # Allow or deny type. + # @!attribute [rw] display_name + # @return [::String] + # One line display name for the UI. + # @!attribute [rw] description + # @return [::String] + # Detailed information about this custom policy constraint. + class CustomConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The operation in which this constraint will be applied. For example: + # If the constraint applies only when create VMs, the method_types will be + # "CREATE" only. If the constraint applied when create or delete VMs, the + # method_types will be "CREATE" and "DELETE". + module MethodType + # Unspecified. Will results in user error. + METHOD_TYPE_UNSPECIFIED = 0 + + # Constraint applied when creating the resource. + CREATE = 1 + + # Constraint applied when updating the resource. + UPDATE = 2 + + # Constraint applied when deleting the resource. + DELETE = 3 + + # Constraint applied when removing an IAM grant. + REMOVE_GRANT = 4 + + # Constraint applied when enforcing forced tagging. + GOVERN_TAGS = 5 + end + + # Allow or deny type. + module ActionType + # Unspecified. Will results in user error. + ACTION_TYPE_UNSPECIFIED = 0 + + # Allowed action type. + ALLOW = 1 + + # Deny action type. + DENY = 2 + end + end + end + + # A request message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies AssetService.AnalyzeOrgPolicies}. + # @!attribute [rw] scope + # @return [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @!attribute [rw] constraint + # @return [::String] + # Required. The name of the constraint to analyze organization policies for. + # The response only contains analyzed organization policies for the provided + # constraint. + # @!attribute [rw] filter + # @return [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results}. + # Filtering is currently available for bare literal values and the following + # fields: + # * consolidated_policy.attached_resource + # * consolidated_policy.rules.enforce + # + # When filtering by a specific field, the only supported operator is `=`. + # For example, filtering by + # consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" + # will return all the Organization Policy results attached to "folders/001". + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results} + # will contain 20 items with a maximum of 200. + # @!attribute [rw] page_token + # @return [::String] + # The pagination token to retrieve the next page. + class AnalyzeOrgPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies AssetService.AnalyzeOrgPolicies}. + # @!attribute [rw] org_policy_results + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] + # The organization policies under the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest#scope AnalyzeOrgPoliciesRequest.scope} + # with the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest#constraint AnalyzeOrgPoliciesRequest.constraint}. + # @!attribute [rw] constraint + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint] + # The definition of the constraint in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The page token to fetch the next page for + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results}. + class AnalyzeOrgPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The organization policy result to the query. + # @!attribute [rw] consolidated_policy + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicy] + # The consolidated organization policy for the analyzed resource. The + # consolidated organization policy is computed by merging and evaluating + # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult#policy_bundle policy_bundle}. + # The evaluation will respect the organization policy [hierarchy + # rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). + # @!attribute [rw] policy_bundle + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicy>] + # The ordered list of all organization policies from the + # {::Google::Cloud::Asset::V1::AnalyzerOrgPolicy#attached_resource consolidated_policy.attached_resource}. + # to the scope specified in the request. + # + # If the constraint is defined with default policy, it will also appear in + # the list. + # @!attribute [rw] project + # @return [::String] + # The project that this consolidated policy belongs to, in the format of + # projects/\\{PROJECT_NUMBER}. This field is available when the consolidated + # policy belongs to a project. + # @!attribute [rw] folders + # @return [::Array<::String>] + # The folder(s) that this consolidated policy belongs to, in the format of + # folders/\\{FOLDER_NUMBER}. This field is available when the consolidated + # policy belongs (directly or cascadingly) to one or more folders. + # @!attribute [rw] organization + # @return [::String] + # The organization that this consolidated policy belongs to, in the format + # of organizations/\\{ORGANIZATION_NUMBER}. This field is available when the + # consolidated policy belongs (directly or cascadingly) to an organization. + class OrgPolicyResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A request message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers AssetService.AnalyzeOrgPolicyGovernedContainers}. + # @!attribute [rw] scope + # @return [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. The output containers will + # also be limited to the ones governed by those in-scope organization + # policies. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @!attribute [rw] constraint + # @return [::String] + # Required. The name of the constraint to analyze governed containers for. + # The analysis only contains organization policies for the provided + # constraint. + # @!attribute [rw] filter + # @return [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers}. + # Filtering is currently available for bare literal values and the following + # fields: + # * parent + # * consolidated_policy.rules.enforce + # + # When filtering by a specific field, the only supported operator is `=`. + # For example, filtering by + # parent="//cloudresourcemanager.googleapis.com/folders/001" + # will return all the containers under "folders/001". + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers} + # will contain 100 items with a maximum of 200. + # @!attribute [rw] page_token + # @return [::String] + # The pagination token to retrieve the next page. + class AnalyzeOrgPolicyGovernedContainersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers AssetService.AnalyzeOrgPolicyGovernedContainers}. + # @!attribute [rw] governed_containers + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] + # The list of the analyzed governed containers. + # @!attribute [rw] constraint + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint] + # The definition of the constraint in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The page token to fetch the next page for + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers}. + class AnalyzeOrgPolicyGovernedContainersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The organization/folder/project resource governed by organization policies + # of + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest#constraint AnalyzeOrgPolicyGovernedContainersRequest.constraint}. + # @!attribute [rw] full_resource_name + # @return [::String] + # The [full resource name] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of + # an organization/folder/project resource. + # @!attribute [rw] parent + # @return [::String] + # The [full resource name] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of + # the parent of + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer#full_resource_name AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name}. + # @!attribute [rw] consolidated_policy + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicy] + # The consolidated organization policy for the analyzed resource. The + # consolidated organization policy is computed by merging and evaluating + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer#policy_bundle AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle}. + # The evaluation will respect the organization policy [hierarchy + # rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). + # @!attribute [rw] policy_bundle + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicy>] + # The ordered list of all organization policies from the + # {::Google::Cloud::Asset::V1::AnalyzerOrgPolicy#attached_resource consolidated_policy.attached_resource}. + # to the scope specified in the request. + # + # If the constraint is defined with default policy, it will also appear in + # the list. + # @!attribute [rw] project + # @return [::String] + # The project that this resource belongs to, in the format of + # projects/\\{PROJECT_NUMBER}. This field is available when the resource + # belongs to a project. + # @!attribute [rw] folders + # @return [::Array<::String>] + # The folder(s) that this resource belongs to, in the format of + # folders/\\{FOLDER_NUMBER}. This field is available when the resource + # belongs (directly or cascadingly) to one or more folders. + # @!attribute [rw] organization + # @return [::String] + # The organization that this resource belongs to, in the format of + # organizations/\\{ORGANIZATION_NUMBER}. This field is available when the + # resource belongs (directly or cascadingly) to an organization. + # @!attribute [rw] effective_tags + # @return [::Array<::Google::Cloud::Asset::V1::EffectiveTagDetails>] + # The effective tags on this resource. + class GovernedContainer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A request message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets AssetService.AnalyzeOrgPolicyGovernedAssets}. + # @!attribute [rw] scope + # @return [::String] + # Required. The organization to scope the request. Only organization + # policies within the scope will be analyzed. The output assets will + # also be limited to the ones governed by those in-scope organization + # policies. + # + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @!attribute [rw] constraint + # @return [::String] + # Required. The name of the constraint to analyze governed assets for. The + # analysis only contains analyzed organization policies for the provided + # constraint. + # @!attribute [rw] filter + # @return [::String] + # The expression to filter + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets}. + # + # For governed resources, filtering is currently available for bare literal + # values and the following fields: + # * governed_resource.project + # * governed_resource.folders + # * consolidated_policy.rules.enforce + # When filtering by `governed_resource.project` or + # `consolidated_policy.rules.enforce`, the only supported operator is `=`. + # When filtering by `governed_resource.folders`, the supported operators + # are `=` and `:`. + # For example, filtering by `governed_resource.project="projects/12345678"` + # will return all the governed resources under "projects/12345678", + # including the project itself if applicable. + # + # For governed IAM policies, filtering is currently available for bare + # literal values and the following fields: + # * governed_iam_policy.project + # * governed_iam_policy.folders + # * consolidated_policy.rules.enforce + # When filtering by `governed_iam_policy.project` or + # `consolidated_policy.rules.enforce`, the only supported operator is `=`. + # When filtering by `governed_iam_policy.folders`, the supported operators + # are `=` and `:`. + # For example, filtering by `governed_iam_policy.folders:"folders/12345678"` + # will return all the governed IAM policies under "folders/001". + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. If unspecified, + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets} + # will contain 100 items with a maximum of 200. + # @!attribute [rw] page_token + # @return [::String] + # The pagination token to retrieve the next page. + class AnalyzeOrgPolicyGovernedAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets AssetService.AnalyzeOrgPolicyGovernedAssets}. + # @!attribute [rw] governed_assets + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] + # The list of the analyzed governed assets. + # @!attribute [rw] constraint + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint] + # The definition of the constraint in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The page token to fetch the next page for + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets}. + class AnalyzeOrgPolicyGovernedAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The Google Cloud resources governed by the organization policies of the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. + # @!attribute [rw] full_resource_name + # @return [::String] + # The [full resource name] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of + # the Google Cloud resource. + # @!attribute [rw] parent + # @return [::String] + # The [full resource name] + # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of + # the parent of + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedResource#full_resource_name AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource.full_resource_name}. + # @!attribute [rw] project + # @return [::String] + # The project that this resource belongs to, in the format of + # projects/\\{PROJECT_NUMBER}. This field is available when the resource + # belongs to a project. + # @!attribute [rw] folders + # @return [::Array<::String>] + # The folder(s) that this resource belongs to, in the format of + # folders/\\{FOLDER_NUMBER}. This field is available when the resource + # belongs (directly or cascadingly) to one or more folders. + # @!attribute [rw] organization + # @return [::String] + # The organization that this resource belongs to, in the format of + # organizations/\\{ORGANIZATION_NUMBER}. This field is available when the + # resource belongs (directly or cascadingly) to an organization. + # @!attribute [rw] asset_type + # @return [::String] + # The asset type of the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedResource#full_resource_name AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource.full_resource_name} + # Example: + # `cloudresourcemanager.googleapis.com/Project` + # See [Cloud Asset Inventory Supported Asset + # Types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for all supported asset types. + # @!attribute [rw] effective_tags + # @return [::Array<::Google::Cloud::Asset::V1::EffectiveTagDetails>] + # The effective tags on this resource. + class GovernedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The IAM policies governed by the organization policies of the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. + # @!attribute [rw] attached_resource + # @return [::String] + # The full resource name of the resource on which this IAM policy is set. + # Example: + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + # See [Cloud Asset Inventory Resource Name + # Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # for more information. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # The IAM policy directly set on the given resource. + # @!attribute [rw] project + # @return [::String] + # The project that this IAM policy belongs to, in the format of + # projects/\\{PROJECT_NUMBER}. This field is available when the IAM policy + # belongs to a project. + # @!attribute [rw] folders + # @return [::Array<::String>] + # The folder(s) that this IAM policy belongs to, in the format of + # folders/\\{FOLDER_NUMBER}. This field is available when the IAM policy + # belongs (directly or cascadingly) to one or more folders. + # @!attribute [rw] organization + # @return [::String] + # The organization that this IAM policy belongs to, in the format of + # organizations/\\{ORGANIZATION_NUMBER}. This field is available when the + # IAM policy belongs (directly or cascadingly) to an organization. + # @!attribute [rw] asset_type + # @return [::String] + # The asset type of the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedIamPolicy#attached_resource AnalyzeOrgPolicyGovernedAssetsResponse.GovernedIamPolicy.attached_resource}. + # Example: + # `cloudresourcemanager.googleapis.com/Project` + # See [Cloud Asset Inventory Supported Asset + # Types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for all supported asset types. + class GovernedIamPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Google Cloud asset(resource or IAM policy) governed by the + # organization policies of the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. + # @!attribute [rw] governed_resource + # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedResource] + # A Google Cloud resource governed by the organization + # policies of the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. + # + # Note: The following fields are mutually exclusive: `governed_resource`, `governed_iam_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] governed_iam_policy + # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedIamPolicy] + # An IAM policy governed by the organization + # policies of the + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. + # + # Note: The following fields are mutually exclusive: `governed_iam_policy`, `governed_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] consolidated_policy + # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicy] + # The consolidated policy for the analyzed asset. The consolidated + # policy is computed by merging and evaluating + # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset#policy_bundle AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.policy_bundle}. + # The evaluation will respect the organization policy [hierarchy + # rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). + # @!attribute [rw] policy_bundle + # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicy>] + # The ordered list of all organization policies from the + # {::Google::Cloud::Asset::V1::AnalyzerOrgPolicy#attached_resource consolidated_policy.attached_resource} + # to the scope specified in the request. + # + # If the constraint is defined with default policy, it will also appear in + # the list. + class GovernedAsset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Asset content type. + module ContentType + # Unspecified content type. + CONTENT_TYPE_UNSPECIFIED = 0 + + # Resource metadata. + RESOURCE = 1 + + # The actual IAM policy set on a resource. + IAM_POLICY = 2 + + # The organization policy set on an asset. + ORG_POLICY = 4 + + # The Access Context Manager policy set on an asset. + ACCESS_POLICY = 5 + + # The runtime OS Inventory information. + OS_INVENTORY = 6 + + # The related resources. + RELATIONSHIP = 7 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/assets.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/assets.rb new file mode 100644 index 000000000000..8632a1f5f826 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/assets.rb @@ -0,0 +1,1173 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Asset + module V1 + # An asset in Google Cloud and its temporal metadata, including the time window + # when it was observed and its status during that window. + # @!attribute [rw] window + # @return [::Google::Cloud::Asset::V1::TimeWindow] + # The time window when the asset data and state was observed. + # @!attribute [rw] deleted + # @return [::Boolean] + # Whether the asset has been deleted or not. + # @!attribute [rw] asset + # @return [::Google::Cloud::Asset::V1::Asset] + # An asset in Google Cloud. + # @!attribute [rw] prior_asset_state + # @return [::Google::Cloud::Asset::V1::TemporalAsset::PriorAssetState] + # State of prior_asset. + # @!attribute [rw] prior_asset + # @return [::Google::Cloud::Asset::V1::Asset] + # Prior copy of the asset. Populated if prior_asset_state is PRESENT. + # Currently this is only set for responses in Real-Time Feed. + class TemporalAsset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of prior asset. + module PriorAssetState + # prior_asset is not applicable for the current asset. + PRIOR_ASSET_STATE_UNSPECIFIED = 0 + + # prior_asset is populated correctly. + PRESENT = 1 + + # Failed to set prior_asset. + INVALID = 2 + + # Current asset is the first known state. + DOES_NOT_EXIST = 3 + + # prior_asset is a deletion. + DELETED = 4 + end + end + + # A time window specified by its `start_time` and `end_time`. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start time of the time window (exclusive). + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End time of the time window (inclusive). If not specified, the current + # timestamp is used instead. + class TimeWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The enhanced metadata information for a resource. + # @!attribute [rw] resource_owners + # @return [::Google::Cloud::Asset::V1::ResourceOwners] + # The resource owners for a resource. + # + # Note that this field only contains the members that have "roles/owner" + # role in the resource's IAM Policy. + class AssetEnrichment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An asset in Google Cloud. An asset can be any resource in the Google Cloud + # [resource + # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + # a resource outside the Google Cloud resource hierarchy (such as Google + # Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy), + # or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship). + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update timestamp of an asset. update_time is updated when + # create/update/delete operation is performed. + # @!attribute [rw] name + # @return [::String] + # The full name of the asset. Example: + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + # + # See [Resource + # names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # for more information. + # @!attribute [rw] asset_type + # @return [::String] + # The type of the asset. Example: `compute.googleapis.com/Disk` + # + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. + # @!attribute [rw] resource + # @return [::Google::Cloud::Asset::V1::Resource] + # A representation of the resource. + # @!attribute [rw] iam_policy + # @return [::Google::Iam::V1::Policy] + # A representation of the IAM policy set on a Google Cloud resource. + # There can be a maximum of one IAM policy set on any given resource. + # In addition, IAM policies inherit their granted access scope from any + # policies set on parent resources in the resource hierarchy. Therefore, the + # effectively policy is the union of both the policy set on this resource + # and each policy set on all of the resource's ancestry resource levels in + # the hierarchy. See + # [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance) + # for more information. + # @!attribute [rw] org_policy + # @return [::Array<::Google::Cloud::OrgPolicy::V1::Policy>] + # A representation of an [organization + # policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). + # There can be more than one organization policy with different constraints + # set on a given resource. + # @!attribute [rw] access_policy + # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] + # Also refer to the [access policy user + # guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). + # + # Note: The following fields are mutually exclusive: `access_policy`, `access_level`, `service_perimeter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] access_level + # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] + # Also refer to the [access level user + # guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). + # + # Note: The following fields are mutually exclusive: `access_level`, `access_policy`, `service_perimeter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] service_perimeter + # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] + # Also refer to the [service perimeter user + # guide](https://cloud.google.com/vpc-service-controls/docs/overview). + # + # Note: The following fields are mutually exclusive: `service_perimeter`, `access_policy`, `access_level`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] os_inventory + # @return [::Google::Cloud::OsConfig::V1::Inventory] + # A representation of runtime OS Inventory information. See [this + # topic](https://cloud.google.com/compute/docs/instances/os-inventory-management) + # for more information. + # @!attribute [rw] related_assets + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Asset::V1::RelatedAssets] + # DEPRECATED. This field only presents for the purpose of + # backward-compatibility. The server will never generate responses with this + # field. + # The related assets of the asset of one relationship type. One asset + # only represents one type of relationship. + # @!attribute [rw] related_asset + # @return [::Google::Cloud::Asset::V1::RelatedAsset] + # One related asset of the current asset. + # @!attribute [rw] ancestors + # @return [::Array<::String>] + # The ancestry path of an asset in Google Cloud [resource + # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + # represented as a list of relative resource names. An ancestry path starts + # with the closest ancestor in the hierarchy and ends at root. If the asset + # is a project, folder, or organization, the ancestry path starts from the + # asset itself. + # + # Example: `["projects/123456789", "folders/5432", "organizations/1234"]` + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A representation of a Google Cloud resource. + # @!attribute [rw] version + # @return [::String] + # The API version. Example: `v1` + # @!attribute [rw] discovery_document_uri + # @return [::String] + # The URL of the discovery document containing the resource's JSON schema. + # Example: + # `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` + # + # This value is unspecified for resources that do not have an API based on a + # discovery document, such as Cloud Bigtable. + # @!attribute [rw] discovery_name + # @return [::String] + # The JSON schema name listed in the discovery document. Example: + # `Project` + # + # This value is unspecified for resources that do not have an API based on a + # discovery document, such as Cloud Bigtable. + # @!attribute [rw] resource_url + # @return [::String] + # The REST URL for accessing the resource. An HTTP `GET` request using this + # URL returns the resource itself. Example: + # `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` + # + # This value is unspecified for resources without a REST API. + # @!attribute [rw] parent + # @return [::String] + # The full name of the immediate parent of this resource. See + # [Resource + # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # for more information. + # + # For Google Cloud assets, this value is the parent resource defined in the + # [IAM policy + # hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + # Example: + # `//cloudresourcemanager.googleapis.com/projects/my_project_123` + # @!attribute [rw] data + # @return [::Google::Protobuf::Struct] + # The content of the resource, in which some sensitive fields are removed + # and may not be present. + # @!attribute [rw] location + # @return [::String] + # The location of the resource in Google Cloud, such as its zone and region. + # For more information, see https://cloud.google.com/about/locations/. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DEPRECATED. This message only presents for the purpose of + # backward-compatibility. The server will never populate this message in + # responses. + # The detailed related assets with the `relationship_type`. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] relationship_attributes + # @return [::Google::Cloud::Asset::V1::RelationshipAttributes] + # The detailed relationship attributes. + # @!attribute [rw] assets + # @return [::Array<::Google::Cloud::Asset::V1::RelatedAsset>] + # The peer resources of the relationship. + class RelatedAssets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DEPRECATED. This message only presents for the purpose of + # backward-compatibility. The server will never populate this message in + # responses. + # The relationship attributes which include `type`, `source_resource_type`, + # `target_resource_type` and `action`. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] type + # @return [::String] + # The unique identifier of the relationship type. Example: + # `INSTANCE_TO_INSTANCEGROUP` + # @!attribute [rw] source_resource_type + # @return [::String] + # The source asset type. Example: `compute.googleapis.com/Instance` + # @!attribute [rw] target_resource_type + # @return [::String] + # The target asset type. Example: `compute.googleapis.com/Disk` + # @!attribute [rw] action + # @return [::String] + # The detail of the relationship, e.g. `contains`, `attaches` + class RelationshipAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An asset identifier in Google Cloud which contains its name, type and + # ancestors. An asset can be any resource in the Google Cloud [resource + # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + # a resource outside the Google Cloud resource hierarchy (such as Google + # Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy). + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. + # @!attribute [rw] asset + # @return [::String] + # The full name of the asset. Example: + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + # + # See [Resource + # names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # for more information. + # @!attribute [rw] asset_type + # @return [::String] + # The type of the asset. Example: `compute.googleapis.com/Disk` + # + # See [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # for more information. + # @!attribute [rw] ancestors + # @return [::Array<::String>] + # The ancestors of an asset in Google Cloud [resource + # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + # represented as a list of relative resource names. An ancestry path starts + # with the closest ancestor in the hierarchy and ends at root. + # + # Example: `["projects/123456789", "folders/5432", "organizations/1234"]` + # @!attribute [rw] relationship_type + # @return [::String] + # The unique identifier of the relationship type. Example: + # `INSTANCE_TO_INSTANCEGROUP` + class RelatedAsset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The key and value for a + # [tag](https://cloud.google.com/resource-manager/docs/tags/tags-overview). + # @!attribute [rw] tag_key + # @return [::String] + # TagKey namespaced name, in the format of \\{ORG_ID}/\\{TAG_KEY_SHORT_NAME}. + # @!attribute [rw] tag_key_id + # @return [::String] + # TagKey ID, in the format of tagKeys/\\{TAG_KEY_ID}. + # @!attribute [rw] tag_value + # @return [::String] + # TagValue namespaced name, in the format of + # \\{ORG_ID}/\\{TAG_KEY_SHORT_NAME}/\\{TAG_VALUE_SHORT_NAME}. + # @!attribute [rw] tag_value_id + # @return [::String] + # TagValue ID, in the format of tagValues/\\{TAG_VALUE_ID}. + class Tag + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The effective tags and the ancestor resources from which they were inherited. + # @!attribute [rw] attached_resource + # @return [::String] + # The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the ancestor from which + # {::Google::Cloud::Asset::V1::EffectiveTagDetails#effective_tags effective_tags} + # are inherited, according to [tag + # inheritance](https://cloud.google.com/resource-manager/docs/tags/tags-overview#inheritance). + # @!attribute [rw] effective_tags + # @return [::Array<::Google::Cloud::Asset::V1::Tag>] + # The effective tags inherited from the + # {::Google::Cloud::Asset::V1::EffectiveTagDetails#attached_resource attached_resource}. + # Note that tags with the same key but different values may attach to + # resources at a different hierarchy levels. The lower hierarchy tag value + # will overwrite the higher hierarchy tag value of the same tag key. In this + # case, the tag value at the higher hierarchy level will be removed. For more + # information, see [tag + # inheritance](https://cloud.google.com/resource-manager/docs/tags/tags-overview#inheritance). + class EffectiveTagDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A result of Resource Search, containing information of a cloud resource. + # @!attribute [rw] name + # @return [::String] + # The full resource name of this resource. Example: + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + # See [Cloud Asset Inventory Resource Name + # Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # for more information. + # + # To search against the `name`: + # + # * Use a field query. Example: `name:instance1` + # * Use a free text query. Example: `instance1` + # @!attribute [rw] asset_type + # @return [::String] + # The type of this resource. Example: `compute.googleapis.com/Disk`. + # + # To search against the `asset_type`: + # + # * Specify the `asset_type` field in your search request. + # @!attribute [rw] project + # @return [::String] + # The project that this resource belongs to, in the form of + # projects/\\{PROJECT_NUMBER}. This field is available when the resource + # belongs to a project. + # + # To search against `project`: + # + # * Use a field query. Example: `project:12345` + # * Use a free text query. Example: `12345` + # * Specify the `scope` field as this project in your search request. + # @!attribute [rw] folders + # @return [::Array<::String>] + # The folder(s) that this resource belongs to, in the form of + # folders/\\{FOLDER_NUMBER}. This field is available when the resource + # belongs to one or more folders. + # + # To search against `folders`: + # + # * Use a field query. Example: `folders:(123 OR 456)` + # * Use a free text query. Example: `123` + # * Specify the `scope` field as this folder in your search request. + # @!attribute [rw] organization + # @return [::String] + # The organization that this resource belongs to, in the form of + # organizations/\\{ORGANIZATION_NUMBER}. This field is available when the + # resource belongs to an organization. + # + # To search against `organization`: + # + # * Use a field query. Example: `organization:123` + # * Use a free text query. Example: `123` + # * Specify the `scope` field as this organization in your search request. + # @!attribute [rw] display_name + # @return [::String] + # The display name of this resource. This field is available only when the + # resource's Protobuf contains it. + # + # To search against the `display_name`: + # + # * Use a field query. Example: `displayName:"My Instance"` + # * Use a free text query. Example: `"My Instance"` + # @!attribute [rw] description + # @return [::String] + # One or more paragraphs of text description of this resource. Maximum length + # could be up to 1M bytes. This field is available only when the resource's + # Protobuf contains it. + # + # To search against the `description`: + # + # * Use a field query. Example: `description:"important instance"` + # * Use a free text query. Example: `"important instance"` + # @!attribute [rw] location + # @return [::String] + # Location can be `global`, regional like `us-east1`, or zonal like + # `us-west1-b`. This field is available only when the resource's Protobuf + # contains it. + # + # To search against the `location`: + # + # * Use a field query. Example: `location:us-west*` + # * Use a free text query. Example: `us-west*` + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User labels associated with this resource. See [Labelling and grouping + # Google Cloud + # resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + # for more information. This field is available only when the resource's + # Protobuf contains it. + # + # To search against the `labels`: + # + # * Use a field query: + # - query on any label's key or value. Example: `labels:prod` + # - query by a given label. Example: `labels.env:prod` + # - query by a given label's existence. Example: `labels.env:*` + # * Use a free text query. Example: `prod` + # @!attribute [rw] network_tags + # @return [::Array<::String>] + # Network tags associated with this resource. Like labels, network tags are a + # type of annotations used to group Google Cloud resources. See [Labelling + # Google Cloud + # resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + # for more information. This field is available only when the resource's + # Protobuf contains it. + # + # To search against the `network_tags`: + # + # * Use a field query. Example: `networkTags:internal` + # * Use a free text query. Example: `internal` + # @!attribute [rw] kms_key + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # The Cloud KMS + # [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) + # name or + # [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) + # name. + # + # This field only presents for the purpose of backward compatibility. + # Use the `kms_keys` field to retrieve Cloud KMS key information. This field + # is available only when the resource's Protobuf contains it and will only be + # populated for [these resource + # types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field) + # for backward compatible purposes. + # + # To search against the `kms_key`: + # + # * Use a field query. Example: `kmsKey:key` + # * Use a free text query. Example: `key` + # @!attribute [rw] kms_keys + # @return [::Array<::String>] + # The Cloud KMS + # [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) + # names or + # [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) + # names. This field is available only when the resource's Protobuf contains + # it. + # + # To search against the `kms_keys`: + # + # * Use a field query. Example: `kmsKeys:key` + # * Use a free text query. Example: `key` + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The create timestamp of this resource, at which the resource was created. + # The granularity is in seconds. Timestamp.nanos will always be 0. This field + # is available only when the resource's Protobuf contains it. + # + # To search against `create_time`: + # + # * Use a field query. + # - value in seconds since unix epoch. Example: `createTime > 1609459200` + # - value in date string. Example: `createTime > 2021-01-01` + # - value in date-time string (must be quoted). Example: `createTime > + # "2021-01-01T00:00:00"` + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update timestamp of this resource, at which the resource was last + # modified or deleted. The granularity is in seconds. Timestamp.nanos will + # always be 0. This field is available only when the resource's Protobuf + # contains it. + # + # To search against `update_time`: + # + # * Use a field query. + # - value in seconds since unix epoch. Example: `updateTime < 1609459200` + # - value in date string. Example: `updateTime < 2021-01-01` + # - value in date-time string (must be quoted). Example: `updateTime < + # "2021-01-01T00:00:00"` + # @!attribute [rw] state + # @return [::String] + # The state of this resource. Different resources types have different state + # definitions that are mapped from various fields of different resource + # types. This field is available only when the resource's Protobuf contains + # it. + # + # Example: + # If the resource is an instance provided by Compute Engine, + # its state will include PROVISIONING, STAGING, RUNNING, STOPPING, + # SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition + # in [API + # Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). + # If the resource is a project provided by Resource Manager, its state + # will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and + # DELETE_IN_PROGRESS. See `lifecycleState` definition in [API + # Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). + # + # To search against the `state`: + # + # * Use a field query. Example: `state:RUNNING` + # * Use a free text query. Example: `RUNNING` + # @!attribute [rw] additional_attributes + # @return [::Google::Protobuf::Struct] + # The additional searchable attributes of this resource. The attributes may + # vary from one resource type to another. Examples: `projectId` for Project, + # `dnsName` for DNS ManagedZone. This field contains a subset of the resource + # metadata fields that are returned by the List or Get APIs provided by the + # corresponding Google Cloud service (e.g., Compute Engine). see [API + # references and supported searchable + # attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # to see which fields are included. + # + # You can search values of these fields through free text search. However, + # you should not consume the field programically as the field names and + # values may change as the Google Cloud service updates to a new incompatible + # API version. + # + # To search against the `additional_attributes`: + # + # * Use a free text query to match the attributes values. Example: to search + # `additional_attributes = { dnsName: "foobar" }`, you can issue a query + # `foobar`. + # @!attribute [rw] parent_full_resource_name + # @return [::String] + # The full resource name of this resource's parent, if it has one. + # To search against the `parent_full_resource_name`: + # + # * Use a field query. Example: + # `parentFullResourceName:"project-name"` + # * Use a free text query. Example: + # `project-name` + # @!attribute [rw] versioned_resources + # @return [::Array<::Google::Cloud::Asset::V1::VersionedResource>] + # Versioned resource representations of this resource. This is repeated + # because there could be multiple versions of resource representations during + # version migration. + # + # This `versioned_resources` field is not searchable. Some attributes of the + # resource representations are exposed in `additional_attributes` field, so + # as to allow users to search on them. + # @!attribute [rw] attached_resources + # @return [::Array<::Google::Cloud::Asset::V1::AttachedResource>] + # Attached resources of this resource. For example, an OSConfig + # Inventory is an attached resource of a Compute Instance. This field is + # repeated because a resource could have multiple attached resources. + # + # This `attached_resources` field is not searchable. Some attributes + # of the attached resources are exposed in `additional_attributes` field, so + # as to allow users to search on them. + # @!attribute [rw] relationships + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Asset::V1::RelatedResources}] + # A map of related resources of this resource, keyed by the + # relationship type. A relationship type is in the format of + # \\{SourceType}_\\{ACTION}_\\{DestType}. Example: `DISK_TO_INSTANCE`, + # `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`. + # See [supported relationship + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types). + # @!attribute [rw] tag_keys + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # This field is only present for the purpose of backward compatibility. + # Use the `tags` field instead. + # + # TagKey namespaced names, in the format of \\{ORG_ID}/\\{TAG_KEY_SHORT_NAME}. + # To search against the `tagKeys`: + # + # * Use a field query. Example: + # - `tagKeys:"123456789/env*"` + # - `tagKeys="123456789/env"` + # - `tagKeys:"env"` + # + # * Use a free text query. Example: + # - `env` + # @!attribute [rw] tag_values + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # This field is only present for the purpose of backward compatibility. + # Use the `tags` field instead. + # + # TagValue namespaced names, in the format of + # \\{ORG_ID}/\\{TAG_KEY_SHORT_NAME}/\\{TAG_VALUE_SHORT_NAME}. + # To search against the `tagValues`: + # + # * Use a field query. Example: + # - `tagValues:"env"` + # - `tagValues:"env/prod"` + # - `tagValues:"123456789/env/prod*"` + # - `tagValues="123456789/env/prod"` + # + # * Use a free text query. Example: + # - `prod` + # @!attribute [rw] tag_value_ids + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # This field is only present for the purpose of backward compatibility. + # Use the `tags` field instead. + # + # TagValue IDs, in the format of tagValues/\\{TAG_VALUE_ID}. + # To search against the `tagValueIds`: + # + # * Use a field query. Example: + # - `tagValueIds="tagValues/456"` + # + # * Use a free text query. Example: + # - `456` + # @!attribute [rw] tags + # @return [::Array<::Google::Cloud::Asset::V1::Tag>] + # The tags directly attached to this resource. + # + # To search against the `tags`: + # + # * Use a field query. Example: + # - `tagKeys:"123456789/env*"` + # - `tagKeys="123456789/env"` + # - `tagKeys:"env"` + # - `tagKeyIds="tagKeys/123"` + # - `tagValues:"env"` + # - `tagValues:"env/prod"` + # - `tagValues:"123456789/env/prod*"` + # - `tagValues="123456789/env/prod"` + # - `tagValueIds="tagValues/456"` + # + # * Use a free text query. Example: + # - `env/prod` + # @!attribute [rw] effective_tags + # @return [::Array<::Google::Cloud::Asset::V1::EffectiveTagDetails>] + # The effective tags on this resource. All of the tags that are both attached + # to and inherited by a resource are collectively called the effective + # tags. For more information, see [tag + # inheritance](https://cloud.google.com/resource-manager/docs/tags/tags-overview#inheritance). + # + # To search against the `effective_tags`: + # + # * Use a field query. Example: + # - `effectiveTagKeys:"123456789/env*"` + # - `effectiveTagKeys="123456789/env"` + # - `effectiveTagKeys:"env"` + # - `effectiveTagKeyIds="tagKeys/123"` + # - `effectiveTagValues:"env"` + # - `effectiveTagValues:"env/prod"` + # - `effectiveTagValues:"123456789/env/prod*"` + # - `effectiveTagValues="123456789/env/prod"` + # - `effectiveTagValueIds="tagValues/456"` + # @!attribute [rw] enrichments + # @return [::Array<::Google::Cloud::Asset::V1::AssetEnrichment>] + # Enrichments of the asset. Currently supported enrichment types with + # SearchAllResources API: + # + # * RESOURCE_OWNERS + # + # The corresponding read masks in order to get the enrichment: + # + # * enrichments.resource_owners + # + # The corresponding required permissions: + # + # * cloudasset.assets.searchEnrichmentResourceOwners + # + # Example query to get resource owner enrichment: + # ``` + # scope: "projects/my-project" + # query: "name: my-project" + # assetTypes: "cloudresourcemanager.googleapis.com/Project" + # readMask: { + # paths: "asset_type" + # paths: "name" + # paths: "enrichments.resource_owners" + # } + # ``` + # @!attribute [rw] parent_asset_type + # @return [::String] + # The type of this resource's immediate parent, if there is one. + # + # To search against the `parent_asset_type`: + # + # * Use a field query. Example: + # `parentAssetType:"cloudresourcemanager.googleapis.com/Project"` + # * Use a free text query. Example: + # `cloudresourcemanager.googleapis.com/Project` + # @!attribute [rw] scc_security_marks + # @return [::Google::Protobuf::Map{::String => ::String}] + # The actual content of Security Command Center security marks associated + # with the asset. + # + # + # To search against SCC SecurityMarks field: + # + # * Use a field query: + # - query by a given key value pair. Example: `sccSecurityMarks.foo=bar` + # - query by a given key's existence. Example: `sccSecurityMarks.foo:*` + class ResourceSearchResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Asset::V1::RelatedResources] + class RelationshipsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SccSecurityMarksEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Resource representation as defined by the corresponding service providing the + # resource for a given API version. + # @!attribute [rw] version + # @return [::String] + # API version of the resource. + # + # Example: + # If the resource is an instance provided by Compute Engine v1 API as defined + # in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`, + # version will be "v1". + # @!attribute [rw] resource + # @return [::Google::Protobuf::Struct] + # JSON representation of the resource as defined by the corresponding + # service providing this resource. + # + # Example: + # If the resource is an instance provided by Compute Engine, this field will + # contain the JSON representation of the instance as defined by Compute + # Engine: + # `https://cloud.google.com/compute/docs/reference/rest/v1/instances`. + # + # You can find the resource definition for each supported resource type in + # this table: + # `https://cloud.google.com/asset-inventory/docs/supported-asset-types` + class VersionedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Attached resource representation, which is defined by the corresponding + # service provider. It represents an attached resource's payload. + # @!attribute [rw] asset_type + # @return [::String] + # The type of this attached resource. + # + # Example: `osconfig.googleapis.com/Inventory` + # + # You can find the supported attached asset types of each resource in this + # table: + # `https://cloud.google.com/asset-inventory/docs/supported-asset-types` + # @!attribute [rw] versioned_resources + # @return [::Array<::Google::Cloud::Asset::V1::VersionedResource>] + # Versioned resource representations of this attached resource. This is + # repeated because there could be multiple versions of the attached resource + # representations during version migration. + class AttachedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The related resources of the primary resource. + # @!attribute [rw] related_resources + # @return [::Array<::Google::Cloud::Asset::V1::RelatedResource>] + # The detailed related resources of the primary resource. + class RelatedResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The detailed related resource. + # @!attribute [rw] asset_type + # @return [::String] + # The type of the asset. Example: `compute.googleapis.com/Instance` + # @!attribute [rw] full_resource_name + # @return [::String] + # The full resource name of the related resource. Example: + # `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123` + class RelatedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A result of IAM Policy search, containing information of an IAM policy. + # @!attribute [rw] resource + # @return [::String] + # The full resource name of the resource associated with this IAM policy. + # Example: + # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + # See [Cloud Asset Inventory Resource Name + # Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # for more information. + # + # To search against the `resource`: + # + # * use a field query. Example: `resource:organizations/123` + # @!attribute [rw] asset_type + # @return [::String] + # The type of the resource associated with this IAM policy. Example: + # `compute.googleapis.com/Disk`. + # + # To search against the `asset_type`: + # + # * specify the `asset_types` field in your search request. + # @!attribute [rw] project + # @return [::String] + # The project that the associated Google Cloud resource belongs to, in the + # form of projects/\\{PROJECT_NUMBER}. If an IAM policy is set on a resource + # (like VM instance, Cloud Storage bucket), the project field will indicate + # the project that contains the resource. If an IAM policy is set on a folder + # or organization, this field will be empty. + # + # To search against the `project`: + # + # * specify the `scope` field as this project in your search request. + # @!attribute [rw] folders + # @return [::Array<::String>] + # The folder(s) that the IAM policy belongs to, in the form of + # folders/\\{FOLDER_NUMBER}. This field is available when the IAM policy + # belongs to one or more folders. + # + # To search against `folders`: + # + # * use a field query. Example: `folders:(123 OR 456)` + # * use a free text query. Example: `123` + # * specify the `scope` field as this folder in your search request. + # @!attribute [rw] organization + # @return [::String] + # The organization that the IAM policy belongs to, in the form + # of organizations/\\{ORGANIZATION_NUMBER}. This field is available when the + # IAM policy belongs to an organization. + # + # To search against `organization`: + # + # * use a field query. Example: `organization:123` + # * use a free text query. Example: `123` + # * specify the `scope` field as this organization in your search request. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # The IAM policy directly set on the given resource. Note that the original + # IAM policy can contain multiple bindings. This only contains the bindings + # that match the given query. For queries that don't contain a constrain on + # policies (e.g., an empty query), this contains all the bindings. + # + # To search against the `policy` bindings: + # + # * use a field query: + # - query by the policy contained members. Example: + # `policy:amy@gmail.com` + # - query by the policy contained roles. Example: + # `policy:roles/compute.admin` + # - query by the policy contained roles' included permissions. Example: + # `policy.role.permissions:compute.instances.create` + # @!attribute [rw] explanation + # @return [::Google::Cloud::Asset::V1::IamPolicySearchResult::Explanation] + # Explanation about the IAM policy search result. It contains additional + # information to explain why the search result matches the query. + class IamPolicySearchResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Explanation about the IAM policy search result. + # @!attribute [rw] matched_permissions + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Asset::V1::IamPolicySearchResult::Explanation::Permissions}] + # The map from roles to their included permissions that match the + # permission query (i.e., a query containing `policy.role.permissions:`). + # Example: if query `policy.role.permissions:compute.disk.get` + # matches a policy binding that contains owner role, the + # matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The + # roles can also be found in the returned `policy` bindings. Note that the + # map is populated only for requests with permission queries. + class Explanation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # IAM permissions + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A list of permissions. A sample permission string: `compute.disk.get`. + class Permissions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Asset::V1::IamPolicySearchResult::Explanation::Permissions] + class MatchedPermissionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Represents the detailed state of an entity under analysis, such as a + # resource, an identity or an access. + # @!attribute [rw] code + # @return [::Google::Rpc::Code] + # The Google standard error code that best describes the state. + # For example: + # - OK means the analysis on this entity has been successfully finished; + # - PERMISSION_DENIED means an access denied error is encountered; + # - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started + # in time; + # @!attribute [rw] cause + # @return [::String] + # The human-readable description of the cause of failure. + class IamPolicyAnalysisState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The condition evaluation. + # @!attribute [rw] evaluation_value + # @return [::Google::Cloud::Asset::V1::ConditionEvaluation::EvaluationValue] + # The evaluation result. + class ConditionEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value of this expression. + module EvaluationValue + # Reserved for future use. + EVALUATION_VALUE_UNSPECIFIED = 0 + + # The evaluation result is `true`. + TRUE = 1 + + # The evaluation result is `false`. + FALSE = 2 + + # The evaluation result is `conditional` when the condition expression + # contains variables that are either missing input values or have not been + # supported by Policy Analyzer yet. + CONDITIONAL = 3 + end + end + + # IAM Policy analysis result, consisting of one IAM policy binding and derived + # access control lists. + # @!attribute [rw] attached_resource_full_name + # @return [::String] + # The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the resource to which the + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult#iam_binding iam_binding} + # policy attaches. + # @!attribute [rw] iam_binding + # @return [::Google::Iam::V1::Binding] + # The IAM policy binding under analysis. + # @!attribute [rw] access_control_lists + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::AccessControlList>] + # The access control lists derived from the + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult#iam_binding iam_binding} + # that match or potentially match resource and access selectors specified in + # the request. + # @!attribute [rw] identity_list + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::IdentityList] + # The identity list derived from members of the + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult#iam_binding iam_binding} + # that match or potentially match identity selector specified in the request. + # @!attribute [rw] fully_explored + # @return [::Boolean] + # Represents whether all analyses on the + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult#iam_binding iam_binding} + # have successfully finished. + class IamPolicyAnalysisResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A Google Cloud resource under analysis. + # @!attribute [rw] full_resource_name + # @return [::String] + # The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # @!attribute [rw] analysis_state + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisState] + # The analysis state of this resource. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An IAM role or permission under analysis. + # @!attribute [rw] role + # @return [::String] + # The role. + # + # Note: The following fields are mutually exclusive: `role`, `permission`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] permission + # @return [::String] + # The permission. + # + # Note: The following fields are mutually exclusive: `permission`, `role`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] analysis_state + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisState] + # The analysis state of this access. + class Access + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An identity under analysis. + # @!attribute [rw] name + # @return [::String] + # The identity of members, formatted as appear in an + # [IAM policy + # binding](https://cloud.google.com/iam/reference/rest/v1/Binding). For + # example, they might be formatted like the following: + # + # - user:foo@google.com + # - group:group1@google.com + # - serviceAccount:s1@prj1.iam.gserviceaccount.com + # - projectOwner:some_project_id + # - domain:google.com + # - allUsers + # @!attribute [rw] analysis_state + # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisState] + # The analysis state of this identity. + class Identity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A directional edge. + # @!attribute [rw] source_node + # @return [::String] + # The source node of the edge. For example, it could be a full resource + # name for a resource node or an email of an identity. + # @!attribute [rw] target_node + # @return [::String] + # The target node of the edge. For example, it could be a full resource + # name for a resource node or an email of an identity. + class Edge + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An access control list, derived from the above IAM policy binding, which + # contains a set of resources and accesses. May include one + # item from each set to compose an access control entry. + # + # NOTICE that there could be multiple access control lists for one IAM policy + # binding. The access control lists are created based on resource and access + # combinations. + # + # For example, assume we have the following cases in one IAM policy binding: + # - Permission P1 and P2 apply to resource R1 and R2; + # - Permission P3 applies to resource R2 and R3; + # + # This will result in the following access control lists: + # - AccessControlList 1: [R1, R2], [P1, P2] + # - AccessControlList 2: [R2, R3], [P3] + # @!attribute [rw] resources + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Resource>] + # The resources that match one of the following conditions: + # - The resource_selector, if it is specified in request; + # - Otherwise, resources reachable from the policy attached resource. + # @!attribute [rw] accesses + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Access>] + # The accesses that match one of the following conditions: + # - The access_selector, if it is specified in request; + # - Otherwise, access specifiers reachable from the policy binding's role. + # @!attribute [rw] resource_edges + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge>] + # Resource edges of the graph starting from the policy attached + # resource to any descendant resources. The + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge#source_node Edge.source_node} + # contains the full resource name of a parent resource and + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge#target_node Edge.target_node} + # contains the full resource name of a child resource. This field is + # present only if the output_resource_edges option is enabled in request. + # @!attribute [rw] condition_evaluation + # @return [::Google::Cloud::Asset::V1::ConditionEvaluation] + # Condition evaluation for this AccessControlList, if there is a condition + # defined in the above IAM policy binding. + class AccessControlList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The identities and group edges. + # @!attribute [rw] identities + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Identity>] + # Only the identities that match one of the following conditions will be + # presented: + # - The identity_selector, if it is specified in request; + # - Otherwise, identities reachable from the policy binding's members. + # @!attribute [rw] group_edges + # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge>] + # Group identity edges of the graph starting from the binding's + # group members to any node of the + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::IdentityList#identities identities}. + # The + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge#source_node Edge.source_node} + # contains a group, such as `group:parent@google.com`. The + # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge#target_node Edge.target_node} + # contains a member of the group, such as `group:child@google.com` or + # `user:foo@google.com`. This field is present only if the + # output_group_edges option is enabled in request. + class IdentityList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb new file mode 100644 index 000000000000..cdf85c94569e --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb @@ -0,0 +1,313 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module OrgPolicy + module V1 + # Defines a Cloud Organization `Policy` which is used to specify `Constraints` + # for configurations of Cloud Platform resources. + # @!attribute [rw] version + # @return [::Integer] + # Version of the `Policy`. Default version is 0; + # @!attribute [rw] constraint + # @return [::String] + # The name of the `Constraint` the `Policy` is configuring, for example, + # `constraints/serviceuser.services`. + # + # Immutable after creation. + # @!attribute [rw] etag + # @return [::String] + # An opaque tag indicating the current version of the `Policy`, used for + # concurrency control. + # + # When the `Policy` is returned from either a `GetPolicy` or a + # `ListOrgPolicy` request, this `etag` indicates the version of the current + # `Policy` to use when executing a read-modify-write loop. + # + # When the `Policy` is returned from a `GetEffectivePolicy` request, the + # `etag` will be unset. + # + # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value + # that was returned from a `GetOrgPolicy` request as part of a + # read-modify-write loop for concurrency control. Not setting the `etag`in a + # `SetOrgPolicy` request will result in an unconditional write of the + # `Policy`. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time stamp the `Policy` was previously updated. This is set by the + # server, not specified by the caller, and represents the last time a call to + # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + # be ignored. + # @!attribute [rw] list_policy + # @return [::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy] + # List of values either allowed or disallowed. + # + # Note: The following fields are mutually exclusive: `list_policy`, `boolean_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] boolean_policy + # @return [::Google::Cloud::OrgPolicy::V1::Policy::BooleanPolicy] + # For boolean `Constraints`, whether to enforce the `Constraint` or not. + # + # Note: The following fields are mutually exclusive: `boolean_policy`, `list_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] restore_default + # @return [::Google::Cloud::OrgPolicy::V1::Policy::RestoreDefault] + # Restores the default behavior of the constraint; independent of + # `Constraint` type. + # + # Note: The following fields are mutually exclusive: `restore_default`, `list_policy`, `boolean_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Used in `policy_type` to specify how `list_policy` behaves at this + # resource. + # + # `ListPolicy` can define specific values and subtrees of Cloud Resource + # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that + # are allowed or denied by setting the `allowed_values` and `denied_values` + # fields. This is achieved by using the `under:` and optional `is:` prefixes. + # The `under:` prefix is used to denote resource subtree values. + # The `is:` prefix is used to denote specific values, and is required only + # if the value contains a ":". Values prefixed with "is:" are treated the + # same as values with no prefix. + # Ancestry subtrees must be in one of the following formats: + # - "projects/", e.g. "projects/tokyo-rain-123" + # - "folders/", e.g. "folders/1234" + # - "organizations/", e.g. "organizations/1234" + # The `supports_under` field of the associated `Constraint` defines whether + # ancestry prefixes can be used. You can set `allowed_values` and + # `denied_values` in the same `Policy` if `all_values` is + # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all + # values. If `all_values` is set to either `ALLOW` or `DENY`, + # `allowed_values` and `denied_values` must be unset. + # @!attribute [rw] allowed_values + # @return [::Array<::String>] + # List of values allowed at this resource. Can only be set if `all_values` + # is set to `ALL_VALUES_UNSPECIFIED`. + # @!attribute [rw] denied_values + # @return [::Array<::String>] + # List of values denied at this resource. Can only be set if `all_values` + # is set to `ALL_VALUES_UNSPECIFIED`. + # @!attribute [rw] all_values + # @return [::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy::AllValues] + # The policy all_values state. + # @!attribute [rw] suggested_value + # @return [::String] + # Optional. The Google Cloud Console will try to default to a configuration + # that matches the value specified in this `Policy`. If `suggested_value` + # is not set, it will inherit the value specified higher in the hierarchy, + # unless `inherit_from_parent` is `false`. + # @!attribute [rw] inherit_from_parent + # @return [::Boolean] + # Determines the inheritance behavior for this `Policy`. + # + # By default, a `ListPolicy` set at a resource supercedes any `Policy` set + # anywhere up the resource hierarchy. However, if `inherit_from_parent` is + # set to `true`, then the values from the effective `Policy` of the parent + # resource are inherited, meaning the values set in this `Policy` are + # added to the values inherited up the hierarchy. + # + # Setting `Policy` hierarchies that inherit both allowed values and denied + # values isn't recommended in most circumstances to keep the configuration + # simple and understandable. However, it is possible to set a `Policy` with + # `allowed_values` set that inherits a `Policy` with `denied_values` set. + # In this case, the values that are allowed must be in `allowed_values` and + # not present in `denied_values`. + # + # For example, suppose you have a `Constraint` + # `constraints/serviceuser.services`, which has a `constraint_type` of + # `list_constraint`, and with `constraint_default` set to `ALLOW`. + # Suppose that at the Organization level, a `Policy` is applied that + # restricts the allowed API activations to \\{`E1`, `E2`}. Then, if a + # `Policy` is applied to a project below the Organization that has + # `inherit_from_parent` set to `false` and field all_values set to DENY, + # then an attempt to activate any API will be denied. + # + # The following examples demonstrate different possible layerings for + # `projects/bar` parented by `organizations/foo`: + # + # Example 1 (no inherited values): + # `organizations/foo` has a `Policy` with values: + # \\{allowed_values: "E1" allowed_values:"E2"} + # `projects/bar` has `inherit_from_parent` `false` and values: + # \\{allowed_values: "E3" allowed_values: "E4"} + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are `E3`, and `E4`. + # + # Example 2 (inherited values): + # `organizations/foo` has a `Policy` with values: + # \\{allowed_values: "E1" allowed_values:"E2"} + # `projects/bar` has a `Policy` with values: + # \\{value: "E3" value: "E4" inherit_from_parent: true} + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. + # + # Example 3 (inheriting both allowed and denied values): + # `organizations/foo` has a `Policy` with values: + # \\{allowed_values: "E1" allowed_values: "E2"} + # `projects/bar` has a `Policy` with: + # \\{denied_values: "E1"} + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The value accepted at `projects/bar` is `E2`. + # + # Example 4 (RestoreDefault): + # `organizations/foo` has a `Policy` with values: + # \\{allowed_values: "E1" allowed_values:"E2"} + # `projects/bar` has a `Policy` with values: + # \\{RestoreDefault: \\{}} + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are either all or none depending on + # the value of `constraint_default` (if `ALLOW`, all; if + # `DENY`, none). + # + # Example 5 (no policy inherits parent policy): + # `organizations/foo` has no `Policy` set. + # `projects/bar` has no `Policy` set. + # The accepted values at both levels are either all or none depending on + # the value of `constraint_default` (if `ALLOW`, all; if + # `DENY`, none). + # + # Example 6 (ListConstraint allowing all): + # `organizations/foo` has a `Policy` with values: + # \\{allowed_values: "E1" allowed_values: "E2"} + # `projects/bar` has a `Policy` with: + # \\{all: ALLOW} + # The accepted values at `organizations/foo` are `E1`, E2`. + # Any value is accepted at `projects/bar`. + # + # Example 7 (ListConstraint allowing none): + # `organizations/foo` has a `Policy` with values: + # \\{allowed_values: "E1" allowed_values: "E2"} + # `projects/bar` has a `Policy` with: + # \\{all: DENY} + # The accepted values at `organizations/foo` are `E1`, E2`. + # No value is accepted at `projects/bar`. + # + # Example 10 (allowed and denied subtrees of Resource Manager hierarchy): + # Given the following resource hierarchy + # O1->\\{F1, F2}; F1->\\{P1}; F2->\\{P2, P3}, + # `organizations/foo` has a `Policy` with values: + # \\{allowed_values: "under:organizations/O1"} + # `projects/bar` has a `Policy` with: + # \\{allowed_values: "under:projects/P3"} + # \\{denied_values: "under:folders/F2"} + # The accepted values at `organizations/foo` are `organizations/O1`, + # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, + # `projects/P3`. + # The accepted values at `projects/bar` are `organizations/O1`, + # `folders/F1`, `projects/P1`. + class ListPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This enum can be used to set `Policies` that apply to all possible + # configuration values rather than specific values in `allowed_values` or + # `denied_values`. + # + # Settting this to `ALLOW` will mean this `Policy` allows all values. + # Similarly, setting it to `DENY` will mean no values are allowed. If + # set to either `ALLOW` or `DENY, `allowed_values` and `denied_values` + # must be unset. Setting this to `ALL_VALUES_UNSPECIFIED` allows for + # setting `allowed_values` and `denied_values`. + module AllValues + # Indicates that allowed_values or denied_values must be set. + ALL_VALUES_UNSPECIFIED = 0 + + # A policy with this set allows all values. + ALLOW = 1 + + # A policy with this set denies all values. + DENY = 2 + end + end + + # Used in `policy_type` to specify how `boolean_policy` will behave at this + # resource. + # @!attribute [rw] enforced + # @return [::Boolean] + # If `true`, then the `Policy` is enforced. If `false`, then any + # configuration is acceptable. + # + # Suppose you have a `Constraint` + # `constraints/compute.disableSerialPortAccess` with `constraint_default` + # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following + # behavior: + # - If the `Policy` at this resource has enforced set to `false`, serial + # port connection attempts will be allowed. + # - If the `Policy` at this resource has enforced set to `true`, serial + # port connection attempts will be refused. + # - If the `Policy` at this resource is `RestoreDefault`, serial port + # connection attempts will be allowed. + # - If no `Policy` is set at this resource or anywhere higher in the + # resource hierarchy, serial port connection attempts will be allowed. + # - If no `Policy` is set at this resource, but one exists higher in the + # resource hierarchy, the behavior is as if the`Policy` were set at + # this resource. + # + # The following examples demonstrate the different possible layerings: + # + # Example 1 (nearest `Constraint` wins): + # `organizations/foo` has a `Policy` with: + # \\{enforced: false} + # `projects/bar` has no `Policy` set. + # The constraint at `projects/bar` and `organizations/foo` will not be + # enforced. + # + # Example 2 (enforcement gets replaced): + # `organizations/foo` has a `Policy` with: + # \\{enforced: false} + # `projects/bar` has a `Policy` with: + # \\{enforced: true} + # The constraint at `organizations/foo` is not enforced. + # The constraint at `projects/bar` is enforced. + # + # Example 3 (RestoreDefault): + # `organizations/foo` has a `Policy` with: + # \\{enforced: true} + # `projects/bar` has a `Policy` with: + # \\{RestoreDefault: \\{}} + # The constraint at `organizations/foo` is enforced. + # The constraint at `projects/bar` is not enforced, because + # `constraint_default` for the `Constraint` is `ALLOW`. + class BooleanPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Ignores policies set above this resource and restores the + # `constraint_default` enforcement behavior of the specific `Constraint` at + # this resource. + # + # Suppose that `constraint_default` is set to `ALLOW` for the + # `Constraint` `constraints/serviceuser.services`. Suppose that organization + # foo.com sets a `Policy` at their Organization resource node that restricts + # the allowed service activations to deny all service activations. They + # could then set a `Policy` with the `policy_type` `restore_default` on + # several experimental projects, restoring the `constraint_default` + # enforcement of the `Constraint` for only those projects, allowing those + # projects to have all services activated. + class RestoreDefault + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/osconfig/v1/inventory.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/osconfig/v1/inventory.rb new file mode 100644 index 000000000000..583eaf029959 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/osconfig/v1/inventory.rb @@ -0,0 +1,425 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module OsConfig + module V1 + # This API resource represents the available inventory data for a + # Compute Engine virtual machine (VM) instance at a given point in time. + # + # You can use this API resource to determine the inventory data of your VM. + # + # For more information, see [Information provided by OS inventory + # management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected). + # @!attribute [r] name + # @return [::String] + # Output only. The `Inventory` API resource name. + # + # Format: + # `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` + # @!attribute [rw] os_info + # @return [::Google::Cloud::OsConfig::V1::Inventory::OsInfo] + # Base level operating system information for the VM. + # @!attribute [rw] items + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::OsConfig::V1::Inventory::Item}] + # Inventory items related to the VM keyed by an opaque unique identifier for + # each inventory item. The identifier is unique to each distinct and + # addressable inventory item and will change, when there is a new package + # version. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the last reported inventory for the VM. + class Inventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Operating system information for the VM. + # @!attribute [rw] hostname + # @return [::String] + # The VM hostname. + # @!attribute [rw] long_name + # @return [::String] + # The operating system long name. + # For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 + # Datacenter'. + # @!attribute [rw] short_name + # @return [::String] + # The operating system short name. + # For example, 'windows' or 'debian'. + # @!attribute [rw] version + # @return [::String] + # The version of the operating system. + # @!attribute [rw] architecture + # @return [::String] + # The system architecture of the operating system. + # @!attribute [rw] kernel_version + # @return [::String] + # The kernel version of the operating system. + # @!attribute [rw] kernel_release + # @return [::String] + # The kernel release of the operating system. + # @!attribute [rw] osconfig_agent_version + # @return [::String] + # The current version of the OS Config agent running on the VM. + class OsInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single piece of inventory on a VM. + # @!attribute [rw] id + # @return [::String] + # Identifier for this item, unique across items for this VM. + # @!attribute [rw] origin_type + # @return [::Google::Cloud::OsConfig::V1::Inventory::Item::OriginType] + # The origin of this inventory item. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # When this inventory item was first detected. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # When this inventory item was last modified. + # @!attribute [rw] type + # @return [::Google::Cloud::OsConfig::V1::Inventory::Item::Type] + # The specific type of inventory, correlating to its specific details. + # @!attribute [rw] installed_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::SoftwarePackage] + # Software package present on the VM instance. + # + # Note: The following fields are mutually exclusive: `installed_package`, `available_package`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] available_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::SoftwarePackage] + # Software package available to be installed on the VM instance. + # + # Note: The following fields are mutually exclusive: `available_package`, `installed_package`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Item + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The origin of a specific inventory item. + module OriginType + # Invalid. An origin type must be specified. + ORIGIN_TYPE_UNSPECIFIED = 0 + + # This inventory item was discovered as the result of the agent + # reporting inventory via the reporting API. + INVENTORY_REPORT = 1 + end + + # The different types of inventory that are tracked on a VM. + module Type + # Invalid. An type must be specified. + TYPE_UNSPECIFIED = 0 + + # This represents a package that is installed on the VM. + INSTALLED_PACKAGE = 1 + + # This represents an update that is available for a package. + AVAILABLE_PACKAGE = 2 + end + end + + # Software package information of the operating system. + # @!attribute [rw] yum_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] + # Yum package info. + # For details about the yum package manager, see + # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. + # + # Note: The following fields are mutually exclusive: `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] apt_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] + # Details of an APT package. + # For details about the apt package manager, see + # https://wiki.debian.org/Apt. + # + # Note: The following fields are mutually exclusive: `apt_package`, `yum_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] zypper_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] + # Details of a Zypper package. + # For details about the Zypper package manager, see + # https://en.opensuse.org/SDB:Zypper_manual. + # + # Note: The following fields are mutually exclusive: `zypper_package`, `yum_package`, `apt_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] googet_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] + # Details of a Googet package. + # For details about the googet package manager, see + # https://github.com/google/googet. + # + # Note: The following fields are mutually exclusive: `googet_package`, `yum_package`, `apt_package`, `zypper_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] zypper_patch + # @return [::Google::Cloud::OsConfig::V1::Inventory::ZypperPatch] + # Details of a Zypper patch. + # For details about the Zypper package manager, see + # https://en.opensuse.org/SDB:Zypper_manual. + # + # Note: The following fields are mutually exclusive: `zypper_patch`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] wua_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::WindowsUpdatePackage] + # Details of a Windows Update package. + # See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for + # information about Windows Update. + # + # Note: The following fields are mutually exclusive: `wua_package`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] qfe_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::WindowsQuickFixEngineeringPackage] + # Details of a Windows Quick Fix engineering package. + # See + # https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + # for info in Windows Quick Fix Engineering. + # + # Note: The following fields are mutually exclusive: `qfe_package`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cos_package + # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] + # Details of a COS package. + # + # Note: The following fields are mutually exclusive: `cos_package`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] windows_application + # @return [::Google::Cloud::OsConfig::V1::Inventory::WindowsApplication] + # Details of Windows Application. + # + # Note: The following fields are mutually exclusive: `windows_application`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SoftwarePackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information related to the a standard versioned package. This includes + # package info for APT, Yum, Zypper, and Googet package managers. + # @!attribute [rw] package_name + # @return [::String] + # The name of the package. + # @!attribute [rw] architecture + # @return [::String] + # The system architecture this package is intended for. + # @!attribute [rw] version + # @return [::String] + # The version of the package. + class VersionedPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details related to a Zypper Patch. + # @!attribute [rw] patch_name + # @return [::String] + # The name of the patch. + # @!attribute [rw] category + # @return [::String] + # The category of the patch. + # @!attribute [rw] severity + # @return [::String] + # The severity specified for this patch + # @!attribute [rw] summary + # @return [::String] + # Any summary information provided about this patch. + class ZypperPatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details related to a Windows Update package. + # Field data and names are taken from Windows Update API IUpdate Interface: + # https://docs.microsoft.com/en-us/windows/win32/api/_wua/ + # Descriptive fields like title, and description are localized based on + # the locale of the VM being updated. + # @!attribute [rw] title + # @return [::String] + # The localized title of the update package. + # @!attribute [rw] description + # @return [::String] + # The localized description of the update package. + # @!attribute [rw] categories + # @return [::Array<::Google::Cloud::OsConfig::V1::Inventory::WindowsUpdatePackage::WindowsUpdateCategory>] + # The categories that are associated with this update package. + # @!attribute [rw] kb_article_ids + # @return [::Array<::String>] + # A collection of Microsoft Knowledge Base article IDs that are associated + # with the update package. + # @!attribute [rw] support_url + # @return [::String] + # A hyperlink to the language-specific support information for the update. + # @!attribute [rw] more_info_urls + # @return [::Array<::String>] + # A collection of URLs that provide more information about the update + # package. + # @!attribute [rw] update_id + # @return [::String] + # Gets the identifier of an update package. Stays the same across + # revisions. + # @!attribute [rw] revision_number + # @return [::Integer] + # The revision number of this update package. + # @!attribute [rw] last_deployment_change_time + # @return [::Google::Protobuf::Timestamp] + # The last published date of the update, in (UTC) date and time. + class WindowsUpdatePackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Categories specified by the Windows Update. + # @!attribute [rw] id + # @return [::String] + # The identifier of the windows update category. + # @!attribute [rw] name + # @return [::String] + # The name of the windows update category. + class WindowsUpdateCategory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Information related to a Quick Fix Engineering package. + # Fields are taken from Windows QuickFixEngineering Interface and match + # the source names: + # https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + # @!attribute [rw] caption + # @return [::String] + # A short textual description of the QFE update. + # @!attribute [rw] description + # @return [::String] + # A textual description of the QFE update. + # @!attribute [rw] hot_fix_id + # @return [::String] + # Unique identifier associated with a particular QFE update. + # @!attribute [rw] install_time + # @return [::Google::Protobuf::Timestamp] + # Date that the QFE update was installed. Mapped from installed_on field. + class WindowsQuickFixEngineeringPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains information about a Windows application that is retrieved from the + # Windows Registry. For more information about these fields, see: + # https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key + # @!attribute [rw] display_name + # @return [::String] + # The name of the application or product. + # @!attribute [rw] display_version + # @return [::String] + # The version of the product or application in string format. + # @!attribute [rw] publisher + # @return [::String] + # The name of the manufacturer for the product or application. + # @!attribute [rw] install_date + # @return [::Google::Type::Date] + # The last time this product received service. The value of this property + # is replaced each time a patch is applied or removed from the product or + # the command-line option is used to repair the product. + # @!attribute [rw] help_link + # @return [::String] + # The internet address for technical support. + class WindowsApplication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::OsConfig::V1::Inventory::Item] + class ItemsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A request message for getting inventory data for the specified VM. + # @!attribute [rw] name + # @return [::String] + # Required. API resource name for inventory resource. + # + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/inventory` + # + # For `{project}`, either `project-number` or `project-id` can be provided. + # For `{instance}`, either Compute Engine `instance-id` or `instance-name` + # can be provided. + # @!attribute [rw] view + # @return [::Google::Cloud::OsConfig::V1::InventoryView] + # Inventory view indicating what information should be included in the + # inventory resource. If unspecified, the default view is BASIC. + class GetInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request message for listing inventory data for all VMs in the specified + # location. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # + # Format: `projects/{project}/locations/{location}/instances/-` + # + # For `{project}`, either `project-number` or `project-id` can be provided. + # @!attribute [rw] view + # @return [::Google::Cloud::OsConfig::V1::InventoryView] + # Inventory view indicating what information should be included in the + # inventory resource. If unspecified, the default view is BASIC. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # A pagination token returned from a previous call to + # `ListInventories` that indicates where this listing + # should continue from. + # @!attribute [rw] filter + # @return [::String] + # If provided, this field specifies the criteria that must be met by a + # `Inventory` API resource to be included in the response. + class ListInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response message for listing inventory data for all VMs in a specified + # location. + # @!attribute [rw] inventories + # @return [::Array<::Google::Cloud::OsConfig::V1::Inventory>] + # List of inventory objects. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token to retrieve the next page of inventory objects. + class ListInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The view for inventory objects. + module InventoryView + # The default value. + # The API defaults to the BASIC view. + INVENTORY_VIEW_UNSPECIFIED = 0 + + # Returns the basic inventory information that includes `os_info`. + BASIC = 1 + + # Returns all fields. + FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb new file mode 100644 index 000000000000..98103f9a8eb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb new file mode 100644 index 000000000000..263cc28aa3d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb new file mode 100644 index 000000000000..b034d49fe22d --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb new file mode 100644 index 000000000000..be4e39e46ef2 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-cloud-asset-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/code.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/code.rb new file mode 100644 index 000000000000..8cf36e815510 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/code.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 Rpc + # The canonical error codes for gRPC APIs. + # + # + # Sometimes multiple error codes may apply. Services should return + # the most specific error code that applies. For example, prefer + # `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. + # Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. + module Code + # Not an error; returned on success. + # + # HTTP Mapping: 200 OK + OK = 0 + + # The operation was cancelled, typically by the caller. + # + # HTTP Mapping: 499 Client Closed Request + CANCELLED = 1 + + # Unknown error. For example, this error may be returned when + # a `Status` value received from another address space belongs to + # an error space that is not known in this address space. Also + # errors raised by APIs that do not return enough error information + # may be converted to this error. + # + # HTTP Mapping: 500 Internal Server Error + UNKNOWN = 2 + + # The client specified an invalid argument. Note that this differs + # from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments + # that are problematic regardless of the state of the system + # (e.g., a malformed file name). + # + # HTTP Mapping: 400 Bad Request + INVALID_ARGUMENT = 3 + + # The deadline expired before the operation could complete. For operations + # that change the state of the system, this error may be returned + # even if the operation has completed successfully. For example, a + # successful response from a server could have been delayed long + # enough for the deadline to expire. + # + # HTTP Mapping: 504 Gateway Timeout + DEADLINE_EXCEEDED = 4 + + # Some requested entity (e.g., file or directory) was not found. + # + # Note to server developers: if a request is denied for an entire class + # of users, such as gradual feature rollout or undocumented allowlist, + # `NOT_FOUND` may be used. If a request is denied for some users within + # a class of users, such as user-based access control, `PERMISSION_DENIED` + # must be used. + # + # HTTP Mapping: 404 Not Found + NOT_FOUND = 5 + + # The entity that a client attempted to create (e.g., file or directory) + # already exists. + # + # HTTP Mapping: 409 Conflict + ALREADY_EXISTS = 6 + + # The caller does not have permission to execute the specified + # operation. `PERMISSION_DENIED` must not be used for rejections + # caused by exhausting some resource (use `RESOURCE_EXHAUSTED` + # instead for those errors). `PERMISSION_DENIED` must not be + # used if the caller can not be identified (use `UNAUTHENTICATED` + # instead for those errors). This error code does not imply the + # request is valid or the requested entity exists or satisfies + # other pre-conditions. + # + # HTTP Mapping: 403 Forbidden + PERMISSION_DENIED = 7 + + # The request does not have valid authentication credentials for the + # operation. + # + # HTTP Mapping: 401 Unauthorized + UNAUTHENTICATED = 16 + + # Some resource has been exhausted, perhaps a per-user quota, or + # perhaps the entire file system is out of space. + # + # HTTP Mapping: 429 Too Many Requests + RESOURCE_EXHAUSTED = 8 + + # The operation was rejected because the system is not in a state + # required for the operation's execution. For example, the directory + # to be deleted is non-empty, an rmdir operation is applied to + # a non-directory, etc. + # + # Service implementors can use the following guidelines to decide + # between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: + # (a) Use `UNAVAILABLE` if the client can retry just the failing call. + # (b) Use `ABORTED` if the client should retry at a higher level. For + # example, when a client-specified test-and-set fails, indicating the + # client should restart a read-modify-write sequence. + # (c) Use `FAILED_PRECONDITION` if the client should not retry until + # the system state has been explicitly fixed. For example, if an "rmdir" + # fails because the directory is non-empty, `FAILED_PRECONDITION` + # should be returned since the client should not retry unless + # the files are deleted from the directory. + # + # HTTP Mapping: 400 Bad Request + FAILED_PRECONDITION = 9 + + # The operation was aborted, typically due to a concurrency issue such as + # a sequencer check failure or transaction abort. + # + # See the guidelines above for deciding between `FAILED_PRECONDITION`, + # `ABORTED`, and `UNAVAILABLE`. + # + # HTTP Mapping: 409 Conflict + ABORTED = 10 + + # The operation was attempted past the valid range. E.g., seeking or + # reading past end-of-file. + # + # Unlike `INVALID_ARGUMENT`, this error indicates a problem that may + # be fixed if the system state changes. For example, a 32-bit file + # system will generate `INVALID_ARGUMENT` if asked to read at an + # offset that is not in the range [0,2^32-1], but it will generate + # `OUT_OF_RANGE` if asked to read from an offset past the current + # file size. + # + # There is a fair bit of overlap between `FAILED_PRECONDITION` and + # `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific + # error) when it applies so that callers who are iterating through + # a space can easily look for an `OUT_OF_RANGE` error to detect when + # they are done. + # + # HTTP Mapping: 400 Bad Request + OUT_OF_RANGE = 11 + + # The operation is not implemented or is not supported/enabled in this + # service. + # + # HTTP Mapping: 501 Not Implemented + UNIMPLEMENTED = 12 + + # Internal errors. This means that some invariants expected by the + # underlying system have been broken. This error code is reserved + # for serious errors. + # + # HTTP Mapping: 500 Internal Server Error + INTERNAL = 13 + + # The service is currently unavailable. This is most likely a + # transient condition, which can be corrected by retrying with + # a backoff. Note that it is not always safe to retry + # non-idempotent operations. + # + # See the guidelines above for deciding between `FAILED_PRECONDITION`, + # `ABORTED`, and `UNAVAILABLE`. + # + # HTTP Mapping: 503 Service Unavailable + UNAVAILABLE = 14 + + # Unrecoverable data loss or corruption. + # + # HTTP Mapping: 500 Internal Server Error + DATA_LOSS = 15 + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..3c630675d70b --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..a52275cebf89 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/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-cloud-asset-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-asset-v1/snippets/Gemfile new file mode 100644 index 000000000000..016da50341ca --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-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-asset-v1", path: "../" +else + gem "google-cloud-asset-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-asset-v1/snippets/asset_service/analyze_iam_policy.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy.rb new file mode 100644 index 000000000000..8317b08502c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_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 cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the analyze_iam_policy call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy. +# +def analyze_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new + + # Call the analyze_iam_policy method. + result = client.analyze_iam_policy request + + # The returned object is of type Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse. + p result +end +# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy_longrunning.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy_longrunning.rb new file mode 100644 index 000000000000..da476199d159 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy_longrunning.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the analyze_iam_policy_longrunning call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning. +# +def analyze_iam_policy_longrunning + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new + + # Call the analyze_iam_policy_longrunning method. + result = client.analyze_iam_policy_longrunning request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_move.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_move.rb new file mode 100644 index 000000000000..2058f68a557e --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_move.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_AnalyzeMove_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the analyze_move call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#analyze_move. +# +def analyze_move + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::AnalyzeMoveRequest.new + + # Call the analyze_move method. + result = client.analyze_move request + + # The returned object is of type Google::Cloud::Asset::V1::AnalyzeMoveResponse. + p result +end +# [END cloudasset_v1_generated_AssetService_AnalyzeMove_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policies.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policies.rb new file mode 100644 index 000000000000..2dfbc70eb98f --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_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 cloudasset_v1_generated_AssetService_AnalyzeOrgPolicies_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the analyze_org_policies call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies. +# +def analyze_org_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new + + # Call the analyze_org_policies method. + result = client.analyze_org_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::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult. + p item + end +end +# [END cloudasset_v1_generated_AssetService_AnalyzeOrgPolicies_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_assets.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_assets.rb new file mode 100644 index 000000000000..8a63275fb823 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedAssets_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the analyze_org_policy_governed_assets call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets. +# +def analyze_org_policy_governed_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new + + # Call the analyze_org_policy_governed_assets method. + result = client.analyze_org_policy_governed_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset. + p item + end +end +# [END cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedAssets_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_containers.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_containers.rb new file mode 100644 index 000000000000..473b472ff343 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_containers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedContainers_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the analyze_org_policy_governed_containers call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers. +# +def analyze_org_policy_governed_containers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new + + # Call the analyze_org_policy_governed_containers method. + result = client.analyze_org_policy_governed_containers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer. + p item + end +end +# [END cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedContainers_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_assets_history.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_assets_history.rb new file mode 100644 index 000000000000..1c6fe8fa2fc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_assets_history.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the batch_get_assets_history call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#batch_get_assets_history. +# +def batch_get_assets_history + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new + + # Call the batch_get_assets_history method. + result = client.batch_get_assets_history request + + # The returned object is of type Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse. + p result +end +# [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_effective_iam_policies.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_effective_iam_policies.rb new file mode 100644 index 000000000000..2b4a4fc1cf5d --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_effective_iam_policies.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the batch_get_effective_iam_policies call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies. +# +def batch_get_effective_iam_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new + + # Call the batch_get_effective_iam_policies method. + result = client.batch_get_effective_iam_policies request + + # The returned object is of type Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse. + p result +end +# [END cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_feed.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_feed.rb new file mode 100644 index 000000000000..bfe499e41160 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_feed.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_CreateFeed_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the create_feed call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#create_feed. +# +def create_feed + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::CreateFeedRequest.new + + # Call the create_feed method. + result = client.create_feed request + + # The returned object is of type Google::Cloud::Asset::V1::Feed. + p result +end +# [END cloudasset_v1_generated_AssetService_CreateFeed_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_saved_query.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_saved_query.rb new file mode 100644 index 000000000000..3e607840bc4e --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_saved_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 cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the create_saved_query call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#create_saved_query. +# +def create_saved_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::CreateSavedQueryRequest.new + + # Call the create_saved_query method. + result = client.create_saved_query request + + # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + p result +end +# [END cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_feed.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_feed.rb new file mode 100644 index 000000000000..b881f0e713c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_feed.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_DeleteFeed_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the delete_feed call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#delete_feed. +# +def delete_feed + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::DeleteFeedRequest.new + + # Call the delete_feed method. + result = client.delete_feed request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudasset_v1_generated_AssetService_DeleteFeed_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_saved_query.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_saved_query.rb new file mode 100644 index 000000000000..478f2f3a23f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_saved_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 cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the delete_saved_query call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#delete_saved_query. +# +def delete_saved_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new + + # Call the delete_saved_query method. + result = client.delete_saved_query request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/export_assets.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/export_assets.rb new file mode 100644 index 000000000000..4e287d8e3537 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/export_assets.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_ExportAssets_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the export_assets call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#export_assets. +# +def export_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::ExportAssetsRequest.new + + # Call the export_assets method. + result = client.export_assets request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudasset_v1_generated_AssetService_ExportAssets_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_feed.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_feed.rb new file mode 100644 index 000000000000..927394ec22c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_feed.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_GetFeed_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the get_feed call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#get_feed. +# +def get_feed + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::GetFeedRequest.new + + # Call the get_feed method. + result = client.get_feed request + + # The returned object is of type Google::Cloud::Asset::V1::Feed. + p result +end +# [END cloudasset_v1_generated_AssetService_GetFeed_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_saved_query.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_saved_query.rb new file mode 100644 index 000000000000..dbcbe2aed600 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_saved_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 cloudasset_v1_generated_AssetService_GetSavedQuery_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the get_saved_query call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#get_saved_query. +# +def get_saved_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::GetSavedQueryRequest.new + + # Call the get_saved_query method. + result = client.get_saved_query request + + # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + p result +end +# [END cloudasset_v1_generated_AssetService_GetSavedQuery_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_assets.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_assets.rb new file mode 100644 index 000000000000..95904aa790a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_ListAssets_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the list_assets call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#list_assets. +# +def list_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::ListAssetsRequest.new + + # Call the list_assets method. + result = client.list_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Asset::V1::Asset. + p item + end +end +# [END cloudasset_v1_generated_AssetService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_feeds.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_feeds.rb new file mode 100644 index 000000000000..851f2fdf0355 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_feeds.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_ListFeeds_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the list_feeds call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#list_feeds. +# +def list_feeds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::ListFeedsRequest.new + + # Call the list_feeds method. + result = client.list_feeds request + + # The returned object is of type Google::Cloud::Asset::V1::ListFeedsResponse. + p result +end +# [END cloudasset_v1_generated_AssetService_ListFeeds_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_saved_queries.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_saved_queries.rb new file mode 100644 index 000000000000..26f0bc586a38 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_saved_queries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_ListSavedQueries_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the list_saved_queries call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#list_saved_queries. +# +def list_saved_queries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::ListSavedQueriesRequest.new + + # Call the list_saved_queries method. + result = client.list_saved_queries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Asset::V1::SavedQuery. + p item + end +end +# [END cloudasset_v1_generated_AssetService_ListSavedQueries_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/query_assets.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/query_assets.rb new file mode 100644 index 000000000000..3139d5fabbe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/query_assets.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_QueryAssets_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the query_assets call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#query_assets. +# +def query_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::QueryAssetsRequest.new + + # Call the query_assets method. + result = client.query_assets request + + # The returned object is of type Google::Cloud::Asset::V1::QueryAssetsResponse. + p result +end +# [END cloudasset_v1_generated_AssetService_QueryAssets_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_iam_policies.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_iam_policies.rb new file mode 100644 index 000000000000..24e36f119cda --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_iam_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 cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the search_all_iam_policies call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#search_all_iam_policies. +# +def search_all_iam_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new + + # Call the search_all_iam_policies method. + result = client.search_all_iam_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::Cloud::Asset::V1::IamPolicySearchResult. + p item + end +end +# [END cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_resources.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_resources.rb new file mode 100644 index 000000000000..dbf8eb79bf0b --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_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 cloudasset_v1_generated_AssetService_SearchAllResources_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the search_all_resources call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#search_all_resources. +# +def search_all_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::SearchAllResourcesRequest.new + + # Call the search_all_resources method. + result = client.search_all_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::Asset::V1::ResourceSearchResult. + p item + end +end +# [END cloudasset_v1_generated_AssetService_SearchAllResources_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_feed.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_feed.rb new file mode 100644 index 000000000000..677f83d06d0a --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_feed.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudasset_v1_generated_AssetService_UpdateFeed_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the update_feed call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#update_feed. +# +def update_feed + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::UpdateFeedRequest.new + + # Call the update_feed method. + result = client.update_feed request + + # The returned object is of type Google::Cloud::Asset::V1::Feed. + p result +end +# [END cloudasset_v1_generated_AssetService_UpdateFeed_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_saved_query.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_saved_query.rb new file mode 100644 index 000000000000..99b68ac1455b --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_saved_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 cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] +require "google/cloud/asset/v1" + +## +# Snippet for the update_saved_query call in the AssetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Asset::V1::AssetService::Client#update_saved_query. +# +def update_saved_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Asset::V1::AssetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new + + # Call the update_saved_query method. + result = client.update_saved_query request + + # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. + p result +end +# [END cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json b/owl-bot-staging/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json new file mode 100644 index 000000000000..e68fe106d181 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json @@ -0,0 +1,935 @@ +{ + "client_library": { + "name": "google-cloud-asset-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.asset.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudasset_v1_generated_AssetService_ExportAssets_sync", + "title": "Snippet for the export_assets call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#export_assets.", + "file": "asset_service/export_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_assets", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#export_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::ExportAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "ExportAssets", + "full_name": "google.cloud.asset.v1.AssetService.ExportAssets", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_ListAssets_sync", + "title": "Snippet for the list_assets call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#list_assets.", + "file": "asset_service/list_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assets", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#list_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::ListAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::ListAssetsResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "ListAssets", + "full_name": "google.cloud.asset.v1.AssetService.ListAssets", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync", + "title": "Snippet for the batch_get_assets_history call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#batch_get_assets_history.", + "file": "asset_service/batch_get_assets_history.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_get_assets_history", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#batch_get_assets_history", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "BatchGetAssetsHistory", + "full_name": "google.cloud.asset.v1.AssetService.BatchGetAssetsHistory", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_CreateFeed_sync", + "title": "Snippet for the create_feed call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#create_feed.", + "file": "asset_service/create_feed.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_feed", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#create_feed", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::CreateFeedRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::Feed", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "CreateFeed", + "full_name": "google.cloud.asset.v1.AssetService.CreateFeed", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_GetFeed_sync", + "title": "Snippet for the get_feed call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#get_feed.", + "file": "asset_service/get_feed.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_feed", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#get_feed", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::GetFeedRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::Feed", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "GetFeed", + "full_name": "google.cloud.asset.v1.AssetService.GetFeed", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_ListFeeds_sync", + "title": "Snippet for the list_feeds call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#list_feeds.", + "file": "asset_service/list_feeds.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_feeds", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#list_feeds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::ListFeedsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::ListFeedsResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "ListFeeds", + "full_name": "google.cloud.asset.v1.AssetService.ListFeeds", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_UpdateFeed_sync", + "title": "Snippet for the update_feed call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#update_feed.", + "file": "asset_service/update_feed.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_feed", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#update_feed", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::UpdateFeedRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::Feed", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "UpdateFeed", + "full_name": "google.cloud.asset.v1.AssetService.UpdateFeed", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_DeleteFeed_sync", + "title": "Snippet for the delete_feed call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#delete_feed.", + "file": "asset_service/delete_feed.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_feed", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#delete_feed", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::DeleteFeedRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "DeleteFeed", + "full_name": "google.cloud.asset.v1.AssetService.DeleteFeed", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_SearchAllResources_sync", + "title": "Snippet for the search_all_resources call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#search_all_resources.", + "file": "asset_service/search_all_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_all_resources", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#search_all_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::SearchAllResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::SearchAllResourcesResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "SearchAllResources", + "full_name": "google.cloud.asset.v1.AssetService.SearchAllResources", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync", + "title": "Snippet for the search_all_iam_policies call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#search_all_iam_policies.", + "file": "asset_service/search_all_iam_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_all_iam_policies", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#search_all_iam_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "SearchAllIamPolicies", + "full_name": "google.cloud.asset.v1.AssetService.SearchAllIamPolicies", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync", + "title": "Snippet for the analyze_iam_policy call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy.", + "file": "asset_service/analyze_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "analyze_iam_policy", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "AnalyzeIamPolicy", + "full_name": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicy", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync", + "title": "Snippet for the analyze_iam_policy_longrunning call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning.", + "file": "asset_service/analyze_iam_policy_longrunning.rb", + "language": "RUBY", + "client_method": { + "short_name": "analyze_iam_policy_longrunning", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "AnalyzeIamPolicyLongrunning", + "full_name": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeMove_sync", + "title": "Snippet for the analyze_move call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_move.", + "file": "asset_service/analyze_move.rb", + "language": "RUBY", + "client_method": { + "short_name": "analyze_move", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_move", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::AnalyzeMoveRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::AnalyzeMoveResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "AnalyzeMove", + "full_name": "google.cloud.asset.v1.AssetService.AnalyzeMove", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_QueryAssets_sync", + "title": "Snippet for the query_assets call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#query_assets.", + "file": "asset_service/query_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_assets", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#query_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::QueryAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::QueryAssetsResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "QueryAssets", + "full_name": "google.cloud.asset.v1.AssetService.QueryAssets", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_sync", + "title": "Snippet for the create_saved_query call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#create_saved_query.", + "file": "asset_service/create_saved_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_saved_query", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#create_saved_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::CreateSavedQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::SavedQuery", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "CreateSavedQuery", + "full_name": "google.cloud.asset.v1.AssetService.CreateSavedQuery", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_GetSavedQuery_sync", + "title": "Snippet for the get_saved_query call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#get_saved_query.", + "file": "asset_service/get_saved_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_saved_query", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#get_saved_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::GetSavedQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::SavedQuery", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "GetSavedQuery", + "full_name": "google.cloud.asset.v1.AssetService.GetSavedQuery", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_ListSavedQueries_sync", + "title": "Snippet for the list_saved_queries call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#list_saved_queries.", + "file": "asset_service/list_saved_queries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_saved_queries", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#list_saved_queries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::ListSavedQueriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::ListSavedQueriesResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "ListSavedQueries", + "full_name": "google.cloud.asset.v1.AssetService.ListSavedQueries", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync", + "title": "Snippet for the update_saved_query call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#update_saved_query.", + "file": "asset_service/update_saved_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_saved_query", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#update_saved_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::UpdateSavedQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::SavedQuery", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "UpdateSavedQuery", + "full_name": "google.cloud.asset.v1.AssetService.UpdateSavedQuery", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync", + "title": "Snippet for the delete_saved_query call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#delete_saved_query.", + "file": "asset_service/delete_saved_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_saved_query", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#delete_saved_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::DeleteSavedQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "DeleteSavedQuery", + "full_name": "google.cloud.asset.v1.AssetService.DeleteSavedQuery", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync", + "title": "Snippet for the batch_get_effective_iam_policies call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies.", + "file": "asset_service/batch_get_effective_iam_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_get_effective_iam_policies", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "BatchGetEffectiveIamPolicies", + "full_name": "google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeOrgPolicies_sync", + "title": "Snippet for the analyze_org_policies call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies.", + "file": "asset_service/analyze_org_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "analyze_org_policies", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "AnalyzeOrgPolicies", + "full_name": "google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedContainers_sync", + "title": "Snippet for the analyze_org_policy_governed_containers call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers.", + "file": "asset_service/analyze_org_policy_governed_containers.rb", + "language": "RUBY", + "client_method": { + "short_name": "analyze_org_policy_governed_containers", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "AnalyzeOrgPolicyGovernedContainers", + "full_name": "google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedAssets_sync", + "title": "Snippet for the analyze_org_policy_governed_assets call in the AssetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets.", + "file": "asset_service/analyze_org_policy_governed_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "analyze_org_policy_governed_assets", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse", + "client": { + "short_name": "AssetService::Client", + "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" + }, + "method": { + "short_name": "AnalyzeOrgPolicyGovernedAssets", + "full_name": "google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets", + "service": { + "short_name": "AssetService", + "full_name": "google.cloud.asset.v1.AssetService" + } + } + }, + "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-asset-v1/test/google/cloud/asset/v1/asset_service_operations_test.rb b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_operations_test.rb new file mode 100644 index 000000000000..20f323f4e53d --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/asset/v1/asset_service_pb" +require "google/cloud/asset/v1/asset_service_services_pb" +require "google/cloud/asset/v1/asset_service" + +class ::Google::Cloud::Asset::V1::AssetService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Asset::V1::AssetService::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::Asset::V1::AssetService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_paths_test.rb b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_paths_test.rb new file mode 100644 index 000000000000..9a032c5309f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_paths_test.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/asset/v1/asset_service" + +class ::Google::Cloud::Asset::V1::AssetService::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_feed_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.feed_path project: "value0", feed: "value1" + assert_equal "projects/value0/feeds/value1", path + + path = client.feed_path folder: "value0", feed: "value1" + assert_equal "folders/value0/feeds/value1", path + + path = client.feed_path organization: "value0", feed: "value1" + assert_equal "organizations/value0/feeds/value1", path + end + end + + def test_folder_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_path folder: "value0" + assert_equal "folders/value0", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", 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::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_saved_query_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.saved_query_path project: "value0", saved_query: "value1" + assert_equal "projects/value0/savedQueries/value1", path + + path = client.saved_query_path folder: "value0", saved_query: "value1" + assert_equal "folders/value0/savedQueries/value1", path + + path = client.saved_query_path organization: "value0", saved_query: "value1" + assert_equal "organizations/value0/savedQueries/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_rest_test.rb b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_rest_test.rb new file mode 100644 index 000000000000..7934fd46b9ba --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_rest_test.rb @@ -0,0 +1,1401 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/asset/v1/asset_service_pb" +require "google/cloud/asset/v1/asset_service/rest" + + +class ::Google::Cloud::Asset::V1::AssetService::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_export_assets + # Create test objects. + 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" + read_time = {} + asset_types = ["hello world"] + content_type = :CONTENT_TYPE_UNSPECIFIED + output_config = {} + relationship_types = ["hello world"] + + export_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_export_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_assets_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_assets parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_assets ::Google::Cloud::Asset::V1::ExportAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_assets(::Google::Cloud::Asset::V1::ExportAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_assets_client_stub.call_count + end + end + end + + def test_list_assets + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::ListAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_time = {} + asset_types = ["hello world"] + content_type = :CONTENT_TYPE_UNSPECIFIED + page_size = 42 + page_token = "hello world" + relationship_types = ["hello world"] + + list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_assets parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Asset::V1::ListAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Asset::V1::ListAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_count + end + end + end + + def test_batch_get_assets_history + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset_names = ["hello world"] + content_type = :CONTENT_TYPE_UNSPECIFIED + read_time_window = {} + relationship_types = ["hello world"] + + batch_get_assets_history_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_batch_get_assets_history_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_get_assets_history_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_get_assets_history({ parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_get_assets_history parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_get_assets_history ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new(parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_get_assets_history({ parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_get_assets_history(::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new(parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_get_assets_history_client_stub.call_count + end + end + end + + def test_create_feed + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::Feed.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + feed_id = "hello world" + feed = {} + + create_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_create_feed_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_feed_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_feed({ parent: parent, feed_id: feed_id, feed: feed }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_feed parent: parent, feed_id: feed_id, feed: feed do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_feed ::Google::Cloud::Asset::V1::CreateFeedRequest.new(parent: parent, feed_id: feed_id, feed: feed) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_feed({ parent: parent, feed_id: feed_id, feed: feed }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_feed(::Google::Cloud::Asset::V1::CreateFeedRequest.new(parent: parent, feed_id: feed_id, feed: feed), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_feed_client_stub.call_count + end + end + end + + def test_get_feed + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::Feed.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_get_feed_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_feed_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_feed({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_feed name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_feed ::Google::Cloud::Asset::V1::GetFeedRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_feed({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_feed(::Google::Cloud::Asset::V1::GetFeedRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_feed_client_stub.call_count + end + end + end + + def test_list_feeds + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::ListFeedsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_feeds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_list_feeds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_feeds_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_feeds({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_feeds parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_feeds ::Google::Cloud::Asset::V1::ListFeedsRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_feeds({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_feeds(::Google::Cloud::Asset::V1::ListFeedsRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_feeds_client_stub.call_count + end + end + end + + def test_update_feed + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::Feed.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + feed = {} + update_mask = {} + + update_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_update_feed_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_feed_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_feed({ feed: feed, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_feed feed: feed, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_feed ::Google::Cloud::Asset::V1::UpdateFeedRequest.new(feed: feed, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_feed({ feed: feed, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_feed(::Google::Cloud::Asset::V1::UpdateFeedRequest.new(feed: feed, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_feed_client_stub.call_count + end + end + end + + def test_delete_feed + # 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_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_delete_feed_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_feed_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_feed({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_feed name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_feed ::Google::Cloud::Asset::V1::DeleteFeedRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_feed({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_feed(::Google::Cloud::Asset::V1::DeleteFeedRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_feed_client_stub.call_count + end + end + end + + def test_search_all_resources + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::SearchAllResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + query = "hello world" + asset_types = ["hello world"] + page_size = 42 + page_token = "hello world" + order_by = "hello world" + read_mask = {} + + search_all_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::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_search_all_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_all_resources_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_all_resources({ scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_all_resources scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_all_resources ::Google::Cloud::Asset::V1::SearchAllResourcesRequest.new(scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_all_resources({ scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_all_resources(::Google::Cloud::Asset::V1::SearchAllResourcesRequest.new(scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_all_resources_client_stub.call_count + end + end + end + + def test_search_all_iam_policies + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + asset_types = ["hello world"] + order_by = "hello world" + + search_all_iam_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_search_all_iam_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_all_iam_policies_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_all_iam_policies({ scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_all_iam_policies scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_all_iam_policies ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new(scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_all_iam_policies({ scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_all_iam_policies(::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new(scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_all_iam_policies_client_stub.call_count + end + end + end + + def test_analyze_iam_policy + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + analysis_query = {} + saved_analysis_query = "hello world" + execution_timeout = {} + + analyze_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, analyze_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.analyze_iam_policy({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.analyze_iam_policy analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.analyze_iam_policy ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.analyze_iam_policy({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.analyze_iam_policy(::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, analyze_iam_policy_client_stub.call_count + end + end + end + + def test_analyze_iam_policy_longrunning + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + analysis_query = {} + saved_analysis_query = "hello world" + output_config = {} + + analyze_iam_policy_longrunning_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_iam_policy_longrunning_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, analyze_iam_policy_longrunning_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.analyze_iam_policy_longrunning({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.analyze_iam_policy_longrunning analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.analyze_iam_policy_longrunning ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.analyze_iam_policy_longrunning({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.analyze_iam_policy_longrunning(::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, analyze_iam_policy_longrunning_client_stub.call_count + end + end + end + + def test_analyze_move + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::AnalyzeMoveResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + destination_parent = "hello world" + view = :ANALYSIS_VIEW_UNSPECIFIED + + analyze_move_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_move_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, analyze_move_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.analyze_move({ resource: resource, destination_parent: destination_parent, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.analyze_move resource: resource, destination_parent: destination_parent, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.analyze_move ::Google::Cloud::Asset::V1::AnalyzeMoveRequest.new(resource: resource, destination_parent: destination_parent, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.analyze_move({ resource: resource, destination_parent: destination_parent, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.analyze_move(::Google::Cloud::Asset::V1::AnalyzeMoveRequest.new(resource: resource, destination_parent: destination_parent, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, analyze_move_client_stub.call_count + end + end + end + + def test_query_assets + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::QueryAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + statement = "hello world" + page_size = 42 + page_token = "hello world" + timeout = {} + read_time_window = {} + output_config = {} + + query_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_query_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_assets_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_assets({ parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_assets parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_assets ::Google::Cloud::Asset::V1::QueryAssetsRequest.new(parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_assets({ parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_assets(::Google::Cloud::Asset::V1::QueryAssetsRequest.new(parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_assets_client_stub.call_count + end + end + end + + def test_create_saved_query + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::SavedQuery.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + saved_query = {} + saved_query_id = "hello world" + + create_saved_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_create_saved_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_saved_query_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_saved_query({ parent: parent, saved_query: saved_query, saved_query_id: saved_query_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_saved_query parent: parent, saved_query: saved_query, saved_query_id: saved_query_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_saved_query ::Google::Cloud::Asset::V1::CreateSavedQueryRequest.new(parent: parent, saved_query: saved_query, saved_query_id: saved_query_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_saved_query({ parent: parent, saved_query: saved_query, saved_query_id: saved_query_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_saved_query(::Google::Cloud::Asset::V1::CreateSavedQueryRequest.new(parent: parent, saved_query: saved_query, saved_query_id: saved_query_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_saved_query_client_stub.call_count + end + end + end + + def test_get_saved_query + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::SavedQuery.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_saved_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_get_saved_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_saved_query_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_saved_query({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_saved_query name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_saved_query ::Google::Cloud::Asset::V1::GetSavedQueryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_saved_query({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_saved_query(::Google::Cloud::Asset::V1::GetSavedQueryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_saved_query_client_stub.call_count + end + end + end + + def test_list_saved_queries + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::ListSavedQueriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_saved_queries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_list_saved_queries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_saved_queries_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_saved_queries({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_saved_queries parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_saved_queries ::Google::Cloud::Asset::V1::ListSavedQueriesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_saved_queries({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_saved_queries(::Google::Cloud::Asset::V1::ListSavedQueriesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_saved_queries_client_stub.call_count + end + end + end + + def test_update_saved_query + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::SavedQuery.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + saved_query = {} + update_mask = {} + + update_saved_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_update_saved_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_saved_query_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_saved_query({ saved_query: saved_query, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_saved_query saved_query: saved_query, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_saved_query ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new(saved_query: saved_query, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_saved_query({ saved_query: saved_query, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_saved_query(::Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new(saved_query: saved_query, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_saved_query_client_stub.call_count + end + end + end + + def test_delete_saved_query + # 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_saved_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_delete_saved_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_saved_query_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_saved_query({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_saved_query name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_saved_query ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_saved_query({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_saved_query(::Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_saved_query_client_stub.call_count + end + end + end + + def test_batch_get_effective_iam_policies + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + names = ["hello world"] + + batch_get_effective_iam_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_batch_get_effective_iam_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_get_effective_iam_policies_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_get_effective_iam_policies({ scope: scope, names: names }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_get_effective_iam_policies scope: scope, names: names do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_get_effective_iam_policies ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new(scope: scope, names: names) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_get_effective_iam_policies({ scope: scope, names: names }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_get_effective_iam_policies(::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new(scope: scope, names: names), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_get_effective_iam_policies_client_stub.call_count + end + end + end + + def test_analyze_org_policies + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + constraint = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + analyze_org_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_org_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, analyze_org_policies_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.analyze_org_policies({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.analyze_org_policies scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.analyze_org_policies ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.analyze_org_policies({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.analyze_org_policies(::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, analyze_org_policies_client_stub.call_count + end + end + end + + def test_analyze_org_policy_governed_containers + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + constraint = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + analyze_org_policy_governed_containers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_org_policy_governed_containers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, analyze_org_policy_governed_containers_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.analyze_org_policy_governed_containers({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.analyze_org_policy_governed_containers scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.analyze_org_policy_governed_containers ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.analyze_org_policy_governed_containers({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.analyze_org_policy_governed_containers(::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, analyze_org_policy_governed_containers_client_stub.call_count + end + end + end + + def test_analyze_org_policy_governed_assets + # Create test objects. + client_result = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + constraint = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + analyze_org_policy_governed_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_org_policy_governed_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, analyze_org_policy_governed_assets_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.analyze_org_policy_governed_assets({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.analyze_org_policy_governed_assets scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.analyze_org_policy_governed_assets ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.analyze_org_policy_governed_assets({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.analyze_org_policy_governed_assets(::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, analyze_org_policy_governed_assets_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::Asset::V1::AssetService::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::Asset::V1::AssetService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb new file mode 100644 index 000000000000..e30ee04961cb --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb @@ -0,0 +1,1622 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/asset/v1/asset_service_pb" +require "google/cloud/asset/v1/asset_service" + +class ::Google::Cloud::Asset::V1::AssetService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_export_assets + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_time = {} + asset_types = ["hello world"] + content_type = :CONTENT_TYPE_UNSPECIFIED + output_config = {} + relationship_types = ["hello world"] + + export_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_assets, name + assert_kind_of ::Google::Cloud::Asset::V1::ExportAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal ["hello world"], request["asset_types"] + assert_equal :CONTENT_TYPE_UNSPECIFIED, request["content_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::OutputConfig), request["output_config"] + assert_equal ["hello world"], request["relationship_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_assets_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_assets parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_assets ::Google::Cloud::Asset::V1::ExportAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_assets(::Google::Cloud::Asset::V1::ExportAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_assets_client_stub.call_rpc_count + end + end + + def test_list_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::ListAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_time = {} + asset_types = ["hello world"] + content_type = :CONTENT_TYPE_UNSPECIFIED + page_size = 42 + page_token = "hello world" + relationship_types = ["hello world"] + + list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assets, name + assert_kind_of ::Google::Cloud::Asset::V1::ListAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal ["hello world"], request["asset_types"] + assert_equal :CONTENT_TYPE_UNSPECIFIED, request["content_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal ["hello world"], request["relationship_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_assets parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Asset::V1::ListAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Asset::V1::ListAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_rpc_count + end + end + + def test_batch_get_assets_history + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset_names = ["hello world"] + content_type = :CONTENT_TYPE_UNSPECIFIED + read_time_window = {} + relationship_types = ["hello world"] + + batch_get_assets_history_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_get_assets_history, name + assert_kind_of ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["asset_names"] + assert_equal :CONTENT_TYPE_UNSPECIFIED, request["content_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::TimeWindow), request["read_time_window"] + assert_equal ["hello world"], request["relationship_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_get_assets_history_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_get_assets_history({ parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_get_assets_history parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_get_assets_history ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new(parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_get_assets_history({ parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_get_assets_history(::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new(parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_get_assets_history_client_stub.call_rpc_count + end + end + + def test_create_feed + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::Feed.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + feed_id = "hello world" + feed = {} + + create_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_feed, name + assert_kind_of ::Google::Cloud::Asset::V1::CreateFeedRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["feed_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::Feed), request["feed"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_feed_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_feed({ parent: parent, feed_id: feed_id, feed: feed }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_feed parent: parent, feed_id: feed_id, feed: feed do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_feed ::Google::Cloud::Asset::V1::CreateFeedRequest.new(parent: parent, feed_id: feed_id, feed: feed) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_feed({ parent: parent, feed_id: feed_id, feed: feed }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_feed(::Google::Cloud::Asset::V1::CreateFeedRequest.new(parent: parent, feed_id: feed_id, feed: feed), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_feed_client_stub.call_rpc_count + end + end + + def test_get_feed + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::Feed.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_feed, name + assert_kind_of ::Google::Cloud::Asset::V1::GetFeedRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_feed_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_feed({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_feed name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_feed ::Google::Cloud::Asset::V1::GetFeedRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_feed({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_feed(::Google::Cloud::Asset::V1::GetFeedRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_feed_client_stub.call_rpc_count + end + end + + def test_list_feeds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::ListFeedsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_feeds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_feeds, name + assert_kind_of ::Google::Cloud::Asset::V1::ListFeedsRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_feeds_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_feeds({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_feeds parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_feeds ::Google::Cloud::Asset::V1::ListFeedsRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_feeds({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_feeds(::Google::Cloud::Asset::V1::ListFeedsRequest.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_feeds_client_stub.call_rpc_count + end + end + + def test_update_feed + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::Feed.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + feed = {} + update_mask = {} + + update_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_feed, name + assert_kind_of ::Google::Cloud::Asset::V1::UpdateFeedRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::Feed), request["feed"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_feed_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_feed({ feed: feed, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_feed feed: feed, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_feed ::Google::Cloud::Asset::V1::UpdateFeedRequest.new(feed: feed, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_feed({ feed: feed, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_feed(::Google::Cloud::Asset::V1::UpdateFeedRequest.new(feed: feed, 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_feed_client_stub.call_rpc_count + end + end + + def test_delete_feed + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_feed, name + assert_kind_of ::Google::Cloud::Asset::V1::DeleteFeedRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_feed_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_feed({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_feed name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_feed ::Google::Cloud::Asset::V1::DeleteFeedRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_feed({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_feed(::Google::Cloud::Asset::V1::DeleteFeedRequest.new(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_feed_client_stub.call_rpc_count + end + end + + def test_search_all_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::SearchAllResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + query = "hello world" + asset_types = ["hello world"] + page_size = 42 + page_token = "hello world" + order_by = "hello world" + read_mask = {} + + search_all_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_all_resources, name + assert_kind_of ::Google::Cloud::Asset::V1::SearchAllResourcesRequest, request + assert_equal "hello world", request["scope"] + assert_equal "hello world", request["query"] + assert_equal ["hello world"], request["asset_types"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_all_resources_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_all_resources({ scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_all_resources scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_all_resources ::Google::Cloud::Asset::V1::SearchAllResourcesRequest.new(scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_all_resources({ scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_all_resources(::Google::Cloud::Asset::V1::SearchAllResourcesRequest.new(scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_all_resources_client_stub.call_rpc_count + end + end + + def test_search_all_iam_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + asset_types = ["hello world"] + order_by = "hello world" + + search_all_iam_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_all_iam_policies, name + assert_kind_of ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, request + assert_equal "hello world", request["scope"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal ["hello world"], request["asset_types"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_all_iam_policies_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_all_iam_policies({ scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_all_iam_policies scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_all_iam_policies ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new(scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_all_iam_policies({ scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_all_iam_policies(::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new(scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, 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, search_all_iam_policies_client_stub.call_rpc_count + end + end + + def test_analyze_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + analysis_query = {} + saved_analysis_query = "hello world" + execution_timeout = {} + + analyze_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :analyze_iam_policy, name + assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery), request["analysis_query"] + assert_equal "hello world", request["saved_analysis_query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["execution_timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, analyze_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.analyze_iam_policy({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.analyze_iam_policy analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.analyze_iam_policy ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.analyze_iam_policy({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.analyze_iam_policy(::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, analyze_iam_policy_client_stub.call_rpc_count + end + end + + def test_analyze_iam_policy_longrunning + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + analysis_query = {} + saved_analysis_query = "hello world" + output_config = {} + + analyze_iam_policy_longrunning_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :analyze_iam_policy_longrunning, name + assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery), request["analysis_query"] + assert_equal "hello world", request["saved_analysis_query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, analyze_iam_policy_longrunning_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.analyze_iam_policy_longrunning({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.analyze_iam_policy_longrunning analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.analyze_iam_policy_longrunning ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.analyze_iam_policy_longrunning({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.analyze_iam_policy_longrunning(::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, analyze_iam_policy_longrunning_client_stub.call_rpc_count + end + end + + def test_analyze_move + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::AnalyzeMoveResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + destination_parent = "hello world" + view = :ANALYSIS_VIEW_UNSPECIFIED + + analyze_move_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :analyze_move, name + assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeMoveRequest, request + assert_equal "hello world", request["resource"] + assert_equal "hello world", request["destination_parent"] + assert_equal :ANALYSIS_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, analyze_move_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.analyze_move({ resource: resource, destination_parent: destination_parent, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.analyze_move resource: resource, destination_parent: destination_parent, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.analyze_move ::Google::Cloud::Asset::V1::AnalyzeMoveRequest.new(resource: resource, destination_parent: destination_parent, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.analyze_move({ resource: resource, destination_parent: destination_parent, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.analyze_move(::Google::Cloud::Asset::V1::AnalyzeMoveRequest.new(resource: resource, destination_parent: destination_parent, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, analyze_move_client_stub.call_rpc_count + end + end + + def test_query_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::QueryAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + statement = "hello world" + page_size = 42 + page_token = "hello world" + timeout = {} + read_time_window = {} + output_config = {} + + query_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_assets, name + assert_kind_of ::Google::Cloud::Asset::V1::QueryAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["statement"] + assert_equal :statement, request.query + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::TimeWindow), request["read_time_window"] + assert_equal :read_time_window, request.time + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::QueryAssetsOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_assets_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_assets({ parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_assets parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_assets ::Google::Cloud::Asset::V1::QueryAssetsRequest.new(parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_assets({ parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_assets(::Google::Cloud::Asset::V1::QueryAssetsRequest.new(parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_assets_client_stub.call_rpc_count + end + end + + def test_create_saved_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::SavedQuery.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + saved_query = {} + saved_query_id = "hello world" + + create_saved_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_saved_query, name + assert_kind_of ::Google::Cloud::Asset::V1::CreateSavedQueryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::SavedQuery), request["saved_query"] + assert_equal "hello world", request["saved_query_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_saved_query_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_saved_query({ parent: parent, saved_query: saved_query, saved_query_id: saved_query_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_saved_query parent: parent, saved_query: saved_query, saved_query_id: saved_query_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_saved_query ::Google::Cloud::Asset::V1::CreateSavedQueryRequest.new(parent: parent, saved_query: saved_query, saved_query_id: saved_query_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_saved_query({ parent: parent, saved_query: saved_query, saved_query_id: saved_query_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_saved_query(::Google::Cloud::Asset::V1::CreateSavedQueryRequest.new(parent: parent, saved_query: saved_query, saved_query_id: saved_query_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_saved_query_client_stub.call_rpc_count + end + end + + def test_get_saved_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::SavedQuery.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_saved_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_saved_query, name + assert_kind_of ::Google::Cloud::Asset::V1::GetSavedQueryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_saved_query_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_saved_query({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_saved_query name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_saved_query ::Google::Cloud::Asset::V1::GetSavedQueryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_saved_query({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_saved_query(::Google::Cloud::Asset::V1::GetSavedQueryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_saved_query_client_stub.call_rpc_count + end + end + + def test_list_saved_queries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::ListSavedQueriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_saved_queries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_saved_queries, name + assert_kind_of ::Google::Cloud::Asset::V1::ListSavedQueriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_saved_queries_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_saved_queries({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_saved_queries parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_saved_queries ::Google::Cloud::Asset::V1::ListSavedQueriesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_saved_queries({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_saved_queries(::Google::Cloud::Asset::V1::ListSavedQueriesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_saved_queries_client_stub.call_rpc_count + end + end + + def test_update_saved_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::SavedQuery.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + saved_query = {} + update_mask = {} + + update_saved_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_saved_query, name + assert_kind_of ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::SavedQuery), request["saved_query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_saved_query_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_saved_query({ saved_query: saved_query, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_saved_query saved_query: saved_query, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_saved_query ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new(saved_query: saved_query, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_saved_query({ saved_query: saved_query, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_saved_query(::Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new(saved_query: saved_query, 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_saved_query_client_stub.call_rpc_count + end + end + + def test_delete_saved_query + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_saved_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_saved_query, name + assert_kind_of ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_saved_query_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_saved_query({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_saved_query name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_saved_query ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_saved_query({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_saved_query(::Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new(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_saved_query_client_stub.call_rpc_count + end + end + + def test_batch_get_effective_iam_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + names = ["hello world"] + + batch_get_effective_iam_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_get_effective_iam_policies, name + assert_kind_of ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest, request + assert_equal "hello world", request["scope"] + assert_equal ["hello world"], request["names"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_get_effective_iam_policies_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_get_effective_iam_policies({ scope: scope, names: names }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_get_effective_iam_policies scope: scope, names: names do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_get_effective_iam_policies ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new(scope: scope, names: names) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_get_effective_iam_policies({ scope: scope, names: names }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_get_effective_iam_policies(::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new(scope: scope, names: names), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_get_effective_iam_policies_client_stub.call_rpc_count + end + end + + def test_analyze_org_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + constraint = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + analyze_org_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :analyze_org_policies, name + assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest, request + assert_equal "hello world", request["scope"] + assert_equal "hello world", request["constraint"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert request.has_page_size? + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, analyze_org_policies_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.analyze_org_policies({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.analyze_org_policies scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.analyze_org_policies ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.analyze_org_policies({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.analyze_org_policies(::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, analyze_org_policies_client_stub.call_rpc_count + end + end + + def test_analyze_org_policy_governed_containers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + constraint = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + analyze_org_policy_governed_containers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :analyze_org_policy_governed_containers, name + assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest, request + assert_equal "hello world", request["scope"] + assert_equal "hello world", request["constraint"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert request.has_page_size? + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, analyze_org_policy_governed_containers_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.analyze_org_policy_governed_containers({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.analyze_org_policy_governed_containers scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.analyze_org_policy_governed_containers ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.analyze_org_policy_governed_containers({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.analyze_org_policy_governed_containers(::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, analyze_org_policy_governed_containers_client_stub.call_rpc_count + end + end + + def test_analyze_org_policy_governed_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + constraint = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + analyze_org_policy_governed_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :analyze_org_policy_governed_assets, name + assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest, request + assert_equal "hello world", request["scope"] + assert_equal "hello world", request["constraint"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert request.has_page_size? + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, analyze_org_policy_governed_assets_client_stub do + # Create client + client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.analyze_org_policy_governed_assets({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.analyze_org_policy_governed_assets scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.analyze_org_policy_governed_assets ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.analyze_org_policy_governed_assets({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.analyze_org_policy_governed_assets(::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, analyze_org_policy_governed_assets_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Asset::V1::AssetService::Client.new do |config| + 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::Asset::V1::AssetService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::Asset::V1::AssetService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Asset::V1::AssetService::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::Asset::V1::AssetService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Asset::V1::AssetService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-asset-v1/test/helper.rb b/owl-bot-staging/google-cloud-asset-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-asset-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json new file mode 100644 index 000000000000..69650035435c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "assuredworkloads.googleapis.com", + "api_shortname": "assuredworkloads", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1/latest", + "distribution_name": "google-cloud-assured_workloads-v1", + "is_cloud": true, + "language": "ruby", + "name": "assuredworkloads", + "name_pretty": "Assured Workloads for Government V1 API", + "product_documentation": "https://cloud.google.com/assured-workloads/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", + "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml new file mode 100644 index 000000000000..1a84e3a85a74 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-assured_workloads-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-assured_workloads-v1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts new file mode 100644 index 000000000000..fd857a4e0231 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Assured Workloads for Government V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..3fba6040c2eb --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-assured_workloads-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-assured_workloads-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/assured_workloads/v1" + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/assured_workloads/v1" + +::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-assured_workloads-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/assured_workloads/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1/README.md new file mode 100644 index 000000000000..a0bb594d8639 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Assured Workloads for Government V1 API + +API Client library for the Assured Workloads for Government V1 API + +Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Assured Workloads for Government V1 API. Most users should consider using +the main client gem, +[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-assured_workloads-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/assuredworkloads.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/assured_workloads/v1" + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new +request = ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new # (request fields as keyword arguments...) +response = client.create_workload request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/assured-workloads/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/assured_workloads/v1" +require "logger" + +client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-assured_workloads`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-assured_workloads-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-assured_workloads`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-assured_workloads-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile new file mode 100644 index 000000000000..e8a4e1de245c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-assured_workloads-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ASSURED_WORKLOADS_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ASSURED_WORKLOADS_PROJECT"] = project + ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project + ENV["ASSURED_WORKLOADS_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-assured_workloads-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-assured_workloads-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-assured_workloads-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-assured_workloads-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-assured_workloads-v1" + header "google-cloud-assured_workloads-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-assured_workloads-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-assured_workloads-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-assured_workloads-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-assured_workloads-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json new file mode 100644 index 000000000000..4117f432b2e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.assuredworkloads.v1", + "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1", + "services": { + "AssuredWorkloadsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client", + "rpcs": { + "CreateWorkload": { + "methods": [ + "create_workload" + ] + }, + "UpdateWorkload": { + "methods": [ + "update_workload" + ] + }, + "RestrictAllowedResources": { + "methods": [ + "restrict_allowed_resources" + ] + }, + "DeleteWorkload": { + "methods": [ + "delete_workload" + ] + }, + "GetWorkload": { + "methods": [ + "get_workload" + ] + }, + "ListWorkloads": { + "methods": [ + "list_workloads" + ] + }, + "ListViolations": { + "methods": [ + "list_violations" + ] + }, + "GetViolation": { + "methods": [ + "get_violation" + ] + }, + "AcknowledgeViolation": { + "methods": [ + "acknowledge_violation" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec new file mode 100644 index 000000000000..0b9428d770a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/assured_workloads/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-assured_workloads-v1" + gem.version = Google::Cloud::AssuredWorkloads::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." + gem.summary = "API Client library for the Assured Workloads for Government V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb new file mode 100644 index 000000000000..24f2ce22bdb4 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/assured_workloads/v1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb new file mode 100644 index 000000000000..8a860900f3a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/assured_workloads/v1/assured_workloads_service" +require "google/cloud/assured_workloads/v1/version" + +module Google + module Cloud + module AssuredWorkloads + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/assured_workloads/v1" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/assured_workloads/v1" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/assured_workloads/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb new file mode 100644 index 000000000000..ea39cd61c3bf --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/assured_workloads/v1/version" + +require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" +require "google/cloud/assured_workloads/v1/assured_workloads_service/paths" +require "google/cloud/assured_workloads/v1/assured_workloads_service/operations" +require "google/cloud/assured_workloads/v1/assured_workloads_service/client" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" + +module Google + module Cloud + module AssuredWorkloads + module V1 + ## + # Service to manage AssuredWorkloads. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/assured_workloads/v1/assured_workloads_service" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + module AssuredWorkloadsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" +require "google/cloud/assured_workloads/v1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb new file mode 100644 index 000000000000..3768d9cc92e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb @@ -0,0 +1,1303 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + ## + # Client for the AssuredWorkloadsService service. + # + # Service to manage AssuredWorkloads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assured_workloads_service_stub + + ## + # Configure the AssuredWorkloadsService Client class. + # + # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssuredWorkloadsService clients + # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AssuredWorkloads", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @assured_workloads_service_stub.universe_domain + end + + ## + # Create a new AssuredWorkloadsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssuredWorkloadsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/assuredworkloads/v1/assuredworkloads_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @assured_workloads_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @assured_workloads_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assured_workloads_service_stub.logger + end + + # Service calls + + ## + # Creates Assured Workload. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workload(parent: nil, workload: nil, external_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] + # Required. Assured Workload to create + # @param external_id [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workload. + # Currently allows updating of workload display_name and labels. + # For force updates don't set etag field in the Workload. + # Only one update operation per workload can be in progress. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workload(workload: nil, update_mask: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + # p result + # + def update_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workload&.name + header_params["workload.name"] = request.workload.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + # + # @overload restrict_allowed_resources(request, options = nil) + # Pass arguments to `restrict_allowed_resources` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restrict_allowed_resources(name: nil, restriction_type: nil) + # Pass arguments to `restrict_allowed_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new + # + # # Call the restrict_allowed_resources method. + # result = client.restrict_allowed_resources request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. + # p result + # + def restrict_allowed_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workload(name: nil, etag: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param etag [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets Assured Workload associated with a CRM Node + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload to fetch. This is the workload's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Assured Workloads under a CRM Node. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @param filter [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Violations in the AssuredWorkload Environment. + # Callers may also choose to read across multiple Workloads as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of workload-id in the parent. + # Format `organizations/{org_id}/locations/{location}/workloads/-` + # + # @overload list_violations(request, options = nil) + # Pass arguments to `list_violations` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_violations(parent: nil, interval: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_violations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Workload name. + # Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. + # @param interval [::Google::Cloud::AssuredWorkloads::V1::TimeWindow, ::Hash] + # Optional. Specifies the time window for retrieving active Violations. + # When specified, retrieves Violations that were active between start_time + # and end_time. + # @param page_size [::Integer] + # Optional. Page size. + # @param page_token [::String] + # Optional. Page token returned from previous request. + # @param filter [::String] + # Optional. A custom filter for filtering by the Violations properties. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Violation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Violation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new + # + # # Call the list_violations method. + # result = client.list_violations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Violation. + # p item + # end + # + def list_violations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_violations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_violations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_violations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :list_violations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_violations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves Assured Workload Violation based on ID. + # + # @overload get_violation(request, options = nil) + # Pass arguments to `get_violation` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_violation(name: nil) + # Pass arguments to `get_violation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Violation to fetch (ie. Violation.name). + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Violation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new + # + # # Call the get_violation method. + # result = client.get_violation request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Violation. + # p result + # + def get_violation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_violation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_violation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_violation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :get_violation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Acknowledges an existing violation. By acknowledging a violation, users + # acknowledge the existence of a compliance violation in their workload and + # decide to ignore it due to a valid business justification. Acknowledgement + # is a permanent operation and it cannot be reverted. + # + # @overload acknowledge_violation(request, options = nil) + # Pass arguments to `acknowledge_violation` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload acknowledge_violation(name: nil, comment: nil, non_compliant_org_policy: nil) + # Pass arguments to `acknowledge_violation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Violation to acknowledge. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} + # @param comment [::String] + # Required. Business justification explaining the need for violation acknowledgement + # @param non_compliant_org_policy [::String] + # Optional. This field is deprecated and will be removed in future version of the API. + # Name of the OrgPolicy which was modified with non-compliant change and + # resulted in this violation. + # Format: + # projects/\\{project_number}/policies/\\{constraint_name} + # folders/\\{folder_id}/policies/\\{constraint_name} + # organizations/\\{organization_id}/policies/\\{constraint_name} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new + # + # # Call the acknowledge_violation method. + # result = client.acknowledge_violation request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse. + # p result + # + def acknowledge_violation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.acknowledge_violation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.acknowledge_violation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.acknowledge_violation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :acknowledge_violation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssuredWorkloadsService API. + # + # This class represents the configuration for AssuredWorkloadsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssuredWorkloadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `restrict_allowed_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :restrict_allowed_resources + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `list_violations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_violations + ## + # RPC-specific configuration for `get_violation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_violation + ## + # RPC-specific configuration for `acknowledge_violation` + # @return [::Gapic::Config::Method] + # + attr_reader :acknowledge_violation + + # @private + def initialize parent_rpcs = nil + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources + @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations + @list_violations = ::Gapic::Config::Method.new list_violations_config + get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation + @get_violation = ::Gapic::Config::Method.new get_violation_config + acknowledge_violation_config = parent_rpcs.acknowledge_violation if parent_rpcs.respond_to? :acknowledge_violation + @acknowledge_violation = ::Gapic::Config::Method.new acknowledge_violation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb new file mode 100644 index 000000000000..51ac08fa7943 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + # Credentials for the AssuredWorkloadsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "ASSURED_WORKLOADS_CREDENTIALS", + "ASSURED_WORKLOADS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ASSURED_WORKLOADS_CREDENTIALS_JSON", + "ASSURED_WORKLOADS_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb new file mode 100644 index 000000000000..6265a323b487 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssuredWorkloadsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb new file mode 100644 index 000000000000..14045503975a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + # Path helper methods for the AssuredWorkloadsService API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified Violation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}` + # + # @param organization [String] + # @param location [String] + # @param workload [String] + # @param violation [String] + # + # @return [::String] + def violation_path organization:, location:, workload:, violation: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workload cannot contain /" if workload.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/workloads/#{workload}/violations/#{violation}" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/workloads/{workload}` + # + # @param organization [String] + # @param location [String] + # @param workload [String] + # + # @return [::String] + def workload_path organization:, location:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb new file mode 100644 index 000000000000..277bb37f1f6d --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/assured_workloads/v1/version" + +require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" +require "google/cloud/assured_workloads/v1/assured_workloads_service/paths" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/client" + +module Google + module Cloud + module AssuredWorkloads + module V1 + ## + # Service to manage AssuredWorkloads. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + module AssuredWorkloadsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb new file mode 100644 index 000000000000..5b3e53ac531c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb @@ -0,0 +1,928 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + module Rest + ## + # REST client for the AssuredWorkloadsService service. + # + # Service to manage AssuredWorkloads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assured_workloads_service_stub + + ## + # Configure the AssuredWorkloadsService Client class. + # + # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssuredWorkloadsService clients + # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AssuredWorkloads", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @assured_workloads_service_stub.universe_domain + end + + ## + # Create a new AssuredWorkloadsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssuredWorkloadsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @assured_workloads_service_stub = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @assured_workloads_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assured_workloads_service_stub.logger + end + + # Service calls + + ## + # Creates Assured Workload. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workload(parent: nil, workload: nil, external_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] + # Required. Assured Workload to create + # @param external_id [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.create_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workload. + # Currently allows updating of workload display_name and labels. + # For force updates don't set etag field in the Workload. + # Only one update operation per workload can be in progress. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workload(workload: nil, update_mask: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + # p result + # + def update_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.update_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + # + # @overload restrict_allowed_resources(request, options = nil) + # Pass arguments to `restrict_allowed_resources` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restrict_allowed_resources(name: nil, restriction_type: nil) + # Pass arguments to `restrict_allowed_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new + # + # # Call the restrict_allowed_resources method. + # result = client.restrict_allowed_resources request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. + # p result + # + def restrict_allowed_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.restrict_allowed_resources request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workload(name: nil, etag: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param etag [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.delete_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets Assured Workload associated with a CRM Node + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload to fetch. This is the workload's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.get_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Assured Workloads under a CRM Node. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @param filter [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.list_workloads request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, "workloads", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssuredWorkloadsService REST API. + # + # This class represents the configuration for AssuredWorkloadsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AssuredWorkloadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `restrict_allowed_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :restrict_allowed_resources + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + + # @private + def initialize parent_rpcs = nil + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources + @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb new file mode 100644 index 000000000000..5b5c5978bb21 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssuredWorkloadsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb new file mode 100644 index 000000000000..54af58066810 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb @@ -0,0 +1,450 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + module Rest + ## + # REST service stub for the AssuredWorkloadsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # A result object deserialized from the server's reply + def update_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1::Workload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restrict_allowed_resources REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] + # A result object deserialized from the server's reply + def restrict_allowed_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restrict_allowed_resources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restrict_allowed_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # A result object deserialized from the server's reply + def get_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1::Workload.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse] + # A result object deserialized from the server's reply + def list_workloads request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workloads", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workloads", + body: "workload", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{workload.name}", + body: "workload", + matches: [ + ["workload.name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restrict_allowed_resources REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restrict_allowed_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:restrictAllowedResources", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workloads_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workloads", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb new file mode 100644 index 000000000000..159eef6467bf --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" +require "google/cloud/assured_workloads/v1/version" + +module Google + module Cloud + module AssuredWorkloads + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/assured_workloads/v1/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb new file mode 100644 index 000000000000..43514745eb32 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AssuredWorkloads + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb new file mode 100644 index 000000000000..1695e94ae30e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/assuredworkloads/v1/assuredworkloads.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n7google/cloud/assuredworkloads/v1/assuredworkloads.proto\x12 google.cloud.assuredworkloads.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb6\x01\n\x15\x43reateWorkloadRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x41\n\x08workload\x18\x02 \x01(\x0b\x32*.google.cloud.assuredworkloads.v1.WorkloadB\x03\xe0\x41\x02\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x15UpdateWorkloadRequest\x12\x41\n\x08workload\x18\x01 \x01(\x0b\x32*.google.cloud.assuredworkloads.v1.WorkloadB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"j\n\x15\x44\x65leteWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x12GetWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\"\x8f\x01\n\x14ListWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"o\n\x15ListWorkloadsResponse\x12=\n\tworkloads\x18\x01 \x03(\x0b\x32*.google.cloud.assuredworkloads.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x15\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\tresources\x18\x03 \x03(\x0b\x32\x37.google.cloud.assuredworkloads.v1.Workload.ResourceInfoB\x03\xe0\x41\x03\x12^\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32;.google.cloud.assuredworkloads.v1.Workload.ComplianceRegimeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x37\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1c\n\x0f\x62illing_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.assuredworkloads.v1.Workload.LabelsEntryB\x03\xe0\x41\x01\x12)\n\x1cprovisioned_resources_parent\x18\r \x01(\tB\x03\xe0\x41\x04\x12S\n\x0ckms_settings\x18\x0e \x01(\x0b\x32\x36.google.cloud.assuredworkloads.v1.Workload.KMSSettingsB\x05\x18\x01\xe0\x41\x04\x12[\n\x11resource_settings\x18\x0f \x03(\x0b\x32;.google.cloud.assuredworkloads.v1.Workload.ResourceSettingsB\x03\xe0\x41\x04\x12`\n\x14kaj_enrollment_state\x18\x11 \x01(\x0e\x32=.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentStateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_sovereign_controls\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12\x66\n\x17saa_enrollment_response\x18\x14 \x01(\x0b\x32@.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponseB\x03\xe0\x41\x03\x12.\n!compliant_but_disallowed_services\x18\x18 \x03(\tB\x03\xe0\x41\x03\x12H\n\x07partner\x18\x19 \x01(\x0e\x32\x32.google.cloud.assuredworkloads.v1.Workload.PartnerB\x03\xe0\x41\x01\x1a\x89\x02\n\x0cResourceInfo\x12\x13\n\x0bresource_id\x18\x01 \x01(\x03\x12[\n\rresource_type\x18\x02 \x01(\x0e\x32\x44.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType\"\x86\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10\x43ONSUMER_PROJECT\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0f\x43ONSUMER_FOLDER\x10\x04\x12\x1b\n\x17\x45NCRYPTION_KEYS_PROJECT\x10\x02\x12\x0b\n\x07KEYRING\x10\x03\x1a\x93\x01\n\x0bKMSSettings\x12\x41\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05\x12=\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1a\x9a\x01\n\x10ResourceSettings\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12[\n\rresource_type\x18\x02 \x01(\x0e\x32\x44.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1a\xfc\x03\n\x15SaaEnrollmentResponse\x12\x66\n\x0csetup_status\x18\x01 \x01(\x0e\x32K.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupStateH\x00\x88\x01\x01\x12\x61\n\x0csetup_errors\x18\x02 \x03(\x0e\x32K.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError\"R\n\nSetupState\x12\x1b\n\x17SETUP_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_PENDING\x10\x01\x12\x13\n\x0fSTATUS_COMPLETE\x10\x02\"\xb2\x01\n\nSetupError\x12\x1b\n\x17SETUP_ERROR_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45RROR_INVALID_BASE_SETUP\x10\x01\x12&\n\"ERROR_MISSING_EXTERNAL_SIGNING_KEY\x10\x02\x12#\n\x1f\x45RROR_NOT_ALL_SERVICES_ENROLLED\x10\x03\x12\x1c\n\x18\x45RROR_SETUP_CHECK_FAILED\x10\x04\x42\x0f\n\r_setup_status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa5\x02\n\x10\x43omplianceRegime\x12!\n\x1d\x43OMPLIANCE_REGIME_UNSPECIFIED\x10\x00\x12\x07\n\x03IL4\x10\x01\x12\x08\n\x04\x43JIS\x10\x02\x12\x10\n\x0c\x46\x45\x44RAMP_HIGH\x10\x03\x12\x14\n\x10\x46\x45\x44RAMP_MODERATE\x10\x04\x12\x16\n\x12US_REGIONAL_ACCESS\x10\x05\x12\t\n\x05HIPAA\x10\x06\x12\x0b\n\x07HITRUST\x10\x07\x12\x1a\n\x16\x45U_REGIONS_AND_SUPPORT\x10\x08\x12\x1a\n\x16\x43\x41_REGIONS_AND_SUPPORT\x10\t\x12\x08\n\x04ITAR\x10\n\x12\x1d\n\x19\x41U_REGIONS_AND_US_SUPPORT\x10\x0b\x12\"\n\x1e\x41SSURED_WORKLOADS_FOR_PARTNERS\x10\x0c\"\x7f\n\x12KajEnrollmentState\x12$\n KAJ_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cKAJ_ENROLLMENT_STATE_PENDING\x10\x01\x12!\n\x1dKAJ_ENROLLMENT_STATE_COMPLETE\x10\x02\">\n\x07Partner\x12\x17\n\x13PARTNER_UNSPECIFIED\x10\x00\x12\x1a\n\x16LOCAL_CONTROLS_BY_S3NS\x10\x01:u\xea\x41r\n(assuredworkloads.googleapis.com/Workload\x12\x46organizations/{organization}/locations/{location}/workloads/{workload}\"\xe4\x01\n\x1f\x43reateWorkloadOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12[\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32;.google.cloud.assuredworkloads.v1.Workload.ComplianceRegimeB\x03\xe0\x41\x01\"\x97\x02\n\x1fRestrictAllowedResourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12p\n\x10restriction_type\x18\x02 \x01(\x0e\x32Q.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionTypeB\x03\xe0\x41\x02\"o\n\x0fRestrictionType\x12 \n\x1cRESTRICTION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41LLOW_ALL_GCP_RESOURCES\x10\x01\x12\x1d\n\x19\x41LLOW_COMPLIANT_RESOURCES\x10\x02\"\"\n RestrictAllowedResourcesResponse\"o\n\x1b\x41\x63knowledgeViolationRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63omment\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x18non_compliant_org_policy\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x01\"\x1e\n\x1c\x41\x63knowledgeViolationResponse\"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe5\x01\n\x15ListViolationsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)assuredworkloads.googleapis.com/Violation\x12\x43\n\x08interval\x18\x02 \x01(\x0b\x32,.google.cloud.assuredworkloads.v1.TimeWindowB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"r\n\x16ListViolationsResponse\x12?\n\nviolations\x18\x01 \x03(\x0b\x32+.google.cloud.assuredworkloads.v1.Violation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x13GetViolationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)assuredworkloads.googleapis.com/Violation\"\x8e\x0e\n\tViolation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nbegin_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0cresolve_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x07 \x01(\x0e\x32\x31.google.cloud.assuredworkloads.v1.Violation.StateB\x03\xe0\x41\x03\x12%\n\x15org_policy_constraint\x18\x08 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1e\n\x0e\x61udit_log_link\x18\x0b \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12(\n\x18non_compliant_org_policy\x18\x0c \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12Q\n\x0bremediation\x18\r \x01(\x0b\x32\x37.google.cloud.assuredworkloads.v1.Violation.RemediationB\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63knowledged\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12\x42\n\x14\x61\x63knowledgement_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12(\n\x18\x65xception_audit_log_link\x18\x10 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x1a\x8c\x07\n\x0bRemediation\x12_\n\x0cinstructions\x18\x01 \x01(\x0b\x32\x44.google.cloud.assuredworkloads.v1.Violation.Remediation.InstructionsB\x03\xe0\x41\x02\x12\x18\n\x10\x63ompliant_values\x18\x02 \x03(\t\x12\x66\n\x10remediation_type\x18\x03 \x01(\x0e\x32G.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationTypeB\x03\xe0\x41\x03\x1a\xfa\x02\n\x0cInstructions\x12h\n\x13gcloud_instructions\x18\x01 \x01(\x0b\x32K.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud\x12j\n\x14\x63onsole_instructions\x18\x02 \x01(\x0b\x32L.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console\x1aJ\n\x06Gcloud\x12\x17\n\x0fgcloud_commands\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\x1aH\n\x07\x43onsole\x12\x14\n\x0c\x63onsole_uris\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\"\x9c\x02\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12,\n(REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION\x10\x01\x12\x38\n4REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION\x10\x02\x12\x37\n3REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION\x10\x03\x12\x46\nBREMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION\x10\x04\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOLVED\x10\x02\x12\x0e\n\nUNRESOLVED\x10\x03\x12\r\n\tEXCEPTION\x10\x04:\x8e\x01\xea\x41\x8a\x01\n)assuredworkloads.googleapis.com/Violation\x12]organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}B\x17\n\x15_acknowledgement_time2\x86\x0e\n\x17\x41ssuredWorkloadsService\x12\xef\x01\n\x0e\x43reateWorkload\x12\x37.google.cloud.assuredworkloads.v1.CreateWorkloadRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41+\n\x08Workload\x12\x1f\x43reateWorkloadOperationMetadata\xda\x41\x0fparent,workload\x82\xd3\xe4\x93\x02>\"2/v1/{parent=organizations/*/locations/*}/workloads:\x08workload\x12\xdb\x01\n\x0eUpdateWorkload\x12\x37.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest\x1a*.google.cloud.assuredworkloads.v1.Workload\"d\xda\x41\x14workload,update_mask\x82\xd3\xe4\x93\x02G2;/v1/{workload.name=organizations/*/locations/*/workloads/*}:\x08workload\x12\xf9\x01\n\x18RestrictAllowedResources\x12\x41.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest\x1a\x42.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{name=organizations/*/locations/*/workloads/*}:restrictAllowedResources:\x01*\x12\xa4\x01\n\x0e\x44\x65leteWorkload\x12\x37.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/locations/*/workloads/*}\x12\xb2\x01\n\x0bGetWorkload\x12\x34.google.cloud.assuredworkloads.v1.GetWorkloadRequest\x1a*.google.cloud.assuredworkloads.v1.Workload\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/locations/*/workloads/*}\x12\xc5\x01\n\rListWorkloads\x12\x36.google.cloud.assuredworkloads.v1.ListWorkloadsRequest\x1a\x37.google.cloud.assuredworkloads.v1.ListWorkloadsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*/locations/*}/workloads\x12\x8e\x01\n\x0eListViolations\x12\x37.google.cloud.assuredworkloads.v1.ListViolationsRequest\x1a\x38.google.cloud.assuredworkloads.v1.ListViolationsResponse\"\t\xda\x41\x06parent\x12{\n\x0cGetViolation\x12\x35.google.cloud.assuredworkloads.v1.GetViolationRequest\x1a+.google.cloud.assuredworkloads.v1.Violation\"\x07\xda\x41\x04name\x12\x97\x01\n\x14\x41\x63knowledgeViolation\x12=.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest\x1a>.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse\"\x00\x1aS\xca\x41\x1f\x61ssuredworkloads.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdd\x02\n$com.google.cloud.assuredworkloads.v1B\x15\x41ssuredworkloadsProtoP\x01ZPcloud.google.com/go/assuredworkloads/apiv1/assuredworkloadspb;assuredworkloadspb\xaa\x02 Google.Cloud.AssuredWorkloads.V1\xca\x02 Google\\Cloud\\AssuredWorkloads\\V1\xea\x02#Google::Cloud::AssuredWorkloads::V1\xea\x41]\n(assuredworkloads.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AssuredWorkloads + module V1 + CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadRequest").msgclass + UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.UpdateWorkloadRequest").msgclass + DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.DeleteWorkloadRequest").msgclass + GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetWorkloadRequest").msgclass + ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsRequest").msgclass + ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsResponse").msgclass + Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload").msgclass + Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo").msgclass + Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType").enummodule + Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KMSSettings").msgclass + Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceSettings").msgclass + Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse").msgclass + Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState").enummodule + Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError").enummodule + Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ComplianceRegime").enummodule + Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState").enummodule + Workload::Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.Partner").enummodule + CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata").msgclass + RestrictAllowedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest").msgclass + RestrictAllowedResourcesRequest::RestrictionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType").enummodule + RestrictAllowedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse").msgclass + AcknowledgeViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest").msgclass + AcknowledgeViolationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse").msgclass + TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.TimeWindow").msgclass + ListViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListViolationsRequest").msgclass + ListViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListViolationsResponse").msgclass + GetViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetViolationRequest").msgclass + Violation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation").msgclass + Violation::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation").msgclass + Violation::Remediation::Instructions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions").msgclass + Violation::Remediation::Instructions::Gcloud = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud").msgclass + Violation::Remediation::Instructions::Console = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console").msgclass + Violation::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType").enummodule + Violation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb new file mode 100644 index 000000000000..438ddf9b93f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb @@ -0,0 +1,78 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/assuredworkloads/v1/assuredworkloads.proto for package 'Google.Cloud.AssuredWorkloads.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/assuredworkloads/v1/assuredworkloads_pb' + +module Google + module Cloud + module AssuredWorkloads + module V1 + module AssuredWorkloadsService + # Service to manage AssuredWorkloads. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.assuredworkloads.v1.AssuredWorkloadsService' + + # Creates Assured Workload. + rpc :CreateWorkload, ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Google::Longrunning::Operation + # Updates an existing workload. + # Currently allows updating of workload display_name and labels. + # For force updates don't set etag field in the Workload. + # Only one update operation per workload can be in progress. + rpc :UpdateWorkload, ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + rpc :RestrictAllowedResources, ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse + # Deletes the workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + rpc :DeleteWorkload, ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Google::Protobuf::Empty + # Gets Assured Workload associated with a CRM Node + rpc :GetWorkload, ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload + # Lists Assured Workloads under a CRM Node. + rpc :ListWorkloads, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse + # Lists the Violations in the AssuredWorkload Environment. + # Callers may also choose to read across multiple Workloads as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of workload-id in the parent. + # Format `organizations/{org_id}/locations/{location}/workloads/-` + rpc :ListViolations, ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse + # Retrieves Assured Workload Violation based on ID. + rpc :GetViolation, ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, ::Google::Cloud::AssuredWorkloads::V1::Violation + # Acknowledges an existing violation. By acknowledging a violation, users + # acknowledge the existence of a compliance violation in their workload and + # decide to ignore it due to a valid business justification. Acknowledgement + # is a permanent operation and it cannot be reverted. + rpc :AcknowledgeViolation, ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md new file mode 100644 index 000000000000..f6053cce5a45 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Assured Workloads for Government V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb new file mode 100644 index 000000000000..29b652613713 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb @@ -0,0 +1,720 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AssuredWorkloads + module V1 + # Request for creating a workload. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @!attribute [rw] workload + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # Required. Assured Workload to create + # @!attribute [rw] external_id + # @return [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + class CreateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for Updating a workload. + # @!attribute [rw] workload + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + class UpdateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a Workload. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + class DeleteWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching a workload. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Workload to fetch. This is the workload's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + class GetWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching workloads in an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @!attribute [rw] filter + # @return [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + class ListWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of ListWorkloads endpoint. + # @!attribute [rw] workloads + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload>] + # List of Workloads under a given parent. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. Return empty if reached the last page. + class ListWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Workload object for managing highly regulated workloads of cloud + # customers. + # @!attribute [rw] name + # @return [::String] + # Optional. The resource name of the workload. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} + # + # Read-only. + # @!attribute [rw] display_name + # @return [::String] + # Required. The user-assigned display name of the Workload. + # When present it must be between 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, and spaces. + # + # Example: My Workload + # @!attribute [r] resources + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo>] + # Output only. The resources associated with this workload. + # These resources will be created when creating the workload. + # If any of the projects already exist, the workload creation will fail. + # Always read only. + # @!attribute [rw] compliance_regime + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ComplianceRegime] + # Required. Immutable. Compliance Regime associated with this workload. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Immutable. The Workload creation timestamp. + # @!attribute [rw] billing_account + # @return [::String] + # Optional. The billing account used for the resources which are + # direct children of workload. This billing account is initially associated + # with the resources created as part of Workload creation. + # After the initial creation of these resources, the customer can change + # the assigned billing account. + # The resource name has the form + # `billingAccounts/{billing_account_id}`. For example, + # `billingAccounts/012345-567890-ABCDEF`. + # @!attribute [rw] etag + # @return [::String] + # Optional. ETag of the workload, it is calculated on the basis + # of the Workload contents. It will be used in Update & Delete operations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels applied to the workload. + # @!attribute [rw] provisioned_resources_parent + # @return [::String] + # Input only. The parent resource for the resources managed by this Assured Workload. May + # be either empty or a folder resource which is a child of the + # Workload parent. If not specified all resources are created under the + # parent organization. + # Format: + # folders/\\{folder_id} + # @!attribute [rw] kms_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::KMSSettings] + # Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS + # CMEK key is provisioned. + # This field is deprecated as of Feb 28, 2022. + # In order to create a Keyring, callers should specify, + # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + # @!attribute [rw] resource_settings + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceSettings>] + # Input only. Resource properties that are used to customize workload resources. + # These properties (such as custom project id) will be used to create + # workload resources if possible. This field is optional. + # @!attribute [r] kaj_enrollment_state + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::KajEnrollmentState] + # Output only. Represents the KAJ enrollment state of the given workload. + # @!attribute [rw] enable_sovereign_controls + # @return [::Boolean] + # Optional. Indicates the sovereignty status of the given workload. + # Currently meant to be used by Europe/Canada customers. + # @!attribute [r] saa_enrollment_response + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse] + # Output only. Represents the SAA enrollment response of the given workload. + # SAA enrollment response is queried during GetWorkload call. + # In failure cases, user friendly error message is shown in SAA details page. + # @!attribute [r] compliant_but_disallowed_services + # @return [::Array<::String>] + # Output only. Urls for services which are compliant for this Assured Workload, but which + # are currently disallowed by the ResourceUsageRestriction org policy. + # Invoke RestrictAllowedResources endpoint to allow your project developers + # to use these services in their environment." + # @!attribute [rw] partner + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::Partner] + # Optional. Compliance Regime associated with this workload. + class Workload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represent the resources that are children of this Workload. + # @!attribute [rw] resource_id + # @return [::Integer] + # Resource identifier. + # For a project this represents project_number. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo::ResourceType] + # Indicates the type of resource. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of resource. + module ResourceType + # Unknown resource type. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # Consumer project. + # AssuredWorkloads Projects are no longer supported. This field will be + # ignored only in CreateWorkload requests. ListWorkloads and GetWorkload + # will continue to provide projects information. + # Use CONSUMER_FOLDER instead. + CONSUMER_PROJECT = 1 + + # Consumer Folder. + CONSUMER_FOLDER = 4 + + # Consumer project containing encryption keys. + ENCRYPTION_KEYS_PROJECT = 2 + + # Keyring resource that hosts encryption keys. + KEYRING = 3 + end + end + + # Settings specific to the Key Management Service. + # This message is deprecated. + # In order to create a Keyring, callers should specify, + # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] next_rotation_time + # @return [::Google::Protobuf::Timestamp] + # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a + # new version of the crypto key and mark it as the primary. + # @!attribute [rw] rotation_period + # @return [::Google::Protobuf::Duration] + # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key + # Management Service automatically rotates a key. Must be at least 24 hours + # and at most 876,000 hours. + class KMSSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represent the custom settings for the resources to be created. + # @!attribute [rw] resource_id + # @return [::String] + # Resource identifier. + # For a project this represents project_id. If the project is already + # taken, the workload creation will fail. + # For KeyRing, this represents the keyring_id. + # For a folder, don't set this value as folder_id is assigned by Google. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo::ResourceType] + # Indicates the type of resource. This field should be specified to + # correspond the id to the right resource type (CONSUMER_FOLDER or + # ENCRYPTION_KEYS_PROJECT) + # @!attribute [rw] display_name + # @return [::String] + # User-assigned resource display name. + # If not empty it will be used to create a resource with the specified + # name. + class ResourceSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Signed Access Approvals (SAA) enrollment response. + # @!attribute [rw] setup_status + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse::SetupState] + # Indicates SAA enrollment status of a given workload. + # @!attribute [rw] setup_errors + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse::SetupError>] + # Indicates SAA enrollment setup error if any. + class SaaEnrollmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Setup state of SAA enrollment. + module SetupState + # Unspecified. + SETUP_STATE_UNSPECIFIED = 0 + + # SAA enrollment pending. + STATUS_PENDING = 1 + + # SAA enrollment comopleted. + STATUS_COMPLETE = 2 + end + + # Setup error of SAA enrollment. + module SetupError + # Unspecified. + SETUP_ERROR_UNSPECIFIED = 0 + + # Invalid states for all customers, to be redirected to AA UI for + # additional details. + ERROR_INVALID_BASE_SETUP = 1 + + # Returned when there is not an EKM key configured. + ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 + + # Returned when there are no enrolled services or the customer is + # enrolled in CAA only for a subset of services. + ERROR_NOT_ALL_SERVICES_ENROLLED = 3 + + # Returned when exception was encountered during evaluation of other + # criteria. + ERROR_SETUP_CHECK_FAILED = 4 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Supported Compliance Regimes. + module ComplianceRegime + # Unknown compliance regime. + COMPLIANCE_REGIME_UNSPECIFIED = 0 + + # Information protection as per DoD IL4 requirements. + IL4 = 1 + + # Criminal Justice Information Services (CJIS) Security policies. + CJIS = 2 + + # FedRAMP High data protection controls + FEDRAMP_HIGH = 3 + + # FedRAMP Moderate data protection controls + FEDRAMP_MODERATE = 4 + + # Assured Workloads For US Regions data protection controls + US_REGIONAL_ACCESS = 5 + + # Health Insurance Portability and Accountability Act controls + HIPAA = 6 + + # Health Information Trust Alliance controls + HITRUST = 7 + + # Assured Workloads For EU Regions and Support controls + EU_REGIONS_AND_SUPPORT = 8 + + # Assured Workloads For Canada Regions and Support controls + CA_REGIONS_AND_SUPPORT = 9 + + # International Traffic in Arms Regulations + ITAR = 10 + + # Assured Workloads for Australia Regions and Support controls + # Available for public preview consumption. + # Don't create production workloads. + AU_REGIONS_AND_US_SUPPORT = 11 + + # Assured Workloads for Partners + ASSURED_WORKLOADS_FOR_PARTNERS = 12 + end + + # Key Access Justifications(KAJ) Enrollment State. + module KajEnrollmentState + # Default State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Pending State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_PENDING = 1 + + # Complete State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_COMPLETE = 2 + end + + # Supported Assured Workloads Partners. + module Partner + # Unknown partner regime/controls. + PARTNER_UNSPECIFIED = 0 + + # S3NS regime/controls. + LOCAL_CONTROLS_BY_S3NS = 1 + end + end + + # Operation metadata to give request details of CreateWorkload. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Time when the operation was created. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the workload. + # @!attribute [rw] parent + # @return [::String] + # Optional. The parent of the workload. + # @!attribute [rw] compliance_regime + # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ComplianceRegime] + # Optional. Compliance controls that should be applied to the resources managed by + # the workload. + class CreateWorkloadOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for restricting list of available resources in Workload environment. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @!attribute [rw] restriction_type + # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + class RestrictAllowedResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of restriction. + module RestrictionType + # Unknown restriction type. + RESTRICTION_TYPE_UNSPECIFIED = 0 + + # Allow the use all of all gcp products, irrespective of the compliance + # posture. This effectively removes gcp.restrictServiceUsage OrgPolicy + # on the AssuredWorkloads Folder. + ALLOW_ALL_GCP_RESOURCES = 1 + + # Based on Workload's compliance regime, allowed list changes. + # See - https://cloud.google.com/assured-workloads/docs/supported-products + # for the list of supported resources. + ALLOW_COMPLIANT_RESOURCES = 2 + end + end + + # Response for restricting the list of allowed resources. + class RestrictAllowedResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for acknowledging the violation + # Next Id: 4 + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Violation to acknowledge. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} + # @!attribute [rw] comment + # @return [::String] + # Required. Business justification explaining the need for violation acknowledgement + # @!attribute [rw] non_compliant_org_policy + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. This field is deprecated and will be removed in future version of the API. + # Name of the OrgPolicy which was modified with non-compliant change and + # resulted in this violation. + # Format: + # projects/\\{project_number}/policies/\\{constraint_name} + # folders/\\{folder_id}/policies/\\{constraint_name} + # organizations/\\{organization_id}/policies/\\{constraint_name} + class AcknowledgeViolationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for violation acknowledgement + class AcknowledgeViolationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Interval defining a time window. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The start of the time window. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The end of the time window. + class TimeWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching violations in an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. The Workload name. + # Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. + # @!attribute [rw] interval + # @return [::Google::Cloud::AssuredWorkloads::V1::TimeWindow] + # Optional. Specifies the time window for retrieving active Violations. + # When specified, retrieves Violations that were active between start_time + # and end_time. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Page size. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token returned from previous request. + # @!attribute [rw] filter + # @return [::String] + # Optional. A custom filter for filtering by the Violations properties. + class ListViolationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of ListViolations endpoint. + # @!attribute [rw] violations + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Violation>] + # List of Violations under a Workload. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. Returns empty if reached the last page. + class ListViolationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching a Workload Violation. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Violation to fetch (ie. Violation.name). + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} + class GetViolationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Workload monitoring Violation. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. Name of the Violation. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload_id}/violations/\\{violations_id} + # @!attribute [r] description + # @return [::String] + # Output only. Description for the Violation. + # e.g. OrgPolicy gcp.resourceLocations has non compliant value. + # @!attribute [r] begin_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the event which triggered the Violation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time when the Violation record was updated. + # @!attribute [r] resolve_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the event which fixed the Violation. + # If the violation is ACTIVE this will be empty. + # @!attribute [r] category + # @return [::String] + # Output only. Category under which this violation is mapped. + # e.g. Location, Service Usage, Access, Encryption, etc. + # @!attribute [r] state + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::State] + # Output only. State of the violation + # @!attribute [r] org_policy_constraint + # @return [::String] + # Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in + # this violation. + # @!attribute [r] audit_log_link + # @return [::String] + # Output only. Immutable. Audit Log Link for violated resource + # Format: + # https://console.cloud.google.com/logs/query;query=\\{logName}\\{protoPayload.resourceName}\\{timeRange}\\{folder} + # @!attribute [r] non_compliant_org_policy + # @return [::String] + # Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and + # resulted this violation. + # Format: + # projects/\\{project_number}/policies/\\{constraint_name} + # folders/\\{folder_id}/policies/\\{constraint_name} + # organizations/\\{organization_id}/policies/\\{constraint_name} + # @!attribute [r] remediation + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation] + # Output only. Compliance violation remediation + # @!attribute [r] acknowledged + # @return [::Boolean] + # Output only. A boolean that indicates if the violation is acknowledged + # @!attribute [rw] acknowledgement_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp when this violation was acknowledged last. + # This will be absent when acknowledged field is marked as false. + # @!attribute [r] exception_audit_log_link + # @return [::String] + # Output only. Immutable. Audit Log link to find business justification provided for violation + # exception. Format: + # https://console.cloud.google.com/logs/query;query=\\{logName}\\{protoPayload.resourceName}\\{protoPayload.methodName}\\{timeRange}\\{organization} + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents remediation guidance to resolve compliance violation for + # AssuredWorkload + # @!attribute [rw] instructions + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions] + # Required. Remediation instructions to resolve violations + # @!attribute [rw] compliant_values + # @return [::Array<::String>] + # Values that can resolve the violation + # For example: for list org policy violations, this will either be the list + # of allowed or denied values + # @!attribute [r] remediation_type + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::RemediationType] + # Output only. Reemediation type based on the type of org policy values violated + class Remediation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Instructions to remediate violation + # @!attribute [rw] gcloud_instructions + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions::Gcloud] + # Remediation instructions to resolve violation via gcloud cli + # @!attribute [rw] console_instructions + # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions::Console] + # Remediation instructions to resolve violation via cloud console + class Instructions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Remediation instructions to resolve violation via gcloud cli + # @!attribute [rw] gcloud_commands + # @return [::Array<::String>] + # Gcloud command to resolve violation + # @!attribute [rw] steps + # @return [::Array<::String>] + # Steps to resolve violation via gcloud cli + # @!attribute [rw] additional_links + # @return [::Array<::String>] + # Additional urls for more information about steps + class Gcloud + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Remediation instructions to resolve violation via cloud console + # @!attribute [rw] console_uris + # @return [::Array<::String>] + # Link to console page where violations can be resolved + # @!attribute [rw] steps + # @return [::Array<::String>] + # Steps to resolve violation via cloud console + # @!attribute [rw] additional_links + # @return [::Array<::String>] + # Additional urls for more information about steps + class Console + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Classifying remediation into various types based on the kind of + # violation. For example, violations caused due to changes in boolean org + # policy requires different remediation instructions compared to violation + # caused due to changes in allowed values of list org policy. + module RemediationType + # Unspecified remediation type + REMEDIATION_TYPE_UNSPECIFIED = 0 + + # Remediation type for boolean org policy + REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1 + + # Remediation type for list org policy which have allowed values in the + # monitoring rule + REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2 + + # Remediation type for list org policy which have denied values in the + # monitoring rule + REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3 + + # Remediation type for gcp.restrictCmekCryptoKeyProjects + REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4 + end + end + + # Violation State Values + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Violation is resolved. + RESOLVED = 2 + + # Violation is Unresolved + UNRESOLVED = 3 + + # Violation is Exception + EXCEPTION = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile new file mode 100644 index 000000000000..49bd814d146e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-assured_workloads-v1", path: "../" +else + gem "google-cloud-assured_workloads-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb new file mode 100644 index 000000000000..e2828db3324c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the acknowledge_violation call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation. +# +def acknowledge_violation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new + + # Call the acknowledge_violation method. + result = client.acknowledge_violation request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb new file mode 100644 index 000000000000..c3ab7fb1bcf6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the create_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload. +# +def create_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new + + # Call the create_workload method. + result = client.create_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb new file mode 100644 index 000000000000..9b95aca15297 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the delete_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload. +# +def delete_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new + + # Call the delete_workload method. + result = client.delete_workload request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb new file mode 100644 index 000000000000..c957fe2e6f20 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the get_violation call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation. +# +def get_violation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new + + # Call the get_violation method. + result = client.get_violation request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Violation. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb new file mode 100644 index 000000000000..4c570c4bf025 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the get_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload. +# +def get_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new + + # Call the get_workload method. + result = client.get_workload request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb new file mode 100644 index 000000000000..8592a9b4a1c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the list_violations call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations. +# +def list_violations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new + + # Call the list_violations method. + result = client.list_violations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Violation. + p item + end +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb new file mode 100644 index 000000000000..480c6982ac6a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the list_workloads call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads. +# +def list_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new + + # Call the list_workloads method. + result = client.list_workloads request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. + p item + end +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb new file mode 100644 index 000000000000..e6804ae174be --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources. +# +def restrict_allowed_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new + + # Call the restrict_allowed_resources method. + result = client.restrict_allowed_resources request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb new file mode 100644 index 000000000000..6a0d2952fd66 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync] +require "google/cloud/assured_workloads/v1" + +## +# Snippet for the update_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload. +# +def update_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new + + # Call the update_workload method. + result = client.update_workload request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. + p result +end +# [END assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json new file mode 100644 index 000000000000..95dad32c09ec --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json @@ -0,0 +1,375 @@ +{ + "client_library": { + "name": "google-cloud-assured_workloads-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.assuredworkloads.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync", + "title": "Snippet for the create_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload.", + "file": "assured_workloads_service/create_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "CreateWorkload", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.CreateWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync", + "title": "Snippet for the update_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload.", + "file": "assured_workloads_service/update_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::Workload", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "UpdateWorkload", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.UpdateWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", + "title": "Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources.", + "file": "assured_workloads_service/restrict_allowed_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "restrict_allowed_resources", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "RestrictAllowedResources", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.RestrictAllowedResources", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync", + "title": "Snippet for the delete_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload.", + "file": "assured_workloads_service/delete_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "DeleteWorkload", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.DeleteWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync", + "title": "Snippet for the get_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload.", + "file": "assured_workloads_service/get_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::Workload", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "GetWorkload", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync", + "title": "Snippet for the list_workloads call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads.", + "file": "assured_workloads_service/list_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workloads", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "ListWorkloads", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListWorkloads", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync", + "title": "Snippet for the list_violations call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations.", + "file": "assured_workloads_service/list_violations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_violations", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "ListViolations", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListViolations", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync", + "title": "Snippet for the get_violation call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation.", + "file": "assured_workloads_service/get_violation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_violation", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::Violation", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "GetViolation", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetViolation", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync", + "title": "Snippet for the acknowledge_violation call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation.", + "file": "assured_workloads_service/acknowledge_violation.rb", + "language": "RUBY", + "client_method": { + "short_name": "acknowledge_violation", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "AcknowledgeViolation", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.AcknowledgeViolation", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb new file mode 100644 index 000000000000..cd74cbc66c3a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" +require "google/cloud/assuredworkloads/v1/assuredworkloads_services_pb" +require "google/cloud/assured_workloads/v1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb new file mode 100644 index 000000000000..a6a2edfb3038 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/assured_workloads/v1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_violation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.violation_path organization: "value0", location: "value1", workload: "value2", violation: "value3" + assert_equal "organizations/value0/locations/value1/workloads/value2/violations/value3", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path organization: "value0", location: "value1", workload: "value2" + assert_equal "organizations/value0/locations/value1/workloads/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb new file mode 100644 index 000000000000..a33fcdd0c1ee --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb @@ -0,0 +1,431 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" +require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" + + +class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_workload + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload = {} + external_id = "hello world" + + create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workload parent: parent, workload: workload, external_id: external_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workload ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workload({ parent: parent, workload: workload, external_id: external_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workload(::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_count + end + end + end + + def test_update_workload + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1::Workload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workload = {} + update_mask = {} + + update_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_update_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workload({ workload: workload, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workload workload: workload, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workload ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workload({ workload: workload, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workload(::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workload_client_stub.call_count + end + end + end + + def test_restrict_allowed_resources + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + restriction_type = :RESTRICTION_TYPE_UNSPECIFIED + + restrict_allowed_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_restrict_allowed_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restrict_allowed_resources_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.restrict_allowed_resources name: name, restriction_type: restriction_type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restrict_allowed_resources_client_stub.call_count + end + end + end + + def test_delete_workload + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workload({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workload name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workload ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workload({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workload(::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workload_client_stub.call_count + end + end + end + + def test_get_workload + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1::Workload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workload ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workload(::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_count + end + end + end + + def test_list_workloads + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workloads ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workloads(::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_workloads_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb new file mode 100644 index 000000000000..42ad9d058624 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb @@ -0,0 +1,683 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" +require "google/cloud/assured_workloads/v1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload = {} + external_id = "hello world" + + create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::Workload), request["workload"] + assert_equal "hello world", request["external_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workload parent: parent, workload: workload, external_id: external_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workload ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workload({ parent: parent, workload: workload, external_id: external_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workload(::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_rpc_count + end + end + + def test_update_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workload = {} + update_mask = {} + + update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::Workload), request["workload"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_workload workload: workload, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_workload ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_workload({ workload: workload, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_workload(::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_workload_client_stub.call_rpc_count + end + end + + def test_restrict_allowed_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + restriction_type = :RESTRICTION_TYPE_UNSPECIFIED + + restrict_allowed_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restrict_allowed_resources, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, request + assert_equal "hello world", request["name"] + assert_equal :RESTRICTION_TYPE_UNSPECIFIED, request["restriction_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restrict_allowed_resources_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.restrict_allowed_resources name: name, restriction_type: restriction_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restrict_allowed_resources_client_stub.call_rpc_count + end + end + + def test_delete_workload + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workload({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workload name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workload ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workload({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workload(::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_workload_client_stub.call_rpc_count + end + end + + def test_get_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workload ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workload(::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_rpc_count + end + end + + def test_list_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workloads, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workloads_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workloads ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workloads(::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_workloads_client_stub.call_rpc_count + end + end + + def test_list_violations + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + interval = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_violations, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::TimeWindow), request["interval"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_violations_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_violations({ parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_violations parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_violations ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new(parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_violations({ parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_violations(::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new(parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_violations_client_stub.call_rpc_count + end + end + + def test_get_violation + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Violation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_violation, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_violation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_violation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_violation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_violation ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_violation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_violation(::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_violation_client_stub.call_rpc_count + end + end + + def test_acknowledge_violation + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + comment = "hello world" + non_compliant_org_policy = "hello world" + + acknowledge_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :acknowledge_violation, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["comment"] + assert_equal "hello world", request["non_compliant_org_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, acknowledge_violation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.acknowledge_violation({ name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.acknowledge_violation name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.acknowledge_violation ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new(name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.acknowledge_violation({ name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.acknowledge_violation(::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new(name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, acknowledge_violation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..f2e12959542e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "assuredworkloads.googleapis.com", + "api_shortname": "assuredworkloads", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1beta1/latest", + "distribution_name": "google-cloud-assured_workloads-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "assuredworkloads", + "name_pretty": "Assured Workloads for Government V1beta1 API", + "product_documentation": "https://cloud.google.com/assured-workloads/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", + "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", + "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..81a9ba91c667 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-assured_workloads-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-assured_workloads-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts new file mode 100644 index 000000000000..a6fffa2ff6ae --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Assured Workloads for Government V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..741738ed213d --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-assured_workloads-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-assured_workloads-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/assured_workloads/v1beta1" + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/assured_workloads/v1beta1" + +::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-assured_workloads-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/assured_workloads/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md new file mode 100644 index 000000000000..dda13ffaf93b --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Assured Workloads for Government V1beta1 API + +API Client library for the Assured Workloads for Government V1beta1 API + +Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Assured Workloads for Government V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-assured_workloads-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/assuredworkloads.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/assured_workloads/v1beta1" + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new +request = ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new # (request fields as keyword arguments...) +response = client.create_workload request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/assured-workloads/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/assured_workloads/v1beta1" +require "logger" + +client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-assured_workloads`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-assured_workloads-v1beta1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-assured_workloads`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-assured_workloads-v1beta1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile new file mode 100644 index 000000000000..d453b207ad79 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-assured_workloads-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ASSURED_WORKLOADS_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ASSURED_WORKLOADS_PROJECT"] = project + ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project + ENV["ASSURED_WORKLOADS_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-assured_workloads-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-assured_workloads-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-assured_workloads-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-assured_workloads-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-assured_workloads-v1beta1" + header "google-cloud-assured_workloads-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-assured_workloads-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-assured_workloads-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-assured_workloads-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-assured_workloads-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..578c2e88d018 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.assuredworkloads.v1beta1", + "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1beta1", + "services": { + "AssuredWorkloadsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client", + "rpcs": { + "CreateWorkload": { + "methods": [ + "create_workload" + ] + }, + "UpdateWorkload": { + "methods": [ + "update_workload" + ] + }, + "RestrictAllowedResources": { + "methods": [ + "restrict_allowed_resources" + ] + }, + "DeleteWorkload": { + "methods": [ + "delete_workload" + ] + }, + "GetWorkload": { + "methods": [ + "get_workload" + ] + }, + "AnalyzeWorkloadMove": { + "methods": [ + "analyze_workload_move" + ] + }, + "ListWorkloads": { + "methods": [ + "list_workloads" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec new file mode 100644 index 000000000000..8dedf87ccf7d --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/assured_workloads/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-assured_workloads-v1beta1" + gem.version = Google::Cloud::AssuredWorkloads::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." + gem.summary = "API Client library for the Assured Workloads for Government V1beta1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb new file mode 100644 index 000000000000..4b23acdd7178 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/assured_workloads/v1beta1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb new file mode 100644 index 000000000000..4395df713d7c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" +require "google/cloud/assured_workloads/v1beta1/version" + +module Google + module Cloud + module AssuredWorkloads + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/assured_workloads/v1beta1" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/assured_workloads/v1beta1" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/assured_workloads/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb new file mode 100644 index 000000000000..077d6ddf1b47 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/assured_workloads/v1beta1/version" + +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/client" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + ## + # Service to manage AssuredWorkloads. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + module AssuredWorkloadsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb new file mode 100644 index 000000000000..212fa3d35a99 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb @@ -0,0 +1,1121 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + ## + # Client for the AssuredWorkloadsService service. + # + # Service to manage AssuredWorkloads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assured_workloads_service_stub + + ## + # Configure the AssuredWorkloadsService Client class. + # + # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssuredWorkloadsService clients + # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AssuredWorkloads", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_workload.timeout = 60.0 + + default_config.rpcs.update_workload.timeout = 60.0 + + default_config.rpcs.delete_workload.timeout = 60.0 + default_config.rpcs.delete_workload.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.analyze_workload_move.timeout = 60.0 + default_config.rpcs.analyze_workload_move.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @assured_workloads_service_stub.universe_domain + end + + ## + # Create a new AssuredWorkloadsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssuredWorkloadsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @assured_workloads_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @assured_workloads_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assured_workloads_service_stub.logger + end + + # Service calls + + ## + # Creates Assured Workload. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workload(parent: nil, workload: nil, external_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] + # Required. Assured Workload to create + # @param external_id [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workload. + # Currently allows updating of workload display_name and labels. + # For force updates don't set etag field in the Workload. + # Only one update operation per workload can be in progress. + # + # @overload update_workload(request, options = nil) + # Pass arguments to `update_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workload(workload: nil, update_mask: nil) + # Pass arguments to `update_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new + # + # # Call the update_workload method. + # result = client.update_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. + # p result + # + def update_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + # + # @overload restrict_allowed_resources(request, options = nil) + # Pass arguments to `restrict_allowed_resources` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restrict_allowed_resources(name: nil, restriction_type: nil) + # Pass arguments to `restrict_allowed_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new + # + # # Call the restrict_allowed_resources method. + # result = client.restrict_allowed_resources request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. + # p result + # + def restrict_allowed_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + # In addition to assuredworkloads.workload.delete permission, the user should + # also have orgpolicy.policy.set permission on the deleted folder to remove + # Assured Workloads OrgPolicies. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workload(name: nil, etag: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param etag [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets Assured Workload associated with a CRM Node + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload to fetch. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyze if the source Assured Workloads can be moved to the target Assured + # Workload + # + # @overload analyze_workload_move(request, options = nil) + # Pass arguments to `analyze_workload_move` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload analyze_workload_move(source: nil, project: nil, target: nil) + # Pass arguments to `analyze_workload_move` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::String] + # The source type is a project-based workload. Specify the workloads's + # relative resource name, formatted as: + # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" + # For example: + # "organizations/123/locations/us-east1/workloads/assured-workload-1" + # + # Note: The following parameters are mutually exclusive: `source`, `project`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param project [::String] + # The source type is a project. Specify the project's relative resource + # name, formatted as either a project number or a project ID: + # "projects/\\{PROJECT_NUMBER}" or "projects/\\{PROJECT_ID}" + # For example: + # "projects/951040570662" when specifying a project number, or + # "projects/my-project-123" when specifying a project ID. + # + # Note: The following parameters are mutually exclusive: `project`, `source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param target [::String] + # Required. The resource ID of the folder-based destination workload. This workload is + # where the source project will hypothetically be moved to. Specify the + # workload's relative resource name, formatted as: + # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" + # For example: + # "organizations/123/locations/us-east1/workloads/assured-workload-2" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new + # + # # Call the analyze_workload_move method. + # result = client.analyze_workload_move request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse. + # p result + # + def analyze_workload_move request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.analyze_workload_move.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.analyze_workload_move.timeout, + metadata: metadata, + retry_policy: @config.rpcs.analyze_workload_move.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :analyze_workload_move, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Assured Workloads under a CRM Node. + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @param filter [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workloads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssuredWorkloadsService API. + # + # This class represents the configuration for AssuredWorkloadsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssuredWorkloadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `update_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workload + ## + # RPC-specific configuration for `restrict_allowed_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :restrict_allowed_resources + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + ## + # RPC-specific configuration for `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `analyze_workload_move` + # @return [::Gapic::Config::Method] + # + attr_reader :analyze_workload_move + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + + # @private + def initialize parent_rpcs = nil + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload + @update_workload = ::Gapic::Config::Method.new update_workload_config + restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources + @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + analyze_workload_move_config = parent_rpcs.analyze_workload_move if parent_rpcs.respond_to? :analyze_workload_move + @analyze_workload_move = ::Gapic::Config::Method.new analyze_workload_move_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb new file mode 100644 index 000000000000..c940ead393b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + # Credentials for the AssuredWorkloadsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "ASSURED_WORKLOADS_CREDENTIALS", + "ASSURED_WORKLOADS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "ASSURED_WORKLOADS_CREDENTIALS_JSON", + "ASSURED_WORKLOADS_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb new file mode 100644 index 000000000000..6e78e5af7c28 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssuredWorkloadsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb new file mode 100644 index 000000000000..abdcfdd68cde --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + # Path helper methods for the AssuredWorkloadsService API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/workloads/{workload}` + # + # @param organization [String] + # @param location [String] + # @param workload [String] + # + # @return [::String] + def workload_path organization:, location:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb new file mode 100644 index 000000000000..6c4602274f15 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/assured_workloads/v1beta1/version" + +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + ## + # Service to manage AssuredWorkloads. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + module AssuredWorkloadsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb new file mode 100644 index 000000000000..c298b223e881 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb @@ -0,0 +1,653 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + module Rest + ## + # REST client for the AssuredWorkloadsService service. + # + # Service to manage AssuredWorkloads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :assured_workloads_service_stub + + ## + # Configure the AssuredWorkloadsService Client class. + # + # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssuredWorkloadsService clients + # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AssuredWorkloads", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_workload.timeout = 60.0 + + default_config.rpcs.delete_workload.timeout = 60.0 + default_config.rpcs.delete_workload.retry_policy = { + initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @assured_workloads_service_stub.universe_domain + end + + ## + # Create a new AssuredWorkloadsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssuredWorkloadsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @assured_workloads_service_stub = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @assured_workloads_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @assured_workloads_service_stub.logger + end + + # Service calls + + ## + # Creates Assured Workload. + # + # @overload create_workload(request, options = nil) + # Pass arguments to `create_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workload(parent: nil, workload: nil, external_id: nil) + # Pass arguments to `create_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] + # Required. Assured Workload to create + # @param external_id [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new + # + # # Call the create_workload method. + # result = client.create_workload request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.create_workload request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restrict the list of resources allowed in the Workload environment. + # The current list of allowed products can be found at + # https://cloud.google.com/assured-workloads/docs/supported-products + # In addition to assuredworkloads.workload.update permission, the user should + # also have orgpolicy.policy.set permission on the folder resource + # to use this functionality. + # + # @overload restrict_allowed_resources(request, options = nil) + # Pass arguments to `restrict_allowed_resources` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restrict_allowed_resources(name: nil, restriction_type: nil) + # Pass arguments to `restrict_allowed_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new + # + # # Call the restrict_allowed_resources method. + # result = client.restrict_allowed_resources request + # + # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. + # p result + # + def restrict_allowed_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.restrict_allowed_resources request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the workload. Make sure that workload's direct children are already + # in a deleted state, otherwise the request will fail with a + # FAILED_PRECONDITION error. + # In addition to assuredworkloads.workload.delete permission, the user should + # also have orgpolicy.policy.set permission on the deleted folder to remove + # Assured Workloads OrgPolicies. + # + # @overload delete_workload(request, options = nil) + # Pass arguments to `delete_workload` via a request object, either of type + # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workload(name: nil, etag: nil) + # Pass arguments to `delete_workload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @param etag [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/assured_workloads/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new + # + # # Call the delete_workload method. + # result = client.delete_workload request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @assured_workloads_service_stub.delete_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AssuredWorkloadsService REST API. + # + # This class represents the configuration for AssuredWorkloadsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_workload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AssuredWorkloadsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workload + ## + # RPC-specific configuration for `restrict_allowed_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :restrict_allowed_resources + ## + # RPC-specific configuration for `delete_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workload + + # @private + def initialize parent_rpcs = nil + create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload + @create_workload = ::Gapic::Config::Method.new create_workload_config + restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources + @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config + delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload + @delete_workload = ::Gapic::Config::Method.new delete_workload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb new file mode 100644 index 000000000000..6a9e2cb34ffd --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AssuredWorkloadsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AssuredWorkloadsService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb new file mode 100644 index 000000000000..e3b6724a99f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb @@ -0,0 +1,266 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + module AssuredWorkloadsService + module Rest + ## + # REST service stub for the AssuredWorkloadsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restrict_allowed_resources REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] + # A result object deserialized from the server's reply + def restrict_allowed_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restrict_allowed_resources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restrict_allowed_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/workloads", + body: "workload", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restrict_allowed_resources REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restrict_allowed_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:restrictAllowedResources", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workload REST call + # + # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb new file mode 100644 index 000000000000..8e2c6c93872f --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" +require "google/cloud/assured_workloads/v1beta1/version" + +module Google + module Cloud + module AssuredWorkloads + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/assured_workloads/v1beta1/rest" + # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new + # + module V1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb new file mode 100644 index 000000000000..871b2223ff1d --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb new file mode 100644 index 000000000000..8c8ba5ca8ba8 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x12GetWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\"s\n\x1a\x41nalyzeWorkloadMoveRequest\x12\x10\n\x06source\x18\x01 \x01(\tH\x00\x12\x11\n\x07project\x18\x03 \x01(\tH\x00\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x1b\n\x19projectOrWorkloadResource\"/\n\x1b\x41nalyzeWorkloadMoveResponse\x12\x10\n\x08\x62lockers\x18\x01 \x03(\t\"\x8f\x01\n\x14ListWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"t\n\x15ListWorkloadsResponse\x12\x42\n\tworkloads\x18\x01 \x03(\x0b\x32/.google.cloud.assuredworkloads.v1beta1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd2\x1b\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\tresources\x18\x03 \x03(\x0b\x32<.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfoB\x03\xe0\x41\x03\x12\x63\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegimeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x37\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1c\n\x0f\x62illing_account\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0cil4_settings\x18\x07 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.IL4SettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12_\n\rcjis_settings\x18\x08 \x01(\x0b\x32<.google.cloud.assuredworkloads.v1beta1.Workload.CJISSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12n\n\x15\x66\x65\x64ramp_high_settings\x18\x0b \x01(\x0b\x32\x43.google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12v\n\x19\x66\x65\x64ramp_moderate_settings\x18\x0c \x01(\x0b\x32G.google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\n \x03(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.LabelsEntryB\x03\xe0\x41\x01\x12)\n\x1cprovisioned_resources_parent\x18\r \x01(\tB\x03\xe0\x41\x04\x12X\n\x0ckms_settings\x18\x0e \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x05\x18\x01\xe0\x41\x04\x12`\n\x11resource_settings\x18\x0f \x03(\x0b\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettingsB\x03\xe0\x41\x04\x12\x65\n\x14kaj_enrollment_state\x18\x11 \x01(\x0e\x32\x42.google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentStateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_sovereign_controls\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12k\n\x17saa_enrollment_response\x18\x14 \x01(\x0b\x32\x45.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponseB\x03\xe0\x41\x03\x12.\n!compliant_but_disallowed_services\x18\x18 \x03(\tB\x03\xe0\x41\x03\x1a\x8e\x02\n\x0cResourceInfo\x12\x13\n\x0bresource_id\x18\x01 \x01(\x03\x12`\n\rresource_type\x18\x02 \x01(\x0e\x32I.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType\"\x86\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10\x43ONSUMER_PROJECT\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0f\x43ONSUMER_FOLDER\x10\x04\x12\x1b\n\x17\x45NCRYPTION_KEYS_PROJECT\x10\x02\x12\x0b\n\x07KEYRING\x10\x03\x1a\x93\x01\n\x0bKMSSettings\x12\x41\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05\x12=\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1al\n\x0bIL4Settings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1am\n\x0c\x43JISSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1at\n\x13\x46\x65\x64rampHighSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1ax\n\x17\x46\x65\x64rampModerateSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1a\x9f\x01\n\x10ResourceSettings\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12`\n\rresource_type\x18\x02 \x01(\x0e\x32I.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1a\x86\x04\n\x15SaaEnrollmentResponse\x12k\n\x0csetup_status\x18\x01 \x01(\x0e\x32P.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupStateH\x00\x88\x01\x01\x12\x66\n\x0csetup_errors\x18\x02 \x03(\x0e\x32P.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError\"R\n\nSetupState\x12\x1b\n\x17SETUP_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_PENDING\x10\x01\x12\x13\n\x0fSTATUS_COMPLETE\x10\x02\"\xb2\x01\n\nSetupError\x12\x1b\n\x17SETUP_ERROR_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45RROR_INVALID_BASE_SETUP\x10\x01\x12&\n\"ERROR_MISSING_EXTERNAL_SIGNING_KEY\x10\x02\x12#\n\x1f\x45RROR_NOT_ALL_SERVICES_ENROLLED\x10\x03\x12\x1c\n\x18\x45RROR_SETUP_CHECK_FAILED\x10\x04\x42\x0f\n\r_setup_status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x81\x02\n\x10\x43omplianceRegime\x12!\n\x1d\x43OMPLIANCE_REGIME_UNSPECIFIED\x10\x00\x12\x07\n\x03IL4\x10\x01\x12\x08\n\x04\x43JIS\x10\x02\x12\x10\n\x0c\x46\x45\x44RAMP_HIGH\x10\x03\x12\x14\n\x10\x46\x45\x44RAMP_MODERATE\x10\x04\x12\x16\n\x12US_REGIONAL_ACCESS\x10\x05\x12\t\n\x05HIPAA\x10\x06\x12\x0b\n\x07HITRUST\x10\x07\x12\x1a\n\x16\x45U_REGIONS_AND_SUPPORT\x10\x08\x12\x1a\n\x16\x43\x41_REGIONS_AND_SUPPORT\x10\t\x12\x08\n\x04ITAR\x10\n\x12\x1d\n\x19\x41U_REGIONS_AND_US_SUPPORT\x10\x0b\"\x7f\n\x12KajEnrollmentState\x12$\n KAJ_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cKAJ_ENROLLMENT_STATE_PENDING\x10\x01\x12!\n\x1dKAJ_ENROLLMENT_STATE_COMPLETE\x10\x02:u\xea\x41r\n(assuredworkloads.googleapis.com/Workload\x12\x46organizations/{organization}/locations/{location}/workloads/{workload}B\x1c\n\x1a\x63ompliance_regime_settings\"\xcb\x02\n\x1f\x43reateWorkloadOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12`\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegimeB\x03\xe0\x41\x01\x12`\n\x11resource_settings\x18\x05 \x03(\x0b\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettingsB\x03\xe0\x41\x01\x42\xf6\x02\n)com.google.cloud.assuredworkloads.v1beta1B\x15\x41ssuredworkloadsProtoP\x01ZUcloud.google.com/go/assuredworkloads/apiv1beta1/assuredworkloadspb;assuredworkloadspb\xaa\x02%Google.Cloud.AssuredWorkloads.V1Beta1\xca\x02%Google\\Cloud\\AssuredWorkloads\\V1beta1\xea\x02(Google::Cloud::AssuredWorkloads::V1beta1\xea\x41]\n(assuredworkloads.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest").msgclass + UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest").msgclass + RestrictAllowedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest").msgclass + RestrictAllowedResourcesRequest::RestrictionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest.RestrictionType").enummodule + RestrictAllowedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse").msgclass + DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest").msgclass + GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest").msgclass + AnalyzeWorkloadMoveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest").msgclass + AnalyzeWorkloadMoveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveResponse").msgclass + ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest").msgclass + ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse").msgclass + Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload").msgclass + Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo").msgclass + Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType").enummodule + Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings").msgclass + Workload::IL4Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings").msgclass + Workload::CJISSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings").msgclass + Workload::FedrampHighSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings").msgclass + Workload::FedrampModerateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings").msgclass + Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings").msgclass + Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse").msgclass + Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState").enummodule + Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError").enummodule + Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime").enummodule + Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState").enummodule + CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb new file mode 100644 index 000000000000..99b60a0169c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\nDgoogle/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto\x12%google.cloud.assuredworkloads.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb new file mode 100644 index 000000000000..dac4e9559b55 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb @@ -0,0 +1,557 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AssuredWorkloads + module V1beta1 + # Request for creating a workload. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the new Workload's parent. + # Must be of the form `organizations/{org_id}/locations/{location_id}`. + # @!attribute [rw] workload + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # Required. Assured Workload to create + # @!attribute [rw] external_id + # @return [::String] + # Optional. A identifier associated with the workload and underlying projects which + # allows for the break down of billing costs for a workload. The value + # provided for the identifier will add a label to the workload and contained + # projects with the identifier as the value. + class CreateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for Updating a workload. + # @!attribute [rw] workload + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] + # Required. The workload to update. + # The workload's `name` field is used to identify the workload to be updated. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + class UpdateWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for restricting list of available resources in Workload environment. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Workload. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + # @!attribute [rw] restriction_type + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] + # Required. The type of restriction for using gcp products in the Workload environment. + class RestrictAllowedResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of restriction. + module RestrictionType + # Unknown restriction type. + RESTRICTION_TYPE_UNSPECIFIED = 0 + + # Allow the use all of all gcp products, irrespective of the compliance + # posture. This effectively removes gcp.restrictServiceUsage OrgPolicy + # on the AssuredWorkloads Folder. + ALLOW_ALL_GCP_RESOURCES = 1 + + # Based on Workload's compliance regime, allowed list changes. + # See - https://cloud.google.com/assured-workloads/docs/supported-products + # for the list of supported resources. + ALLOW_COMPLIANT_RESOURCES = 2 + end + end + + # Response for restricting the list of allowed resources. + class RestrictAllowedResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a Workload. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the workload. + # Format: + # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the workload. + # If this is provided, it must match the server's etag. + class DeleteWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching a workload. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Workload to fetch. This is the workloads's + # relative path in the API, formatted as + # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". + # For example, + # "organizations/123/locations/us-east1/workloads/assured-workload-1". + class GetWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to analyze a hypothetical move of a source project or project-based + # workload to a target (destination) folder-based workload. + # @!attribute [rw] source + # @return [::String] + # The source type is a project-based workload. Specify the workloads's + # relative resource name, formatted as: + # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" + # For example: + # "organizations/123/locations/us-east1/workloads/assured-workload-1" + # + # Note: The following fields are mutually exclusive: `source`, `project`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] project + # @return [::String] + # The source type is a project. Specify the project's relative resource + # name, formatted as either a project number or a project ID: + # "projects/\\{PROJECT_NUMBER}" or "projects/\\{PROJECT_ID}" + # For example: + # "projects/951040570662" when specifying a project number, or + # "projects/my-project-123" when specifying a project ID. + # + # Note: The following fields are mutually exclusive: `project`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target + # @return [::String] + # Required. The resource ID of the folder-based destination workload. This workload is + # where the source project will hypothetically be moved to. Specify the + # workload's relative resource name, formatted as: + # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" + # For example: + # "organizations/123/locations/us-east1/workloads/assured-workload-2" + class AnalyzeWorkloadMoveRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response that includes the analysis of the hypothetical resource move. + # @!attribute [rw] blockers + # @return [::Array<::String>] + # A list of blockers that should be addressed before moving the source + # project or project-based workload to the destination folder-based workload. + class AnalyzeWorkloadMoveResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching workloads in an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent Resource to list workloads from. + # Must be of the form `organizations/{org_id}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token returned from previous request. Page token contains context from + # previous request. Page token needs to be passed in the second and following + # requests. + # @!attribute [rw] filter + # @return [::String] + # A custom filter for filtering by properties of a workload. At this time, + # only filtering by labels is supported. + class ListWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of ListWorkloads endpoint. + # @!attribute [rw] workloads + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] + # List of Workloads under a given parent. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. Return empty if reached the last page. + class ListWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An Workload object for managing highly regulated workloads of cloud + # customers. + # @!attribute [rw] name + # @return [::String] + # Optional. The resource name of the workload. + # Format: + # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} + # + # Read-only. + # @!attribute [rw] display_name + # @return [::String] + # Required. The user-assigned display name of the Workload. + # When present it must be between 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, and spaces. + # + # Example: My Workload + # @!attribute [r] resources + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo>] + # Output only. The resources associated with this workload. + # These resources will be created when creating the workload. + # If any of the projects already exist, the workload creation will fail. + # Always read only. + # @!attribute [rw] compliance_regime + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] + # Required. Immutable. Compliance Regime associated with this workload. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Immutable. The Workload creation timestamp. + # @!attribute [r] billing_account + # @return [::String] + # Output only. The billing account used for the resources which are + # direct children of workload. This billing account is initially associated + # with the resources created as part of Workload creation. + # After the initial creation of these resources, the customer can change + # the assigned billing account. + # The resource name has the form + # `billingAccounts/{billing_account_id}`. For example, + # `billingAccounts/012345-567890-ABCDEF`. + # @!attribute [rw] il4_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::IL4Settings] + # Input only. Immutable. Settings specific to resources needed for IL4. + # + # Note: The following fields are mutually exclusive: `il4_settings`, `cjis_settings`, `fedramp_high_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cjis_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::CJISSettings] + # Input only. Immutable. Settings specific to resources needed for CJIS. + # + # Note: The following fields are mutually exclusive: `cjis_settings`, `il4_settings`, `fedramp_high_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] fedramp_high_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampHighSettings] + # Input only. Immutable. Settings specific to resources needed for FedRAMP High. + # + # Note: The following fields are mutually exclusive: `fedramp_high_settings`, `il4_settings`, `cjis_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] fedramp_moderate_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampModerateSettings] + # Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. + # + # Note: The following fields are mutually exclusive: `fedramp_moderate_settings`, `il4_settings`, `cjis_settings`, `fedramp_high_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] etag + # @return [::String] + # Optional. ETag of the workload, it is calculated on the basis + # of the Workload contents. It will be used in Update & Delete operations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels applied to the workload. + # @!attribute [rw] provisioned_resources_parent + # @return [::String] + # Input only. The parent resource for the resources managed by this Assured Workload. May + # be either empty or a folder resource which is a child of the + # Workload parent. If not specified all resources are created under the + # parent organization. + # Format: + # folders/\\{folder_id} + # @!attribute [rw] kms_settings + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS + # CMEK key is provisioned. + # This field is deprecated as of Feb 28, 2022. + # In order to create a Keyring, callers should specify, + # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + # @!attribute [rw] resource_settings + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] + # Input only. Resource properties that are used to customize workload resources. + # These properties (such as custom project id) will be used to create + # workload resources if possible. This field is optional. + # @!attribute [r] kaj_enrollment_state + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KajEnrollmentState] + # Output only. Represents the KAJ enrollment state of the given workload. + # @!attribute [rw] enable_sovereign_controls + # @return [::Boolean] + # Optional. Indicates the sovereignty status of the given workload. + # Currently meant to be used by Europe/Canada customers. + # @!attribute [r] saa_enrollment_response + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse] + # Output only. Represents the SAA enrollment response of the given workload. + # SAA enrollment response is queried during GetWorkload call. + # In failure cases, user friendly error message is shown in SAA details page. + # @!attribute [r] compliant_but_disallowed_services + # @return [::Array<::String>] + # Output only. Urls for services which are compliant for this Assured Workload, but which + # are currently disallowed by the ResourceUsageRestriction org policy. + # Invoke RestrictAllowedResources endpoint to allow your project developers + # to use these services in their environment." + class Workload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represent the resources that are children of this Workload. + # @!attribute [rw] resource_id + # @return [::Integer] + # Resource identifier. + # For a project this represents project_number. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] + # Indicates the type of resource. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of resource. + module ResourceType + # Unknown resource type. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # Deprecated. Existing workloads will continue to support this, but new + # CreateWorkloadRequests should not specify this as an input value. + CONSUMER_PROJECT = 1 + + # Consumer Folder. + CONSUMER_FOLDER = 4 + + # Consumer project containing encryption keys. + ENCRYPTION_KEYS_PROJECT = 2 + + # Keyring resource that hosts encryption keys. + KEYRING = 3 + end + end + + # Settings specific to the Key Management Service. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] next_rotation_time + # @return [::Google::Protobuf::Timestamp] + # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a + # new version of the crypto key and mark it as the primary. + # @!attribute [rw] rotation_period + # @return [::Google::Protobuf::Duration] + # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key + # Management Service automatically rotates a key. Must be at least 24 hours + # and at most 876,000 hours. + class KMSSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to resources needed for IL4. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] kms_settings + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Immutable. Settings used to create a CMEK crypto key. + class IL4Settings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to resources needed for CJIS. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] kms_settings + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Immutable. Settings used to create a CMEK crypto key. + class CJISSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to resources needed for FedRAMP High. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] kms_settings + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Immutable. Settings used to create a CMEK crypto key. + class FedrampHighSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to resources needed for FedRAMP Moderate. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] kms_settings + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] + # Input only. Immutable. Settings used to create a CMEK crypto key. + class FedrampModerateSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represent the custom settings for the resources to be created. + # @!attribute [rw] resource_id + # @return [::String] + # Resource identifier. + # For a project this represents project_id. If the project is already + # taken, the workload creation will fail. + # For KeyRing, this represents the keyring_id. + # For a folder, don't set this value as folder_id is assigned by Google. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] + # Indicates the type of resource. This field should be specified to + # correspond the id to the right project type (CONSUMER_PROJECT or + # ENCRYPTION_KEYS_PROJECT) + # @!attribute [rw] display_name + # @return [::String] + # User-assigned resource display name. + # If not empty it will be used to create a resource with the specified + # name. + class ResourceSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Signed Access Approvals (SAA) enrollment response. + # @!attribute [rw] setup_status + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupState] + # Indicates SAA enrollment status of a given workload. + # @!attribute [rw] setup_errors + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupError>] + # Indicates SAA enrollment setup error if any. + class SaaEnrollmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Setup state of SAA enrollment. + module SetupState + # Unspecified. + SETUP_STATE_UNSPECIFIED = 0 + + # SAA enrollment pending. + STATUS_PENDING = 1 + + # SAA enrollment comopleted. + STATUS_COMPLETE = 2 + end + + # Setup error of SAA enrollment. + module SetupError + # Unspecified. + SETUP_ERROR_UNSPECIFIED = 0 + + # Invalid states for all customers, to be redirected to AA UI for + # additional details. + ERROR_INVALID_BASE_SETUP = 1 + + # Returned when there is not an EKM key configured. + ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 + + # Returned when there are no enrolled services or the customer is + # enrolled in CAA only for a subset of services. + ERROR_NOT_ALL_SERVICES_ENROLLED = 3 + + # Returned when exception was encountered during evaluation of other + # criteria. + ERROR_SETUP_CHECK_FAILED = 4 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Supported Compliance Regimes. + module ComplianceRegime + # Unknown compliance regime. + COMPLIANCE_REGIME_UNSPECIFIED = 0 + + # Information protection as per DoD IL4 requirements. + IL4 = 1 + + # Criminal Justice Information Services (CJIS) Security policies. + CJIS = 2 + + # FedRAMP High data protection controls + FEDRAMP_HIGH = 3 + + # FedRAMP Moderate data protection controls + FEDRAMP_MODERATE = 4 + + # Assured Workloads For US Regions data protection controls + US_REGIONAL_ACCESS = 5 + + # Health Insurance Portability and Accountability Act controls + HIPAA = 6 + + # Health Information Trust Alliance controls + HITRUST = 7 + + # Assured Workloads For EU Regions and Support controls + EU_REGIONS_AND_SUPPORT = 8 + + # Assured Workloads For Canada Regions and Support controls + CA_REGIONS_AND_SUPPORT = 9 + + # International Traffic in Arms Regulations + ITAR = 10 + + # Assured Workloads for Australia Regions and Support controls + AU_REGIONS_AND_US_SUPPORT = 11 + end + + # Key Access Justifications(KAJ) Enrollment State. + module KajEnrollmentState + # Default State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Pending State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_PENDING = 1 + + # Complete State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_COMPLETE = 2 + end + end + + # Operation metadata to give request details of CreateWorkload. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Time when the operation was created. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the workload. + # @!attribute [rw] parent + # @return [::String] + # Optional. The parent of the workload. + # @!attribute [rw] compliance_regime + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] + # Optional. Compliance controls that should be applied to the resources managed by + # the workload. + # @!attribute [rw] resource_settings + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] + # Optional. Resource properties in the input that are used for creating/customizing + # workload resources. + class CreateWorkloadOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..fa17d8d9c654 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-assured_workloads-v1beta1", path: "../" +else + gem "google-cloud-assured_workloads-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb new file mode 100644 index 000000000000..81b408eee261 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the analyze_workload_move call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move. +# +def analyze_workload_move + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new + + # Call the analyze_workload_move method. + result = client.analyze_workload_move request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb new file mode 100644 index 000000000000..014d6ac23a14 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the create_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload. +# +def create_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new + + # Call the create_workload method. + result = client.create_workload request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb new file mode 100644 index 000000000000..4f48c90e6969 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the delete_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload. +# +def delete_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new + + # Call the delete_workload method. + result = client.delete_workload request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb new file mode 100644 index 000000000000..32cce0425b59 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the get_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload. +# +def get_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new + + # Call the get_workload method. + result = client.get_workload request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb new file mode 100644 index 000000000000..f5978bf7a2ef --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the list_workloads call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads. +# +def list_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new + + # Call the list_workloads method. + result = client.list_workloads request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. + p item + end +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb new file mode 100644 index 000000000000..4323e4795eac --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources. +# +def restrict_allowed_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new + + # Call the restrict_allowed_resources method. + result = client.restrict_allowed_resources request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb new file mode 100644 index 000000000000..3f066388fe20 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] +require "google/cloud/assured_workloads/v1beta1" + +## +# Snippet for the update_workload call in the AssuredWorkloadsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload. +# +def update_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new + + # Call the update_workload method. + result = client.update_workload request + + # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. + p result +end +# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json new file mode 100644 index 000000000000..5156be35c227 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-cloud-assured_workloads-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.assuredworkloads.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync", + "title": "Snippet for the create_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload.", + "file": "assured_workloads_service/create_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "CreateWorkload", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.CreateWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync", + "title": "Snippet for the update_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload.", + "file": "assured_workloads_service/update_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::Workload", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "UpdateWorkload", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.UpdateWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", + "title": "Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources.", + "file": "assured_workloads_service/restrict_allowed_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "restrict_allowed_resources", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "RestrictAllowedResources", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.RestrictAllowedResources", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync", + "title": "Snippet for the delete_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload.", + "file": "assured_workloads_service/delete_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "DeleteWorkload", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.DeleteWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync", + "title": "Snippet for the get_workload call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload.", + "file": "assured_workloads_service/get_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workload", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::Workload", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "GetWorkload", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.GetWorkload", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync", + "title": "Snippet for the analyze_workload_move call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move.", + "file": "assured_workloads_service/analyze_workload_move.rb", + "language": "RUBY", + "client_method": { + "short_name": "analyze_workload_move", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "AnalyzeWorkloadMove", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.AnalyzeWorkloadMove", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync", + "title": "Snippet for the list_workloads call in the AssuredWorkloadsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads.", + "file": "assured_workloads_service/list_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workloads", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse", + "client": { + "short_name": "AssuredWorkloadsService::Client", + "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" + }, + "method": { + "short_name": "ListWorkloads", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.ListWorkloads", + "service": { + "short_name": "AssuredWorkloadsService", + "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb new file mode 100644 index 000000000000..1a2b200419f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb new file mode 100644 index 000000000000..e911089b4572 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path organization: "value0", location: "value1", workload: "value2" + assert_equal "organizations/value0/locations/value1/workloads/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb new file mode 100644 index 000000000000..873d4d761657 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" + + +class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_workload + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload = {} + external_id = "hello world" + + create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workload parent: parent, workload: workload, external_id: external_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workload({ parent: parent, workload: workload, external_id: external_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_count + end + end + end + + def test_restrict_allowed_resources + # Create test objects. + client_result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + restriction_type = :RESTRICTION_TYPE_UNSPECIFIED + + restrict_allowed_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_restrict_allowed_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restrict_allowed_resources_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.restrict_allowed_resources name: name, restriction_type: restriction_type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restrict_allowed_resources_client_stub.call_count + end + end + end + + def test_delete_workload + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workload({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workload name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workload({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workload_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb new file mode 100644 index 000000000000..7b2dced5c32a --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb @@ -0,0 +1,553 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" +require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" + +class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_workload + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workload = {} + external_id = "hello world" + + create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] + assert_equal "hello world", request["external_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workload parent: parent, workload: workload, external_id: external_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workload({ parent: parent, workload: workload, external_id: external_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_workload_client_stub.call_rpc_count + end + end + + def test_update_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workload = {} + update_mask = {} + + update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_workload workload: workload, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_workload ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_workload({ workload: workload, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_workload(::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_workload_client_stub.call_rpc_count + end + end + + def test_restrict_allowed_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + restriction_type = :RESTRICTION_TYPE_UNSPECIFIED + + restrict_allowed_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restrict_allowed_resources, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, request + assert_equal "hello world", request["name"] + assert_equal :RESTRICTION_TYPE_UNSPECIFIED, request["restriction_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restrict_allowed_resources_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.restrict_allowed_resources name: name, restriction_type: restriction_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restrict_allowed_resources_client_stub.call_rpc_count + end + end + + def test_delete_workload + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workload({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workload name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workload({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_workload_client_stub.call_rpc_count + end + end + + def test_get_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workload, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workload ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workload({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workload(::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_rpc_count + end + end + + def test_analyze_workload_move + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + source = "hello world" + target = "hello world" + + analyze_workload_move_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :analyze_workload_move, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest, request + assert_equal "hello world", request["source"] + assert_equal :source, request.projectOrWorkloadResource + assert_equal "hello world", request["target"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, analyze_workload_move_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.analyze_workload_move({ source: source, target: target }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.analyze_workload_move source: source, target: target do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.analyze_workload_move ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new(source: source, target: target) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.analyze_workload_move({ source: source, target: target }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.analyze_workload_move(::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new(source: source, target: target), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, analyze_workload_move_client_stub.call_rpc_count + end + end + + def test_list_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workloads, name + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workloads_client_stub do + # Create client + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workloads ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workloads(::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_workloads_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-automl-v1/.gitignore b/owl-bot-staging/google-cloud-automl-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json new file mode 100644 index 000000000000..d22539d020e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json @@ -0,0 +1,20 @@ +{ + "api_id": "automl.googleapis.com", + "api_shortname": "automl", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest", + "distribution_name": "google-cloud-automl-v1", + "is_cloud": true, + "language": "ruby", + "name": "automl", + "name_pretty": "Cloud AutoML V1 API", + "product_documentation": "https://cloud.google.com/automl", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", + "ruby-cloud-env-prefix": "AUTOML", + "ruby-cloud-product-url": "https://cloud.google.com/automl", + "ruby-cloud-path-override": "auto_ml=automl", + "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml b/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml new file mode 100644 index 000000000000..622056ff5619 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-automl-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-automl-v1.rb" diff --git a/owl-bot-staging/google-cloud-automl-v1/.toys.rb b/owl-bot-staging/google-cloud-automl-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-automl-v1/.yardopts b/owl-bot-staging/google-cloud-automl-v1/.yardopts new file mode 100644 index 000000000000..cecfd779ab86 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud AutoML V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..5381a147f986 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-automl-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-automl-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/automl/v1" + +client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/automl/v1" + +::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-automl-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/automl/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-automl-v1/Gemfile b/owl-bot-staging/google-cloud-automl-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-automl-v1/LICENSE.md b/owl-bot-staging/google-cloud-automl-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-automl-v1/README.md b/owl-bot-staging/google-cloud-automl-v1/README.md new file mode 100644 index 000000000000..139a73148b10 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud AutoML V1 API + +Train high-quality custom machine learning models with minimum effort and machine learning expertise. + +AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud AutoML V1 API. Most users should consider using +the main client gem, +[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-automl-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/automl.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/automl/v1" + +client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new +request = ::Google::Cloud::AutoML::V1::PredictRequest.new # (request fields as keyword arguments...) +response = client.predict request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/automl) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/automl/v1" +require "logger" + +client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-automl`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-automl-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-automl`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-automl-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-automl-v1/Rakefile b/owl-bot-staging/google-cloud-automl-v1/Rakefile new file mode 100644 index 000000000000..9dd468f3830e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/Rakefile @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-automl-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["AUTOML_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["AUTOML_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["AUTOML_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/automl/v1/prediction_service/credentials" + ::Google::Cloud::AutoML::V1::PredictionService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["AUTOML_PROJECT"] = project + ENV["AUTOML_TEST_PROJECT"] = project + ENV["AUTOML_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-automl-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-automl-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-automl-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-automl-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-automl-v1" + header "google-cloud-automl-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-automl-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-automl-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-automl-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-automl-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json new file mode 100644 index 000000000000..e3b4d840f3ac --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json @@ -0,0 +1,127 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.automl.v1", + "libraryPackage": "::Google::Cloud::AutoML::V1", + "services": { + "PredictionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AutoML::V1::PredictionService::Client", + "rpcs": { + "Predict": { + "methods": [ + "predict" + ] + }, + "BatchPredict": { + "methods": [ + "batch_predict" + ] + } + } + } + } + }, + "AutoMl": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AutoML::V1::AutoML::Client", + "rpcs": { + "CreateDataset": { + "methods": [ + "create_dataset" + ] + }, + "GetDataset": { + "methods": [ + "get_dataset" + ] + }, + "ListDatasets": { + "methods": [ + "list_datasets" + ] + }, + "UpdateDataset": { + "methods": [ + "update_dataset" + ] + }, + "DeleteDataset": { + "methods": [ + "delete_dataset" + ] + }, + "ImportData": { + "methods": [ + "import_data" + ] + }, + "ExportData": { + "methods": [ + "export_data" + ] + }, + "GetAnnotationSpec": { + "methods": [ + "get_annotation_spec" + ] + }, + "CreateModel": { + "methods": [ + "create_model" + ] + }, + "GetModel": { + "methods": [ + "get_model" + ] + }, + "ListModels": { + "methods": [ + "list_models" + ] + }, + "DeleteModel": { + "methods": [ + "delete_model" + ] + }, + "UpdateModel": { + "methods": [ + "update_model" + ] + }, + "DeployModel": { + "methods": [ + "deploy_model" + ] + }, + "UndeployModel": { + "methods": [ + "undeploy_model" + ] + }, + "ExportModel": { + "methods": [ + "export_model" + ] + }, + "GetModelEvaluation": { + "methods": [ + "get_model_evaluation" + ] + }, + "ListModelEvaluations": { + "methods": [ + "list_model_evaluations" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec b/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec new file mode 100644 index 000000000000..03c962859907 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/automl/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-automl-v1" + gem.version = Google::Cloud::AutoML::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." + gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb new file mode 100644 index 000000000000..0639f3bfe935 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/automl/v1" diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb new file mode 100644 index 000000000000..70b770d6ce68 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1/prediction_service" +require "google/cloud/automl/v1/automl" +require "google/cloud/automl/v1/version" + +module Google + module Cloud + module AutoML + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/automl/v1" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/automl/v1" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/automl/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb new file mode 100644 index 000000000000..5429cd0a0e66 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/annotation_payload.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/classification_pb' +require 'google/cloud/automl/v1/detection_pb' +require 'google/cloud/automl/v1/text_extraction_pb' +require 'google/cloud/automl/v1/text_sentiment_pb' +require 'google/cloud/automl/v1/translation_pb' + + +descriptor_data = "\n/google/cloud/automl/v1/annotation_payload.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\"\xd3\x03\n\x11\x41nnotationPayload\x12\x44\n\x0btranslation\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1.TranslationAnnotationH\x00\x12J\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x30.google.cloud.automl.v1.ClassificationAnnotationH\x00\x12X\n\x16image_object_detection\x18\x04 \x01(\x0b\x32\x36.google.cloud.automl.v1.ImageObjectDetectionAnnotationH\x00\x12K\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x30.google.cloud.automl.v1.TextExtractionAnnotationH\x00\x12I\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32/.google.cloud.automl.v1.TextSentimentAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.AnnotationPayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb new file mode 100644 index 000000000000..1570c5e4ceeb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/annotation_spec.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n,google/cloud/automl/v1/annotation_spec.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.AnnotationSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb new file mode 100644 index 000000000000..62e9c8a5a030 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1/version" + +require "google/cloud/automl/v1/automl/credentials" +require "google/cloud/automl/v1/automl/paths" +require "google/cloud/automl/v1/automl/operations" +require "google/cloud/automl/v1/automl/client" +require "google/cloud/automl/v1/automl/rest" + +module Google + module Cloud + module AutoML + module V1 + ## + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/automl/v1/automl" + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/automl/v1/automl/rest" + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + module AutoML + end + end + end + end +end + +helper_path = ::File.join __dir__, "automl", "helpers.rb" +require "google/cloud/automl/v1/automl/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb new file mode 100644 index 000000000000..f665fd989f3c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb @@ -0,0 +1,2349 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/automl/v1/service_pb" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + ## + # Client for the AutoMl service. + # + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :auto_ml_stub + + ## + # Configure the AutoMl Client class. + # + # See {::Google::Cloud::AutoML::V1::AutoML::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutoMl clients + # ::Google::Cloud::AutoML::V1::AutoML::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AutoML", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_dataset.timeout = 5.0 + + default_config.rpcs.get_dataset.timeout = 5.0 + default_config.rpcs.get_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_datasets.timeout = 5.0 + default_config.rpcs.list_datasets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_dataset.timeout = 5.0 + + default_config.rpcs.delete_dataset.timeout = 5.0 + default_config.rpcs.delete_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.import_data.timeout = 5.0 + + default_config.rpcs.export_data.timeout = 5.0 + + default_config.rpcs.get_annotation_spec.timeout = 5.0 + default_config.rpcs.get_annotation_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_model.timeout = 5.0 + + default_config.rpcs.get_model.timeout = 5.0 + default_config.rpcs.get_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_models.timeout = 5.0 + default_config.rpcs.list_models.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_model.timeout = 5.0 + default_config.rpcs.delete_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_model.timeout = 5.0 + + default_config.rpcs.deploy_model.timeout = 5.0 + + default_config.rpcs.undeploy_model.timeout = 5.0 + + default_config.rpcs.export_model.timeout = 5.0 + + default_config.rpcs.get_model_evaluation.timeout = 5.0 + default_config.rpcs.get_model_evaluation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_model_evaluations.timeout = 5.0 + default_config.rpcs.list_model_evaluations.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AutoML::V1::AutoML::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @auto_ml_stub.universe_domain + end + + ## + # Create a new AutoMl client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutoMl client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/automl/v1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @auto_ml_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AutoML::V1::AutoMl::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @auto_ml_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AutoML::V1::AutoML::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @auto_ml_stub.logger + end + + # Service calls + + ## + # Creates a dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_dataset(parent: nil, dataset: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project to create the dataset for. + # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] + # Required. The dataset to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :create_dataset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists datasets in a project. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project from which to list datasets. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_dataset(dataset: nil, update_mask: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] + # Required. The dataset which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + # p result + # + def update_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.dataset&.name + header_params["dataset.name"] = request.dataset.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a dataset and all of its contents. + # Returns empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_dataset(name: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version} + # parameter must be explicitly set. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_data(name: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash] + # Required. The desired input location and its domain specific semantics, + # if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_data(name: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset. + # @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash] + # Required. The desired output location. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an annotation spec. + # + # @overload get_annotation_spec(request, options = nil) + # Pass arguments to `get_annotation_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_annotation_spec(name: nil) + # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the annotation spec to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::AnnotationSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new + # + # # Call the get_annotation_spec method. + # result = client.get_annotation_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. + # p result + # + def get_annotation_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_annotation_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_annotation_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_annotation_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a model. + # Returns a Model in the {::Google::Longrunning::Operation#response response} + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_model(parent: nil, model: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent project where the model is being created. + # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] + # Required. The model to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_model, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project, from which to list the models. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_models.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_model(name: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model being deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a model. + # + # @overload update_model(request, options = nil) + # Pass arguments to `update_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_model(model: nil, update_mask: nil) + # Pass arguments to `update_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] + # Required. The model which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new + # + # # Call the update_model method. + # result = client.update_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Model. + # p result + # + def update_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.model&.name + header_params["model.name"] = request.model.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_model, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload deploy_model(request, options = nil) + # Pass arguments to `deploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) + # Pass arguments to `deploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Classification. + # + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param name [::String] + # Required. Resource name of the model to deploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeployModelRequest.new + # + # # Call the deploy_model method. + # result = client.deploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.deploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.deploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload undeploy_model(request, options = nil) + # Pass arguments to `undeploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undeploy_model(name: nil) + # Pass arguments to `undeploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model to undeploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new + # + # # Call the undeploy_model method. + # result = client.undeploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undeploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undeploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_model(request, options = nil) + # Pass arguments to `export_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_model(name: nil, output_config: nil) + # Pass arguments to `export_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the model to export. + # @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ExportModelRequest.new + # + # # Call the export_model method. + # result = client.export_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a model evaluation. + # + # @overload get_model_evaluation(request, options = nil) + # Pass arguments to `get_model_evaluation` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model_evaluation(name: nil) + # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the model evaluation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::ModelEvaluation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new + # + # # Call the get_model_evaluation method. + # result = client.get_model_evaluation request + # + # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. + # p result + # + def get_model_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_model_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_model_evaluation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists model evaluations. + # + # @overload list_model_evaluations(request, options = nil) + # Pass arguments to `list_model_evaluations` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @param filter [::String] + # Required. An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new + # + # # Call the list_model_evaluations method. + # result = client.list_model_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. + # p item + # end + # + def list_model_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_model_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_model_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AutoMl API. + # + # This class represents the configuration for AutoMl, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AutoML::V1::AutoML::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_dataset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1::AutoML::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AutoMl API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `get_annotation_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_annotation_spec + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `update_model` + # @return [::Gapic::Config::Method] + # + attr_reader :update_model + ## + # RPC-specific configuration for `deploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_model + ## + # RPC-specific configuration for `undeploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_model + ## + # RPC-specific configuration for `export_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model + ## + # RPC-specific configuration for `get_model_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model_evaluation + ## + # RPC-specific configuration for `list_model_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_model_evaluations + + # @private + def initialize parent_rpcs = nil + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec + @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model + @update_model = ::Gapic::Config::Method.new update_model_config + deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model + @deploy_model = ::Gapic::Config::Method.new deploy_model_config + undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model + @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config + export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model + @export_model = ::Gapic::Config::Method.new export_model_config + get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation + @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config + list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations + @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb new file mode 100644 index 000000000000..bafb75c5f4ab --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + # Credentials for the AutoMl API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "AUTOML_CREDENTIALS", + "AUTOML_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "AUTOML_CREDENTIALS_JSON", + "AUTOML_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb new file mode 100644 index 000000000000..a23adc9a2811 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb @@ -0,0 +1,849 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AutoMl Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb new file mode 100644 index 000000000000..7cfa7f1b018d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb @@ -0,0 +1,130 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + module AutoML + # Path helper methods for the AutoMl API. + module Paths + ## + # Create a fully-qualified AnnotationSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param annotation_spec [String] + # + # @return [::String] + def annotation_spec_path project:, location:, dataset:, annotation_spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, location:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + ## + # Create a fully-qualified ModelEvaluation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # @param model_evaluation [String] + # + # @return [::String] + def model_evaluation_path project:, location:, model:, model_evaluation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb new file mode 100644 index 000000000000..fe9133837455 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1/version" + +require "google/cloud/automl/v1/automl/credentials" +require "google/cloud/automl/v1/automl/paths" +require "google/cloud/automl/v1/automl/rest/operations" +require "google/cloud/automl/v1/automl/rest/client" + +module Google + module Cloud + module AutoML + module V1 + ## + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/automl/v1/automl/rest" + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + module AutoML + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/automl/v1/automl/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb new file mode 100644 index 000000000000..817c63a5cd37 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb @@ -0,0 +1,2180 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/automl/v1/service_pb" +require "google/cloud/automl/v1/automl/rest/service_stub" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + module Rest + ## + # REST client for the AutoMl service. + # + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :auto_ml_stub + + ## + # Configure the AutoMl Client class. + # + # See {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutoMl clients + # ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AutoML", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_dataset.timeout = 5.0 + + default_config.rpcs.get_dataset.timeout = 5.0 + default_config.rpcs.get_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_datasets.timeout = 5.0 + default_config.rpcs.list_datasets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_dataset.timeout = 5.0 + + default_config.rpcs.delete_dataset.timeout = 5.0 + default_config.rpcs.delete_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.import_data.timeout = 5.0 + + default_config.rpcs.export_data.timeout = 5.0 + + default_config.rpcs.get_annotation_spec.timeout = 5.0 + default_config.rpcs.get_annotation_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_model.timeout = 5.0 + + default_config.rpcs.get_model.timeout = 5.0 + default_config.rpcs.get_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_models.timeout = 5.0 + default_config.rpcs.list_models.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_model.timeout = 5.0 + default_config.rpcs.delete_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_model.timeout = 5.0 + + default_config.rpcs.deploy_model.timeout = 5.0 + + default_config.rpcs.undeploy_model.timeout = 5.0 + + default_config.rpcs.export_model.timeout = 5.0 + + default_config.rpcs.get_model_evaluation.timeout = 5.0 + default_config.rpcs.get_model_evaluation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_model_evaluations.timeout = 5.0 + default_config.rpcs.list_model_evaluations.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @auto_ml_stub.universe_domain + end + + ## + # Create a new AutoMl REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutoMl client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @auto_ml_stub = ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @auto_ml_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AutoML::V1::AutoML::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @auto_ml_stub.logger + end + + # Service calls + + ## + # Creates a dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_dataset(parent: nil, dataset: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project to create the dataset for. + # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] + # Required. The dataset to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.create_dataset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists datasets in a project. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project from which to list datasets. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_datasets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_dataset(dataset: nil, update_mask: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] + # Required. The dataset which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + # p result + # + def update_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a dataset and all of its contents. + # Returns empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_dataset(name: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.delete_dataset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version} + # parameter must be explicitly set. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_data(name: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash] + # Required. The desired input location and its domain specific semantics, + # if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.import_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_data(name: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset. + # @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash] + # Required. The desired output location. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an annotation spec. + # + # @overload get_annotation_spec(request, options = nil) + # Pass arguments to `get_annotation_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_annotation_spec(name: nil) + # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the annotation spec to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new + # + # # Call the get_annotation_spec method. + # result = client.get_annotation_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. + # p result + # + def get_annotation_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_annotation_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_annotation_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a model. + # Returns a Model in the {::Google::Longrunning::Operation#response response} + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_model(parent: nil, model: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent project where the model is being created. + # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] + # Required. The model to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.create_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_model request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project, from which to list the models. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_models.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_models request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_model(name: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model being deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.delete_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a model. + # + # @overload update_model(request, options = nil) + # Pass arguments to `update_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_model(model: nil, update_mask: nil) + # Pass arguments to `update_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] + # Required. The model which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new + # + # # Call the update_model method. + # result = client.update_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1::Model. + # p result + # + def update_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_model request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload deploy_model(request, options = nil) + # Pass arguments to `deploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) + # Pass arguments to `deploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Classification. + # + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param name [::String] + # Required. Resource name of the model to deploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::DeployModelRequest.new + # + # # Call the deploy_model method. + # result = client.deploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.deploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.deploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.deploy_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload undeploy_model(request, options = nil) + # Pass arguments to `undeploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undeploy_model(name: nil) + # Pass arguments to `undeploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model to undeploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new + # + # # Call the undeploy_model method. + # result = client.undeploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undeploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undeploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.undeploy_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_model(request, options = nil) + # Pass arguments to `export_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_model(name: nil, output_config: nil) + # Pass arguments to `export_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the model to export. + # @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ExportModelRequest.new + # + # # Call the export_model method. + # result = client.export_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a model evaluation. + # + # @overload get_model_evaluation(request, options = nil) + # Pass arguments to `get_model_evaluation` via a request object, either of type + # {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model_evaluation(name: nil) + # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the model evaluation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new + # + # # Call the get_model_evaluation method. + # result = client.get_model_evaluation request + # + # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. + # p result + # + def get_model_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_model_evaluation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists model evaluations. + # + # @overload list_model_evaluations(request, options = nil) + # Pass arguments to `list_model_evaluations` via a request object, either of type + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @param filter [::String] + # Required. An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new + # + # # Call the list_model_evaluations method. + # result = client.list_model_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. + # p item + # end + # + def list_model_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_model_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_model_evaluations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AutoMl REST API. + # + # This class represents the configuration for AutoMl REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_dataset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AutoMl API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `get_annotation_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_annotation_spec + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `update_model` + # @return [::Gapic::Config::Method] + # + attr_reader :update_model + ## + # RPC-specific configuration for `deploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_model + ## + # RPC-specific configuration for `undeploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_model + ## + # RPC-specific configuration for `export_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model + ## + # RPC-specific configuration for `get_model_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model_evaluation + ## + # RPC-specific configuration for `list_model_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_model_evaluations + + # @private + def initialize parent_rpcs = nil + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec + @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model + @update_model = ::Gapic::Config::Method.new update_model_config + deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model + @deploy_model = ::Gapic::Config::Method.new deploy_model_config + undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model + @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config + export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model + @export_model = ::Gapic::Config::Method.new export_model_config + get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation + @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config + list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations + @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb new file mode 100644 index 000000000000..6d5126afad95 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb @@ -0,0 +1,1093 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AutoMl Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.wait_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "wait_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb new file mode 100644 index 000000000000..55b031b23a36 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb @@ -0,0 +1,1188 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1/service_pb" + +module Google + module Cloud + module AutoML + module V1 + module AutoML + module Rest + ## + # REST service stub for the AutoMl service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # A result object deserialized from the server's reply + def get_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::Dataset.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_datasets REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ListDatasetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ListDatasetsResponse] + # A result object deserialized from the server's reply + def list_datasets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_datasets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Dataset] + # A result object deserialized from the server's reply + def update_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::Dataset.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_annotation_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] + # A result object deserialized from the server's reply + def get_annotation_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_annotation_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::AnnotationSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # A result object deserialized from the server's reply + def get_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::Model.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_models REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ListModelsResponse] + # A result object deserialized from the server's reply + def list_models request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_models", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::ListModelsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::Model] + # A result object deserialized from the server's reply + def update_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::Model.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the deploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def deploy_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "deploy_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the undeploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def undeploy_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undeploy_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_model_evaluation REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] + # A result object deserialized from the server's reply + def get_model_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_model_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::ModelEvaluation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_model_evaluations REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse] + # A result object deserialized from the server's reply + def list_model_evaluations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_model_evaluations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/datasets", + body: "dataset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_datasets REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_datasets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/datasets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{dataset.name}", + body: "dataset", + matches: [ + ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:importData", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:exportData", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_annotation_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_annotation_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/models", + body: "model", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_models REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_models_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/models", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{model.name}", + body: "model", + matches: [ + ["model.name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the deploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_deploy_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:deploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undeploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undeploy_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:undeploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:export", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model_evaluation REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_model_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_model_evaluations REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_model_evaluations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/modelEvaluations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb new file mode 100644 index 000000000000..333190be5c39 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/classification.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/automl/v1/classification.proto\x12\x16google.cloud.automl.v1\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\x81\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12p\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32N.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x61\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xbb\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12X\n\x03row\x18\x02 \x03(\x0b\x32K.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xb5\x01\n\x1a\x63om.google.cloud.automl.v1B\x13\x43lassificationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationAnnotation").msgclass + ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics").msgclass + ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass + ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass + ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass + ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb new file mode 100644 index 000000000000..06071be6eda6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/data_items.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/geometry_pb' +require 'google/cloud/automl/v1/io_pb' +require 'google/cloud/automl/v1/text_segment_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1/data_items.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a)google/cloud/automl/v1/text_segment.proto\"=\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xea\x01\n\x12\x44ocumentDimensions\x12N\n\x04unit\x18\x01 \x01(\x0e\x32@.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xd6\x05\n\x08\x44ocument\x12\x41\n\x0cinput_config\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1.DocumentInputConfig\x12:\n\rdocument_text\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippet\x12\x37\n\x06layout\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1.Document.Layout\x12G\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32*.google.cloud.automl.v1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xb4\x03\n\x06Layout\x12\x39\n\x0ctext_segment\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12;\n\rbounding_poly\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12R\n\x11text_segment_type\x18\x04 \x01(\x0e\x32\x37.google.cloud.automl.v1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"\xbe\x01\n\x0e\x45xamplePayload\x12.\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ImageH\x00\x12;\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetH\x00\x12\x34\n\x08\x64ocument\x18\x04 \x01(\x0b\x32 .google.cloud.automl.v1.DocumentH\x00\x42\t\n\x07payloadB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Image").msgclass + TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSnippet").msgclass + DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentDimensions").msgclass + DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit").enummodule + Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document").msgclass + Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document.Layout").msgclass + Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document.Layout.TextSegmentType").enummodule + ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExamplePayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb new file mode 100644 index 000000000000..af1155523150 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/dataset.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/image_pb' +require 'google/cloud/automl/v1/text_pb' +require 'google/cloud/automl/v1/translation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n$google/cloud/automl/v1/dataset.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x07\n\x07\x44\x61taset\x12Z\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x32.google.cloud.automl.v1.TranslationDatasetMetadataH\x00\x12k\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32:.google.cloud.automl.v1.ImageClassificationDatasetMetadataH\x00\x12i\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32\x39.google.cloud.automl.v1.TextClassificationDatasetMetadataH\x00\x12n\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32;.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadataH\x00\x12\x61\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32\x35.google.cloud.automl.v1.TextExtractionDatasetMetadataH\x00\x12_\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x34.google.cloud.automl.v1.TextSentimentDatasetMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12;\n\x06labels\x18\' \x03(\x0b\x32+.google.cloud.automl.v1.Dataset.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Dataset").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb new file mode 100644 index 000000000000..644c36eb549f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/detection.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/geometry_pb' + + +descriptor_data = "\n&google/cloud/automl/v1/detection.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\"k\n\x1eImageObjectDetectionAnnotation\x12:\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xa9\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12j\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32\x46.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd1\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12U\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32/.google.cloud.automl.v1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionAnnotation").msgclass + BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingBoxMetricsEntry").msgclass + BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass + ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb new file mode 100644 index 000000000000..7d463bb0a1e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/geometry.proto + +require 'google/protobuf' + + +descriptor_data = "\n%google/cloud/automl/v1/geometry.proto\x12\x16google.cloud.automl.v1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"U\n\x0c\x42oundingPoly\x12\x45\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32(.google.cloud.automl.v1.NormalizedVertexB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.NormalizedVertex").msgclass + BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingPoly").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb new file mode 100644 index 000000000000..537e7a464184 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/image.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/automl/v1/classification_pb' + + +descriptor_data = "\n\"google/cloud/automl/v1/image.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a+google/cloud/automl/v1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationTypeB\x03\xe0\x41\x02\"%\n#ImageObjectDetectionDatasetMetadata\"\xf7\x01\n ImageClassificationModelMetadata\x12\x1a\n\rbase_model_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12*\n\x1dtrain_budget_milli_node_hours\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12(\n\x1btrain_cost_milli_node_hours\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bstop_reason\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nmodel_type\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08node_qps\x18\r \x01(\x01\x42\x03\xe0\x41\x03\x12\x17\n\nnode_count\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\"\xdc\x01\n!ImageObjectDetectionModelMetadata\x12\x17\n\nmodel_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08node_qps\x18\x04 \x01(\x01\x42\x03\xe0\x41\x03\x12\x18\n\x0bstop_reason\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12*\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01\x12(\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\"E\n*ImageClassificationModelDeploymentMetadata\x12\x17\n\nnode_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x04\"F\n+ImageObjectDetectionModelDeploymentMetadata\x12\x17\n\nnode_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x04\x42\xac\x01\n\x1a\x63om.google.cloud.automl.v1B\nImageProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationDatasetMetadata").msgclass + ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata").msgclass + ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationModelMetadata").msgclass + ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionModelMetadata").msgclass + ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata").msgclass + ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb new file mode 100644 index 000000000000..3eabed59230d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/io.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\x1fgoogle/cloud/automl/v1/io.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xc0\x01\n\x0bInputConfig\x12\x37\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSourceH\x00\x12?\n\x06params\x18\x02 \x03(\x0b\x32/.google.cloud.automl.v1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"a\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSourceB\x03\xe0\x41\x02H\x00\x42\x08\n\x06source\"L\n\x13\x44ocumentInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSource\"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"q\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x82\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12K\n\x06params\x18\x02 \x03(\x0b\x32;.google.cloud.automl.v1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"$\n\tGcsSource\x12\x17\n\ninput_uris\x18\x01 \x03(\tB\x03\xe0\x41\x02\"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.InputConfig").msgclass + BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictInputConfig").msgclass + DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentInputConfig").msgclass + OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.OutputConfig").msgclass + BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOutputConfig").msgclass + ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ModelExportOutputConfig").msgclass + GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GcsSource").msgclass + GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GcsDestination").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb new file mode 100644 index 000000000000..7a64d0c09e95 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/model_evaluation.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/classification_pb' +require 'google/cloud/automl/v1/detection_pb' +require 'google/cloud/automl/v1/text_extraction_pb' +require 'google/cloud/automl/v1/text_sentiment_pb' +require 'google/cloud/automl/v1/translation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/automl/v1/model_evaluation.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x06\n\x0fModelEvaluation\x12\x64\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32\x37.google.cloud.automl.v1.ClassificationEvaluationMetricsH\x00\x12^\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x34.google.cloud.automl.v1.TranslationEvaluationMetricsH\x00\x12r\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32=.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsH\x00\x12\x63\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32\x36.google.cloud.automl.v1.TextSentimentEvaluationMetricsH\x00\x12\x65\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32\x37.google.cloud.automl.v1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ModelEvaluation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb new file mode 100644 index 000000000000..813290824876 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/model.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/image_pb' +require 'google/cloud/automl/v1/text_pb' +require 'google/cloud/automl/v1/translation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\"google/cloud/automl/v1/model.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf1\x08\n\x05Model\x12V\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x30.google.cloud.automl.v1.TranslationModelMetadataH\x00\x12g\n#image_classification_model_metadata\x18\r \x01(\x0b\x32\x38.google.cloud.automl.v1.ImageClassificationModelMetadataH\x00\x12\x65\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32\x37.google.cloud.automl.v1.TextClassificationModelMetadataH\x00\x12j\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32\x39.google.cloud.automl.v1.ImageObjectDetectionModelMetadataH\x00\x12]\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x33.google.cloud.automl.v1.TextExtractionModelMetadataH\x00\x12[\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x32.google.cloud.automl.v1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12G\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32-.google.cloud.automl.v1.Model.DeploymentState\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12\x39\n\x06labels\x18\" \x03(\x0b\x32).google.cloud.automl.v1.Model.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Model").msgclass + Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Model.DeploymentState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb new file mode 100644 index 000000000000..f253d09dfae0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/operations.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/io_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1/operations.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xc9\x07\n\x11OperationMetadata\x12I\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32/.google.cloud.automl.v1.DeleteOperationMetadataH\x00\x12T\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x34.google.cloud.automl.v1.DeployModelOperationMetadataH\x00\x12X\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32\x36.google.cloud.automl.v1.UndeployModelOperationMetadataH\x00\x12T\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x34.google.cloud.automl.v1.CreateModelOperationMetadataH\x00\x12X\n\x16\x63reate_dataset_details\x18\x1e \x01(\x0b\x32\x36.google.cloud.automl.v1.CreateDatasetOperationMetadataH\x00\x12R\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x33.google.cloud.automl.v1.ImportDataOperationMetadataH\x00\x12V\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32\x35.google.cloud.automl.v1.BatchPredictOperationMetadataH\x00\x12R\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x33.google.cloud.automl.v1.ExportDataOperationMetadataH\x00\x12T\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x34.google.cloud.automl.v1.ExportModelOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\" \n\x1e\x43reateDatasetOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xc7\x01\n\x1b\x45xportDataOperationMetadata\x12]\n\x0boutput_info\x18\x01 \x01(\x0b\x32H.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo\x1aI\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\x96\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12\x45\n\x0cinput_config\x18\x01 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfig\x12\x61\n\x0boutput_info\x18\x02 \x01(\x0b\x32L.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1aK\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xb6\x01\n\x1c\x45xportModelOperationMetadata\x12_\n\x0boutput_info\x18\x02 \x01(\x0b\x32J.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\tB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.OperationMetadata").msgclass + DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteOperationMetadata").msgclass + DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeployModelOperationMetadata").msgclass + UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UndeployModelOperationMetadata").msgclass + CreateDatasetOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateDatasetOperationMetadata").msgclass + CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateModelOperationMetadata").msgclass + ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImportDataOperationMetadata").msgclass + ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataOperationMetadata").msgclass + ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass + BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOperationMetadata").msgclass + BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass + ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelOperationMetadata").msgclass + ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb new file mode 100644 index 000000000000..6c5045916cb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1/version" + +require "google/cloud/automl/v1/prediction_service/credentials" +require "google/cloud/automl/v1/prediction_service/paths" +require "google/cloud/automl/v1/prediction_service/operations" +require "google/cloud/automl/v1/prediction_service/client" +require "google/cloud/automl/v1/prediction_service/rest" + +module Google + module Cloud + module AutoML + module V1 + ## + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/automl/v1/prediction_service" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/automl/v1/prediction_service/rest" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + module PredictionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" +require "google/cloud/automl/v1/prediction_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb new file mode 100644 index 000000000000..dd765b396a80 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb @@ -0,0 +1,768 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/automl/v1/prediction_service_pb" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + ## + # Client for the PredictionService service. + # + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :prediction_service_stub + + ## + # Configure the PredictionService Client class. + # + # See {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PredictionService clients + # ::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AutoML", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.predict.timeout = 60.0 + + default_config.rpcs.batch_predict.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @prediction_service_stub.universe_domain + end + + ## + # Create a new PredictionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PredictionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/automl/v1/prediction_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @prediction_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AutoML::V1::PredictionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @prediction_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AutoML::V1::PredictionService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @prediction_service_stub.logger + end + + # Service calls + + ## + # Perform an online prediction. The prediction result is directly + # returned in the response. + # Available for following ML scenarios, and their expected request payloads: + # + # AutoML Vision Classification + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Vision Object Detection + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Natural Language Classification + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Natural Language Entity Extraction + # + # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document + # in .PDF, .TIF or .TIFF format with size upto 20MB. + # + # AutoML Natural Language Sentiment Analysis + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Translation + # + # * A TextSnippet up to 25,000 characters, UTF-8 encoded. + # + # AutoML Tables + # + # * A row with column values matching + # the columns of the model, up to 5MB. Not available for FORECASTING + # `prediction_type`. + # + # @overload predict(request, options = nil) + # Pass arguments to `predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload predict(name: nil, payload: nil, params: nil) + # Pass arguments to `predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the model requested to serve the prediction. + # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned. The default is 100. The + # number of returned bounding boxes might be limited by the server. + # + # AutoML Tables + # + # `feature_importance` + # : (boolean) Whether + # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] + # is populated in the returned list of + # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] + # objects. The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1::PredictResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1::PredictResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::PredictRequest.new + # + # # Call the predict method. + # result = client.predict request + # + # # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. + # p result + # + def predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.predict.timeout, + metadata: metadata, + retry_policy: @config.rpcs.predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Client#predict Predict}, batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via GetOperation + # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in + # the {::Google::Longrunning::Operation#response response} field. + # Available for following ML scenarios: + # + # * AutoML Vision Classification + # * AutoML Vision Object Detection + # * AutoML Video Intelligence Classification + # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification + # * AutoML Natural Language Entity Extraction + # * AutoML Natural Language Sentiment Analysis + # * AutoML Tables + # + # @overload batch_predict(request, options = nil) + # Pass arguments to `batch_predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) + # Pass arguments to `batch_predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the model requested to serve the batch prediction. + # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash] + # Required. The input configuration for batch prediction. + # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash] + # Required. The Configuration specifying where output predictions should + # be written. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # AutoML Natural Language Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # AutoML Video Intelligence Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # `segment_classification` + # : (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is true. + # + # `shot_classification` + # : (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # The default is false. + # + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. + # + # `1s_interval_classification` + # : (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. The default is false. + # + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # + # AutoML Video Intelligence Object Tracking + # + # `score_threshold` + # : (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # + # `min_bounding_box_size` + # : (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size are + # returned. Value in 0 to 1 range. Default is 0. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::PredictionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::BatchPredictRequest.new + # + # # Call the batch_predict method. + # result = client.batch_predict request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PredictionService API. + # + # This class represents the configuration for PredictionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # predict to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PredictionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `predict` + # @return [::Gapic::Config::Method] + # + attr_reader :predict + ## + # RPC-specific configuration for `batch_predict` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_predict + + # @private + def initialize parent_rpcs = nil + predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict + @predict = ::Gapic::Config::Method.new predict_config + batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict + @batch_predict = ::Gapic::Config::Method.new batch_predict_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb new file mode 100644 index 000000000000..4fe31b05d81c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + # Credentials for the PredictionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "AUTOML_CREDENTIALS", + "AUTOML_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "AUTOML_CREDENTIALS_JSON", + "AUTOML_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb new file mode 100644 index 000000000000..dcbcbbe84e2c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb @@ -0,0 +1,849 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PredictionService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb new file mode 100644 index 000000000000..b529a1fcf51f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + # Path helper methods for the PredictionService API. + module Paths + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb new file mode 100644 index 000000000000..566a8b946d44 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1/version" + +require "google/cloud/automl/v1/prediction_service/credentials" +require "google/cloud/automl/v1/prediction_service/paths" +require "google/cloud/automl/v1/prediction_service/rest/operations" +require "google/cloud/automl/v1/prediction_service/rest/client" + +module Google + module Cloud + module AutoML + module V1 + ## + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/automl/v1/prediction_service/rest" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + module PredictionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/automl/v1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb new file mode 100644 index 000000000000..bff89880da69 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb @@ -0,0 +1,711 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/automl/v1/prediction_service_pb" +require "google/cloud/automl/v1/prediction_service/rest/service_stub" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + module Rest + ## + # REST client for the PredictionService service. + # + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :prediction_service_stub + + ## + # Configure the PredictionService Client class. + # + # See {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PredictionService clients + # ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AutoML", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.predict.timeout = 60.0 + + default_config.rpcs.batch_predict.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @prediction_service_stub.universe_domain + end + + ## + # Create a new PredictionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PredictionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @prediction_service_stub = ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @prediction_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AutoML::V1::PredictionService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @prediction_service_stub.logger + end + + # Service calls + + ## + # Perform an online prediction. The prediction result is directly + # returned in the response. + # Available for following ML scenarios, and their expected request payloads: + # + # AutoML Vision Classification + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Vision Object Detection + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Natural Language Classification + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Natural Language Entity Extraction + # + # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document + # in .PDF, .TIF or .TIFF format with size upto 20MB. + # + # AutoML Natural Language Sentiment Analysis + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Translation + # + # * A TextSnippet up to 25,000 characters, UTF-8 encoded. + # + # AutoML Tables + # + # * A row with column values matching + # the columns of the model, up to 5MB. Not available for FORECASTING + # `prediction_type`. + # + # @overload predict(request, options = nil) + # Pass arguments to `predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload predict(name: nil, payload: nil, params: nil) + # Pass arguments to `predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the model requested to serve the prediction. + # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned. The default is 100. The + # number of returned bounding boxes might be limited by the server. + # + # AutoML Tables + # + # `feature_importance` + # : (boolean) Whether + # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] + # is populated in the returned list of + # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] + # objects. The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::PredictResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::PredictResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::PredictRequest.new + # + # # Call the predict method. + # result = client.predict request + # + # # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. + # p result + # + def predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.predict.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.predict request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client#predict Predict}, batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via GetOperation + # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in + # the {::Google::Longrunning::Operation#response response} field. + # Available for following ML scenarios: + # + # * AutoML Vision Classification + # * AutoML Vision Object Detection + # * AutoML Video Intelligence Classification + # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification + # * AutoML Natural Language Entity Extraction + # * AutoML Natural Language Sentiment Analysis + # * AutoML Tables + # + # @overload batch_predict(request, options = nil) + # Pass arguments to `batch_predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) + # Pass arguments to `batch_predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the model requested to serve the batch prediction. + # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash] + # Required. The input configuration for batch prediction. + # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash] + # Required. The Configuration specifying where output predictions should + # be written. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # AutoML Natural Language Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # AutoML Video Intelligence Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # `segment_classification` + # : (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is true. + # + # `shot_classification` + # : (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # The default is false. + # + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. + # + # `1s_interval_classification` + # : (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. The default is false. + # + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # + # AutoML Video Intelligence Object Tracking + # + # `score_threshold` + # : (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # + # `min_bounding_box_size` + # : (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size are + # returned. Value in 0 to 1 range. Default is 0. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1::BatchPredictRequest.new + # + # # Call the batch_predict method. + # result = client.batch_predict request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.batch_predict request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PredictionService REST API. + # + # This class represents the configuration for PredictionService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # predict to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the PredictionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `predict` + # @return [::Gapic::Config::Method] + # + attr_reader :predict + ## + # RPC-specific configuration for `batch_predict` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_predict + + # @private + def initialize parent_rpcs = nil + predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict + @predict = ::Gapic::Config::Method.new predict_config + batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict + @batch_predict = ::Gapic::Config::Method.new batch_predict_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb new file mode 100644 index 000000000000..55a08a1cae80 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb @@ -0,0 +1,1093 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PredictionService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.wait_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "wait_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:wait", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb new file mode 100644 index 000000000000..ed831fb87e44 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1/prediction_service_pb" + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + module Rest + ## + # REST service stub for the PredictionService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::PredictRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1::PredictResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1::PredictResponse] + # A result object deserialized from the server's reply + def predict request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "predict", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1::PredictResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::BatchPredictRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_predict request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_predict", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::PredictRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_predict_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:predict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1::BatchPredictRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_predict_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:batchPredict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb new file mode 100644 index 000000000000..bd25b445ea06 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/prediction_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/annotation_payload_pb' +require 'google/cloud/automl/v1/data_items_pb' +require 'google/cloud/automl/v1/io_pb' +require 'google/longrunning/operations_pb' + + +descriptor_data = "\n/google/cloud/automl/v1/prediction_service.proto\x12\x16google.cloud.automl.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/automl/v1/annotation_payload.proto\x1a\'google/cloud/automl/v1/data_items.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a#google/longrunning/operations.proto\"\xf4\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12<\n\x07payload\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayloadB\x03\xe0\x41\x02\x12\x42\n\x06params\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x02\n\x0fPredictResponse\x12:\n\x07payload\x18\x01 \x03(\x0b\x32).google.cloud.automl.v1.AnnotationPayload\x12\x42\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayload\x12G\n\x08metadata\x18\x02 \x03(\x0b\x32\x35.google.cloud.automl.v1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xda\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12J\n\x0cinput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.automl.v1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12G\n\x06params\x18\x05 \x03(\x0b\x32\x37.google.cloud.automl.v1.BatchPredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x12\x42\x61tchPredictResult\x12J\n\x08metadata\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x85\x04\n\x11PredictionService\x12\xaf\x01\n\x07Predict\x12&.google.cloud.automl.v1.PredictRequest\x1a\'.google.cloud.automl.v1.PredictResponse\"S\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xf2\x01\n\x0c\x42\x61tchPredict\x12+.google.cloud.automl.v1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/models/*}:batchPredict:\x01*\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n\x1a\x63om.google.cloud.automl.v1B\x16PredictionServiceProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + PredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.PredictRequest").msgclass + PredictResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.PredictResponse").msgclass + BatchPredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictRequest").msgclass + BatchPredictResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictResult").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb new file mode 100644 index 000000000000..fa9f4cd6c333 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb @@ -0,0 +1,99 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/automl/v1/prediction_service.proto for package 'Google.Cloud.AutoML.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/automl/v1/prediction_service_pb' + +module Google + module Cloud + module AutoML + module V1 + module PredictionService + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.automl.v1.PredictionService' + + # Perform an online prediction. The prediction result is directly + # returned in the response. + # Available for following ML scenarios, and their expected request payloads: + # + # AutoML Vision Classification + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Vision Object Detection + # + # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. + # + # AutoML Natural Language Classification + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Natural Language Entity Extraction + # + # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document + # in .PDF, .TIF or .TIFF format with size upto 20MB. + # + # AutoML Natural Language Sentiment Analysis + # + # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in + # .PDF, .TIF or .TIFF format with size upto 2MB. + # + # AutoML Translation + # + # * A TextSnippet up to 25,000 characters, UTF-8 encoded. + # + # AutoML Tables + # + # * A row with column values matching + # the columns of the model, up to 5MB. Not available for FORECASTING + # `prediction_type`. + rpc :Predict, ::Google::Cloud::AutoML::V1::PredictRequest, ::Google::Cloud::AutoML::V1::PredictResponse + # Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1.PredictionService.Predict], batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via [GetOperation][google.longrunning.Operations.GetOperation] + # method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1.BatchPredictResult] is returned in + # the [response][google.longrunning.Operation.response] field. + # Available for following ML scenarios: + # + # * AutoML Vision Classification + # * AutoML Vision Object Detection + # * AutoML Video Intelligence Classification + # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification + # * AutoML Natural Language Entity Extraction + # * AutoML Natural Language Sentiment Analysis + # * AutoML Tables + rpc :BatchPredict, ::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb new file mode 100644 index 000000000000..e7f6441bacb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1/prediction_service/rest" +require "google/cloud/automl/v1/automl/rest" +require "google/cloud/automl/v1/version" + +module Google + module Cloud + module AutoML + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/automl/v1/rest" + # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb new file mode 100644 index 000000000000..965c37c6de4c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/automl/v1/annotation_payload_pb' +require 'google/cloud/automl/v1/annotation_spec_pb' +require 'google/cloud/automl/v1/dataset_pb' +require 'google/cloud/automl/v1/image_pb' +require 'google/cloud/automl/v1/io_pb' +require 'google/cloud/automl/v1/model_pb' +require 'google/cloud/automl/v1/model_evaluation_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n$google/cloud/automl/v1/service.proto\x12\x16google.cloud.automl.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/automl/v1/annotation_payload.proto\x1a,google/cloud/automl/v1/annotation_spec.proto\x1a$google/cloud/automl/v1/dataset.proto\x1a\"google/cloud/automl/v1/image.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\"google/cloud/automl/v1/model.proto\x1a-google/cloud/automl/v1/model_evaluation.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x88\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\"H\n\x11GetDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x87\x01\n\x13ListDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"b\n\x14ListDatasetsResponse\x12\x31\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.automl.v1.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x14UpdateDatasetRequest\x12\x35\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"K\n\x14\x44\x65leteDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x88\x01\n\x11ImportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12>\n\x0cinput_config\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.InputConfigB\x03\xe0\x41\x02\"\x8a\x01\n\x11\x45xportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12@\n\routput_config\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.OutputConfigB\x03\xe0\x41\x02\"V\n\x18GetAnnotationSpecRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$automl.googleapis.com/AnnotationSpec\"\x82\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x31\n\x05model\x18\x04 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\"D\n\x0fGetModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x85\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"[\n\x12ListModelsResponse\x12,\n\x05model\x18\x01 \x03(\x0b\x32\x1d.google.cloud.automl.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x12\x44\x65leteModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"}\n\x12UpdateModelRequest\x12\x31\n\x05model\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe3\x02\n\x12\x44\x65ployModelRequest\x12\x7f\n0image_object_detection_model_deployment_metadata\x18\x02 \x01(\x0b\x32\x43.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataH\x00\x12|\n.image_classification_model_deployment_metadata\x18\x04 \x01(\x0b\x32\x42.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataH\x00\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/ModelB\x1b\n\x19model_deployment_metadata\"I\n\x14UndeployModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x94\x01\n\x12\x45xportModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12K\n\routput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.ModelExportOutputConfigB\x03\xe0\x41\x02\"X\n\x19GetModelEvaluationRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%automl.googleapis.com/ModelEvaluation\"\x8e\x01\n\x1bListModelEvaluationsRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"z\n\x1cListModelEvaluationsResponse\x12\x41\n\x10model_evaluation\x18\x01 \x03(\x0b\x32\'.google.cloud.automl.v1.ModelEvaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe8\x1b\n\x06\x41utoMl\x12\xcb\x01\n\rCreateDataset\x12,.google.cloud.automl.v1.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\xda\x41\x0eparent,dataset\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\x12\x95\x01\n\nGetDataset\x12).google.cloud.automl.v1.GetDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/datasets/*}\x12\xa8\x01\n\x0cListDatasets\x12+.google.cloud.automl.v1.ListDatasetsRequest\x1a,.google.cloud.automl.v1.ListDatasetsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/datasets\x12\xbb\x01\n\rUpdateDataset\x12,.google.cloud.automl.v1.UpdateDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\"[\xda\x41\x13\x64\x61taset,update_mask\x82\xd3\xe4\x93\x02?24/v1/{dataset.name=projects/*/locations/*/datasets/*}:\x07\x64\x61taset\x12\xc6\x01\n\rDeleteDataset\x12,.google.cloud.automl.v1.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/datasets/*}\x12\xdc\x01\n\nImportData\x12).google.cloud.automl.v1.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x11name,input_config\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:importData:\x01*\x12\xdd\x01\n\nExportData\x12).google.cloud.automl.v1.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:exportData:\x01*\x12\xbc\x01\n\x11GetAnnotationSpec\x12\x30.google.cloud.automl.v1.GetAnnotationSpecRequest\x1a&.google.cloud.automl.v1.AnnotationSpec\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}\x12\xbf\x01\n\x0b\x43reateModel\x12*.google.cloud.automl.v1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/models:\x05model\x12\x8d\x01\n\x08GetModel\x12\'.google.cloud.automl.v1.GetModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/models/*}\x12\xa0\x01\n\nListModels\x12).google.cloud.automl.v1.ListModelsRequest\x1a*.google.cloud.automl.v1.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/models\x12\xc0\x01\n\x0b\x44\x65leteModel\x12*.google.cloud.automl.v1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/models/*}\x12\xad\x01\n\x0bUpdateModel\x12*.google.cloud.automl.v1.UpdateModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"S\xda\x41\x11model,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{model.name=projects/*/locations/*/models/*}:\x05model\x12\xca\x01\n\x0b\x44\x65ployModel\x12*.google.cloud.automl.v1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xd0\x01\n\rUndeployModel\x12,.google.cloud.automl.v1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xd8\x01\n\x0b\x45xportModel\x12*.google.cloud.automl.v1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\xbe\x01\n\x12GetModelEvaluation\x12\x31.google.cloud.automl.v1.GetModelEvaluationRequest\x1a\'.google.cloud.automl.v1.ModelEvaluation\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xd8\x01\n\x14ListModelEvaluations\x12\x33.google.cloud.automl.v1.ListModelEvaluationsRequest\x1a\x34.google.cloud.automl.v1.ListModelEvaluationsResponse\"U\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xad\x01\n\x1a\x63om.google.cloud.automl.v1B\x0b\x41utoMlProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateDatasetRequest").msgclass + GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetDatasetRequest").msgclass + ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListDatasetsRequest").msgclass + ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListDatasetsResponse").msgclass + UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UpdateDatasetRequest").msgclass + DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteDatasetRequest").msgclass + ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImportDataRequest").msgclass + ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataRequest").msgclass + GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetAnnotationSpecRequest").msgclass + CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateModelRequest").msgclass + GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetModelRequest").msgclass + ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelsRequest").msgclass + ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelsResponse").msgclass + DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteModelRequest").msgclass + UpdateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UpdateModelRequest").msgclass + DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeployModelRequest").msgclass + UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UndeployModelRequest").msgclass + ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelRequest").msgclass + GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetModelEvaluationRequest").msgclass + ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelEvaluationsRequest").msgclass + ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelEvaluationsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb new file mode 100644 index 000000000000..da906eec628a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb @@ -0,0 +1,136 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/automl/v1/service.proto for package 'Google.Cloud.AutoML.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/automl/v1/service_pb' + +module Google + module Cloud + module AutoML + module V1 + module AutoMl + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or dash-case, either of those cases is accepted. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.automl.v1.AutoMl' + + # Creates a dataset. + rpc :CreateDataset, ::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Google::Longrunning::Operation + # Gets a dataset. + rpc :GetDataset, ::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset + # Lists datasets in a project. + rpc :ListDatasets, ::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1::ListDatasetsResponse + # Updates a dataset. + rpc :UpdateDataset, ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset + # Deletes a dataset and all of its contents. + # Returns empty response in the + # [response][google.longrunning.Operation.response] field when it completes, + # and `delete_details` in the + # [metadata][google.longrunning.Operation.metadata] field. + rpc :DeleteDataset, ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Google::Longrunning::Operation + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # [schema_inference_version][google.cloud.automl.v1.InputConfig.params] + # parameter must be explicitly set. + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ImportData, ::Google::Cloud::AutoML::V1::ImportDataRequest, ::Google::Longrunning::Operation + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportData, ::Google::Cloud::AutoML::V1::ExportDataRequest, ::Google::Longrunning::Operation + # Gets an annotation spec. + rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1::AnnotationSpec + # Creates a model. + # Returns a Model in the [response][google.longrunning.Operation.response] + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + rpc :CreateModel, ::Google::Cloud::AutoML::V1::CreateModelRequest, ::Google::Longrunning::Operation + # Gets a model. + rpc :GetModel, ::Google::Cloud::AutoML::V1::GetModelRequest, ::Google::Cloud::AutoML::V1::Model + # Lists models. + rpc :ListModels, ::Google::Cloud::AutoML::V1::ListModelsRequest, ::Google::Cloud::AutoML::V1::ListModelsResponse + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # [response][google.longrunning.Operation.response] field when it completes, + # and `delete_details` in the + # [metadata][google.longrunning.Operation.metadata] field. + rpc :DeleteModel, ::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Google::Longrunning::Operation + # Updates a model. + rpc :UpdateModel, ::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Google::Cloud::AutoML::V1::Model + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :DeployModel, ::Google::Cloud::AutoML::V1::DeployModelRequest, ::Google::Longrunning::Operation + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :UndeployModel, ::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Google::Longrunning::Operation + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig]. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportModel, ::Google::Cloud::AutoML::V1::ExportModelRequest, ::Google::Longrunning::Operation + # Gets a model evaluation. + rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1::ModelEvaluation + # Lists model evaluations. + rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb new file mode 100644 index 000000000000..97da0ef8bb22 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/text_extraction.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/text_segment_pb' + + +descriptor_data = "\n,google/cloud/automl/v1/text_extraction.proto\x12\x16google.cloud.automl.v1\x1a)google/cloud/automl/v1/text_segment.proto\"t\n\x18TextExtractionAnnotation\x12;\n\x0ctext_segment\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x92\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12r\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32N.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionAnnotation").msgclass + TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionEvaluationMetrics").msgclass + TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb new file mode 100644 index 000000000000..92ccffaa6e09 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/text.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/classification_pb' + + +descriptor_data = "\n!google/cloud/automl/v1/text.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\"l\n!TextClassificationDatasetMetadata\x12G\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"j\n\x1fTextClassificationModelMetadata\x12G\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"\x1d\n\x1bTextExtractionModelMetadata\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xab\x01\n\x1a\x63om.google.cloud.automl.v1B\tTextProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextClassificationDatasetMetadata").msgclass + TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextClassificationModelMetadata").msgclass + TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionDatasetMetadata").msgclass + TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionModelMetadata").msgclass + TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentDatasetMetadata").msgclass + TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentModelMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb new file mode 100644 index 000000000000..f8ac0e311fe0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/text_segment.proto + +require 'google/protobuf' + + +descriptor_data = "\n)google/cloud/automl/v1/text_segment.proto\x12\x16google.cloud.automl.v1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TextSegmentProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSegment").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb new file mode 100644 index 000000000000..4f4061a1a5e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/text_sentiment.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1/classification_pb' + + +descriptor_data = "\n+google/cloud/automl/v1/text_sentiment.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xa0\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x61\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrixB\xb4\x01\n\x1a\x63om.google.cloud.automl.v1B\x12TextSentimentProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentAnnotation").msgclass + TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentEvaluationMetrics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb new file mode 100644 index 000000000000..728635fe1c9a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1/translation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/automl/v1/data_items_pb' + + +descriptor_data = "\n(google/cloud/automl/v1/translation.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\'google/cloud/automl/v1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"X\n\x15TranslationAnnotation\x12?\n\x12translated_content\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetB\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TranslationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1 + TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationDatasetMetadata").msgclass + TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationEvaluationMetrics").msgclass + TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationModelMetadata").msgclass + TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationAnnotation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb new file mode 100644 index 000000000000..33b9ec43d3df --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md new file mode 100644 index 000000000000..fcbf60ce5647 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud AutoML V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb new file mode 100644 index 000000000000..9bd24ebc2a4b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Contains annotation information that is relevant to AutoML. + # @!attribute [rw] translation + # @return [::Google::Cloud::AutoML::V1::TranslationAnnotation] + # Annotation details for translation. + # + # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] classification + # @return [::Google::Cloud::AutoML::V1::ClassificationAnnotation] + # Annotation details for content or image classification. + # + # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionAnnotation] + # Annotation details for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction + # @return [::Google::Cloud::AutoML::V1::TextExtractionAnnotation] + # Annotation details for text extraction. + # + # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment + # @return [::Google::Cloud::AutoML::V1::TextSentimentAnnotation] + # Annotation details for text sentiment. + # + # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `text_extraction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] annotation_spec_id + # @return [::String] + # Output only . The resource ID of the annotation spec that + # this annotation pertains to. The annotation spec comes from either an + # ancestor dataset, or the dataset that was used to train the model in use. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The value of + # {::Google::Cloud::AutoML::V1::AnnotationSpec#display_name display_name} + # when the model was trained. Because this field returns a value at model + # training time, for different models trained using the same dataset, the + # returned value could be different as model owner could update the + # `display_name` between any two model training. + class AnnotationPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb new file mode 100644 index 000000000000..942cbd6b09ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # A definition of an annotation spec. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the annotation spec. + # Form: + # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the annotation spec to show in the interface. The name can be + # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. + # @!attribute [rw] example_count + # @return [::Integer] + # Output only. The number of examples in the parent dataset + # labeled by the annotation spec. + class AnnotationSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb new file mode 100644 index 000000000000..9044a0c41bef --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb @@ -0,0 +1,189 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Contains annotation details specific to classification. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0. A higher value + # means greater confidence that the annotation is positive. If a user + # approves an annotation as negative or positive, the score value remains + # unchanged. If a user creates an annotation, the score is 0 for negative or + # 1 for positive. + class ClassificationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for classification problems. + # Note: For Video Classification this metrics only describe quality of the + # Video Classification predictions of "segment_classification" type. + # @!attribute [rw] au_prc + # @return [::Float] + # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged + # for the overall evaluation. + # @!attribute [rw] au_roc + # @return [::Float] + # Output only. The Area Under Receiver Operating Characteristic curve metric. + # Micro-averaged for the overall evaluation. + # @!attribute [rw] log_loss + # @return [::Float] + # Output only. The Log Loss metric. + # @!attribute [rw] confidence_metrics_entry + # @return [::Array<::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] + # Output only. Metrics for each confidence_threshold in + # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and + # position_threshold = INT32_MAX_VALUE. + # ROC and precision-recall curves, and other aggregated metrics are derived + # from them. The confidence metrics entries may also be supplied for + # additional values of position_threshold, but from these no aggregated + # metrics are computed. + # @!attribute [rw] confusion_matrix + # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix] + # Output only. Confusion matrix of the evaluation. + # Only set for MULTICLASS classification problems where number + # of labels is no more than 10. + # Only set for model level evaluation, not for evaluation per label. + # @!attribute [rw] annotation_spec_id + # @return [::Array<::String>] + # Output only. The annotation spec ids used for this evaluation. + class ClassificationEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. Metrics are computed with an assumption that the model + # never returns predictions with score lower than this value. + # @!attribute [rw] position_threshold + # @return [::Integer] + # Output only. Metrics are computed with an assumption that the model + # always returns at most this many predictions (ordered by their score, + # descendingly), but they all still need to meet the confidence_threshold. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall (True Positive Rate) for the given confidence + # threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision for the given confidence threshold. + # @!attribute [rw] false_positive_rate + # @return [::Float] + # Output only. False Positive Rate for the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + # @!attribute [rw] recall_at1 + # @return [::Float] + # Output only. The Recall (True Positive Rate) when only considering the + # label that has the highest prediction score and not below the confidence + # threshold for each example. + # @!attribute [rw] precision_at1 + # @return [::Float] + # Output only. The precision when only considering the label that has the + # highest prediction score and not below the confidence threshold for each + # example. + # @!attribute [rw] false_positive_rate_at1 + # @return [::Float] + # Output only. The False Positive Rate when only considering the label that + # has the highest prediction score and not below the confidence threshold + # for each example. + # @!attribute [rw] f1_score_at1 + # @return [::Float] + # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. + # @!attribute [rw] true_positive_count + # @return [::Integer] + # Output only. The number of model created labels that match a ground truth + # label. + # @!attribute [rw] false_positive_count + # @return [::Integer] + # Output only. The number of model created labels that do not match a + # ground truth label. + # @!attribute [rw] false_negative_count + # @return [::Integer] + # Output only. The number of ground truth labels that are not matched + # by a model created label. + # @!attribute [rw] true_negative_count + # @return [::Integer] + # Output only. The number of labels that were not created by the model, + # but if they would, they would not match a ground truth label. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Confusion matrix of the model running the classification. + # @!attribute [rw] annotation_spec_id + # @return [::Array<::String>] + # Output only. IDs of the annotation specs used in the confusion matrix. + # For Tables CLASSIFICATION + # [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type] + # only list of [annotation_spec_display_name-s][] is populated. + # @!attribute [rw] display_name + # @return [::Array<::String>] + # Output only. Display name of the annotation specs used in the confusion + # matrix, as they were at the moment of the evaluation. For Tables + # CLASSIFICATION + # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type], + # distinct values of the target column at the moment of the model + # evaluation are populated here. + # @!attribute [rw] row + # @return [::Array<::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] + # Output only. Rows in the confusion matrix. The number of rows is equal to + # the size of `annotation_spec_id`. + # `row[i].example_count[j]` is the number of examples that have ground + # truth of the `annotation_spec_id[i]` and are predicted as + # `annotation_spec_id[j]` by the model being evaluated. + class ConfusionMatrix + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. A row in the confusion matrix. + # @!attribute [rw] example_count + # @return [::Array<::Integer>] + # Output only. Value of the specific cell in the confusion matrix. + # The number of values each row has (i.e. the length of the row) is equal + # to the length of the `annotation_spec_id` field or, if that one is not + # populated, length of the {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Type of the classification problem. + module ClassificationType + # An un-set value of this enum. + CLASSIFICATION_TYPE_UNSPECIFIED = 0 + + # At most one label is allowed per example. + MULTICLASS = 1 + + # Multiple labels are allowed for one example. + MULTILABEL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb new file mode 100644 index 000000000000..27054977211d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb @@ -0,0 +1,202 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # A representation of an image. + # Only images up to 30MB in size are supported. + # @!attribute [rw] image_bytes + # @return [::String] + # Image content represented as a stream of bytes. + # Note: As with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # @!attribute [rw] thumbnail_uri + # @return [::String] + # Output only. HTTP URI to the thumbnail image. + class Image + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A representation of a text snippet. + # @!attribute [rw] content + # @return [::String] + # Required. The content of the text snippet as a string. Up to 250000 + # characters long. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. The format of {::Google::Cloud::AutoML::V1::TextSnippet#content content}. Currently the only two allowed + # values are "text/html" and "text/plain". If left blank, the format is + # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1::TextSnippet#content content}. + # @!attribute [rw] content_uri + # @return [::String] + # Output only. HTTP URI where you can download the content. + class TextSnippet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message that describes dimension of a document. + # @!attribute [rw] unit + # @return [::Google::Cloud::AutoML::V1::DocumentDimensions::DocumentDimensionUnit] + # Unit of the dimension. + # @!attribute [rw] width + # @return [::Float] + # Width value of the document, works together with the unit. + # @!attribute [rw] height + # @return [::Float] + # Height value of the document, works together with the unit. + class DocumentDimensions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Unit of the document dimension. + module DocumentDimensionUnit + # Should not be used. + DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 + + # Document dimension is measured in inches. + INCH = 1 + + # Document dimension is measured in centimeters. + CENTIMETER = 2 + + # Document dimension is measured in points. 72 points = 1 inch. + POINT = 3 + end + end + + # A structured text document e.g. a PDF. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1::DocumentInputConfig] + # An input config specifying the content of the document. + # @!attribute [rw] document_text + # @return [::Google::Cloud::AutoML::V1::TextSnippet] + # The plain text version of this document. + # @!attribute [rw] layout + # @return [::Array<::Google::Cloud::AutoML::V1::Document::Layout>] + # Describes the layout of the document. + # Sorted by [page_number][]. + # @!attribute [rw] document_dimensions + # @return [::Google::Cloud::AutoML::V1::DocumentDimensions] + # The dimensions of the page in the document. + # @!attribute [rw] page_count + # @return [::Integer] + # Number of pages in the document. + class Document + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the layout information of a {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the document. + # @!attribute [rw] text_segment + # @return [::Google::Cloud::AutoML::V1::TextSegment] + # Text Segment that represents a segment in + # [document_text][google.cloud.automl.v1p1beta.Document.document_text]. + # @!attribute [rw] page_number + # @return [::Integer] + # Page number of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the original document, starts + # from 1. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::AutoML::V1::BoundingPoly] + # The position of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the page. + # Contains exactly 4 + # [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] + # and they are connected by edges in the order provided, which will + # represent a rectangle parallel to the frame. The + # [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are + # relative to the page. + # Coordinates are based on top-left as point (0,0). + # @!attribute [rw] text_segment_type + # @return [::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType] + # The type of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in document. + class Layout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of TextSegment in the context of the original document. + module TextSegmentType + # Should not be used. + TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 + + # The text segment is a token. e.g. word. + TOKEN = 1 + + # The text segment is a paragraph. + PARAGRAPH = 2 + + # The text segment is a form field. + FORM_FIELD = 3 + + # The text segment is the name part of a form field. It will be treated + # as child of another FORM_FIELD TextSegment if its span is subspan of + # another TextSegment with type FORM_FIELD. + FORM_FIELD_NAME = 4 + + # The text segment is the text content part of a form field. It will be + # treated as child of another FORM_FIELD TextSegment if its span is + # subspan of another TextSegment with type FORM_FIELD. + FORM_FIELD_CONTENTS = 5 + + # The text segment is a whole table, including headers, and all rows. + TABLE = 6 + + # The text segment is a table's headers. It will be treated as child of + # another TABLE TextSegment if its span is subspan of another TextSegment + # with type TABLE. + TABLE_HEADER = 7 + + # The text segment is a row in table. It will be treated as child of + # another TABLE TextSegment if its span is subspan of another TextSegment + # with type TABLE. + TABLE_ROW = 8 + + # The text segment is a cell in table. It will be treated as child of + # another TABLE_ROW TextSegment if its span is subspan of another + # TextSegment with type TABLE_ROW. + TABLE_CELL = 9 + end + end + end + + # Example data used for training or prediction. + # @!attribute [rw] image + # @return [::Google::Cloud::AutoML::V1::Image] + # Example image. + # + # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_snippet + # @return [::Google::Cloud::AutoML::V1::TextSnippet] + # Example text. + # + # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] document + # @return [::Google::Cloud::AutoML::V1::Document] + # Example document. + # + # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExamplePayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb new file mode 100644 index 000000000000..afaccfc1a7d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # A workspace for solving a single, particular machine learning (ML) problem. + # A workspace contains examples that may be annotated. + # @!attribute [rw] translation_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::TranslationDatasetMetadata] + # Metadata for a dataset used for translation. + # + # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::ImageClassificationDatasetMetadata] + # Metadata for a dataset used for image classification. + # + # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::TextClassificationDatasetMetadata] + # Metadata for a dataset used for text classification. + # + # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionDatasetMetadata] + # Metadata for a dataset used for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::TextExtractionDatasetMetadata] + # Metadata for a dataset used for text extraction. + # + # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_dataset_metadata + # @return [::Google::Cloud::AutoML::V1::TextSentimentDatasetMetadata] + # Metadata for a dataset used for text sentiment. + # + # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the dataset. + # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the dataset to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores + # (_), and ASCII digits 0-9. + # @!attribute [rw] description + # @return [::String] + # User-provided description of the dataset. The description can be up to + # 25000 characters long. + # @!attribute [rw] example_count + # @return [::Integer] + # Output only. The number of examples in the dataset. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this dataset was created. + # @!attribute [rw] etag + # @return [::String] + # Used to perform consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata to organize your dataset. + # + # Label keys and values can be no longer than 64 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://goo.gl/xmQnxf for more information on and examples of labels. + class Dataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb new file mode 100644 index 000000000000..3a1323a1c88d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Annotation details for image object detection. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::AutoML::V1::BoundingPoly] + # Output only. The rectangle representing the object location. + # @!attribute [rw] score + # @return [::Float] + # Output only. The confidence that this annotation is positive for the parent example, + # value in [0, 1], higher means higher positivity confidence. + class ImageObjectDetectionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bounding box matching model metrics for a single intersection-over-union + # threshold and multiple label match confidence thresholds. + # @!attribute [rw] iou_threshold + # @return [::Float] + # Output only. The intersection-over-union threshold value used to compute + # this metrics entry. + # @!attribute [rw] mean_average_precision + # @return [::Float] + # Output only. The mean average precision, most often close to au_prc. + # @!attribute [rw] confidence_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] + # Output only. Metrics for each label-match confidence_threshold from + # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is + # derived from them. + class BoundingBoxMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. The confidence threshold value used to compute the metrics. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall under the given confidence threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision under the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Model evaluation metrics for image object detection problems. + # Evaluates prediction quality of labeled bounding boxes. + # @!attribute [rw] evaluated_bounding_box_count + # @return [::Integer] + # Output only. The total number of bounding boxes (i.e. summed over all + # images) the ground truth used to create this evaluation had. + # @!attribute [rw] bounding_box_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1::BoundingBoxMetricsEntry>] + # Output only. The bounding boxes match metrics for each + # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # pair. + # @!attribute [rw] bounding_box_mean_average_precision + # @return [::Float] + # Output only. The single metric for bounding boxes evaluation: + # the mean_average_precision averaged over all bounding_box_metrics_entries. + class ImageObjectDetectionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb new file mode 100644 index 000000000000..74a562769bfa --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # A vertex represents a 2D point in the image. + # The normalized vertex coordinates are between 0 to 1 fractions relative to + # the original plane (image, video). E.g. if the plane (e.g. whole image) would + # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would + # be at the position (1, 6) on that plane. + # @!attribute [rw] x + # @return [::Float] + # Required. Horizontal coordinate. + # @!attribute [rw] y + # @return [::Float] + # Required. Vertical coordinate. + class NormalizedVertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A bounding polygon of a detected object on a plane. + # On output both vertices and normalized_vertices are provided. + # The polygon is formed by connecting vertices in the order they are listed. + # @!attribute [rw] normalized_vertices + # @return [::Array<::Google::Cloud::AutoML::V1::NormalizedVertex>] + # Output only . The bounding polygon normalized vertices. + class BoundingPoly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb new file mode 100644 index 000000000000..4e520cdd2e8b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb @@ -0,0 +1,215 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Dataset metadata that is specific to image classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1::ClassificationType] + # Required. Type of the classification problem. + class ImageClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata specific to image object detection. + class ImageObjectDetectionDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata for image classification. + # @!attribute [rw] base_model_id + # @return [::String] + # Optional. The ID of the `base` model. If it is specified, the new model + # will be created based on the `base` model. Otherwise, the new model will be + # created from scratch. The `base` model must be in the same + # `project` and `location` as the new model to create, and have the same + # `model_type`. + # @!attribute [rw] train_budget_milli_node_hours + # @return [::Integer] + # Optional. The train budget of creating this model, expressed in milli node + # hours i.e. 1,000 value in this field means 1 node hour. The actual + # `train_cost` will be equal or less than this value. If further model + # training ceases to provide any improvements, it will stop without using + # full budget and the stop_reason will be `MODEL_CONVERGED`. + # Note, node_hour = actual_hour * number_of_nodes_invovled. + # For model type `cloud`(default), the train budget must be between 8,000 + # and 800,000 milli node hours, inclusive. The default value is 192, 000 + # which represents one day in wall time. For model type + # `mobile-low-latency-1`, `mobile-versatile-1`, `mobile-high-accuracy-1`, + # `mobile-core-ml-low-latency-1`, `mobile-core-ml-versatile-1`, + # `mobile-core-ml-high-accuracy-1`, the train budget must be between 1,000 + # and 100,000 milli node hours, inclusive. The default value is 24, 000 which + # represents one day in wall time. + # @!attribute [r] train_cost_milli_node_hours + # @return [::Integer] + # Output only. The actual train cost of creating this model, expressed in + # milli node hours, i.e. 1,000 value in this field means 1 node hour. + # Guaranteed to not exceed the train budget. + # @!attribute [r] stop_reason + # @return [::String] + # Output only. The reason that this create model operation stopped, + # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + # @!attribute [rw] model_type + # @return [::String] + # Optional. Type of the model. The available values are: + # * `cloud` - Model to be used via prediction calls to AutoML API. + # This is the default value. + # * `mobile-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have low latency, but + # may have lower prediction quality than other models. + # * `mobile-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. + # * `mobile-high-accuracy-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have a higher + # latency, but should also have a higher prediction quality + # than other models. + # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core + # ML afterwards. Expected to have low latency, but may have + # lower prediction quality than other models. + # * `mobile-core-ml-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core + # ML afterwards. + # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to + # providing prediction via AutoML API, can also be exported + # (see {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with + # Core ML afterwards. Expected to have a higher latency, but + # should also have a higher prediction quality than other + # models. + # @!attribute [r] node_qps + # @return [::Float] + # Output only. An approximate number of online prediction QPS that can + # be supported by this model per each node on which it is deployed. + # @!attribute [r] node_count + # @return [::Integer] + # Output only. The number of nodes this model is deployed on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the node_qps field. + class ImageClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata specific to image object detection. + # @!attribute [rw] model_type + # @return [::String] + # Optional. Type of the model. The available values are: + # * `cloud-high-accuracy-1` - (default) A model to be used via prediction + # calls to AutoML API. Expected to have a higher latency, but + # should also have a higher prediction quality than other + # models. + # * `cloud-low-latency-1` - A model to be used via prediction + # calls to AutoML API. Expected to have low latency, but may + # have lower prediction quality than other models. + # * `mobile-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have low latency, but + # may have lower prediction quality than other models. + # * `mobile-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. + # * `mobile-high-accuracy-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have a higher + # latency, but should also have a higher prediction quality + # than other models. + # @!attribute [r] node_count + # @return [::Integer] + # Output only. The number of nodes this model is deployed on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the qps_per_node field. + # @!attribute [r] node_qps + # @return [::Float] + # Output only. An approximate number of online prediction QPS that can + # be supported by this model per each node on which it is deployed. + # @!attribute [r] stop_reason + # @return [::String] + # Output only. The reason that this create model operation stopped, + # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + # @!attribute [rw] train_budget_milli_node_hours + # @return [::Integer] + # Optional. The train budget of creating this model, expressed in milli node + # hours i.e. 1,000 value in this field means 1 node hour. The actual + # `train_cost` will be equal or less than this value. If further model + # training ceases to provide any improvements, it will stop without using + # full budget and the stop_reason will be `MODEL_CONVERGED`. + # Note, node_hour = actual_hour * number_of_nodes_invovled. + # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, + # the train budget must be between 20,000 and 900,000 milli node hours, + # inclusive. The default value is 216, 000 which represents one day in + # wall time. + # For model type `mobile-low-latency-1`, `mobile-versatile-1`, + # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, + # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train + # budget must be between 1,000 and 100,000 milli node hours, inclusive. + # The default value is 24, 000 which represents one day in wall time. + # @!attribute [r] train_cost_milli_node_hours + # @return [::Integer] + # Output only. The actual train cost of creating this model, expressed in + # milli node hours, i.e. 1,000 value in this field means 1 node hour. + # Guaranteed to not exceed the train budget. + class ImageObjectDetectionModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model deployment metadata specific to Image Classification. + # @!attribute [rw] node_count + # @return [::Integer] + # Input only. The number of nodes to deploy the model on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the model's + # {::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata#node_qps node_qps}. + # Must be between 1 and 100, inclusive on both ends. + class ImageClassificationModelDeploymentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model deployment metadata specific to Image Object Detection. + # @!attribute [rw] node_count + # @return [::Integer] + # Input only. The number of nodes to deploy the model on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the model's + # [qps_per_node][google.cloud.automl.v1.ImageObjectDetectionModelMetadata.qps_per_node]. + # Must be between 1 and 100, inclusive on both ends. + class ImageObjectDetectionModelDeploymentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb new file mode 100644 index 000000000000..07e37b650808 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb @@ -0,0 +1,1345 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Input configuration for + # {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData} action. + # + # The format of input depends on dataset_metadata the Dataset into which + # the import is happening has. As input source the + # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} + # is expected, unless specified otherwise. Additionally any input .CSV file + # by itself must be 100MB or smaller, unless specified otherwise. + # If an "example" file (that is, image, video etc.) with identical content + # (even if it had different `GCS_FILE_PATH`) is mentioned multiple times, then + # its label, bounding boxes etc. are appended. The same file should be always + # provided with the same `ML_USE` and `GCS_FILE_PATH`, if it is not, then + # these values are nondeterministically selected from the given ones. + # + # The formats are represented in EBNF with commas being literal and with + # non-terminal symbols defined near the end of this comment. The formats are: + # + # #### AutoML Vision + # + # + # ##### Classification + # + # See [Preparing your training + # data](https://cloud.google.com/vision/automl/docs/prepare) for more + # information. + # + # CSV file(s) with each line in format: + # + # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing. + # + # * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to + # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, + # .TIFF, .ICO. + # + # * `LABEL` - A label that identifies the object in the image. + # + # For the `MULTICLASS` classification type, at most one `LABEL` is allowed + # per image. If an image has not yet been labeled, then it should be + # mentioned just once with no `LABEL`. + # + # Some sample rows: + # + # TRAIN,gs://folder/image1.jpg,daisy + # TEST,gs://folder/image2.jpg,dandelion,tulip,rose + # UNASSIGNED,gs://folder/image3.jpg,daisy + # UNASSIGNED,gs://folder/image4.jpg + # + # + # ##### Object Detection + # See [Preparing your training + # data](https://cloud.google.com/vision/automl/object-detection/docs/prepare) + # for more information. + # + # A CSV file(s) with each line in format: + # + # ML_USE,GCS_FILE_PATH,[LABEL],(BOUNDING_BOX | ,,,,,,,) + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing. + # + # * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to + # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. Each image + # is assumed to be exhaustively labeled. + # + # * `LABEL` - A label that identifies the object in the image specified by the + # `BOUNDING_BOX`. + # + # * `BOUNDING BOX` - The vertices of an object in the example image. + # The minimum allowed `BOUNDING_BOX` edge length is 0.01, and no more than + # 500 `BOUNDING_BOX` instances per image are allowed (one `BOUNDING_BOX` + # per line). If an image has no looked for objects then it should be + # mentioned just once with no LABEL and the ",,,,,,," in place of the + # `BOUNDING_BOX`. + # + # **Four sample rows:** + # + # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, + # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, + # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 + # TEST,gs://folder/im3.png,,,,,,,,, + # + # + # + # + # #### AutoML Video Intelligence + # + # + # ##### Classification + # + # See [Preparing your training + # data](https://cloud.google.com/video-intelligence/automl/docs/prepare) for + # more information. + # + # CSV file(s) with each line in format: + # + # ML_USE,GCS_FILE_PATH + # + # For `ML_USE`, do not use `VALIDATE`. + # + # `GCS_FILE_PATH` is the path to another .csv file that describes training + # example for a given `ML_USE`, using the following row format: + # + # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) + # + # Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up + # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # + # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the + # length of the video, and the end time must be after the start time. Any + # segment of a video which has one or more labels on it, is considered a + # hard negative for all other labels. Any segment with no labels on + # it is considered to be unknown. If a whole video is unknown, then + # it should be mentioned just once with ",," in place of `LABEL, + # TIME_SEGMENT_START,TIME_SEGMENT_END`. + # + # Sample top level CSV file: + # + # TRAIN,gs://folder/train_videos.csv + # TEST,gs://folder/test_videos.csv + # UNASSIGNED,gs://folder/other_videos.csv + # + # Sample rows of a CSV file for a particular ML_USE: + # + # gs://folder/video1.avi,car,120,180.000021 + # gs://folder/video1.avi,bike,150,180.000021 + # gs://folder/vid2.avi,car,0,60.5 + # gs://folder/vid3.avi,,, + # + # + # + # ##### Object Tracking + # + # See [Preparing your training + # data](/video-intelligence/automl/object-tracking/docs/prepare) for more + # information. + # + # CSV file(s) with each line in format: + # + # ML_USE,GCS_FILE_PATH + # + # For `ML_USE`, do not use `VALIDATE`. + # + # `GCS_FILE_PATH` is the path to another .csv file that describes training + # example for a given `ML_USE`, using the following row format: + # + # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX + # + # or + # + # GCS_FILE_PATH,,,,,,,,,, + # + # Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up + # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # Providing `INSTANCE_ID`s can help to obtain a better model. When + # a specific labeled entity leaves the video frame, and shows up + # afterwards it is not required, albeit preferable, that the same + # `INSTANCE_ID` is given to it. + # + # `TIMESTAMP` must be within the length of the video, the + # `BOUNDING_BOX` is assumed to be drawn on the closest video's frame + # to the `TIMESTAMP`. Any mentioned by the `TIMESTAMP` frame is expected + # to be exhaustively labeled and no more than 500 `BOUNDING_BOX`-es per + # frame are allowed. If a whole video is unknown, then it should be + # mentioned just once with ",,,,,,,,,," in place of `LABEL, + # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX`. + # + # Sample top level CSV file: + # + # TRAIN,gs://folder/train_videos.csv + # TEST,gs://folder/test_videos.csv + # UNASSIGNED,gs://folder/other_videos.csv + # + # Seven sample rows of a CSV file for a particular ML_USE: + # + # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 + # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 + # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 + # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, + # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, + # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, + # gs://folder/video2.avi,,,,,,,,,,, + # + # + # #### AutoML Natural Language + # + # + # ##### Entity Extraction + # + # See [Preparing your training + # data](/natural-language/automl/entity-analysis/docs/prepare) for more + # information. + # + # One or more CSV file(s) with each line in the following format: + # + # ML_USE,GCS_FILE_PATH + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing.. + # + # * `GCS_FILE_PATH` - a Identifies JSON Lines (.JSONL) file stored in + # Google Cloud Storage that contains in-line text in-line as documents + # for model training. + # + # After the training data set has been determined from the `TRAIN` and + # `UNASSIGNED` CSV files, the training data is divided into train and + # validation data sets. 70% for training and 30% for validation. + # + # For example: + # + # TRAIN,gs://folder/file1.jsonl + # VALIDATE,gs://folder/file2.jsonl + # TEST,gs://folder/file3.jsonl + # + # **In-line JSONL files** + # + # In-line .JSONL files contain, per line, a JSON document that wraps a + # {::Google::Cloud::AutoML::V1::TextSnippet `text_snippet`} field followed by + # one or more {::Google::Cloud::AutoML::V1::AnnotationPayload `annotations`} + # fields, which have `display_name` and `text_extraction` fields to describe + # the entity from the text snippet. Multiple JSON documents can be separated + # using line breaks (\n). + # + # The supplied text must be annotated exhaustively. For example, if you + # include the text "horse", but do not label it as "animal", + # then "horse" is assumed to not be an "animal". + # + # Any given text snippet content must have 30,000 characters or + # less, and also be UTF-8 NFC encoded. ASCII is accepted as it is + # UTF-8 NFC encoded. + # + # For example: + # + # { + # "text_snippet": { + # "content": "dog car cat" + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 0, "end_offset": 2} + # } + # }, + # { + # "display_name": "vehicle", + # "text_extraction": { + # "text_segment": {"start_offset": 4, "end_offset": 6} + # } + # }, + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 8, "end_offset": 10} + # } + # } + # ] + # }\n + # { + # "text_snippet": { + # "content": "This dog is good." + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 5, "end_offset": 7} + # } + # } + # ] + # } + # + # **JSONL files that reference documents** + # + # .JSONL files contain, per line, a JSON document that wraps a + # `input_config` that contains the path to a source document. + # Multiple JSON documents can be separated using line breaks (\n). + # + # Supported document extensions: .PDF, .TIF, .TIFF + # + # For example: + # + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] + # } + # } + # } + # }\n + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] + # } + # } + # } + # } + # + # **In-line JSONL files with document layout information** + # + # **Note:** You can only annotate documents using the UI. The format described + # below applies to annotated documents exported using the UI or `exportData`. + # + # In-line .JSONL files for documents contain, per line, a JSON document + # that wraps a `document` field that provides the textual content of the + # document and the layout information. + # + # For example: + # + # { + # "document": { + # "document_text": { + # "content": "dog car cat" + # } + # "layout": [ + # { + # "text_segment": { + # "start_offset": 0, + # "end_offset": 11, + # }, + # "page_number": 1, + # "bounding_poly": { + # "normalized_vertices": [ + # {"x": 0.1, "y": 0.1}, + # {"x": 0.1, "y": 0.3}, + # {"x": 0.3, "y": 0.3}, + # {"x": 0.3, "y": 0.1}, + # ], + # }, + # "text_segment_type": TOKEN, + # } + # ], + # "document_dimensions": { + # "width": 8.27, + # "height": 11.69, + # "unit": INCH, + # } + # "page_count": 3, + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 0, "end_offset": 3} + # } + # }, + # { + # "display_name": "vehicle", + # "text_extraction": { + # "text_segment": {"start_offset": 4, "end_offset": 7} + # } + # }, + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": {"start_offset": 8, "end_offset": 11} + # } + # }, + # ], + # + # + # + # + # ##### Classification + # + # See [Preparing your training + # data](https://cloud.google.com/natural-language/automl/docs/prepare) for more + # information. + # + # One or more CSV file(s) with each line in the following format: + # + # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing. + # + # * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If + # the column content is a valid Google Cloud Storage file path, that is, + # prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if + # the content is enclosed in double quotes (""), it is treated as a + # `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a + # file with supported extension and UTF-8 encoding, for example, + # "gs://folder/content.txt" AutoML imports the file content + # as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content + # excluding quotes. In both cases, size of the content must be 10MB or + # less in size. For zip files, the size of each file inside the zip must be + # 10MB or less in size. + # + # For the `MULTICLASS` classification type, at most one `LABEL` is allowed. + # + # The `ML_USE` and `LABEL` columns are optional. + # Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP + # + # A maximum of 100 unique labels are allowed per CSV row. + # + # Sample rows: + # + # TRAIN,"They have bad food and very rude",RudeService,BadFood + # gs://folder/content.txt,SlowService + # TEST,gs://folder/document.pdf + # VALIDATE,gs://folder/text_files.zip,BadFood + # + # + # + # ##### Sentiment Analysis + # + # See [Preparing your training + # data](https://cloud.google.com/natural-language/automl/docs/prepare) for more + # information. + # + # CSV file(s) with each line in format: + # + # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT + # + # * `ML_USE` - Identifies the data set that the current row (file) applies + # to. + # This value can be one of the following: + # * `TRAIN` - Rows in this file are used to train the model. + # * `TEST` - Rows in this file are used to test the model during training. + # * `UNASSIGNED` - Rows in this file are not categorized. They are + # Automatically divided into train and test data. 80% for training and + # 20% for testing. + # + # * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If + # the column content is a valid Google Cloud Storage file path, that is, + # prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if + # the content is enclosed in double quotes (""), it is treated as a + # `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a + # file with supported extension and UTF-8 encoding, for example, + # "gs://folder/content.txt" AutoML imports the file content + # as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content + # excluding quotes. In both cases, size of the content must be 128kB or + # less in size. For zip files, the size of each file inside the zip must be + # 128kB or less in size. + # + # The `ML_USE` and `SENTIMENT` columns are optional. + # Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP + # + # * `SENTIMENT` - An integer between 0 and + # Dataset.text_sentiment_dataset_metadata.sentiment_max + # (inclusive). Describes the ordinal of the sentiment - higher + # value means a more positive sentiment. All the values are + # completely relative, i.e. neither 0 needs to mean a negative or + # neutral sentiment nor sentiment_max needs to mean a positive one - + # it is just required that 0 is the least positive sentiment + # in the data, and sentiment_max is the most positive one. + # The SENTIMENT shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + # All SENTIMENT values between 0 and sentiment_max must be + # represented in the imported data. On prediction the same 0 to + # sentiment_max range will be used. The difference between + # neighboring sentiment values needs not to be uniform, e.g. 1 and + # 2 may be similar whereas the difference between 2 and 3 may be + # large. + # + # Sample rows: + # + # TRAIN,"@freewrytin this is way too good for your product",2 + # gs://folder/content.txt,3 + # TEST,gs://folder/document.pdf + # VALIDATE,gs://folder/text_files.zip,2 + # + # + # + # #### AutoML Tables + # + # See [Preparing your training + # data](https://cloud.google.com/automl-tables/docs/prepare) for more + # information. + # + # You can use either + # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} or + # [bigquery_source][google.cloud.automl.v1.InputConfig.bigquery_source]. + # All input is concatenated into a + # single + # [primary_table_spec_id][google.cloud.automl.v1.TablesDatasetMetadata.primary_table_spec_id] + # + # **For gcs_source:** + # + # CSV file(s), where the first row of the first file is the header, + # containing unique column names. If the first row of a subsequent + # file is the same as the header, then it is also treated as a + # header. All other rows contain values for the corresponding + # columns. + # + # Each .CSV file by itself must be 10GB or smaller, and their total + # size must be 100GB or smaller. + # + # First three sample rows of a CSV file: + #

+        # "Id","First Name","Last Name","Dob","Addresses"
+        # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
+        # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
+        # 
+ # **For bigquery_source:** + # + # An URI of a BigQuery table. The user data size of the BigQuery + # table must be 100GB or smaller. + # + # An imported table must have between 2 and 1,000 columns, inclusive, + # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 + # import data running in parallel. + # + # + # + # **Input field definitions:** + # + # `ML_USE` + # : ("TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED") + # Describes how the given example (file) should be used for model + # training. "UNASSIGNED" can be used when user has no preference. + # + # `GCS_FILE_PATH` + # : The path to a file on Google Cloud Storage. For example, + # "gs://folder/image1.png". + # + # `LABEL` + # : A display name of an object on an image, video etc., e.g. "dog". + # Must be up to 32 characters long and can consist only of ASCII + # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. + # For each label an AnnotationSpec is created which display_name + # becomes the label; AnnotationSpecs are given back in predictions. + # + # `INSTANCE_ID` + # : A positive integer that identifies a specific instance of a + # labeled entity on an example. Used e.g. to track two cars on + # a video while being able to tell apart which one is which. + # + # `BOUNDING_BOX` + # : (`VERTEX,VERTEX,VERTEX,VERTEX` | `VERTEX,,,VERTEX,,`) + # A rectangle parallel to the frame of the example (image, + # video). If 4 vertices are given they are connected by edges + # in the order provided, if 2 are given they are recognized + # as diagonally opposite vertices of the rectangle. + # + # `VERTEX` + # : (`COORDINATE,COORDINATE`) + # First coordinate is horizontal (x), the second is vertical (y). + # + # `COORDINATE` + # : A float in 0 to 1 range, relative to total length of + # image or video in given dimension. For fractions the + # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). + # Point 0,0 is in top left. + # + # `TIME_SEGMENT_START` + # : (`TIME_OFFSET`) + # Expresses a beginning, inclusive, of a time segment + # within an example that has a time dimension + # (e.g. video). + # + # `TIME_SEGMENT_END` + # : (`TIME_OFFSET`) + # Expresses an end, exclusive, of a time segment within + # n example that has a time dimension (e.g. video). + # + # `TIME_OFFSET` + # : A number of seconds as measured from the start of an + # example (e.g. video). Fractions are allowed, up to a + # microsecond precision. "inf" is allowed, and it means the end + # of the example. + # + # `TEXT_SNIPPET` + # : The content of a text snippet, UTF-8 encoded, enclosed within + # double quotes (""). + # + # `DOCUMENT` + # : A field that provides the textual content with document and the layout + # information. + # + # + # **Errors:** + # + # If any of the provided CSV files can't be parsed or if more than certain + # percent of CSV rows cannot be processed then the operation fails and + # nothing is imported. Regardless of overall success or failure the per-row + # failures, up to a certain count cap, is listed in + # Operation.metadata.partial_failures. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1::GcsSource] + # The Google Cloud Storage location for the input content. + # For {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData}, + # `gcs_source` points to a CSV file with a structure described in + # {::Google::Cloud::AutoML::V1::InputConfig InputConfig}. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters describing the semantic of the + # imported data, any string must be up to 25000 + # characters long. + # + # #### AutoML Tables + # + # `schema_inference_version` + # : (integer) This value must be supplied. + # The version of the + # algorithm to use for the initial inference of the + # column data types of the imported table. Allowed values: "1". + class InputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Input configuration for BatchPredict Action. + # + # The format of input depends on the ML problem of the model used for + # prediction. As input source the + # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} + # is expected, unless specified otherwise. + # + # The formats are represented in EBNF with commas being literal and with + # non-terminal symbols defined near the end of this comment. The formats + # are: + # + # #### AutoML Vision + # ##### Classification + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH + # + # The Google Cloud Storage location of an image of up to + # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. + # This path is treated as the ID in the batch predict output. + # + # Sample rows: + # + # gs://folder/image1.jpeg + # gs://folder/image2.gif + # gs://folder/image3.png + # + # ##### Object Detection + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH + # + # The Google Cloud Storage location of an image of up to + # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. + # This path is treated as the ID in the batch predict output. + # + # Sample rows: + # + # gs://folder/image1.jpeg + # gs://folder/image2.gif + # gs://folder/image3.png + # + # #### AutoML Video Intelligence + # ##### Classification + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END + # + # `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in + # size and up to 3h in duration duration. + # Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # + # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the + # length of the video, and the end time must be after the start time. + # + # Sample rows: + # + # gs://folder/video1.mp4,10,40 + # gs://folder/video1.mp4,20,60 + # gs://folder/vid2.mov,0,inf + # + # ##### Object Tracking + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END + # + # `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in + # size and up to 3h in duration duration. + # Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # + # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the + # length of the video, and the end time must be after the start time. + # + # Sample rows: + # + # gs://folder/video1.mp4,10,40 + # gs://folder/video1.mp4,20,60 + # gs://folder/vid2.mov,0,inf + # + # #### AutoML Natural Language + # ##### Classification + # + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH + # + # `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. + # Supported file extensions: .TXT, .PDF, .TIF, .TIFF + # + # Text files can be no larger than 10MB in size. + # + # Sample rows: + # + # gs://folder/text1.txt + # gs://folder/text2.pdf + # gs://folder/text3.tif + # + # ##### Sentiment Analysis + # One or more CSV files where each line is a single column: + # + # GCS_FILE_PATH + # + # `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. + # Supported file extensions: .TXT, .PDF, .TIF, .TIFF + # + # Text files can be no larger than 128kB in size. + # + # Sample rows: + # + # gs://folder/text1.txt + # gs://folder/text2.pdf + # gs://folder/text3.tif + # + # ##### Entity Extraction + # + # One or more JSONL (JSON Lines) files that either provide inline text or + # documents. You can only use one format, either inline text or documents, + # for a single call to [AutoMl.BatchPredict]. + # + # Each JSONL file contains a per line a proto that + # wraps a temporary user-assigned TextSnippet ID (string up to 2000 + # characters long) called "id", a TextSnippet proto (in + # JSON representation) and zero or more TextFeature protos. Any given + # text snippet content must have 30,000 characters or less, and also + # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be + # unique. + # + # Each document JSONL file contains, per line, a proto that wraps a Document + # proto with `input_config` set. Each document cannot exceed 2MB in size. + # + # Supported document extensions: .PDF, .TIF, .TIFF + # + # Each JSONL file must not exceed 100MB in size, and no more than 20 + # JSONL files may be passed. + # + # Sample inline JSONL file (Shown with artificial line + # breaks. Actual line breaks are denoted by "\n".): + # + # { + # "id": "my_first_id", + # "text_snippet": { "content": "dog car cat"}, + # "text_features": [ + # { + # "text_segment": \\{"start_offset": 4, "end_offset": 6}, + # "structural_type": PARAGRAPH, + # "bounding_poly": { + # "normalized_vertices": [ + # \\{"x": 0.1, "y": 0.1}, + # \\{"x": 0.1, "y": 0.3}, + # \\{"x": 0.3, "y": 0.3}, + # \\{"x": 0.3, "y": 0.1}, + # ] + # }, + # } + # ], + # }\n + # { + # "id": "2", + # "text_snippet": { + # "content": "Extended sample content", + # "mime_type": "text/plain" + # } + # } + # + # Sample document JSONL file (Shown with artificial line + # breaks. Actual line breaks are denoted by "\n".): + # + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] + # } + # } + # } + # }\n + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] + # } + # } + # } + # } + # + # #### AutoML Tables + # + # See [Preparing your training + # data](https://cloud.google.com/automl-tables/docs/predict-batch) for more + # information. + # + # You can use either + # {::Google::Cloud::AutoML::V1::BatchPredictInputConfig#gcs_source gcs_source} + # or + # [bigquery_source][BatchPredictInputConfig.bigquery_source]. + # + # **For gcs_source:** + # + # CSV file(s), each by itself 10GB or smaller and total size must be + # 100GB or smaller, where first file must have a header containing + # column names. If the first row of a subsequent file is the same as + # the header, then it is also treated as a header. All other rows + # contain values for the corresponding columns. + # + # The column names must contain the model's + # [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] + # [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] + # (order doesn't matter). The columns corresponding to the model's + # input feature column specs must contain values compatible with the + # column spec's data types. Prediction on all the rows, i.e. the CSV + # lines, will be attempted. + # + # + # Sample rows from a CSV file: + #
+        # "First Name","Last Name","Dob","Addresses"
+        # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
+        # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
+        # 
+ # **For bigquery_source:** + # + # The URI of a BigQuery table. The user data size of the BigQuery + # table must be 100GB or smaller. + # + # The column names must contain the model's + # [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] + # [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] + # (order doesn't matter). The columns corresponding to the model's + # input feature column specs must contain values compatible with the + # column spec's data types. Prediction on all the rows of the table + # will be attempted. + # + # **Input field definitions:** + # + # `GCS_FILE_PATH` + # : The path to a file on Google Cloud Storage. For example, + # "gs://folder/video.avi". + # + # `TIME_SEGMENT_START` + # : (`TIME_OFFSET`) + # Expresses a beginning, inclusive, of a time segment + # within an example that has a time dimension + # (e.g. video). + # + # `TIME_SEGMENT_END` + # : (`TIME_OFFSET`) + # Expresses an end, exclusive, of a time segment within + # n example that has a time dimension (e.g. video). + # + # `TIME_OFFSET` + # : A number of seconds as measured from the start of an + # example (e.g. video). Fractions are allowed, up to a + # microsecond precision. "inf" is allowed, and it means the end + # of the example. + # + # **Errors:** + # + # If any of the provided CSV files can't be parsed or if more than certain + # percent of CSV rows cannot be processed then the operation fails and + # prediction does not happen. Regardless of overall success or failure the + # per-row failures, up to a certain count cap, will be listed in + # Operation.metadata.partial_failures. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1::GcsSource] + # Required. The Google Cloud Storage location for the input content. + class BatchPredictInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input configuration of a {::Google::Cloud::AutoML::V1::Document Document}. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1::GcsSource] + # The Google Cloud Storage location of the document file. Only a single path + # should be given. + # + # Max supported size: 512MB. + # + # Supported extensions: .PDF. + class DocumentInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # * For Translation: + # CSV file `translation.csv`, with each line in format: + # ML_USE,GCS_FILE_PATH + # GCS_FILE_PATH leads to a .TSV file which describes examples that have + # given ML_USE, using the following row format per line: + # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target + # language) + # + # * For Tables: + # Output depends on whether the dataset was imported from Google Cloud + # Storage or BigQuery. + # Google Cloud Storage case: + # [gcs_destination][google.cloud.automl.v1p1beta.OutputConfig.gcs_destination] + # must be set. Exported are CSV file(s) `tables_1.csv`, + # `tables_2.csv`,...,`tables_N.csv` with each having as header line + # the table's column names, and all other lines contain values for + # the header columns. + # BigQuery case: + # [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # `export_data__` + # where will be made + # BigQuery-dataset-name compatible (e.g. most special characters will + # become underscores), and timestamp will be in + # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that + # dataset a new table called `primary_table` will be created, and + # filled with precisely the same data as this obtained on import. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1::GcsDestination] + # Required. The Google Cloud Storage location where the output is to be + # written to. For Image Object Detection, Text Extraction, Video + # Classification and Tables, in the given directory a new directory will be + # created with name: + # export_data-- where + # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export + # output will be written into that directory. + class OutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for BatchPredict Action. + # + # As destination the + # {::Google::Cloud::AutoML::V1::BatchPredictOutputConfig#gcs_destination gcs_destination} + # must be set unless specified otherwise for a domain. If gcs_destination is + # set then in the given directory a new directory is created. Its name + # will be + # "prediction--", + # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents + # of it depends on the ML problem the predictions are made for. + # + # * For Image Classification: + # In the created directory files `image_classification_1.jsonl`, + # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of the successfully predicted images and annotations. + # A single image will be listed only once with all its annotations, + # and its annotations will never be split across files. + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps image's "ID" : "" followed by a list of + # zero or more AnnotationPayload protos (called annotations), which + # have classification detail populated. + # If prediction for any image failed (partially or completely), then an + # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` + # files will be created (N depends on total number of failed + # predictions). These files will have a JSON representation of a proto + # that wraps the same "ID" : "" but here followed by + # exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`fields. + # + # * For Image Object Detection: + # In the created directory files `image_object_detection_1.jsonl`, + # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of the successfully predicted images and annotations. + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps image's "ID" : "" followed by a list of + # zero or more AnnotationPayload protos (called annotations), which + # have image_object_detection detail populated. A single image will + # be listed only once with all its annotations, and its annotations + # will never be split across files. + # If prediction for any image failed (partially or completely), then + # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` + # files will be created (N depends on total number of failed + # predictions). These files will have a JSON representation of a proto + # that wraps the same "ID" : "" but here followed by + # exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`fields. + # * For Video Classification: + # In the created directory a video_classification.csv file, and a .JSON + # file per each video classification requested in the input (i.e. each + # line in given CSV(s)), will be created. + # + # The format of video_classification.csv is: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS + # where: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 + # the prediction input lines (i.e. video_classification.csv has + # precisely the same number of lines as the prediction input had.) + # JSON_FILE_NAME = Name of .JSON file in the output directory, which + # contains prediction responses for the video time segment. + # STATUS = "OK" if prediction completed successfully, or an error code + # with message otherwise. If STATUS is not "OK" then the .JSON file + # for that line may not exist or be empty. + # + # Each .JSON file, assuming STATUS is "OK", will contain a list of + # AnnotationPayload protos in JSON format, which are the predictions + # for the video time segment the file is assigned to in the + # video_classification.csv. All AnnotationPayload protos will have + # video_classification field set, and will be sorted by + # video_classification.type field (note that the returned types are + # governed by `classifaction_types` parameter in + # [PredictService.BatchPredictRequest.params][]). + # + # * For Video Object Tracking: + # In the created directory a video_object_tracking.csv file will be + # created, and multiple files video_object_trackinng_1.json, + # video_object_trackinng_2.json,..., video_object_trackinng_N.json, + # where N is the number of requests in the input (i.e. the number of + # lines in given CSV(s)). + # + # The format of video_object_tracking.csv is: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS + # where: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 + # the prediction input lines (i.e. video_object_tracking.csv has + # precisely the same number of lines as the prediction input had.) + # JSON_FILE_NAME = Name of .JSON file in the output directory, which + # contains prediction responses for the video time segment. + # STATUS = "OK" if prediction completed successfully, or an error + # code with message otherwise. If STATUS is not "OK" then the .JSON + # file for that line may not exist or be empty. + # + # Each .JSON file, assuming STATUS is "OK", will contain a list of + # AnnotationPayload protos in JSON format, which are the predictions + # for each frame of the video time segment the file is assigned to in + # video_object_tracking.csv. All AnnotationPayload protos will have + # video_object_tracking field set. + # * For Text Classification: + # In the created directory files `text_classification_1.jsonl`, + # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps input text file (or document) in + # the text snippet (or document) proto and a list of + # zero or more AnnotationPayload protos (called annotations), which + # have classification detail populated. A single text file (or + # document) will be listed only once with all its annotations, and its + # annotations will never be split across files. + # + # If prediction for any input file (or document) failed (partially or + # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps input file followed by exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Text Sentiment: + # In the created directory files `text_sentiment_1.jsonl`, + # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps input text file (or document) in + # the text snippet (or document) proto and a list of + # zero or more AnnotationPayload protos (called annotations), which + # have text_sentiment detail populated. A single text file (or + # document) will be listed only once with all its annotations, and its + # annotations will never be split across files. + # + # If prediction for any input file (or document) failed (partially or + # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps input file followed by exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Text Extraction: + # In the created directory files `text_extraction_1.jsonl`, + # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # The contents of these .JSONL file(s) depend on whether the input + # used inline text, or documents. + # If input was inline, then each .JSONL file will contain, per line, + # a JSON representation of a proto that wraps given in request text + # snippet's "id" (if specified), followed by input text snippet, + # and a list of zero or more + # AnnotationPayload protos (called annotations), which have + # text_extraction detail populated. A single text snippet will be + # listed only once with all its annotations, and its annotations will + # never be split across files. + # If input used documents, then each .JSONL file will contain, per + # line, a JSON representation of a proto that wraps given in request + # document proto, followed by its OCR-ed representation in the form + # of a text snippet, finally followed by a list of zero or more + # AnnotationPayload protos (called annotations), which have + # text_extraction detail populated and refer, via their indices, to + # the OCR-ed text snippet. A single document (and its text snippet) + # will be listed only once with all its annotations, and its + # annotations will never be split across files. + # If prediction for any text snippet failed (partially or completely), + # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps either the "id" : "" (in case of inline) + # or the document proto (in case of document) but here followed by + # exactly one + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Tables: + # Output depends on whether + # [gcs_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.gcs_destination] + # or + # [bigquery_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.bigquery_destination] + # is set (either is allowed). + # Google Cloud Storage case: + # In the created directory files `tables_1.csv`, `tables_2.csv`,..., + # `tables_N.csv` will be created, where N may be 1, and depends on + # the total number of the successfully predicted rows. + # For all CLASSIFICATION + # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: + # Each .csv file will contain a header, listing all columns' + # [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] + # given on input followed by M target column names in the format of + # "<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] + # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>__score" where M is the number of distinct target values, + # i.e. number of distinct values in the target column of the table + # used to train the model. Subsequent lines will contain the + # respective values of successfully predicted rows, with the last, + # i.e. the target, columns having the corresponding prediction + # [scores][google.cloud.automl.v1p1beta.TablesAnnotation.score]. + # For REGRESSION and FORECASTING + # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: + # Each .csv file will contain a header, listing all columns' + # [display_name-s][google.cloud.automl.v1p1beta.display_name] + # given on input followed by the predicted target column with name + # in the format of + # "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] + # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" + # Subsequent lines will contain the respective values of + # successfully predicted rows, with the last, i.e. the target, + # column having the predicted target value. + # If prediction for any rows failed, then an additional + # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be + # created (N depends on total number of failed rows). These files + # will have analogous format as `tables_*.csv`, but always with a + # single target column having + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # represented as a JSON string, and containing only `code` and + # `message`. + # BigQuery case: + # [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # `prediction__` + # where will be made + # BigQuery-dataset-name compatible (e.g. most special characters will + # become underscores), and timestamp will be in + # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset + # two tables will be created, `predictions`, and `errors`. + # The `predictions` table's column names will be the input columns' + # [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] + # followed by the target column with name in the format of + # "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] + # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" + # The input feature columns will contain the respective values of + # successfully predicted rows, with the target column having an + # ARRAY of + # [AnnotationPayloads][google.cloud.automl.v1p1beta.AnnotationPayload], + # represented as STRUCT-s, containing + # [TablesAnnotation][google.cloud.automl.v1p1beta.TablesAnnotation]. + # The `errors` table contains rows for which the prediction has + # failed, it has analogous input columns while the target column name + # is in the format of + # "errors_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] + # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>", + # and as a value has + # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # represented as a STRUCT, and containing only `code` and `message`. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1::GcsDestination] + # Required. The Google Cloud Storage location of the directory where the + # output is to be written to. + class BatchPredictOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for ModelExport Action. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1::GcsDestination] + # Required. The Google Cloud Storage location where the model is to be + # written to. This location may only be set for the following model + # formats: + # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". + # + # Under the directory given as the destination a new one with name + # "model-export--", + # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, + # will be created. Inside the model and any of its supporting files + # will be written. + # @!attribute [rw] model_format + # @return [::String] + # The format in which the model must be exported. The available, and default, + # formats depend on the problem and model type (if given problem and type + # combination doesn't have a format listed, it means its models are not + # exportable): + # + # * For Image Classification mobile-low-latency-1, mobile-versatile-1, + # mobile-high-accuracy-1: + # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", + # "docker". + # + # * For Image Classification mobile-core-ml-low-latency-1, + # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: + # "core_ml" (default). + # + # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, + # mobile-high-accuracy-1: + # "tflite", "tf_saved_model", "tf_js". + # Formats description: + # + # * tflite - Used for Android mobile devices. + # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) + # devices. + # * tf_saved_model - A tensorflow model in SavedModel format. + # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can + # be used in the browser and in Node.js using JavaScript. + # * docker - Used for Docker containers. Use the params field to customize + # the container. The container is verified to work correctly on + # ubuntu 16.04 operating system. See more at + # [containers + # quickstart](https://cloud.google.com/vision/automl/docs/containers-gcs-quickstart) + # * core_ml - Used for iOS mobile devices. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional model-type and format specific parameters describing the + # requirements for the to be exported model files, any string must be up to + # 25000 characters long. + # + # * For `docker` format: + # `cpu_architecture` - (string) "x86_64" (default). + # `gpu_architecture` - (string) "none" (default), "nvidia". + class ModelExportOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The Google Cloud Storage location for the input content. + # @!attribute [rw] input_uris + # @return [::Array<::String>] + # Required. Google Cloud Storage URIs to input files, up to 2000 + # characters long. Accepted forms: + # * Full object path, e.g. gs://bucket/directory/object.csv + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location where the output is to be written to. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # Required. Google Cloud Storage URI to output directory, up to 2000 + # characters long. + # Accepted forms: + # * Prefix path: gs://bucket/directory + # The requesting user must have write permission to the bucket. + # The directory is created if it doesn't exist. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb new file mode 100644 index 000000000000..37165c8fbf69 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # API proto representing a trained machine learning model. + # @!attribute [rw] translation_model_metadata + # @return [::Google::Cloud::AutoML::V1::TranslationModelMetadata] + # Metadata for translation models. + # + # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata] + # Metadata for image classification models. + # + # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1::TextClassificationModelMetadata] + # Metadata for text classification models. + # + # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_model_metadata + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata] + # Metadata for image object detection models. + # + # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_model_metadata + # @return [::Google::Cloud::AutoML::V1::TextExtractionModelMetadata] + # Metadata for text extraction models. + # + # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_model_metadata + # @return [::Google::Cloud::AutoML::V1::TextSentimentModelMetadata] + # Metadata for text sentiment models. + # + # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the model. + # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the model to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores + # (_), and ASCII digits 0-9. It must start with a letter. + # @!attribute [rw] dataset_id + # @return [::String] + # Required. The resource ID of the dataset used to create the model. The dataset must + # come from the same ancestor project and location. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the model training finished and can be used for prediction. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model was last updated. + # @!attribute [rw] deployment_state + # @return [::Google::Cloud::AutoML::V1::Model::DeploymentState] + # Output only. Deployment state of the model. A model can only serve + # prediction requests after it gets deployed. + # @!attribute [rw] etag + # @return [::String] + # Used to perform a consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata to organize your model. + # + # Label keys and values can be no longer than 64 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://goo.gl/xmQnxf for more information on and examples of labels. + class Model + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deployment state of the model. + module DeploymentState + # Should not be used, an un-set enum has this value by default. + DEPLOYMENT_STATE_UNSPECIFIED = 0 + + # Model is deployed. + DEPLOYED = 1 + + # Model is not deployed. + UNDEPLOYED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb new file mode 100644 index 000000000000..729817ff4233 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Evaluation results of a model. + # @!attribute [rw] classification_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics] + # Model evaluation metrics for image, text, video and tables + # classification. + # Tables problem is considered a classification when the target column + # is CATEGORY DataType. + # + # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::TranslationEvaluationMetrics] + # Model evaluation metrics for translation. + # + # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionEvaluationMetrics] + # Model evaluation metrics for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::TextSentimentEvaluationMetrics] + # Evaluation metrics for text sentiment models. + # + # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1::TextExtractionEvaluationMetrics] + # Evaluation metrics for text extraction models. + # + # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the model evaluation. + # Format: + # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` + # @!attribute [rw] annotation_spec_id + # @return [::String] + # Output only. The ID of the annotation spec that the model evaluation applies to. The + # The ID is empty for the overall model evaluation. + # For Tables annotation specs in the dataset do not exist and this ID is + # always not set, but for CLASSIFICATION + # [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] + # the + # {::Google::Cloud::AutoML::V1::ModelEvaluation#display_name display_name} + # field is used. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The value of + # {::Google::Cloud::AutoML::V1::AnnotationSpec#display_name display_name} + # at the moment when the model was trained. Because this field returns a + # value at model training time, for different models trained from the same + # dataset, the values may differ, since display names could had been changed + # between the two model's trainings. For Tables CLASSIFICATION + # [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] + # distinct values of the target column at the moment of the model evaluation + # are populated here. + # The display_name is empty for the overall model evaluation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model evaluation was created. + # @!attribute [rw] evaluated_example_count + # @return [::Integer] + # Output only. The number of examples used for model evaluation, i.e. for + # which ground truth from time of model creation is compared against the + # predicted annotations created by the model. + # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is + # the total number of all examples used for evaluation. + # Otherwise, this is the count of examples that according to the ground + # truth were annotated by the + # {::Google::Cloud::AutoML::V1::ModelEvaluation#annotation_spec_id annotation_spec_id}. + class ModelEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb new file mode 100644 index 000000000000..78d79e45a942 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb @@ -0,0 +1,197 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Metadata used across all long running operations returned by AutoML API. + # @!attribute [rw] delete_details + # @return [::Google::Cloud::AutoML::V1::DeleteOperationMetadata] + # Details of a Delete operation. + # + # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deploy_model_details + # @return [::Google::Cloud::AutoML::V1::DeployModelOperationMetadata] + # Details of a DeployModel operation. + # + # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] undeploy_model_details + # @return [::Google::Cloud::AutoML::V1::UndeployModelOperationMetadata] + # Details of an UndeployModel operation. + # + # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_model_details + # @return [::Google::Cloud::AutoML::V1::CreateModelOperationMetadata] + # Details of CreateModel operation. + # + # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_dataset_details + # @return [::Google::Cloud::AutoML::V1::CreateDatasetOperationMetadata] + # Details of CreateDataset operation. + # + # Note: The following fields are mutually exclusive: `create_dataset_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] import_data_details + # @return [::Google::Cloud::AutoML::V1::ImportDataOperationMetadata] + # Details of ImportData operation. + # + # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] batch_predict_details + # @return [::Google::Cloud::AutoML::V1::BatchPredictOperationMetadata] + # Details of BatchPredict operation. + # + # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_data_details + # @return [::Google::Cloud::AutoML::V1::ExportDataOperationMetadata] + # Details of ExportData operation. + # + # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_model_details + # @return [::Google::Cloud::AutoML::V1::ExportModelOperationMetadata] + # Details of ExportModel operation. + # + # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Output only. Progress of operation. Range: [0, 100]. + # Not used currently. + # @!attribute [rw] partial_failures + # @return [::Array<::Google::Rpc::Status>] + # Output only. Partial failures encountered. + # E.g. single files that couldn't be read. + # This field should never exceed 20 entries. + # Status details field will contain standard GCP error details. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was updated for the last time. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of operations that perform deletes of any entities. + class DeleteOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of DeployModel operation. + class DeployModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of UndeployModel operation. + class UndeployModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of CreateDataset operation. + class CreateDatasetOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of CreateModel operation. + class CreateModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of ImportData operation. + class ImportDataOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of ExportData operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1::ExportDataOperationMetadata::ExportDataOutputInfo] + # Output only. Information further describing this export data's output. + class ExportDataOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes this export data's output. + # Supplements + # {::Google::Cloud::AutoML::V1::OutputConfig OutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the exported data is written. + class ExportDataOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of BatchPredict operation. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1::BatchPredictInputConfig] + # Output only. The input config that was given upon starting this + # batch predict operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1::BatchPredictOperationMetadata::BatchPredictOutputInfo] + # Output only. Information further describing this batch predict's output. + class BatchPredictOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes this batch predict's output. + # Supplements + # {::Google::Cloud::AutoML::V1::BatchPredictOutputConfig BatchPredictOutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the prediction output is written. + class BatchPredictOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of ExportModel operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1::ExportModelOperationMetadata::ExportModelOutputInfo] + # Output only. Information further describing the output of this model + # export. + class ExportModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes the output of model export. + # Supplements + # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the model will be exported. + class ExportModelOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb new file mode 100644 index 000000000000..0811f3318b09 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb @@ -0,0 +1,270 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Request message for {::Google::Cloud::AutoML::V1::PredictionService::Client#predict PredictionService.Predict}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the model requested to serve the prediction. + # @!attribute [rw] payload + # @return [::Google::Cloud::AutoML::V1::ExamplePayload] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned. The default is 100. The + # number of returned bounding boxes might be limited by the server. + # + # AutoML Tables + # + # `feature_importance` + # : (boolean) Whether + # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] + # is populated in the returned list of + # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] + # objects. The default is false. + class PredictRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for {::Google::Cloud::AutoML::V1::PredictionService::Client#predict PredictionService.Predict}. + # @!attribute [rw] payload + # @return [::Array<::Google::Cloud::AutoML::V1::AnnotationPayload>] + # Prediction result. + # AutoML Translation and AutoML Natural Language Sentiment Analysis + # return precisely one payload. + # @!attribute [rw] preprocessed_input + # @return [::Google::Cloud::AutoML::V1::ExamplePayload] + # The preprocessed example that AutoML actually makes prediction on. + # Empty if AutoML does not preprocess the input example. + # + # For AutoML Natural Language (Classification, Entity Extraction, and + # Sentiment Analysis), if the input is a document, the recognized text is + # returned in the + # {::Google::Cloud::AutoML::V1::Document#document_text document_text} + # property. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific prediction response metadata. + # + # AutoML Vision Object Detection + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding boxes to return per image. + # + # AutoML Natural Language Sentiment Analysis + # + # `sentiment_score` + # : (float, deprecated) A value between -1 and 1, + # -1 maps to least positive sentiment, while 1 maps to the most positive + # one and the higher the score, the more positive the sentiment in the + # document is. Yet these values are relative to the training data, so + # e.g. if all data was positive then -1 is also positive (though + # the least). + # `sentiment_score` is not the same as "score" and "magnitude" + # from Sentiment Analysis in the Natural Language API. + class PredictResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for {::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the model requested to serve the batch prediction. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1::BatchPredictInputConfig] + # Required. The input configuration for batch prediction. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig] + # Required. The Configuration specifying where output predictions should + # be written. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # AutoML Natural Language Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # + # AutoML Vision Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # AutoML Vision Object Detection + # + # `score_threshold` + # : (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # AutoML Video Intelligence Classification + # + # `score_threshold` + # : (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # `segment_classification` + # : (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is true. + # + # `shot_classification` + # : (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # The default is false. + # + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. + # + # `1s_interval_classification` + # : (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. The default is false. + # + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # + # AutoML Video Intelligence Object Tracking + # + # `score_threshold` + # : (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding + # boxes returned per image. The default is 100, the + # number of bounding boxes returned might be limited by the server. + # + # `min_bounding_box_size` + # : (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size are + # returned. Value in 0 to 1 range. Default is 0. + class BatchPredictRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of the Batch Predict. This message is returned in + # {::Google::Longrunning::Operation#response response} of the operation returned + # by the {::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific prediction response metadata. + # + # AutoML Vision Object Detection + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding boxes returned per image. + # + # AutoML Video Intelligence Object Tracking + # + # `max_bounding_box_count` + # : (int64) The maximum number of bounding boxes returned per frame. + class BatchPredictResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb new file mode 100644 index 000000000000..3185ecd7a149 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb @@ -0,0 +1,326 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#create_dataset AutoMl.CreateDataset}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project to create the dataset for. + # @!attribute [rw] dataset + # @return [::Google::Cloud::AutoML::V1::Dataset] + # Required. The dataset to create. + class CreateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_dataset AutoMl.GetDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to retrieve. + class GetDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project from which to list datasets. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. + class ListDatasetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets}. + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::AutoML::V1::Dataset>] + # The datasets read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. + class ListDatasetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#update_dataset AutoMl.UpdateDataset} + # @!attribute [rw] dataset + # @return [::Google::Cloud::AutoML::V1::Dataset] + # Required. The dataset which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. + class UpdateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to delete. + class DeleteDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData}. + # @!attribute [rw] name + # @return [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1::InputConfig] + # Required. The desired input location and its domain specific semantics, + # if any. + class ImportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#export_data AutoMl.ExportData}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1::OutputConfig] + # Required. The desired output location. + class ExportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the annotation spec to retrieve. + class GetAnnotationSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#create_model AutoMl.CreateModel}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent project where the model is being created. + # @!attribute [rw] model + # @return [::Google::Cloud::AutoML::V1::Model] + # Required. The model to create. + class CreateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_model AutoMl.GetModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model. + class GetModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project, from which to list the models. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels} call. + class ListModelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels}. + # @!attribute [rw] model + # @return [::Array<::Google::Cloud::AutoML::V1::Model>] + # List of models in the requested page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. + class ListModelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#delete_model AutoMl.DeleteModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model being deleted. + class DeleteModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#update_model AutoMl.UpdateModel} + # @!attribute [rw] model + # @return [::Google::Cloud::AutoML::V1::Model] + # Required. The model which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. + class UpdateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#deploy_model AutoMl.DeployModel}. + # @!attribute [rw] image_object_detection_model_deployment_metadata + # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_model_deployment_metadata + # @return [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata] + # Model deployment metadata specific to Image Classification. + # + # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model to deploy. + class DeployModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model to undeploy. + class UndeployModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}. + # Models need to be enabled for exporting, otherwise an error code will be + # returned. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the model to export. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1::ModelExportOutputConfig] + # Required. The desired output location and configuration. + class ExportModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the model evaluation. + class GetModelEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @!attribute [rw] filter + # @return [::String] + # Required. An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + class ListModelEvaluationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. + # @!attribute [rw] model_evaluation + # @return [::Array<::Google::Cloud::AutoML::V1::ModelEvaluation>] + # List of model evaluations in the requested page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to the {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new + # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. + class ListModelEvaluationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb new file mode 100644 index 000000000000..aa705d31cb5d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Dataset metadata for classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1::ClassificationType] + # Required. Type of the classification problem. + class TextClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1::ClassificationType] + # Output only. Classification type of the dataset used to train this model. + class TextClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata that is specific to text extraction + class TextExtractionDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text extraction. + class TextExtractionModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata for text sentiment. + # @!attribute [rw] sentiment_max + # @return [::Integer] + # Required. A sentiment is expressed as an integer ordinal, where higher value + # means a more positive sentiment. The range of sentiments that will be used + # is between 0 and sentiment_max (inclusive on both ends), and all the values + # in the range must be represented in the dataset before a model can be + # created. + # sentiment_max value must be between 1 and 10 (inclusive). + class TextSentimentDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text sentiment. + class TextSentimentModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb new file mode 100644 index 000000000000..817c0921c657 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Annotation for identifying spans of text. + # @!attribute [rw] text_segment + # @return [::Google::Cloud::AutoML::V1::TextSegment] + # An entity annotation will set this, which is the part of the original + # text to which the annotation pertains. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0. A higher value + # means greater confidence in correctness of the annotation. + class TextExtractionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for text extraction problems. + # @!attribute [rw] au_prc + # @return [::Float] + # Output only. The Area under precision recall curve metric. + # @!attribute [rw] confidence_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] + # Output only. Metrics that have confidence thresholds. + # Precision-recall curve can be derived from it. + class TextExtractionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. The confidence threshold value used to compute the metrics. + # Only annotations with score of at least this threshold are considered to + # be ones the model would return. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall under the given confidence threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision under the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb new file mode 100644 index 000000000000..93eddac0a79f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. + # @!attribute [rw] content + # @return [::String] + # Output only. The content of the TextSegment. + # @!attribute [rw] start_offset + # @return [::Integer] + # Required. Zero-based character index of the first character of the text + # segment (counting characters from the beginning of the text). + # @!attribute [rw] end_offset + # @return [::Integer] + # Required. Zero-based character index of the first character past the end of + # the text segment (counting character from the beginning of the text). + # The character at the end_offset is NOT included in the text segment. + class TextSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb new file mode 100644 index 000000000000..1c4bc080ceb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Contains annotation details specific to text sentiment. + # @!attribute [rw] sentiment + # @return [::Integer] + # Output only. The sentiment with the semantic, as given to the + # {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used + # for the prediction had been trained. + # The sentiment values are between 0 and + # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), + # with higher value meaning more positive sentiment. They are completely + # relative, i.e. 0 means least positive sentiment and sentiment_max means + # the most positive from the sentiments present in the train data. Therefore + # e.g. if train data had only negative sentiment, then sentiment_max, would + # be still negative (although least negative). + # The sentiment shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + class TextSentimentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for text sentiment problems. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + # @!attribute [rw] mean_absolute_error + # @return [::Float] + # Output only. Mean absolute error. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] mean_squared_error + # @return [::Float] + # Output only. Mean squared error. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] linear_kappa + # @return [::Float] + # Output only. Linear weighted kappa. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] quadratic_kappa + # @return [::Float] + # Output only. Quadratic weighted kappa. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] confusion_matrix + # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix] + # Output only. Confusion matrix of the evaluation. + # Only set for the overall model evaluation, not for evaluation of a single + # annotation spec. + class TextSentimentEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb new file mode 100644 index 000000000000..b41617bc0ea1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1 + # Dataset metadata that is specific to translation. + # @!attribute [rw] source_language_code + # @return [::String] + # Required. The BCP-47 language code of the source language. + # @!attribute [rw] target_language_code + # @return [::String] + # Required. The BCP-47 language code of the target language. + class TranslationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluation metrics for the dataset. + # @!attribute [rw] bleu_score + # @return [::Float] + # Output only. BLEU score. + # @!attribute [rw] base_bleu_score + # @return [::Float] + # Output only. BLEU score for base model. + class TranslationEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to translation. + # @!attribute [rw] base_model + # @return [::String] + # The resource name of the model to use as a baseline to train the custom + # model. If unset, we use the default base model provided by Google + # Translate. Format: + # `projects/{project_id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] source_language_code + # @return [::String] + # Output only. Inferred from the dataset. + # The source language (The BCP-47 language code) that is used for training. + # @!attribute [rw] target_language_code + # @return [::String] + # Output only. The target language (The BCP-47 language code) that is used + # for training. + class TranslationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation details specific to translation. + # @!attribute [rw] translated_content + # @return [::Google::Cloud::AutoML::V1::TextSnippet] + # Output only . The translated content. + class TranslationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile new file mode 100644 index 000000000000..a30bcdf1095a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-automl-v1", path: "../" +else + gem "google-cloud-automl-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb new file mode 100644 index 000000000000..b5039ab44d72 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_CreateDataset_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the create_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#create_dataset. +# +def create_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new + + # Call the create_dataset method. + result = client.create_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb new file mode 100644 index 000000000000..5d3c31c2a84e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_CreateModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the create_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#create_model. +# +def create_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::CreateModelRequest.new + + # Call the create_model method. + result = client.create_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb new file mode 100644 index 000000000000..5d9f3bddfa4c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_DeleteDataset_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the delete_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset. +# +def delete_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new + + # Call the delete_dataset method. + result = client.delete_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb new file mode 100644 index 000000000000..31d572dc4ae4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_DeleteModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the delete_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#delete_model. +# +def delete_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::DeleteModelRequest.new + + # Call the delete_model method. + result = client.delete_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb new file mode 100644 index 000000000000..6bf6b9d1894a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_DeployModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the deploy_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#deploy_model. +# +def deploy_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::DeployModelRequest.new + + # Call the deploy_model method. + result = client.deploy_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_DeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb new file mode 100644 index 000000000000..0c6ccde37676 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_ExportData_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the export_data call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#export_data. +# +def export_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ExportDataRequest.new + + # Call the export_data method. + result = client.export_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb new file mode 100644 index 000000000000..a8d8b903e76d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_ExportModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the export_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#export_model. +# +def export_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ExportModelRequest.new + + # Call the export_model method. + result = client.export_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_ExportModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb new file mode 100644 index 000000000000..1370dd7f6de2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_GetAnnotationSpec_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the get_annotation_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec. +# +def get_annotation_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new + + # Call the get_annotation_spec method. + result = client.get_annotation_spec request + + # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. + p result +end +# [END automl_v1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb new file mode 100644 index 000000000000..653b941b6763 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_GetDataset_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the get_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#get_dataset. +# +def get_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::GetDatasetRequest.new + + # Call the get_dataset method. + result = client.get_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + p result +end +# [END automl_v1_generated_AutoML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb new file mode 100644 index 000000000000..3cfec8bd9f5b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_GetModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the get_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#get_model. +# +def get_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::GetModelRequest.new + + # Call the get_model method. + result = client.get_model request + + # The returned object is of type Google::Cloud::AutoML::V1::Model. + p result +end +# [END automl_v1_generated_AutoML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb new file mode 100644 index 000000000000..66b9f5107d85 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_GetModelEvaluation_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the get_model_evaluation call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation. +# +def get_model_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new + + # Call the get_model_evaluation method. + result = client.get_model_evaluation request + + # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. + p result +end +# [END automl_v1_generated_AutoML_GetModelEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb new file mode 100644 index 000000000000..69bb6c83c5dc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_ImportData_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the import_data call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#import_data. +# +def import_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ImportDataRequest.new + + # Call the import_data method. + result = client.import_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb new file mode 100644 index 000000000000..c5a76dbcd997 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_ListDatasets_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the list_datasets call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#list_datasets. +# +def list_datasets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new + + # Call the list_datasets method. + result = client.list_datasets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. + p item + end +end +# [END automl_v1_generated_AutoML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb new file mode 100644 index 000000000000..c9798178e36c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_ListModelEvaluations_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the list_model_evaluations call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations. +# +def list_model_evaluations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new + + # Call the list_model_evaluations method. + result = client.list_model_evaluations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. + p item + end +end +# [END automl_v1_generated_AutoML_ListModelEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb new file mode 100644 index 000000000000..9b3102e77406 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_ListModels_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the list_models call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#list_models. +# +def list_models + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::ListModelsRequest.new + + # Call the list_models method. + result = client.list_models request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1::Model. + p item + end +end +# [END automl_v1_generated_AutoML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb new file mode 100644 index 000000000000..9044e6b31e6d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_UndeployModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the undeploy_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model. +# +def undeploy_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::UndeployModelRequest.new + + # Call the undeploy_model method. + result = client.undeploy_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_AutoML_UndeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb new file mode 100644 index 000000000000..097b11573307 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_UpdateDataset_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the update_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#update_dataset. +# +def update_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new + + # Call the update_dataset method. + result = client.update_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1::Dataset. + p result +end +# [END automl_v1_generated_AutoML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb new file mode 100644 index 000000000000..8b945e7f28c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_AutoML_UpdateModel_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the update_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::AutoML::Client#update_model. +# +def update_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::UpdateModelRequest.new + + # Call the update_model method. + result = client.update_model request + + # The returned object is of type Google::Cloud::AutoML::V1::Model. + p result +end +# [END automl_v1_generated_AutoML_UpdateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb new file mode 100644 index 000000000000..97f5c94f0b1a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_PredictionService_BatchPredict_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the batch_predict call in the PredictionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict. +# +def batch_predict + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::PredictionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::BatchPredictRequest.new + + # Call the batch_predict method. + result = client.batch_predict request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1_generated_PredictionService_BatchPredict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb new file mode 100644 index 000000000000..bc742b1e85e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1_generated_PredictionService_Predict_sync] +require "google/cloud/automl/v1" + +## +# Snippet for the predict call in the PredictionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1::PredictionService::Client#predict. +# +def predict + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1::PredictionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1::PredictRequest.new + + # Call the predict method. + result = client.predict request + + # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. + p result +end +# [END automl_v1_generated_PredictionService_Predict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json b/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json new file mode 100644 index 000000000000..96e1da944c03 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json @@ -0,0 +1,815 @@ +{ + "client_library": { + "name": "google-cloud-automl-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.automl.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "automl_v1_generated_PredictionService_Predict_sync", + "title": "Snippet for the predict call in the PredictionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::PredictionService::Client#predict.", + "file": "prediction_service/predict.rb", + "language": "RUBY", + "client_method": { + "short_name": "predict", + "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client#predict", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::PredictRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::PredictResponse", + "client": { + "short_name": "PredictionService::Client", + "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client" + }, + "method": { + "short_name": "Predict", + "full_name": "google.cloud.automl.v1.PredictionService.Predict", + "service": { + "short_name": "PredictionService", + "full_name": "google.cloud.automl.v1.PredictionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_PredictionService_BatchPredict_sync", + "title": "Snippet for the batch_predict call in the PredictionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict.", + "file": "prediction_service/batch_predict.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_predict", + "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::BatchPredictRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PredictionService::Client", + "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client" + }, + "method": { + "short_name": "BatchPredict", + "full_name": "google.cloud.automl.v1.PredictionService.BatchPredict", + "service": { + "short_name": "PredictionService", + "full_name": "google.cloud.automl.v1.PredictionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_CreateDataset_sync", + "title": "Snippet for the create_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#create_dataset.", + "file": "automl/create_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dataset", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#create_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::CreateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "CreateDataset", + "full_name": "google.cloud.automl.v1.AutoMl.CreateDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_GetDataset_sync", + "title": "Snippet for the get_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_dataset.", + "file": "automl/get_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dataset", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::GetDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "GetDataset", + "full_name": "google.cloud.automl.v1.AutoMl.GetDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ListDatasets_sync", + "title": "Snippet for the list_datasets call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_datasets.", + "file": "automl/list_datasets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_datasets", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ListDatasetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::ListDatasetsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ListDatasets", + "full_name": "google.cloud.automl.v1.AutoMl.ListDatasets", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_UpdateDataset_sync", + "title": "Snippet for the update_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#update_dataset.", + "file": "automl/update_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_dataset", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#update_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::UpdateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "UpdateDataset", + "full_name": "google.cloud.automl.v1.AutoMl.UpdateDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_DeleteDataset_sync", + "title": "Snippet for the delete_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset.", + "file": "automl/delete_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dataset", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::DeleteDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "DeleteDataset", + "full_name": "google.cloud.automl.v1.AutoMl.DeleteDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ImportData_sync", + "title": "Snippet for the import_data call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#import_data.", + "file": "automl/import_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_data", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#import_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ImportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ImportData", + "full_name": "google.cloud.automl.v1.AutoMl.ImportData", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ExportData_sync", + "title": "Snippet for the export_data call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#export_data.", + "file": "automl/export_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_data", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#export_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ExportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ExportData", + "full_name": "google.cloud.automl.v1.AutoMl.ExportData", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_GetAnnotationSpec_sync", + "title": "Snippet for the get_annotation_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec.", + "file": "automl/get_annotation_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_annotation_spec", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::AnnotationSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "GetAnnotationSpec", + "full_name": "google.cloud.automl.v1.AutoMl.GetAnnotationSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_CreateModel_sync", + "title": "Snippet for the create_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#create_model.", + "file": "automl/create_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#create_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::CreateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "CreateModel", + "full_name": "google.cloud.automl.v1.AutoMl.CreateModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_GetModel_sync", + "title": "Snippet for the get_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_model.", + "file": "automl/get_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::GetModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::Model", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "GetModel", + "full_name": "google.cloud.automl.v1.AutoMl.GetModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ListModels_sync", + "title": "Snippet for the list_models call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_models.", + "file": "automl/list_models.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_models", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_models", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ListModelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::ListModelsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ListModels", + "full_name": "google.cloud.automl.v1.AutoMl.ListModels", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_DeleteModel_sync", + "title": "Snippet for the delete_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#delete_model.", + "file": "automl/delete_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#delete_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::DeleteModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "DeleteModel", + "full_name": "google.cloud.automl.v1.AutoMl.DeleteModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_UpdateModel_sync", + "title": "Snippet for the update_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#update_model.", + "file": "automl/update_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#update_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::UpdateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::Model", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "UpdateModel", + "full_name": "google.cloud.automl.v1.AutoMl.UpdateModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_DeployModel_sync", + "title": "Snippet for the deploy_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#deploy_model.", + "file": "automl/deploy_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "deploy_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#deploy_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::DeployModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "DeployModel", + "full_name": "google.cloud.automl.v1.AutoMl.DeployModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_UndeployModel_sync", + "title": "Snippet for the undeploy_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model.", + "file": "automl/undeploy_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "undeploy_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::UndeployModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "UndeployModel", + "full_name": "google.cloud.automl.v1.AutoMl.UndeployModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ExportModel_sync", + "title": "Snippet for the export_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#export_model.", + "file": "automl/export_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_model", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#export_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ExportModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ExportModel", + "full_name": "google.cloud.automl.v1.AutoMl.ExportModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_GetModelEvaluation_sync", + "title": "Snippet for the get_model_evaluation call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation.", + "file": "automl/get_model_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model_evaluation", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::GetModelEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::ModelEvaluation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "GetModelEvaluation", + "full_name": "google.cloud.automl.v1.AutoMl.GetModelEvaluation", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1_generated_AutoML_ListModelEvaluations_sync", + "title": "Snippet for the list_model_evaluations call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations.", + "file": "automl/list_model_evaluations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_model_evaluations", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" + }, + "method": { + "short_name": "ListModelEvaluations", + "full_name": "google.cloud.automl.v1.AutoMl.ListModelEvaluations", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb new file mode 100644 index 000000000000..be42c2eb5950 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1/service_pb" +require "google/cloud/automl/v1/service_services_pb" +require "google/cloud/automl/v1/automl" + +class ::Google::Cloud::AutoML::V1::AutoML::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb new file mode 100644 index 000000000000..be60ed069bd5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1/automl" + +class ::Google::Cloud::AutoML::V1::AutoML::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_annotation_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" + assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", location: "value1", dataset: "value2" + assert_equal "projects/value0/locations/value1/datasets/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end + + def test_model_evaluation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" + assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb new file mode 100644 index 000000000000..83adbd02e4b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb @@ -0,0 +1,1088 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/automl/v1/service_pb" +require "google/cloud/automl/v1/automl/rest" + + +class ::Google::Cloud::AutoML::V1::AutoML::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_dataset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset = {} + + create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_dataset parent: parent, dataset: dataset do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_dataset ::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_dataset(::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_dataset_client_stub.call_count + end + end + end + + def test_get_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dataset ::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dataset(::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dataset_client_stub.call_count + end + end + end + + def test_list_datasets + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_datasets ::Google::Cloud::AutoML::V1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_datasets(::Google::Cloud::AutoML::V1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_datasets_client_stub.call_count + end + end + end + + def test_update_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + dataset = {} + update_mask = {} + + update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_dataset ::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_dataset(::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_dataset_client_stub.call_count + end + end + end + + def test_delete_dataset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_dataset ::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_dataset(::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_dataset_client_stub.call_count + end + end + end + + def test_import_data + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + + import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_data_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_data({ name: name, input_config: input_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_data name: name, input_config: input_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_data ::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_data(::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_data_client_stub.call_count + end + end + end + + def test_export_data + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_data_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_data({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_data name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_data ::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_data(::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_count + end + end + end + + def test_get_annotation_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::AnnotationSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_annotation_spec({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_annotation_spec name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_annotation_spec ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_annotation_spec({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_annotation_spec(::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_annotation_spec_client_stub.call_count + end + end + end + + def test_create_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + model = {} + + create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_model({ parent: parent, model: model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_model parent: parent, model: model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_model ::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_model({ parent: parent, model: model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_model(::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_model_client_stub.call_count + end + end + end + + def test_get_model + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::Model.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_model ::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_model(::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_client_stub.call_count + end + end + end + + def test_list_models + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::ListModelsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_models_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_models ::Google::Cloud::AutoML::V1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_models(::Google::Cloud::AutoML::V1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_models_client_stub.call_count + end + end + end + + def test_delete_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_model ::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_model(::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_model_client_stub.call_count + end + end + end + + def test_update_model + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::Model.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + model = {} + update_mask = {} + + update_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_update_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_model({ model: model, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_model model: model, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_model ::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_model({ model: model, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_model(::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_model_client_stub.call_count + end + end + end + + def test_deploy_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + image_object_detection_model_deployment_metadata = {} + name = "hello world" + + deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.deploy_model ::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.deploy_model(::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, deploy_model_client_stub.call_count + end + end + end + + def test_undeploy_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.undeploy_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.undeploy_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.undeploy_model ::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.undeploy_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.undeploy_model(::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undeploy_model_client_stub.call_count + end + end + end + + def test_export_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_model({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_model name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_model ::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_model(::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_model_client_stub.call_count + end + end + end + + def test_get_model_evaluation + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::ModelEvaluation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_model_evaluation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_model_evaluation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_model_evaluation ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_model_evaluation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_model_evaluation(::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_evaluation_client_stub.call_count + end + end + end + + def test_list_model_evaluations + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_model_evaluations ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_model_evaluations(::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_model_evaluations_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb new file mode 100644 index 000000000000..e3dd2a583ba3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb @@ -0,0 +1,1257 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1/service_pb" +require "google/cloud/automl/v1/automl" + +class ::Google::Cloud::AutoML::V1::AutoML::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset = {} + + create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1::CreateDatasetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Dataset), request["dataset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_dataset({ parent: parent, dataset: dataset }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_dataset parent: parent, dataset: dataset do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_dataset ::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_dataset(::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_dataset_client_stub.call_rpc_count + end + end + + def test_get_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1::GetDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dataset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dataset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dataset ::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dataset({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_dataset(::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_dataset_client_stub.call_rpc_count + end + end + + def test_list_datasets + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_datasets, name + assert_kind_of ::Google::Cloud::AutoML::V1::ListDatasetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_datasets_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_datasets ::Google::Cloud::AutoML::V1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_datasets(::Google::Cloud::AutoML::V1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_datasets_client_stub.call_rpc_count + end + end + + def test_update_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + dataset = {} + update_mask = {} + + update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Dataset), request["dataset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_dataset ::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_dataset({ dataset: dataset, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_dataset(::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_dataset_client_stub.call_rpc_count + end + end + + def test_delete_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_dataset({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_dataset name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_dataset ::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_dataset({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_dataset(::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_dataset_client_stub.call_rpc_count + end + end + + def test_import_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + + import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_data, name + assert_kind_of ::Google::Cloud::AutoML::V1::ImportDataRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::InputConfig), request["input_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_data_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_data({ name: name, input_config: input_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_data name: name, input_config: input_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_data ::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_data({ name: name, input_config: input_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_data(::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_data_client_stub.call_rpc_count + end + end + + def test_export_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_data, name + assert_kind_of ::Google::Cloud::AutoML::V1::ExportDataRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::OutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_data_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_data({ name: name, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_data name: name, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_data ::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_data({ name: name, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_data(::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_rpc_count + end + end + + def test_get_annotation_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::AnnotationSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_annotation_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_annotation_spec({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_annotation_spec name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_annotation_spec ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_annotation_spec({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_annotation_spec(::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_annotation_spec_client_stub.call_rpc_count + end + end + + def test_create_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + model = {} + + create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::CreateModelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Model), request["model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_model({ parent: parent, model: model }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_model parent: parent, model: model do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_model ::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_model({ parent: parent, model: model }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_model(::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_model_client_stub.call_rpc_count + end + end + + def test_get_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::Model.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::GetModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_model({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_model name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_model ::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_model({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_model(::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_model_client_stub.call_rpc_count + end + end + + def test_list_models + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::ListModelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_models, name + assert_kind_of ::Google::Cloud::AutoML::V1::ListModelsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_models_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_models ::Google::Cloud::AutoML::V1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_models(::Google::Cloud::AutoML::V1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_models_client_stub.call_rpc_count + end + end + + def test_delete_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::DeleteModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_model({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_model name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_model ::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_model({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_model(::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_model_client_stub.call_rpc_count + end + end + + def test_update_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::Model.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + model = {} + update_mask = {} + + update_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::UpdateModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Model), request["model"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_model({ model: model, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_model model: model, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_model ::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_model({ model: model, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_model(::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_model_client_stub.call_rpc_count + end + end + + def test_deploy_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + image_object_detection_model_deployment_metadata = {} + name = "hello world" + + deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :deploy_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::DeployModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] + assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, deploy_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.deploy_model ::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.deploy_model(::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, deploy_model_client_stub.call_rpc_count + end + end + + def test_undeploy_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undeploy_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::UndeployModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undeploy_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.undeploy_model({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.undeploy_model name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.undeploy_model ::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.undeploy_model({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.undeploy_model(::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undeploy_model_client_stub.call_rpc_count + end + end + + def test_export_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_model, name + assert_kind_of ::Google::Cloud::AutoML::V1::ExportModelRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ModelExportOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_model({ name: name, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_model name: name, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_model ::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_model({ name: name, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_model(::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_model_client_stub.call_rpc_count + end + end + + def test_get_model_evaluation + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::ModelEvaluation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model_evaluation, name + assert_kind_of ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_model_evaluation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_model_evaluation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_model_evaluation ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_model_evaluation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_model_evaluation(::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_model_evaluation_client_stub.call_rpc_count + end + end + + def test_list_model_evaluations + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_model_evaluations, name + assert_kind_of ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_model_evaluations_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_model_evaluations ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_model_evaluations(::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_model_evaluations_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb new file mode 100644 index 000000000000..365a660da971 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1/prediction_service_pb" +require "google/cloud/automl/v1/prediction_service_services_pb" +require "google/cloud/automl/v1/prediction_service" + +class ::Google::Cloud::AutoML::V1::PredictionService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb new file mode 100644 index 000000000000..f5f666866b67 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1/prediction_service" + +class ::Google::Cloud::AutoML::V1::PredictionService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb new file mode 100644 index 000000000000..9485c201e2ff --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/automl/v1/prediction_service_pb" +require "google/cloud/automl/v1/prediction_service/rest" + + +class ::Google::Cloud::AutoML::V1::PredictionService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_predict + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1::PredictResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + params = {} + + predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, predict_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.predict({ name: name, payload: payload, params: params }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.predict name: name, payload: payload, params: params do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.predict ::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.predict(::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, predict_client_stub.call_count + end + end + end + + def test_batch_predict + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + output_config = {} + params = {} + + batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_predict ::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_predict(::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_predict_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb new file mode 100644 index 000000000000..30de3c8b6bf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb @@ -0,0 +1,249 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1/prediction_service_pb" +require "google/cloud/automl/v1/prediction_service" + +class ::Google::Cloud::AutoML::V1::PredictionService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_predict + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1::PredictResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + params = {} + + predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :predict, name + assert_kind_of ::Google::Cloud::AutoML::V1::PredictRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ExamplePayload), request["payload"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, predict_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.predict({ name: name, payload: payload, params: params }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.predict name: name, payload: payload, params: params do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.predict ::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.predict(::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, predict_client_stub.call_rpc_count + end + end + + def test_batch_predict + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + output_config = {} + params = {} + + batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_predict, name + assert_kind_of ::Google::Cloud::AutoML::V1::BatchPredictRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::BatchPredictInputConfig), request["input_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::BatchPredictOutputConfig), request["output_config"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_predict_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_predict ::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_predict(::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_predict_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/helper.rb b/owl-bot-staging/google-cloud-automl-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.gitignore b/owl-bot-staging/google-cloud-automl-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..4b715a4588d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json @@ -0,0 +1,20 @@ +{ + "api_id": "automl.googleapis.com", + "api_shortname": "automl", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest", + "distribution_name": "google-cloud-automl-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "automl", + "name_pretty": "Cloud AutoML V1beta1 API", + "product_documentation": "https://cloud.google.com/automl", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", + "ruby-cloud-env-prefix": "AUTOML", + "ruby-cloud-product-url": "https://cloud.google.com/automl", + "ruby-cloud-path-override": "auto_ml=automl", + "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..bf48a3e31581 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-automl-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-automl-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts b/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts new file mode 100644 index 000000000000..0e8b7f5e7acd --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud AutoML V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..038f994f5360 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-automl-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-automl-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/automl/v1beta1" + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/automl/v1beta1" + +::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-automl-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/automl/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile b/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/README.md b/owl-bot-staging/google-cloud-automl-v1beta1/README.md new file mode 100644 index 000000000000..e6c1806fd3a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud AutoML V1beta1 API + +Train high-quality custom machine learning models with minimum effort and machine learning expertise. + +AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud AutoML V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-automl-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/automl.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/automl/v1beta1" + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new +request = ::Google::Cloud::AutoML::V1beta1::PredictRequest.new # (request fields as keyword arguments...) +response = client.predict request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/automl) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/automl/v1beta1" +require "logger" + +client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-automl`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-automl-v1beta1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-automl`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-automl-v1beta1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/Rakefile b/owl-bot-staging/google-cloud-automl-v1beta1/Rakefile new file mode 100644 index 000000000000..0809ccb14b35 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-automl-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["AUTOML_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["AUTOML_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["AUTOML_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/automl/v1beta1/prediction_service/credentials" + ::Google::Cloud::AutoML::V1beta1::PredictionService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["AUTOML_PROJECT"] = project + ENV["AUTOML_TEST_PROJECT"] = project + ENV["AUTOML_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-automl-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-automl-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-automl-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-automl-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-automl-v1beta1" + header "google-cloud-automl-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-automl-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-automl-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-automl-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-automl-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..ebf069d33f8d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json @@ -0,0 +1,157 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.automl.v1beta1", + "libraryPackage": "::Google::Cloud::AutoML::V1beta1", + "services": { + "PredictionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client", + "rpcs": { + "Predict": { + "methods": [ + "predict" + ] + }, + "BatchPredict": { + "methods": [ + "batch_predict" + ] + } + } + } + } + }, + "AutoMl": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::AutoML::V1beta1::AutoML::Client", + "rpcs": { + "CreateDataset": { + "methods": [ + "create_dataset" + ] + }, + "GetDataset": { + "methods": [ + "get_dataset" + ] + }, + "ListDatasets": { + "methods": [ + "list_datasets" + ] + }, + "UpdateDataset": { + "methods": [ + "update_dataset" + ] + }, + "DeleteDataset": { + "methods": [ + "delete_dataset" + ] + }, + "ImportData": { + "methods": [ + "import_data" + ] + }, + "ExportData": { + "methods": [ + "export_data" + ] + }, + "GetAnnotationSpec": { + "methods": [ + "get_annotation_spec" + ] + }, + "GetTableSpec": { + "methods": [ + "get_table_spec" + ] + }, + "ListTableSpecs": { + "methods": [ + "list_table_specs" + ] + }, + "UpdateTableSpec": { + "methods": [ + "update_table_spec" + ] + }, + "GetColumnSpec": { + "methods": [ + "get_column_spec" + ] + }, + "ListColumnSpecs": { + "methods": [ + "list_column_specs" + ] + }, + "UpdateColumnSpec": { + "methods": [ + "update_column_spec" + ] + }, + "CreateModel": { + "methods": [ + "create_model" + ] + }, + "GetModel": { + "methods": [ + "get_model" + ] + }, + "ListModels": { + "methods": [ + "list_models" + ] + }, + "DeleteModel": { + "methods": [ + "delete_model" + ] + }, + "DeployModel": { + "methods": [ + "deploy_model" + ] + }, + "UndeployModel": { + "methods": [ + "undeploy_model" + ] + }, + "ExportModel": { + "methods": [ + "export_model" + ] + }, + "ExportEvaluatedExamples": { + "methods": [ + "export_evaluated_examples" + ] + }, + "GetModelEvaluation": { + "methods": [ + "get_model_evaluation" + ] + }, + "ListModelEvaluations": { + "methods": [ + "list_model_evaluations" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec b/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec new file mode 100644 index 000000000000..8e0d93173ed3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/automl/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-automl-v1beta1" + gem.version = Google::Cloud::AutoML::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." + gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb new file mode 100644 index 000000000000..ac7d092bf31e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/automl/v1beta1" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb new file mode 100644 index 000000000000..78a600ce0c87 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1beta1/prediction_service" +require "google/cloud/automl/v1beta1/automl" +require "google/cloud/automl/v1beta1/version" + +module Google + module Cloud + module AutoML + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/automl/v1beta1" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/automl/v1beta1" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/automl/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb new file mode 100644 index 000000000000..c031b6200be1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/annotation_payload.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' +require 'google/cloud/automl/v1beta1/detection_pb' +require 'google/cloud/automl/v1beta1/tables_pb' +require 'google/cloud/automl/v1beta1/text_extraction_pb' +require 'google/cloud/automl/v1beta1/text_sentiment_pb' +require 'google/cloud/automl/v1beta1/translation_pb' + + +descriptor_data = "\n4google/cloud/automl/v1beta1/annotation_payload.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\"\xe6\x05\n\x11\x41nnotationPayload\x12I\n\x0btranslation\x18\x02 \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TranslationAnnotationH\x00\x12O\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotationH\x00\x12]\n\x16image_object_detection\x18\x04 \x01(\x0b\x32;.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationH\x00\x12Z\n\x14video_classification\x18\t \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoClassificationAnnotationH\x00\x12[\n\x15video_object_tracking\x18\x08 \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationH\x00\x12P\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TextExtractionAnnotationH\x00\x12N\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.TextSentimentAnnotationH\x00\x12?\n\x06tables\x18\n \x01(\x0b\x32-.google.cloud.automl.v1beta1.TablesAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationPayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb new file mode 100644 index 000000000000..85b08ebdfc7b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/annotation_spec.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n1google/cloud/automl/v1beta1/annotation_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb new file mode 100644 index 000000000000..3e41d90e7a98 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1beta1/version" + +require "google/cloud/automl/v1beta1/automl/credentials" +require "google/cloud/automl/v1beta1/automl/paths" +require "google/cloud/automl/v1beta1/automl/operations" +require "google/cloud/automl/v1beta1/automl/client" +require "google/cloud/automl/v1beta1/automl/rest" + +module Google + module Cloud + module AutoML + module V1beta1 + ## + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/automl/v1beta1/automl" + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/automl/v1beta1/automl/rest" + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + module AutoML + end + end + end + end +end + +helper_path = ::File.join __dir__, "automl", "helpers.rb" +require "google/cloud/automl/v1beta1/automl/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb new file mode 100644 index 000000000000..f6465ef5f465 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb @@ -0,0 +1,2983 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/automl/v1beta1/service_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + ## + # Client for the AutoMl service. + # + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :auto_ml_stub + + ## + # Configure the AutoMl Client class. + # + # See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutoMl clients + # ::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AutoML", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_dataset.timeout = 5.0 + + default_config.rpcs.get_dataset.timeout = 5.0 + default_config.rpcs.get_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_datasets.timeout = 5.0 + default_config.rpcs.list_datasets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_dataset.timeout = 5.0 + + default_config.rpcs.delete_dataset.timeout = 5.0 + default_config.rpcs.delete_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.import_data.timeout = 5.0 + + default_config.rpcs.export_data.timeout = 5.0 + + default_config.rpcs.get_annotation_spec.timeout = 5.0 + default_config.rpcs.get_annotation_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_table_spec.timeout = 5.0 + default_config.rpcs.get_table_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_table_specs.timeout = 5.0 + default_config.rpcs.list_table_specs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_table_spec.timeout = 5.0 + + default_config.rpcs.get_column_spec.timeout = 5.0 + default_config.rpcs.get_column_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_column_specs.timeout = 5.0 + default_config.rpcs.list_column_specs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_column_spec.timeout = 5.0 + + default_config.rpcs.create_model.timeout = 5.0 + + default_config.rpcs.get_model.timeout = 5.0 + default_config.rpcs.get_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_models.timeout = 5.0 + default_config.rpcs.list_models.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_model.timeout = 5.0 + default_config.rpcs.delete_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.deploy_model.timeout = 5.0 + + default_config.rpcs.undeploy_model.timeout = 5.0 + + default_config.rpcs.export_model.timeout = 5.0 + + default_config.rpcs.export_evaluated_examples.timeout = 5.0 + + default_config.rpcs.get_model_evaluation.timeout = 5.0 + default_config.rpcs.get_model_evaluation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_model_evaluations.timeout = 5.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @auto_ml_stub.universe_domain + end + + ## + # Create a new AutoMl client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutoMl client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/automl/v1beta1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @auto_ml_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AutoML::V1beta1::AutoMl::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @auto_ml_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AutoML::V1beta1::AutoML::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @auto_ml_stub.logger + end + + # Service calls + + ## + # Creates a dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_dataset(parent: nil, dataset: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project to create the dataset for. + # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] + # Required. The dataset to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def create_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :create_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists datasets in a project. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project from which to list datasets. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of + # using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_dataset(dataset: nil, update_mask: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] + # Required. The dataset which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def update_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.dataset&.name + header_params["dataset.name"] = request.dataset.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a dataset and all of its contents. + # Returns empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_dataset(name: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} + # parameter must be explicitly set. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_data(name: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] + # Required. The desired input location and its domain specific semantics, + # if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_data(name: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset. + # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] + # Required. The desired output location. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an annotation spec. + # + # @overload get_annotation_spec(request, options = nil) + # Pass arguments to `get_annotation_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_annotation_spec(name: nil) + # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the annotation spec to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new + # + # # Call the get_annotation_spec method. + # result = client.get_annotation_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. + # p result + # + def get_annotation_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_annotation_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_annotation_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_annotation_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a table spec. + # + # @overload get_table_spec(request, options = nil) + # Pass arguments to `get_table_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_table_spec(name: nil, field_mask: nil) + # Pass arguments to `get_table_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the table spec to retrieve. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new + # + # # Call the get_table_spec method. + # result = client.get_table_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + # p result + # + def get_table_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_table_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_table_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_table_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_table_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists table specs in a dataset. + # + # @overload list_table_specs(request, options = nil) + # Pass arguments to `list_table_specs` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_table_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the dataset to list table specs from. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @param filter [::String] + # Filter expression, see go/filtering. + # @param page_size [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new + # + # # Call the list_table_specs method. + # result = client.list_table_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. + # p item + # end + # + def list_table_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_table_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_table_specs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_table_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_table_specs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_table_specs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a table spec. + # + # @overload update_table_spec(request, options = nil) + # Pass arguments to `update_table_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_table_spec(table_spec: nil, update_mask: nil) + # Pass arguments to `update_table_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] + # Required. The table spec which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new + # + # # Call the update_table_spec method. + # result = client.update_table_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + # p result + # + def update_table_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_table_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.table_spec&.name + header_params["table_spec.name"] = request.table_spec.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_table_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_table_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_table_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a column spec. + # + # @overload get_column_spec(request, options = nil) + # Pass arguments to `get_column_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_column_spec(name: nil, field_mask: nil) + # Pass arguments to `get_column_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the column spec to retrieve. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new + # + # # Call the get_column_spec method. + # result = client.get_column_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p result + # + def get_column_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_column_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_column_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_column_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_column_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists column specs in a table spec. + # + # @overload list_column_specs(request, options = nil) + # Pass arguments to `list_column_specs` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_column_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the table spec to list column specs from. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @param filter [::String] + # Filter expression, see go/filtering. + # @param page_size [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new + # + # # Call the list_column_specs method. + # result = client.list_column_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p item + # end + # + def list_column_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_column_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_column_specs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_column_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_column_specs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_column_specs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a column spec. + # + # @overload update_column_spec(request, options = nil) + # Pass arguments to `update_column_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_column_spec(column_spec: nil, update_mask: nil) + # Pass arguments to `update_column_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] + # Required. The column spec which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new + # + # # Call the update_column_spec method. + # result = client.update_column_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p result + # + def update_column_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_column_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.column_spec&.name + header_params["column_spec.name"] = request.column_spec.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_column_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_column_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :update_column_spec, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a model. + # Returns a Model in the {::Google::Longrunning::Operation#response response} + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_model(parent: nil, model: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent project where the model is being created. + # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] + # Required. The model to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Model] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Model] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_model, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project, from which to list the models. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_models.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_model(name: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model being deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # + # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload deploy_model(request, options = nil) + # Pass arguments to `deploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) + # Pass arguments to `deploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Classification. + # + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param name [::String] + # Required. Resource name of the model to deploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new + # + # # Call the deploy_model method. + # result = client.deploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.deploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.deploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload undeploy_model(request, options = nil) + # Pass arguments to `undeploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undeploy_model(name: nil) + # Pass arguments to `undeploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model to undeploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new + # + # # Call the undeploy_model method. + # result = client.undeploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undeploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undeploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # + # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_model(request, options = nil) + # Pass arguments to `export_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_model(name: nil, output_config: nil) + # Pass arguments to `export_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the model to export. + # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new + # + # # Call the export_model method. + # result = client.export_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports examples on which the model was evaluated (i.e. which were in the + # TEST set of the dataset the model was created from), together with their + # ground truth annotations and the annotations created (predicted) by the + # model. + # The examples, ground truth and predictions are exported in the state + # they were at the moment the model was evaluated. + # + # This export is available only for 30 days since the model evaluation is + # created. + # + # Currently only available for Tables. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_evaluated_examples(request, options = nil) + # Pass arguments to `export_evaluated_examples` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_evaluated_examples(name: nil, output_config: nil) + # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the model whose evaluated examples are to + # be exported. + # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new + # + # # Call the export_evaluated_examples method. + # result = client.export_evaluated_examples request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluated_examples request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_evaluated_examples.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_evaluated_examples.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_evaluated_examples.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :export_evaluated_examples, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a model evaluation. + # + # @overload get_model_evaluation(request, options = nil) + # Pass arguments to `get_model_evaluation` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model_evaluation(name: nil) + # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the model evaluation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new + # + # # Call the get_model_evaluation method. + # result = client.get_model_evaluation request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. + # p result + # + def get_model_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_model_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :get_model_evaluation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists model evaluations. + # + # @overload list_model_evaluations(request, options = nil) + # Pass arguments to `list_model_evaluations` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new + # + # # Call the list_model_evaluations method. + # result = client.list_model_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. + # p item + # end + # + def list_model_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_model_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_model_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AutoMl API. + # + # This class represents the configuration for AutoMl, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_dataset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AutoMl API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `get_annotation_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_annotation_spec + ## + # RPC-specific configuration for `get_table_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_table_spec + ## + # RPC-specific configuration for `list_table_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_table_specs + ## + # RPC-specific configuration for `update_table_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_table_spec + ## + # RPC-specific configuration for `get_column_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_column_spec + ## + # RPC-specific configuration for `list_column_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_column_specs + ## + # RPC-specific configuration for `update_column_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_column_spec + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `deploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_model + ## + # RPC-specific configuration for `undeploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_model + ## + # RPC-specific configuration for `export_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model + ## + # RPC-specific configuration for `export_evaluated_examples` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluated_examples + ## + # RPC-specific configuration for `get_model_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model_evaluation + ## + # RPC-specific configuration for `list_model_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_model_evaluations + + # @private + def initialize parent_rpcs = nil + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec + @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config + get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec + @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config + list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs + @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config + update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec + @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config + get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec + @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config + list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs + @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config + update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec + @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model + @deploy_model = ::Gapic::Config::Method.new deploy_model_config + undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model + @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config + export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model + @export_model = ::Gapic::Config::Method.new export_model_config + export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples + @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config + get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation + @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config + list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations + @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb new file mode 100644 index 000000000000..59c4eb1fb2be --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + # Credentials for the AutoMl API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "AUTOML_CREDENTIALS", + "AUTOML_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "AUTOML_CREDENTIALS_JSON", + "AUTOML_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb new file mode 100644 index 000000000000..10f048277270 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb @@ -0,0 +1,849 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AutoMl Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb new file mode 100644 index 000000000000..f9a7d5efd31e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb @@ -0,0 +1,174 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + # Path helper methods for the AutoMl API. + module Paths + ## + # Create a fully-qualified AnnotationSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param annotation_spec [String] + # + # @return [::String] + def annotation_spec_path project:, location:, dataset:, annotation_spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" + end + + ## + # Create a fully-qualified ColumnSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param table_spec [String] + # @param column_spec [String] + # + # @return [::String] + def column_spec_path project:, location:, dataset:, table_spec:, column_spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + raise ::ArgumentError, "table_spec cannot contain /" if table_spec.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}/columnSpecs/#{column_spec}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, location:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + ## + # Create a fully-qualified ModelEvaluation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # @param model_evaluation [String] + # + # @return [::String] + def model_evaluation_path project:, location:, model:, model_evaluation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" + end + + ## + # Create a fully-qualified TableSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param table_spec [String] + # + # @return [::String] + def table_spec_path project:, location:, dataset:, table_spec: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb new file mode 100644 index 000000000000..da55991d354b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1beta1/version" + +require "google/cloud/automl/v1beta1/automl/credentials" +require "google/cloud/automl/v1beta1/automl/paths" +require "google/cloud/automl/v1beta1/automl/rest/operations" +require "google/cloud/automl/v1beta1/automl/rest/client" + +module Google + module Cloud + module AutoML + module V1beta1 + ## + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/automl/v1beta1/automl/rest" + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + module AutoML + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/automl/v1beta1/automl/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb new file mode 100644 index 000000000000..f1cdebd73081 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb @@ -0,0 +1,2772 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/automl/v1beta1/service_pb" +require "google/cloud/automl/v1beta1/automl/rest/service_stub" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + module Rest + ## + # REST client for the AutoMl service. + # + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :auto_ml_stub + + ## + # Configure the AutoMl Client class. + # + # See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutoMl clients + # ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AutoML", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_dataset.timeout = 5.0 + + default_config.rpcs.get_dataset.timeout = 5.0 + default_config.rpcs.get_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_datasets.timeout = 5.0 + default_config.rpcs.list_datasets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_dataset.timeout = 5.0 + + default_config.rpcs.delete_dataset.timeout = 5.0 + default_config.rpcs.delete_dataset.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.import_data.timeout = 5.0 + + default_config.rpcs.export_data.timeout = 5.0 + + default_config.rpcs.get_annotation_spec.timeout = 5.0 + default_config.rpcs.get_annotation_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_table_spec.timeout = 5.0 + default_config.rpcs.get_table_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_table_specs.timeout = 5.0 + default_config.rpcs.list_table_specs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_table_spec.timeout = 5.0 + + default_config.rpcs.get_column_spec.timeout = 5.0 + default_config.rpcs.get_column_spec.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_column_specs.timeout = 5.0 + default_config.rpcs.list_column_specs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_column_spec.timeout = 5.0 + + default_config.rpcs.create_model.timeout = 5.0 + + default_config.rpcs.get_model.timeout = 5.0 + default_config.rpcs.get_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_models.timeout = 5.0 + default_config.rpcs.list_models.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_model.timeout = 5.0 + default_config.rpcs.delete_model.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.deploy_model.timeout = 5.0 + + default_config.rpcs.undeploy_model.timeout = 5.0 + + default_config.rpcs.export_model.timeout = 5.0 + + default_config.rpcs.export_evaluated_examples.timeout = 5.0 + + default_config.rpcs.get_model_evaluation.timeout = 5.0 + default_config.rpcs.get_model_evaluation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_model_evaluations.timeout = 5.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @auto_ml_stub.universe_domain + end + + ## + # Create a new AutoMl REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutoMl client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @auto_ml_stub = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @auto_ml_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @auto_ml_stub.logger + end + + # Service calls + + ## + # Creates a dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_dataset(parent: nil, dataset: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project to create the dataset for. + # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] + # Required. The dataset to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def create_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.create_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists datasets in a project. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project from which to list datasets. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of + # using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_datasets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_dataset(dataset: nil, update_mask: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] + # Required. The dataset which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + # p result + # + def update_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a dataset and all of its contents. + # Returns empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_dataset(name: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.delete_dataset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} + # parameter must be explicitly set. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_data(name: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] + # Required. The desired input location and its domain specific semantics, + # if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.import_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_data(name: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataset. + # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] + # Required. The desired output location. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an annotation spec. + # + # @overload get_annotation_spec(request, options = nil) + # Pass arguments to `get_annotation_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_annotation_spec(name: nil) + # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the annotation spec to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new + # + # # Call the get_annotation_spec method. + # result = client.get_annotation_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. + # p result + # + def get_annotation_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_annotation_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_annotation_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a table spec. + # + # @overload get_table_spec(request, options = nil) + # Pass arguments to `get_table_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_table_spec(name: nil, field_mask: nil) + # Pass arguments to `get_table_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the table spec to retrieve. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new + # + # # Call the get_table_spec method. + # result = client.get_table_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + # p result + # + def get_table_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_table_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_table_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_table_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_table_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists table specs in a dataset. + # + # @overload list_table_specs(request, options = nil) + # Pass arguments to `list_table_specs` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_table_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the dataset to list table specs from. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @param filter [::String] + # Filter expression, see go/filtering. + # @param page_size [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_table_specs AutoMl.ListTableSpecs} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new + # + # # Call the list_table_specs method. + # result = client.list_table_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. + # p item + # end + # + def list_table_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_table_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_table_specs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_table_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_table_specs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_table_specs, "table_specs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a table spec. + # + # @overload update_table_spec(request, options = nil) + # Pass arguments to `update_table_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_table_spec(table_spec: nil, update_mask: nil) + # Pass arguments to `update_table_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] + # Required. The table spec which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new + # + # # Call the update_table_spec method. + # result = client.update_table_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + # p result + # + def update_table_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_table_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_table_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_table_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_table_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a column spec. + # + # @overload get_column_spec(request, options = nil) + # Pass arguments to `get_column_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_column_spec(name: nil, field_mask: nil) + # Pass arguments to `get_column_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the column spec to retrieve. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new + # + # # Call the get_column_spec method. + # result = client.get_column_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p result + # + def get_column_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_column_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_column_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_column_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_column_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists column specs in a table spec. + # + # @overload list_column_specs(request, options = nil) + # Pass arguments to `list_column_specs` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_column_specs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the table spec to list column specs from. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask specifying which fields to read. + # @param filter [::String] + # Filter expression, see go/filtering. + # @param page_size [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_column_specs AutoMl.ListColumnSpecs} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new + # + # # Call the list_column_specs method. + # result = client.list_column_specs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p item + # end + # + def list_column_specs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_column_specs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_column_specs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_column_specs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_column_specs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_column_specs, "column_specs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a column spec. + # + # @overload update_column_spec(request, options = nil) + # Pass arguments to `update_column_spec` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_column_spec(column_spec: nil, update_mask: nil) + # Pass arguments to `update_column_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] + # Required. The column spec which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new + # + # # Call the update_column_spec method. + # result = client.update_column_spec request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + # p result + # + def update_column_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_column_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_column_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_column_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.update_column_spec request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a model. + # Returns a Model in the {::Google::Longrunning::Operation#response response} + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_model(parent: nil, model: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent project where the model is being created. + # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] + # Required. The model to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.create_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Model] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_model request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project, from which to list the models. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_models.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_models request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # {::Google::Longrunning::Operation#response response} field when it completes, + # and `delete_details` in the + # {::Google::Longrunning::Operation#metadata metadata} field. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_model(name: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model being deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.delete_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # + # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload deploy_model(request, options = nil) + # Pass arguments to `deploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) + # Pass arguments to `deploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] + # Model deployment metadata specific to Image Classification. + # + # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param name [::String] + # Required. Resource name of the model to deploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new + # + # # Call the deploy_model method. + # result = client.deploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.deploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.deploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.deploy_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload undeploy_model(request, options = nil) + # Pass arguments to `undeploy_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undeploy_model(name: nil) + # Pass arguments to `undeploy_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the model to undeploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new + # + # # Call the undeploy_model method. + # result = client.undeploy_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undeploy_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undeploy_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.undeploy_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # + # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_model(request, options = nil) + # Pass arguments to `export_model` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_model(name: nil, output_config: nil) + # Pass arguments to `export_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the model to export. + # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new + # + # # Call the export_model method. + # result = client.export_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports examples on which the model was evaluated (i.e. which were in the + # TEST set of the dataset the model was created from), together with their + # ground truth annotations and the annotations created (predicted) by the + # model. + # The examples, ground truth and predictions are exported in the state + # they were at the moment the model was evaluated. + # + # This export is available only for 30 days since the model evaluation is + # created. + # + # Currently only available for Tables. + # + # Returns an empty response in the + # {::Google::Longrunning::Operation#response response} field when it completes. + # + # @overload export_evaluated_examples(request, options = nil) + # Pass arguments to `export_evaluated_examples` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_evaluated_examples(name: nil, output_config: nil) + # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the model whose evaluated examples are to + # be exported. + # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] + # Required. The desired output location and configuration. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new + # + # # Call the export_evaluated_examples method. + # result = client.export_evaluated_examples request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluated_examples request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_evaluated_examples.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_evaluated_examples.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_evaluated_examples.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.export_evaluated_examples request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a model evaluation. + # + # @overload get_model_evaluation(request, options = nil) + # Pass arguments to `get_model_evaluation` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model_evaluation(name: nil) + # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name for the model evaluation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new + # + # # Call the get_model_evaluation method. + # result = client.get_model_evaluation request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. + # p result + # + def get_model_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.get_model_evaluation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists model evaluations. + # + # @overload list_model_evaluations(request, options = nil) + # Pass arguments to `list_model_evaluations` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @param filter [::String] + # An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @param page_size [::Integer] + # Requested page size. + # @param page_token [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new + # + # # Call the list_model_evaluations method. + # result = client.list_model_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. + # p item + # end + # + def list_model_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_model_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @auto_ml_stub.list_model_evaluations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AutoMl REST API. + # + # This class represents the configuration for AutoMl REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_dataset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_dataset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AutoMl API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `get_annotation_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_annotation_spec + ## + # RPC-specific configuration for `get_table_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_table_spec + ## + # RPC-specific configuration for `list_table_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_table_specs + ## + # RPC-specific configuration for `update_table_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_table_spec + ## + # RPC-specific configuration for `get_column_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_column_spec + ## + # RPC-specific configuration for `list_column_specs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_column_specs + ## + # RPC-specific configuration for `update_column_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :update_column_spec + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `deploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_model + ## + # RPC-specific configuration for `undeploy_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_model + ## + # RPC-specific configuration for `export_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model + ## + # RPC-specific configuration for `export_evaluated_examples` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluated_examples + ## + # RPC-specific configuration for `get_model_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model_evaluation + ## + # RPC-specific configuration for `list_model_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_model_evaluations + + # @private + def initialize parent_rpcs = nil + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec + @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config + get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec + @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config + list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs + @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config + update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec + @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config + get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec + @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config + list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs + @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config + update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec + @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model + @deploy_model = ::Gapic::Config::Method.new deploy_model_config + undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model + @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config + export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model + @export_model = ::Gapic::Config::Method.new export_model_config + export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples + @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config + get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation + @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config + list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations + @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb new file mode 100644 index 000000000000..0bd77325d30d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb @@ -0,0 +1,1093 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AutoMl Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AutoMl Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.wait_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "wait_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:wait", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb new file mode 100644 index 000000000000..774d061a2484 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb @@ -0,0 +1,1556 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1beta1/service_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoML + module Rest + ## + # REST service stub for the AutoMl service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # A result object deserialized from the server's reply + def create_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # A result object deserialized from the server's reply + def get_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_datasets REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] + # A result object deserialized from the server's reply + def list_datasets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_datasets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # A result object deserialized from the server's reply + def update_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_annotation_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] + # A result object deserialized from the server's reply + def get_annotation_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_annotation_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_table_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # A result object deserialized from the server's reply + def get_table_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_table_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_table_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::TableSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_table_specs REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] + # A result object deserialized from the server's reply + def list_table_specs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_table_specs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_table_specs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_table_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # A result object deserialized from the server's reply + def update_table_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_table_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_table_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::TableSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_column_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # A result object deserialized from the server's reply + def get_column_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_column_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_column_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_column_specs REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] + # A result object deserialized from the server's reply + def list_column_specs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_column_specs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_column_specs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_column_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # A result object deserialized from the server's reply + def update_column_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_column_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_column_spec", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::Model] + # A result object deserialized from the server's reply + def get_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::Model.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_models REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] + # A result object deserialized from the server's reply + def list_models request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_models", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the deploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def deploy_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "deploy_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the undeploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def undeploy_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undeploy_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_evaluated_examples REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_evaluated_examples request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluated_examples_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_evaluated_examples", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_model_evaluation REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] + # A result object deserialized from the server's reply + def get_model_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_model_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_model_evaluations REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] + # A result object deserialized from the server's reply + def list_model_evaluations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_model_evaluations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/datasets", + body: "dataset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_datasets REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_datasets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/datasets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{dataset.name}", + body: "dataset", + matches: [ + ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dataset REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:importData", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_data REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:exportData", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_annotation_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_annotation_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_table_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_table_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_table_specs REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_table_specs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/tableSpecs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_table_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_table_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{table_spec.name}", + body: "table_spec", + matches: [ + ["table_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_column_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_column_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_column_specs REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_column_specs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/columnSpecs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_column_spec REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_column_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{column_spec.name}", + body: "column_spec", + matches: [ + ["column_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/models", + body: "model", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_models REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_models_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/models", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the deploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_deploy_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:deploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undeploy_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undeploy_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:undeploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_model REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:export", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_evaluated_examples REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_evaluated_examples_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:exportEvaluatedExamples", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model_evaluation REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_model_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_model_evaluations REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_model_evaluations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/modelEvaluations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb new file mode 100644 index 000000000000..e1ade31b5e08 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/classification.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/temporal_pb' + + +descriptor_data = "\n0google/cloud/automl/v1beta1/classification.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/temporal.proto\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\xc7\x01\n\x1dVideoClassificationAnnotation\x12\x0c\n\x04type\x18\x01 \x01(\t\x12X\n\x19\x63lassification_annotation\x18\x02 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotation\x12>\n\x0ctime_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TimeSegment\"\xa9\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x17\n\x0b\x62\x61se_au_prc\x18\x02 \x01(\x02\x42\x02\x18\x01\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12u\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32S.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x66\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xc0\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12]\n\x03row\x18\x02 \x03(\x0b\x32P.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xae\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x13\x43lassificationProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationAnnotation").msgclass + VideoClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationAnnotation").msgclass + ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics").msgclass + ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass + ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass + ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass + ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb new file mode 100644 index 000000000000..631c71630e0e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/column_spec.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/data_stats_pb' +require 'google/cloud/automl/v1beta1/data_types_pb' + + +descriptor_data = "\n-google/cloud/automl/v1beta1/column_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a,google/cloud/automl/v1beta1/data_types.proto\"\x9b\x04\n\nColumnSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\tdata_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12:\n\ndata_stats\x18\x04 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\x12X\n\x16top_correlated_columns\x18\x05 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x1at\n\x10\x43orrelatedColumn\x12\x16\n\x0e\x63olumn_spec_id\x18\x01 \x01(\t\x12H\n\x11\x63orrelation_stats\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x94\x01\xea\x41\x90\x01\n automl.googleapis.com/ColumnSpec\x12lprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ColumnSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec").msgclass + ColumnSpec::CorrelatedColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb new file mode 100644 index 000000000000..1a0c06144eb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/data_items.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/geometry_pb' +require 'google/cloud/automl/v1beta1/io_pb' +require 'google/cloud/automl/v1beta1/temporal_pb' +require 'google/cloud/automl/v1beta1/text_segment_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/data_items.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a.google/cloud/automl/v1beta1/text_segment.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x7f\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12@\n\x0cinput_config\x18\x06 \x01(\x0b\x32(.google.cloud.automl.v1beta1.InputConfigH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xef\x01\n\x12\x44ocumentDimensions\x12S\n\x04unit\x18\x01 \x01(\x0e\x32\x45.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xf9\x05\n\x08\x44ocument\x12\x46\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.DocumentInputConfig\x12?\n\rdocument_text\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippet\x12<\n\x06layout\x18\x03 \x03(\x0b\x32,.google.cloud.automl.v1beta1.Document.Layout\x12L\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32/.google.cloud.automl.v1beta1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xc3\x03\n\x06Layout\x12>\n\x0ctext_segment\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12@\n\rbounding_poly\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12W\n\x11text_segment_type\x18\x04 \x01(\x0e\x32<.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"F\n\x03Row\x12\x17\n\x0f\x63olumn_spec_ids\x18\x02 \x03(\t\x12&\n\x06values\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xfe\x01\n\x0e\x45xamplePayload\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32\".google.cloud.automl.v1beta1.ImageH\x00\x12@\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetH\x00\x12\x39\n\x08\x64ocument\x18\x04 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DocumentH\x00\x12/\n\x03row\x18\x03 \x01(\x0b\x32 .google.cloud.automl.v1beta1.RowH\x00\x42\t\n\x07payloadB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Image").msgclass + TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSnippet").msgclass + DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions").msgclass + DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit").enummodule + Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document").msgclass + Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout").msgclass + Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout.TextSegmentType").enummodule + Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Row").msgclass + ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExamplePayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb new file mode 100644 index 000000000000..becbd202cf0c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/data_stats.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/data_stats.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfd\x03\n\tDataStats\x12\x42\n\rfloat64_stats\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.Float64StatsH\x00\x12@\n\x0cstring_stats\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StringStatsH\x00\x12\x46\n\x0ftimestamp_stats\x18\x05 \x01(\x0b\x32+.google.cloud.automl.v1beta1.TimestampStatsH\x00\x12>\n\x0b\x61rray_stats\x18\x06 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ArrayStatsH\x00\x12@\n\x0cstruct_stats\x18\x07 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StructStatsH\x00\x12\x44\n\x0e\x63\x61tegory_stats\x18\x08 \x01(\x0b\x32*.google.cloud.automl.v1beta1.CategoryStatsH\x00\x12\x1c\n\x14\x64istinct_value_count\x18\x01 \x01(\x03\x12\x18\n\x10null_value_count\x18\x02 \x01(\x03\x12\x19\n\x11valid_value_count\x18\t \x01(\x03\x42\x07\n\x05stats\"\xdd\x01\n\x0c\x46loat64Stats\x12\x0c\n\x04mean\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x02 \x01(\x01\x12\x11\n\tquantiles\x18\x03 \x03(\x01\x12T\n\x11histogram_buckets\x18\x04 \x03(\x0b\x32\x39.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket\x1a:\n\x0fHistogramBucket\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\"\x8d\x01\n\x0bStringStats\x12P\n\x11top_unigram_stats\x18\x01 \x03(\x0b\x32\x35.google.cloud.automl.v1beta1.StringStats.UnigramStats\x1a,\n\x0cUnigramStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xf4\x02\n\x0eTimestampStats\x12V\n\x0egranular_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.TimestampStats.GranularStatsEntry\x1a\x98\x01\n\rGranularStats\x12W\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x46.google.cloud.automl.v1beta1.TimestampStats.GranularStats.BucketsEntry\x1a.\n\x0c\x42ucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1ao\n\x12GranularStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TimestampStats.GranularStats:\x02\x38\x01\"J\n\nArrayStats\x12<\n\x0cmember_stats\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\"\xb7\x01\n\x0bStructStats\x12M\n\x0b\x66ield_stats\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.StructStats.FieldStatsEntry\x1aY\n\x0f\x46ieldStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats:\x02\x38\x01\"\xa0\x01\n\rCategoryStats\x12Z\n\x12top_category_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats\x1a\x33\n\x13SingleCategoryStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"%\n\x10\x43orrelationStats\x12\x11\n\tcramers_v\x18\x01 \x01(\x01\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + DataStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataStats").msgclass + Float64Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats").msgclass + Float64Stats::HistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats.HistogramBucket").msgclass + StringStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats").msgclass + StringStats::UnigramStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats.UnigramStats").msgclass + TimestampStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats").msgclass + TimestampStats::GranularStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats.GranularStats").msgclass + ArrayStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ArrayStats").msgclass + StructStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructStats").msgclass + CategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats").msgclass + CategoryStats::SingleCategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats").msgclass + CorrelationStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CorrelationStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb new file mode 100644 index 000000000000..e1edf66dbe0d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/data_types.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/data_types.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfc\x01\n\x08\x44\x61taType\x12\x42\n\x11list_element_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataTypeH\x00\x12>\n\x0bstruct_type\x18\x03 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.StructTypeH\x00\x12\x15\n\x0btime_format\x18\x05 \x01(\tH\x00\x12\x38\n\ttype_code\x18\x01 \x01(\x0e\x32%.google.cloud.automl.v1beta1.TypeCode\x12\x10\n\x08nullable\x18\x04 \x01(\x08\x42\t\n\x07\x64\x65tails\"\xa7\x01\n\nStructType\x12\x43\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x33.google.cloud.automl.v1beta1.StructType.FieldsEntry\x1aT\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType:\x02\x38\x01*r\n\x08TypeCode\x12\x19\n\x15TYPE_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46LOAT64\x10\x03\x12\r\n\tTIMESTAMP\x10\x04\x12\n\n\x06STRING\x10\x06\x12\t\n\x05\x41RRAY\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x0c\n\x08\x43\x41TEGORY\x10\nB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataType").msgclass + StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructType").msgclass + TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TypeCode").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb new file mode 100644 index 000000000000..3135034e2cdc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/dataset.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/image_pb' +require 'google/cloud/automl/v1beta1/tables_pb' +require 'google/cloud/automl/v1beta1/text_pb' +require 'google/cloud/automl/v1beta1/translation_pb' +require 'google/cloud/automl/v1beta1/video_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/cloud/automl/v1beta1/dataset.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\t\n\x07\x44\x61taset\x12_\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TranslationDatasetMetadataH\x00\x12p\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32?.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataH\x00\x12n\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32>.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataH\x00\x12s\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32@.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataH\x00\x12p\n%video_classification_dataset_metadata\x18\x1f \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataH\x00\x12q\n&video_object_tracking_dataset_metadata\x18\x1d \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataH\x00\x12\x66\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32:.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataH\x00\x12\x64\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataH\x00\x12U\n\x17tables_dataset_metadata\x18! \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesDatasetMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Dataset").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb new file mode 100644 index 000000000000..2e9510dd00d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/detection.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/geometry_pb' +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n+google/cloud/automl/v1beta1/detection.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a\x1egoogle/protobuf/duration.proto\"p\n\x1eImageObjectDetectionAnnotation\x12?\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xb4\x01\n\x1dVideoObjectTrackingAnnotation\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12?\n\x0c\x62ounding_box\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x04 \x01(\x02\"\xae\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12o\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32K.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd6\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\"\xf4\x01\n$VideoObjectTrackingEvaluationMetrics\x12\x1d\n\x15\x65valuated_frame_count\x18\x01 \x01(\x05\x12$\n\x1c\x65valuated_bounding_box_count\x18\x02 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x04 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x06 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation").msgclass + VideoObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation").msgclass + BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry").msgclass + BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass + ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics").msgclass + VideoObjectTrackingEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb new file mode 100644 index 000000000000..4a92f0a318eb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/geometry.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/automl/v1beta1/geometry.proto\x12\x1bgoogle.cloud.automl.v1beta1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"Z\n\x0c\x42oundingPoly\x12J\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32-.google.cloud.automl.v1beta1.NormalizedVertexB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.NormalizedVertex").msgclass + BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingPoly").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb new file mode 100644 index 000000000000..8631c4f1de2e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/image.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/annotation_spec_pb' +require 'google/cloud/automl/v1beta1/classification_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1beta1/image.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x31google/cloud/automl/v1beta1/annotation_spec.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"%\n#ImageObjectDetectionDatasetMetadata\"\xb2\x01\n ImageClassificationModelMetadata\x12\x15\n\rbase_model_id\x18\x01 \x01(\t\x12\x14\n\x0ctrain_budget\x18\x02 \x01(\x03\x12\x12\n\ntrain_cost\x18\x03 \x01(\x03\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12\x12\n\nmodel_type\x18\x07 \x01(\t\x12\x10\n\x08node_qps\x18\r \x01(\x01\x12\x12\n\nnode_count\x18\x0e \x01(\x03\"\xbe\x01\n!ImageObjectDetectionModelMetadata\x12\x12\n\nmodel_type\x18\x01 \x01(\t\x12\x12\n\nnode_count\x18\x03 \x01(\x03\x12\x10\n\x08node_qps\x18\x04 \x01(\x01\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\"@\n*ImageClassificationModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\"A\n+ImageObjectDetectionModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\x42\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nImageProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata").msgclass + ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata").msgclass + ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelMetadata").msgclass + ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata").msgclass + ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata").msgclass + ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb new file mode 100644 index 000000000000..0ae4984c691f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/io.proto + +require 'google/protobuf' + + +descriptor_data = "\n$google/cloud/automl/v1beta1/io.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\x92\x02\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x12\x44\n\x06params\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"\xa9\x01\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x42\x08\n\x06source\"Q\n\x13\x44ocumentInputConfig\x12:\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSource\"\xb7\x01\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xc3\x01\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xcf\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12\x46\n\x0fgcr_destination\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcrDestinationH\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12P\n\x06params\x18\x02 \x03(\x0b\x32@.google.cloud.automl.v1beta1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"\x86\x01\n#ExportEvaluatedExamplesOutputConfig\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x1f\n\tGcsSource\x12\x12\n\ninput_uris\x18\x01 \x03(\t\"#\n\x0e\x42igQuerySource\x12\x11\n\tinput_uri\x18\x01 \x01(\t\"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\")\n\x13\x42igQueryDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\t\"$\n\x0eGcrDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.InputConfig").msgclass + BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictInputConfig").msgclass + DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentInputConfig").msgclass + OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OutputConfig").msgclass + BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOutputConfig").msgclass + ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelExportOutputConfig").msgclass + ExportEvaluatedExamplesOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig").msgclass + GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsSource").msgclass + BigQuerySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQuerySource").msgclass + GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsDestination").msgclass + BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQueryDestination").msgclass + GcrDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcrDestination").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb new file mode 100644 index 000000000000..0b5f16c6bf27 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/model_evaluation.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/classification_pb' +require 'google/cloud/automl/v1beta1/detection_pb' +require 'google/cloud/automl/v1beta1/regression_pb' +require 'google/cloud/automl/v1beta1/tables_pb' +require 'google/cloud/automl/v1beta1/text_extraction_pb' +require 'google/cloud/automl/v1beta1/text_sentiment_pb' +require 'google/cloud/automl/v1beta1/translation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/automl/v1beta1/model_evaluation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x08\n\x0fModelEvaluation\x12i\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32<.google.cloud.automl.v1beta1.ClassificationEvaluationMetricsH\x00\x12\x61\n\x1dregression_evaluation_metrics\x18\x18 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.RegressionEvaluationMetricsH\x00\x12\x63\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TranslationEvaluationMetricsH\x00\x12w\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32\x42.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsH\x00\x12u\n(video_object_tracking_evaluation_metrics\x18\x0e \x01(\x0b\x32\x41.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsH\x00\x12h\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32;.google.cloud.automl.v1beta1.TextSentimentEvaluationMetricsH\x00\x12j\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelEvaluation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb new file mode 100644 index 000000000000..5e4ceb1dd794 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/model.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/image_pb' +require 'google/cloud/automl/v1beta1/tables_pb' +require 'google/cloud/automl/v1beta1/text_pb' +require 'google/cloud/automl/v1beta1/translation_pb' +require 'google/cloud/automl/v1beta1/video_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1beta1/model.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\n\n\x05Model\x12[\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TranslationModelMetadataH\x00\x12l\n#image_classification_model_metadata\x18\r \x01(\x0b\x32=.google.cloud.automl.v1beta1.ImageClassificationModelMetadataH\x00\x12j\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextClassificationModelMetadataH\x00\x12o\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32>.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataH\x00\x12l\n#video_classification_model_metadata\x18\x17 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoClassificationModelMetadataH\x00\x12m\n$video_object_tracking_model_metadata\x18\x15 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataH\x00\x12\x62\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.TextExtractionModelMetadataH\x00\x12Q\n\x15tables_model_metadata\x18\x18 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.TablesModelMetadataH\x00\x12`\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32\x32.google.cloud.automl.v1beta1.Model.DeploymentState\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model").msgclass + Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model.DeploymentState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb new file mode 100644 index 000000000000..651d885fc239 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/operations.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/io_pb' +require 'google/cloud/automl/v1beta1/model_pb' +require 'google/cloud/automl/v1beta1/model_evaluation_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/operations.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a$google/cloud/automl/v1beta1/io.proto\x1a\'google/cloud/automl/v1beta1/model.proto\x1a\x32google/cloud/automl/v1beta1/model_evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8b\x08\n\x11OperationMetadata\x12N\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.DeleteOperationMetadataH\x00\x12Y\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.DeployModelOperationMetadataH\x00\x12]\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32;.google.cloud.automl.v1beta1.UndeployModelOperationMetadataH\x00\x12Y\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.CreateModelOperationMetadataH\x00\x12W\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ImportDataOperationMetadataH\x00\x12[\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32:.google.cloud.automl.v1beta1.BatchPredictOperationMetadataH\x00\x12W\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ExportDataOperationMetadataH\x00\x12Y\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.ExportModelOperationMetadataH\x00\x12r\n!export_evaluated_examples_details\x18\x1a \x01(\x0b\x32\x45.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xef\x01\n\x1b\x45xportDataOperationMetadata\x12\x62\n\x0boutput_info\x18\x01 \x01(\x0b\x32M.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo\x1al\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xc3\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12J\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfig\x12\x66\n\x0boutput_info\x18\x02 \x01(\x0b\x32Q.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1an\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xbb\x01\n\x1c\x45xportModelOperationMetadata\x12\x64\n\x0boutput_info\x18\x02 \x01(\x0b\x32O.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\t\"\xee\x01\n(ExportEvaluatedExamplesOperationMetadata\x12|\n\x0boutput_info\x18\x02 \x01(\x0b\x32g.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo\x1a\x44\n!ExportEvaluatedExamplesOutputInfo\x12\x1f\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OperationMetadata").msgclass + DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteOperationMetadata").msgclass + DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelOperationMetadata").msgclass + UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelOperationMetadata").msgclass + CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelOperationMetadata").msgclass + ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataOperationMetadata").msgclass + ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata").msgclass + ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass + BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata").msgclass + BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass + ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata").msgclass + ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass + ExportEvaluatedExamplesOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata").msgclass + ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb new file mode 100644 index 000000000000..3ef3fce3b376 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1beta1/version" + +require "google/cloud/automl/v1beta1/prediction_service/credentials" +require "google/cloud/automl/v1beta1/prediction_service/paths" +require "google/cloud/automl/v1beta1/prediction_service/operations" +require "google/cloud/automl/v1beta1/prediction_service/client" +require "google/cloud/automl/v1beta1/prediction_service/rest" + +module Google + module Cloud + module AutoML + module V1beta1 + ## + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/automl/v1beta1/prediction_service" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/automl/v1beta1/prediction_service/rest" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + module PredictionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" +require "google/cloud/automl/v1beta1/prediction_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb new file mode 100644 index 000000000000..1e33b55c5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb @@ -0,0 +1,725 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/automl/v1beta1/prediction_service_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + ## + # Client for the PredictionService service. + # + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :prediction_service_stub + + ## + # Configure the PredictionService Client class. + # + # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PredictionService clients + # ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AutoML", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.predict.timeout = 60.0 + + default_config.rpcs.batch_predict.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @prediction_service_stub.universe_domain + end + + ## + # Create a new PredictionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PredictionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/automl/v1beta1/prediction_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @prediction_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::AutoML::V1beta1::PredictionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @prediction_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AutoML::V1beta1::PredictionService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @prediction_service_stub.logger + end + + # Service calls + + ## + # Perform an online prediction. The prediction result will be directly + # returned in the response. + # Available for following ML problems, and their expected request payloads: + # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes + # up to 30MB. + # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes + # up to 30MB. + # * Text Classification - TextSnippet, content up to 60,000 characters, + # UTF-8 encoded. + # * Text Extraction - TextSnippet, content up to 30,000 characters, + # UTF-8 NFC encoded. + # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 + # encoded. + # * Tables - Row, with column values matching the columns of the model, + # up to 5MB. Not available for FORECASTING + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 + # encoded. + # + # @overload predict(request, options = nil) + # Pass arguments to `predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload predict(name: nil, payload: nil, params: nil) + # Pass arguments to `predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the model requested to serve the prediction. + # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned in the response. Default is 100, the + # requested value may be limited by server. + # * For Tables: + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotation. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new + # + # # Call the predict method. + # result = client.predict request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. + # p result + # + def predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.predict.timeout, + metadata: metadata, + retry_policy: @config.rpcs.predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict Predict}, batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via GetOperation + # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in + # the {::Google::Longrunning::Operation#response response} field. + # Available for following ML problems: + # * Image Classification + # * Image Object Detection + # * Video Classification + # * Video Object Tracking * Text Extraction + # * Tables + # + # @overload batch_predict(request, options = nil) + # Pass arguments to `batch_predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) + # Pass arguments to `batch_predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the model requested to serve the batch prediction. + # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] + # Required. The input configuration for batch prediction. + # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] + # Required. The Configuration specifying where output predictions should + # be written. + # @param params [::Hash{::String => ::String}] + # Required. Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # * For Text Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be produced per image. Default is 100, the + # requested value may be limited by server. + # + # * For Video Classification : + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # `segment_classification` - (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is "true". + # `shot_classification` - (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. The default is "false". + # `1s_interval_classification` - (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. The default is + # "false". + # + # * For Tables: + # + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotations. The + # default is false. + # + # * For Video Object Tracking: + # + # `score_threshold` - (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned per frame. Default is 100, the requested + # value may be limited by server. + # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size will be + # returned. Value in 0 to 1 range. Default is 0. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new + # + # # Call the batch_predict method. + # result = client.batch_predict request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PredictionService API. + # + # This class represents the configuration for PredictionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # predict to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PredictionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `predict` + # @return [::Gapic::Config::Method] + # + attr_reader :predict + ## + # RPC-specific configuration for `batch_predict` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_predict + + # @private + def initialize parent_rpcs = nil + predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict + @predict = ::Gapic::Config::Method.new predict_config + batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict + @batch_predict = ::Gapic::Config::Method.new batch_predict_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb new file mode 100644 index 000000000000..a5db32e08e4d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + # Credentials for the PredictionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "AUTOML_CREDENTIALS", + "AUTOML_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "AUTOML_CREDENTIALS_JSON", + "AUTOML_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb new file mode 100644 index 000000000000..86611b26eb38 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb @@ -0,0 +1,849 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PredictionService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb new file mode 100644 index 000000000000..a43bf51c919f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + # Path helper methods for the PredictionService API. + module Paths + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb new file mode 100644 index 000000000000..7d3604f143b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/automl/v1beta1/version" + +require "google/cloud/automl/v1beta1/prediction_service/credentials" +require "google/cloud/automl/v1beta1/prediction_service/paths" +require "google/cloud/automl/v1beta1/prediction_service/rest/operations" +require "google/cloud/automl/v1beta1/prediction_service/rest/client" + +module Google + module Cloud + module AutoML + module V1beta1 + ## + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/automl/v1beta1/prediction_service/rest" + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + module PredictionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/automl/v1beta1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb new file mode 100644 index 000000000000..20ea008e1bb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb @@ -0,0 +1,668 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/automl/v1beta1/prediction_service_pb" +require "google/cloud/automl/v1beta1/prediction_service/rest/service_stub" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + module Rest + ## + # REST client for the PredictionService service. + # + # AutoML Prediction API. + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :prediction_service_stub + + ## + # Configure the PredictionService Client class. + # + # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PredictionService clients + # ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "AutoML", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.predict.timeout = 60.0 + + default_config.rpcs.batch_predict.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @prediction_service_stub.universe_domain + end + + ## + # Create a new PredictionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PredictionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @prediction_service_stub = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @prediction_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @prediction_service_stub.logger + end + + # Service calls + + ## + # Perform an online prediction. The prediction result will be directly + # returned in the response. + # Available for following ML problems, and their expected request payloads: + # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes + # up to 30MB. + # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes + # up to 30MB. + # * Text Classification - TextSnippet, content up to 60,000 characters, + # UTF-8 encoded. + # * Text Extraction - TextSnippet, content up to 30,000 characters, + # UTF-8 NFC encoded. + # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 + # encoded. + # * Tables - Row, with column values matching the columns of the model, + # up to 5MB. Not available for FORECASTING + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 + # encoded. + # + # @overload predict(request, options = nil) + # Pass arguments to `predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload predict(name: nil, payload: nil, params: nil) + # Pass arguments to `predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the model requested to serve the prediction. + # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @param params [::Hash{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned in the response. Default is 100, the + # requested value may be limited by server. + # * For Tables: + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotation. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new + # + # # Call the predict method. + # result = client.predict request + # + # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. + # p result + # + def predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.predict.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.predict request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client#predict Predict}, batch + # prediction result won't be immediately available in the response. Instead, + # a long running operation object is returned. User can poll the operation + # result via GetOperation + # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in + # the {::Google::Longrunning::Operation#response response} field. + # Available for following ML problems: + # * Image Classification + # * Image Object Detection + # * Video Classification + # * Video Object Tracking * Text Extraction + # * Tables + # + # @overload batch_predict(request, options = nil) + # Pass arguments to `batch_predict` via a request object, either of type + # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) + # Pass arguments to `batch_predict` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the model requested to serve the batch prediction. + # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] + # Required. The input configuration for batch prediction. + # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] + # Required. The Configuration specifying where output predictions should + # be written. + # @param params [::Hash{::String => ::String}] + # Required. Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # * For Text Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be produced per image. Default is 100, the + # requested value may be limited by server. + # + # * For Video Classification : + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # `segment_classification` - (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is "true". + # `shot_classification` - (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. The default is "false". + # `1s_interval_classification` - (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. The default is + # "false". + # + # * For Tables: + # + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotations. The + # default is false. + # + # * For Video Object Tracking: + # + # `score_threshold` - (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned per frame. Default is 100, the requested + # value may be limited by server. + # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size will be + # returned. Value in 0 to 1 range. Default is 0. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/automl/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new + # + # # Call the batch_predict method. + # result = client.batch_predict request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_predict request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_predict.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_predict.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @prediction_service_stub.batch_predict request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the PredictionService REST API. + # + # This class represents the configuration for PredictionService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # predict to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.predict.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the PredictionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `predict` + # @return [::Gapic::Config::Method] + # + attr_reader :predict + ## + # RPC-specific configuration for `batch_predict` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_predict + + # @private + def initialize parent_rpcs = nil + predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict + @predict = ::Gapic::Config::Method.new predict_config + batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict + @batch_predict = ::Gapic::Config::Method.new batch_predict_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb new file mode 100644 index 000000000000..4a88d22613f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb @@ -0,0 +1,1093 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the PredictionService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the PredictionService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.wait_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "automl.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "wait_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:wait", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb new file mode 100644 index 000000000000..4d4927cfe5ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/automl/v1beta1/prediction_service_pb" + +module Google + module Cloud + module AutoML + module V1beta1 + module PredictionService + module Rest + ## + # REST service stub for the PredictionService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] + # A result object deserialized from the server's reply + def predict request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "predict", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_predict request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_predict", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_predict_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:predict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_predict REST call + # + # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_predict_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:batchPredict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb new file mode 100644 index 000000000000..1d749800e047 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/prediction_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/annotation_payload_pb' +require 'google/cloud/automl/v1beta1/data_items_pb' +require 'google/cloud/automl/v1beta1/io_pb' +require 'google/cloud/automl/v1beta1/operations_pb' +require 'google/longrunning/operations_pb' + + +descriptor_data = "\n4google/cloud/automl/v1beta1/prediction_service.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/automl/v1beta1/annotation_payload.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a,google/cloud/automl/v1beta1/operations.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x41\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayloadB\x03\xe0\x41\x02\x12G\n\x06params\x18\x03 \x03(\x0b\x32\x37.google.cloud.automl.v1beta1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9a\x02\n\x0fPredictResponse\x12?\n\x07payload\x18\x01 \x03(\x0b\x32..google.cloud.automl.v1beta1.AnnotationPayload\x12G\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayload\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.google.cloud.automl.v1beta1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xee\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12O\n\x0cinput_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12Q\n\routput_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12Q\n\x06params\x18\x05 \x03(\x0b\x32<.google.cloud.automl.v1beta1.BatchPredictRequest.ParamsEntryB\x03\xe0\x41\x02\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x96\x01\n\x12\x42\x61tchPredictResult\x12O\n\x08metadata\x18\x01 \x03(\x0b\x32=.google.cloud.automl.v1beta1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x9e\x04\n\x11PredictionService\x12\xbe\x01\n\x07Predict\x12+.google.cloud.automl.v1beta1.PredictRequest\x1a,.google.cloud.automl.v1beta1.PredictResponse\"X\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xfc\x01\n\x0c\x42\x61tchPredict\x12\x30.google.cloud.automl.v1beta1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02\x41\"/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}\x12\xca\x01\n\x0eListTableSpecs\x12\x32.google.cloud.automl.v1beta1.ListTableSpecsRequest\x1a\x33.google.cloud.automl.v1beta1.ListTableSpecsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs\x12\xda\x01\n\x0fUpdateTableSpec\x12\x33.google.cloud.automl.v1beta1.UpdateTableSpecRequest\x1a&.google.cloud.automl.v1beta1.TableSpec\"j\xda\x41\ntable_spec\x82\xd3\xe4\x93\x02W2I/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}:\ntable_spec\x12\xc8\x01\n\rGetColumnSpec\x12\x31.google.cloud.automl.v1beta1.GetColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}\x12\xdb\x01\n\x0fListColumnSpecs\x12\x33.google.cloud.automl.v1beta1.ListColumnSpecsRequest\x1a\x34.google.cloud.automl.v1beta1.ListColumnSpecsResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs\x12\xee\x01\n\x10UpdateColumnSpec\x12\x34.google.cloud.automl.v1beta1.UpdateColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"{\xda\x41\x0b\x63olumn_spec\x82\xd3\xe4\x93\x02g2X/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}:\x0b\x63olumn_spec\x12\xc9\x01\n\x0b\x43reateModel\x12/.google.cloud.automl.v1beta1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x38\"//v1beta1/{parent=projects/*/locations/*}/models:\x05model\x12\x9c\x01\n\x08GetModel\x12,.google.cloud.automl.v1beta1.GetModelRequest\x1a\".google.cloud.automl.v1beta1.Model\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{name=projects/*/locations/*/models/*}\x12\xaf\x01\n\nListModels\x12..google.cloud.automl.v1beta1.ListModelsRequest\x1a/.google.cloud.automl.v1beta1.ListModelsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{parent=projects/*/locations/*}/models\x12\xca\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.automl.v1beta1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1beta1/{name=projects/*/locations/*/models/*}\x12\xd4\x01\n\x0b\x44\x65ployModel\x12/.google.cloud.automl.v1beta1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xda\x01\n\rUndeployModel\x12\x31.google.cloud.automl.v1beta1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1beta1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xe3\x01\n\x0b\x45xportModel\x12/.google.cloud.automl.v1beta1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\x8c\x02\n\x17\x45xportEvaluatedExamples\x12;.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples:\x01*\x12\xcd\x01\n\x12GetModelEvaluation\x12\x36.google.cloud.automl.v1beta1.GetModelEvaluationRequest\x1a,.google.cloud.automl.v1beta1.ModelEvaluation\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xe0\x01\n\x14ListModelEvaluations\x12\x38.google.cloud.automl.v1beta1.ListModelEvaluationsRequest\x1a\x39.google.cloud.automl.v1beta1.ListModelEvaluationsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x0b\x41utoMlProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateDatasetRequest").msgclass + GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetDatasetRequest").msgclass + ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsRequest").msgclass + ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsResponse").msgclass + UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateDatasetRequest").msgclass + DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteDatasetRequest").msgclass + ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataRequest").msgclass + ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataRequest").msgclass + GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetAnnotationSpecRequest").msgclass + GetTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetTableSpecRequest").msgclass + ListTableSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsRequest").msgclass + ListTableSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsResponse").msgclass + UpdateTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateTableSpecRequest").msgclass + GetColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetColumnSpecRequest").msgclass + ListColumnSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsRequest").msgclass + ListColumnSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsResponse").msgclass + UpdateColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateColumnSpecRequest").msgclass + CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelRequest").msgclass + GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelRequest").msgclass + ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsRequest").msgclass + ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsResponse").msgclass + DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteModelRequest").msgclass + DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelRequest").msgclass + UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelRequest").msgclass + ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelRequest").msgclass + ExportEvaluatedExamplesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest").msgclass + GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelEvaluationRequest").msgclass + ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsRequest").msgclass + ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb new file mode 100644 index 000000000000..3058d28ba237 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb @@ -0,0 +1,163 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/automl/v1beta1/service.proto for package 'Google.Cloud.AutoML.V1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/automl/v1beta1/service_pb' + +module Google + module Cloud + module AutoML + module V1beta1 + module AutoMl + # AutoML Server API. + # + # The resource names are assigned by the server. + # The server never reuses names that it has created after the resources with + # those names are deleted. + # + # An ID of a resource is the last element of the item's resource name. For + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then + # the id for the item is `{dataset_id}`. + # + # Currently the only supported `location_id` is "us-central1". + # + # On any input that is documented to expect a string parameter in + # snake_case or kebab-case, either of those cases is accepted. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.automl.v1beta1.AutoMl' + + # Creates a dataset. + rpc :CreateDataset, ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset + # Gets a dataset. + rpc :GetDataset, ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset + # Lists datasets in a project. + rpc :ListDatasets, ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse + # Updates a dataset. + rpc :UpdateDataset, ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset + # Deletes a dataset and all of its contents. + # Returns empty response in the + # [response][google.longrunning.Operation.response] field when it completes, + # and `delete_details` in the + # [metadata][google.longrunning.Operation.metadata] field. + rpc :DeleteDataset, ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Google::Longrunning::Operation + # Imports data into a dataset. + # For Tables this method can only be called on an empty Dataset. + # + # For Tables: + # * A + # [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] + # parameter must be explicitly set. + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ImportData, ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Google::Longrunning::Operation + # Exports dataset's data to the provided output location. + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportData, ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Google::Longrunning::Operation + # Gets an annotation spec. + rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1beta1::AnnotationSpec + # Gets a table spec. + rpc :GetTableSpec, ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec + # Lists table specs in a dataset. + rpc :ListTableSpecs, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse + # Updates a table spec. + rpc :UpdateTableSpec, ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec + # Gets a column spec. + rpc :GetColumnSpec, ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec + # Lists column specs in a table spec. + rpc :ListColumnSpecs, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse + # Updates a column spec. + rpc :UpdateColumnSpec, ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec + # Creates a model. + # Returns a Model in the [response][google.longrunning.Operation.response] + # field when it completes. + # When you create a model, several model evaluations are created for it: + # a global evaluation, and one evaluation for each annotation spec. + rpc :CreateModel, ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Google::Longrunning::Operation + # Gets a model. + rpc :GetModel, ::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Google::Cloud::AutoML::V1beta1::Model + # Lists models. + rpc :ListModels, ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelsResponse + # Deletes a model. + # Returns `google.protobuf.Empty` in the + # [response][google.longrunning.Operation.response] field when it completes, + # and `delete_details` in the + # [metadata][google.longrunning.Operation.metadata] field. + rpc :DeleteModel, ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Google::Longrunning::Operation + # Deploys a model. If a model is already deployed, deploying it with the + # same parameters has no effect. Deploying with different parametrs + # (as e.g. changing + # + # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + # will reset the deployment state without pausing the model's availability. + # + # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + # deployment automatically. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :DeployModel, ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Google::Longrunning::Operation + # Undeploys a model. If the model is not deployed this method has no effect. + # + # Only applicable for Text Classification, Image Object Detection and Tables; + # all other domains manage deployment automatically. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :UndeployModel, ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Google::Longrunning::Operation + # Exports a trained, "export-able", model to a user specified Google Cloud + # Storage location. A model is considered export-able if and only if it has + # an export format defined for it in + # + # [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportModel, ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Google::Longrunning::Operation + # Exports examples on which the model was evaluated (i.e. which were in the + # TEST set of the dataset the model was created from), together with their + # ground truth annotations and the annotations created (predicted) by the + # model. + # The examples, ground truth and predictions are exported in the state + # they were at the moment the model was evaluated. + # + # This export is available only for 30 days since the model evaluation is + # created. + # + # Currently only available for Tables. + # + # Returns an empty response in the + # [response][google.longrunning.Operation.response] field when it completes. + rpc :ExportEvaluatedExamples, ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Google::Longrunning::Operation + # Gets a model evaluation. + rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1beta1::ModelEvaluation + # Lists model evaluations. + rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb new file mode 100644 index 000000000000..160d97c9614a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/table_spec.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/automl/v1beta1/io_pb' + + +descriptor_data = "\n,google/cloud/automl/v1beta1/table_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a$google/cloud/automl/v1beta1/io.proto\"\xc1\x02\n\tTableSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13time_column_spec_id\x18\x02 \x01(\t\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x17\n\x0fvalid_row_count\x18\x04 \x01(\x03\x12\x14\n\x0c\x63olumn_count\x18\x07 \x01(\x03\x12?\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.automl.v1beta1.InputConfig\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:x\xea\x41u\n\x1f\x61utoml.googleapis.com/TableSpec\x12Rprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TableSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TableSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb new file mode 100644 index 000000000000..f6d3ca925dc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/tables.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' +require 'google/cloud/automl/v1beta1/column_spec_pb' +require 'google/cloud/automl/v1beta1/data_items_pb' +require 'google/cloud/automl/v1beta1/data_stats_pb' +require 'google/cloud/automl/v1beta1/ranges_pb' +require 'google/cloud/automl/v1beta1/regression_pb' +require 'google/cloud/automl/v1beta1/temporal_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/automl/v1beta1/tables.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a-google/cloud/automl/v1beta1/column_spec.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a(google/cloud/automl/v1beta1/ranges.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x03\n\x15TablesDatasetMetadata\x12\x1d\n\x15primary_table_spec_id\x18\x01 \x01(\t\x12\x1d\n\x15target_column_spec_id\x18\x02 \x01(\t\x12\x1d\n\x15weight_column_spec_id\x18\x03 \x01(\t\x12\x1d\n\x15ml_use_column_spec_id\x18\x04 \x01(\t\x12t\n\x1atarget_column_correlations\x18\x06 \x03(\x0b\x32P.google.cloud.automl.v1beta1.TablesDatasetMetadata.TargetColumnCorrelationsEntry\x12\x35\n\x11stats_update_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1an\n\x1dTargetColumnCorrelationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x02\x38\x01\"\x96\x04\n\x13TablesModelMetadata\x12-\n#optimization_objective_recall_value\x18\x11 \x01(\x02H\x00\x12\x30\n&optimization_objective_precision_value\x18\x12 \x01(\x02H\x00\x12\x43\n\x12target_column_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12K\n\x1ainput_feature_column_specs\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12\x1e\n\x16optimization_objective\x18\x04 \x01(\t\x12T\n\x18tables_model_column_info\x18\x05 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x12\x1e\n\x16\x64isable_early_stopping\x18\x0c \x01(\x08\x42*\n(additional_optimization_objective_config\"\xfd\x01\n\x10TablesAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x45\n\x13prediction_interval\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.DoubleRange\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x12T\n\x18tables_model_column_info\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12\x16\n\x0e\x62\x61seline_score\x18\x05 \x01(\x02\"j\n\x15TablesModelColumnInfo\x12\x18\n\x10\x63olumn_spec_name\x18\x01 \x01(\t\x12\x1b\n\x13\x63olumn_display_name\x18\x02 \x01(\t\x12\x1a\n\x12\x66\x65\x61ture_importance\x18\x03 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TablesDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesDatasetMetadata").msgclass + TablesModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelMetadata").msgclass + TablesAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesAnnotation").msgclass + TablesModelColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelColumnInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb new file mode 100644 index 000000000000..396cc6fd35e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/temporal.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n*google/cloud/automl/v1beta1/temporal.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1egoogle/protobuf/duration.proto\"w\n\x0bTimeSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TimeSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimeSegment").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb new file mode 100644 index 000000000000..d6721fb18c95 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/text_extraction.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/text_segment_pb' + + +descriptor_data = "\n1google/cloud/automl/v1beta1/text_extraction.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a.google/cloud/automl/v1beta1/text_segment.proto\"y\n\x18TextExtractionAnnotation\x12@\n\x0ctext_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x97\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12w\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32S.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionAnnotation").msgclass + TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics").msgclass + TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb new file mode 100644 index 000000000000..ff6b1ba5b994 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/text.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' + + +descriptor_data = "\n&google/cloud/automl/v1beta1/text.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"q\n!TextClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"o\n\x1fTextClassificationModelMetadata\x12L\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"1\n\x1bTextExtractionModelMetadata\x12\x12\n\nmodel_hint\x18\x03 \x01(\t\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xa6\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\tTextProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationDatasetMetadata").msgclass + TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationModelMetadata").msgclass + TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionDatasetMetadata").msgclass + TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionModelMetadata").msgclass + TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentDatasetMetadata").msgclass + TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentModelMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb new file mode 100644 index 000000000000..33f9468c557a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/text_segment.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/automl/v1beta1/text_segment.proto\x12\x1bgoogle.cloud.automl.v1beta1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TextSegmentProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSegment").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb new file mode 100644 index 000000000000..0b206376a98e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/text_sentiment.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' + + +descriptor_data = "\n0google/cloud/automl/v1beta1/text_sentiment.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xc5\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x66\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1e\n\x12\x61nnotation_spec_id\x18\t \x03(\tB\x02\x18\x01\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x12TextSentimentProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentAnnotation").msgclass + TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb new file mode 100644 index 000000000000..cbd8923df2c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/translation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/automl/v1beta1/data_items_pb' + + +descriptor_data = "\n-google/cloud/automl/v1beta1/translation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"]\n\x15TranslationAnnotation\x12\x44\n\x12translated_content\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetB\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TranslationProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationDatasetMetadata").msgclass + TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationEvaluationMetrics").msgclass + TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationModelMetadata").msgclass + TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationAnnotation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb new file mode 100644 index 000000000000..339624fb94a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb new file mode 100644 index 000000000000..0cde809f1c74 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/automl/v1beta1/video.proto + +require 'google/protobuf' + +require 'google/cloud/automl/v1beta1/classification_pb' + + +descriptor_data = "\n\'google/cloud/automl/v1beta1/video.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"$\n\"VideoClassificationDatasetMetadata\"$\n\"VideoObjectTrackingDatasetMetadata\"\"\n VideoClassificationModelMetadata\"\"\n VideoObjectTrackingModelMetadataB\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nVideoProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module AutoML + module V1beta1 + VideoClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata").msgclass + VideoObjectTrackingDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata").msgclass + VideoClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationModelMetadata").msgclass + VideoObjectTrackingModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..483947fef0b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud AutoML V1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb new file mode 100644 index 000000000000..a5d64336682a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Contains annotation information that is relevant to AutoML. + # @!attribute [rw] translation + # @return [::Google::Cloud::AutoML::V1beta1::TranslationAnnotation] + # Annotation details for translation. + # + # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] classification + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] + # Annotation details for content or image classification. + # + # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionAnnotation] + # Annotation details for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_classification + # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationAnnotation] + # Annotation details for video classification. + # Returned for Video Classification predictions. + # + # Note: The following fields are mutually exclusive: `video_classification`, `translation`, `classification`, `image_object_detection`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_object_tracking + # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingAnnotation] + # Annotation details for video object tracking. + # + # Note: The following fields are mutually exclusive: `video_object_tracking`, `translation`, `classification`, `image_object_detection`, `video_classification`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction + # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionAnnotation] + # Annotation details for text extraction. + # + # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment + # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentAnnotation] + # Annotation details for text sentiment. + # + # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tables + # @return [::Google::Cloud::AutoML::V1beta1::TablesAnnotation] + # Annotation details for Tables. + # + # Note: The following fields are mutually exclusive: `tables`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] annotation_spec_id + # @return [::String] + # Output only . The resource ID of the annotation spec that + # this annotation pertains to. The annotation spec comes from either an + # ancestor dataset, or the dataset that was used to train the model in use. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The value of + # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} + # when the model was trained. Because this field returns a value at model + # training time, for different models trained using the same dataset, the + # returned value could be different as model owner could update the + # `display_name` between any two model training. + class AnnotationPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb new file mode 100644 index 000000000000..fef4ea17d2ba --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A definition of an annotation spec. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the annotation spec. + # Form: + # + # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the annotation spec to show in the interface. The name can be + # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. + # @!attribute [rw] example_count + # @return [::Integer] + # Output only. The number of examples in the parent dataset + # labeled by the annotation spec. + class AnnotationSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb new file mode 100644 index 000000000000..ddcb7dbb8d85 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Contains annotation details specific to classification. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0. A higher value + # means greater confidence that the annotation is positive. If a user + # approves an annotation as negative or positive, the score value remains + # unchanged. If a user creates an annotation, the score is 0 for negative or + # 1 for positive. + class ClassificationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains annotation details specific to video classification. + # @!attribute [rw] type + # @return [::String] + # Output only. Expresses the type of video classification. Possible values: + # + # * `segment` - Classification done on a specified by user + # time segment of a video. AnnotationSpec is answered to be present + # in that time segment, if it is present in any part of it. The video + # ML model evaluations are done only for this type of classification. + # + # * `shot`- Shot-level classification. + # AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # + # * `1s_interval` - AutoML Video Intelligence returns labels and their + # confidence scores for each second of the entire segment of the video + # that user specified in the request configuration. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no + # metrics provided to describe that quality. + # @!attribute [rw] classification_annotation + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] + # Output only . The classification details of this annotation. + # @!attribute [rw] time_segment + # @return [::Google::Cloud::AutoML::V1beta1::TimeSegment] + # Output only . The time segment of the video to which the + # annotation applies. + class VideoClassificationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for classification problems. + # Note: For Video Classification this metrics only describe quality of the + # Video Classification predictions of "segment_classification" type. + # @!attribute [rw] au_prc + # @return [::Float] + # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged + # for the overall evaluation. + # @!attribute [rw] base_au_prc + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Float] + # Output only. The Area Under Precision-Recall Curve metric based on priors. + # Micro-averaged for the overall evaluation. + # Deprecated. + # @!attribute [rw] au_roc + # @return [::Float] + # Output only. The Area Under Receiver Operating Characteristic curve metric. + # Micro-averaged for the overall evaluation. + # @!attribute [rw] log_loss + # @return [::Float] + # Output only. The Log Loss metric. + # @!attribute [rw] confidence_metrics_entry + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] + # Output only. Metrics for each confidence_threshold in + # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and + # position_threshold = INT32_MAX_VALUE. + # ROC and precision-recall curves, and other aggregated metrics are derived + # from them. The confidence metrics entries may also be supplied for + # additional values of position_threshold, but from these no aggregated + # metrics are computed. + # @!attribute [rw] confusion_matrix + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] + # Output only. Confusion matrix of the evaluation. + # Only set for MULTICLASS classification problems where number + # of labels is no more than 10. + # Only set for model level evaluation, not for evaluation per label. + # @!attribute [rw] annotation_spec_id + # @return [::Array<::String>] + # Output only. The annotation spec ids used for this evaluation. + class ClassificationEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. Metrics are computed with an assumption that the model + # never returns predictions with score lower than this value. + # @!attribute [rw] position_threshold + # @return [::Integer] + # Output only. Metrics are computed with an assumption that the model + # always returns at most this many predictions (ordered by their score, + # descendingly), but they all still need to meet the confidence_threshold. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall (True Positive Rate) for the given confidence + # threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision for the given confidence threshold. + # @!attribute [rw] false_positive_rate + # @return [::Float] + # Output only. False Positive Rate for the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + # @!attribute [rw] recall_at1 + # @return [::Float] + # Output only. The Recall (True Positive Rate) when only considering the + # label that has the highest prediction score and not below the confidence + # threshold for each example. + # @!attribute [rw] precision_at1 + # @return [::Float] + # Output only. The precision when only considering the label that has the + # highest prediction score and not below the confidence threshold for each + # example. + # @!attribute [rw] false_positive_rate_at1 + # @return [::Float] + # Output only. The False Positive Rate when only considering the label that + # has the highest prediction score and not below the confidence threshold + # for each example. + # @!attribute [rw] f1_score_at1 + # @return [::Float] + # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. + # @!attribute [rw] true_positive_count + # @return [::Integer] + # Output only. The number of model created labels that match a ground truth + # label. + # @!attribute [rw] false_positive_count + # @return [::Integer] + # Output only. The number of model created labels that do not match a + # ground truth label. + # @!attribute [rw] false_negative_count + # @return [::Integer] + # Output only. The number of ground truth labels that are not matched + # by a model created label. + # @!attribute [rw] true_negative_count + # @return [::Integer] + # Output only. The number of labels that were not created by the model, + # but if they would, they would not match a ground truth label. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Confusion matrix of the model running the classification. + # @!attribute [rw] annotation_spec_id + # @return [::Array<::String>] + # Output only. IDs of the annotation specs used in the confusion matrix. + # For Tables CLASSIFICATION + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + # only list of [annotation_spec_display_name-s][] is populated. + # @!attribute [rw] display_name + # @return [::Array<::String>] + # Output only. Display name of the annotation specs used in the confusion + # matrix, as they were at the moment of the evaluation. For Tables + # CLASSIFICATION + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type], + # distinct values of the target column at the moment of the model + # evaluation are populated here. + # @!attribute [rw] row + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] + # Output only. Rows in the confusion matrix. The number of rows is equal to + # the size of `annotation_spec_id`. + # `row[i].example_count[j]` is the number of examples that have ground + # truth of the `annotation_spec_id[i]` and are predicted as + # `annotation_spec_id[j]` by the model being evaluated. + class ConfusionMatrix + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. A row in the confusion matrix. + # @!attribute [rw] example_count + # @return [::Array<::Integer>] + # Output only. Value of the specific cell in the confusion matrix. + # The number of values each row has (i.e. the length of the row) is equal + # to the length of the `annotation_spec_id` field or, if that one is not + # populated, length of the {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Type of the classification problem. + module ClassificationType + # An un-set value of this enum. + CLASSIFICATION_TYPE_UNSPECIFIED = 0 + + # At most one label is allowed per example. + MULTICLASS = 1 + + # Multiple labels are allowed for one example. + MULTILABEL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb new file mode 100644 index 000000000000..5a49f3139bdf --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were + # given on import . + # Used by: + # * Tables + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the column specs. + # Form: + # + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` + # @!attribute [rw] data_type + # @return [::Google::Cloud::AutoML::V1beta1::DataType] + # The data type of elements stored in the column. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The name of the column to show in the interface. The name can + # be up to 100 characters long and can consist only of ASCII Latin letters + # A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and + # must start with a letter or a digit. + # @!attribute [rw] data_stats + # @return [::Google::Cloud::AutoML::V1beta1::DataStats] + # Output only. Stats of the series of values in the column. + # This field may be stale, see the ancestor's + # Dataset.tables_dataset_metadata.stats_update_time field + # for the timestamp at which these stats were last updated. + # @!attribute [rw] top_correlated_columns + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec::CorrelatedColumn>] + # Deprecated. + # @!attribute [rw] etag + # @return [::String] + # Used to perform consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + class ColumnSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Identifies the table's column, and its correlation with the column this + # ColumnSpec describes. + # @!attribute [rw] column_spec_id + # @return [::String] + # The column_spec_id of the correlated column, which belongs to the same + # table as the in-context column. + # @!attribute [rw] correlation_stats + # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] + # Correlation between this and the in-context column. + class CorrelatedColumn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb new file mode 100644 index 000000000000..c6d3145ce607 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb @@ -0,0 +1,239 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A representation of an image. + # Only images up to 30MB in size are supported. + # @!attribute [rw] image_bytes + # @return [::String] + # Image content represented as a stream of bytes. + # Note: As with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # + # Note: The following fields are mutually exclusive: `image_bytes`, `input_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] + # An input config specifying the content of the image. + # + # Note: The following fields are mutually exclusive: `input_config`, `image_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] thumbnail_uri + # @return [::String] + # Output only. HTTP URI to the thumbnail image. + class Image + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A representation of a text snippet. + # @!attribute [rw] content + # @return [::String] + # Required. The content of the text snippet as a string. Up to 250000 + # characters long. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. The format of {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. Currently the only two allowed + # values are "text/html" and "text/plain". If left blank, the format is + # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. + # @!attribute [rw] content_uri + # @return [::String] + # Output only. HTTP URI where you can download the content. + class TextSnippet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message that describes dimension of a document. + # @!attribute [rw] unit + # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions::DocumentDimensionUnit] + # Unit of the dimension. + # @!attribute [rw] width + # @return [::Float] + # Width value of the document, works together with the unit. + # @!attribute [rw] height + # @return [::Float] + # Height value of the document, works together with the unit. + class DocumentDimensions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Unit of the document dimension. + module DocumentDimensionUnit + # Should not be used. + DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 + + # Document dimension is measured in inches. + INCH = 1 + + # Document dimension is measured in centimeters. + CENTIMETER = 2 + + # Document dimension is measured in points. 72 points = 1 inch. + POINT = 3 + end + end + + # A structured text document e.g. a PDF. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::DocumentInputConfig] + # An input config specifying the content of the document. + # @!attribute [rw] document_text + # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] + # The plain text version of this document. + # @!attribute [rw] layout + # @return [::Array<::Google::Cloud::AutoML::V1beta1::Document::Layout>] + # Describes the layout of the document. + # Sorted by [page_number][]. + # @!attribute [rw] document_dimensions + # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions] + # The dimensions of the page in the document. + # @!attribute [rw] page_count + # @return [::Integer] + # Number of pages in the document. + class Document + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. + # @!attribute [rw] text_segment + # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] + # Text Segment that represents a segment in + # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. + # @!attribute [rw] page_number + # @return [::Integer] + # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts + # from 1. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] + # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. + # Contains exactly 4 + # + # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} + # and they are connected by edges in the order provided, which will + # represent a rectangle parallel to the frame. The + # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are + # relative to the page. + # Coordinates are based on top-left as point (0,0). + # @!attribute [rw] text_segment_type + # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] + # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. + class Layout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of TextSegment in the context of the original document. + module TextSegmentType + # Should not be used. + TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 + + # The text segment is a token. e.g. word. + TOKEN = 1 + + # The text segment is a paragraph. + PARAGRAPH = 2 + + # The text segment is a form field. + FORM_FIELD = 3 + + # The text segment is the name part of a form field. It will be treated + # as child of another FORM_FIELD TextSegment if its span is subspan of + # another TextSegment with type FORM_FIELD. + FORM_FIELD_NAME = 4 + + # The text segment is the text content part of a form field. It will be + # treated as child of another FORM_FIELD TextSegment if its span is + # subspan of another TextSegment with type FORM_FIELD. + FORM_FIELD_CONTENTS = 5 + + # The text segment is a whole table, including headers, and all rows. + TABLE = 6 + + # The text segment is a table's headers. It will be treated as child of + # another TABLE TextSegment if its span is subspan of another TextSegment + # with type TABLE. + TABLE_HEADER = 7 + + # The text segment is a row in table. It will be treated as child of + # another TABLE TextSegment if its span is subspan of another TextSegment + # with type TABLE. + TABLE_ROW = 8 + + # The text segment is a cell in table. It will be treated as child of + # another TABLE_ROW TextSegment if its span is subspan of another + # TextSegment with type TABLE_ROW. + TABLE_CELL = 9 + end + end + end + + # A representation of a row in a relational table. + # @!attribute [rw] column_spec_ids + # @return [::Array<::String>] + # The resource IDs of the column specs describing the columns of the row. + # If set must contain, but possibly in a different order, all input + # feature + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_spec_ids} + # of the Model this row is being passed to. + # Note: The below `values` field must match order of this field, if this + # field is set. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Required. The values of the row cells, given in the same order as the + # column_spec_ids, or, if not set, then in the same order as input + # feature + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_specs} + # of the Model this row is being passed to. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Example data used for training or prediction. + # @!attribute [rw] image + # @return [::Google::Cloud::AutoML::V1beta1::Image] + # Example image. + # + # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_snippet + # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] + # Example text. + # + # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] document + # @return [::Google::Cloud::AutoML::V1beta1::Document] + # Example document. + # + # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] row + # @return [::Google::Cloud::AutoML::V1beta1::Row] + # Example relational table row. + # + # Note: The following fields are mutually exclusive: `row`, `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExamplePayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb new file mode 100644 index 000000000000..69d1de9e2ebe --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb @@ -0,0 +1,239 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # The data statistics of a series of values that share the same DataType. + # @!attribute [rw] float64_stats + # @return [::Google::Cloud::AutoML::V1beta1::Float64Stats] + # The statistics for FLOAT64 DataType. + # + # Note: The following fields are mutually exclusive: `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_stats + # @return [::Google::Cloud::AutoML::V1beta1::StringStats] + # The statistics for STRING DataType. + # + # Note: The following fields are mutually exclusive: `string_stats`, `float64_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_stats + # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats] + # The statistics for TIMESTAMP DataType. + # + # Note: The following fields are mutually exclusive: `timestamp_stats`, `float64_stats`, `string_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] array_stats + # @return [::Google::Cloud::AutoML::V1beta1::ArrayStats] + # The statistics for ARRAY DataType. + # + # Note: The following fields are mutually exclusive: `array_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_stats + # @return [::Google::Cloud::AutoML::V1beta1::StructStats] + # The statistics for STRUCT DataType. + # + # Note: The following fields are mutually exclusive: `struct_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] category_stats + # @return [::Google::Cloud::AutoML::V1beta1::CategoryStats] + # The statistics for CATEGORY DataType. + # + # Note: The following fields are mutually exclusive: `category_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] distinct_value_count + # @return [::Integer] + # The number of distinct values. + # @!attribute [rw] null_value_count + # @return [::Integer] + # The number of values that are null. + # @!attribute [rw] valid_value_count + # @return [::Integer] + # The number of values that are valid. + class DataStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data statistics of a series of FLOAT64 values. + # @!attribute [rw] mean + # @return [::Float] + # The mean of the series. + # @!attribute [rw] standard_deviation + # @return [::Float] + # The standard deviation of the series. + # @!attribute [rw] quantiles + # @return [::Array<::Float>] + # Ordered from 0 to k k-quantile values of the data series of n values. + # The value at index i is, approximately, the i*n/k-th smallest value in the + # series; for i = 0 and i = k these are, respectively, the min and max + # values. + # @!attribute [rw] histogram_buckets + # @return [::Array<::Google::Cloud::AutoML::V1beta1::Float64Stats::HistogramBucket>] + # Histogram buckets of the data series. Sorted by the min value of the + # bucket, ascendingly, and the number of the buckets is dynamically + # generated. The buckets are non-overlapping and completely cover whole + # FLOAT64 range with min of first bucket being `"-Infinity"`, and max of + # the last one being `"Infinity"`. + class Float64Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A bucket of a histogram. + # @!attribute [rw] min + # @return [::Float] + # The minimum value of the bucket, inclusive. + # @!attribute [rw] max + # @return [::Float] + # The maximum value of the bucket, exclusive unless max = `"Infinity"`, in + # which case it's inclusive. + # @!attribute [rw] count + # @return [::Integer] + # The number of data values that are in the bucket, i.e. are between + # min and max values. + class HistogramBucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data statistics of a series of STRING values. + # @!attribute [rw] top_unigram_stats + # @return [::Array<::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats>] + # The statistics of the top 20 unigrams, ordered by + # {::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats#count count}. + class StringStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The statistics of a unigram. + # @!attribute [rw] value + # @return [::String] + # The unigram. + # @!attribute [rw] count + # @return [::Integer] + # The number of occurrences of this unigram in the series. + class UnigramStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data statistics of a series of TIMESTAMP values. + # @!attribute [rw] granular_stats + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats}] + # The string key is the pre-defined granularity. Currently supported: + # hour_of_day, day_of_week, month_of_year. + # Granularities finer that the granularity of timestamp data are not + # populated (e.g. if timestamps are at day granularity, then hour_of_day + # is not populated). + class TimestampStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stats split by a defined in context granularity. + # @!attribute [rw] buckets + # @return [::Google::Protobuf::Map{::Integer => ::Integer}] + # A map from granularity key to example count for that key. + # E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). + class GranularStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::Integer] + # @!attribute [rw] value + # @return [::Integer] + class BucketsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats] + class GranularStatsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data statistics of a series of ARRAY values. + # @!attribute [rw] member_stats + # @return [::Google::Cloud::AutoML::V1beta1::DataStats] + # Stats of all the values of all arrays, as if they were a single long + # series of data. The type depends on the element type of the array. + class ArrayStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data statistics of a series of STRUCT values. + # @!attribute [rw] field_stats + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataStats}] + # Map from a field name of the struct to data stats aggregated over series + # of all data in that field across all the structs. + class StructStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AutoML::V1beta1::DataStats] + class FieldStatsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data statistics of a series of CATEGORY values. + # @!attribute [rw] top_category_stats + # @return [::Array<::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats>] + # The statistics of the top 20 CATEGORY values, ordered by + # + # {::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats#count count}. + class CategoryStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The statistics of a single CATEGORY value. + # @!attribute [rw] value + # @return [::String] + # The CATEGORY value. + # @!attribute [rw] count + # @return [::Integer] + # The number of occurrences of this value in the series. + class SingleCategoryStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A correlation statistics between two series of DataType values. The series + # may have differing DataType-s, but within a single series the DataType must + # be the same. + # @!attribute [rw] cramers_v + # @return [::Float] + # The correlation value using the Cramer's V measure. + class CorrelationStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb new file mode 100644 index 000000000000..487ca044c5e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Indicated the type of data that can be stored in a structured data entity + # (e.g. a table). + # @!attribute [rw] list_element_type + # @return [::Google::Cloud::AutoML::V1beta1::DataType] + # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::ARRAY ARRAY}, + # then `list_element_type` is the type of the elements. + # + # Note: The following fields are mutually exclusive: `list_element_type`, `struct_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_type + # @return [::Google::Cloud::AutoML::V1beta1::StructType] + # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT}, then `struct_type` + # provides type information for the struct's fields. + # + # Note: The following fields are mutually exclusive: `struct_type`, `list_element_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_format + # @return [::String] + # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::TIMESTAMP TIMESTAMP} + # then `time_format` provides the format in which that time field is + # expressed. The time_format must either be one of: + # * `UNIX_SECONDS` + # * `UNIX_MILLISECONDS` + # * `UNIX_MICROSECONDS` + # * `UNIX_NANOSECONDS` + # (for respectively number of seconds, milliseconds, microseconds and + # nanoseconds since start of the Unix epoch); + # or be written in `strftime` syntax. If time_format is not set, then the + # default format as described on the type_code is used. + # + # Note: The following fields are mutually exclusive: `time_format`, `list_element_type`, `struct_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type_code + # @return [::Google::Cloud::AutoML::V1beta1::TypeCode] + # Required. The {::Google::Cloud::AutoML::V1beta1::TypeCode TypeCode} for this type. + # @!attribute [rw] nullable + # @return [::Boolean] + # If true, this DataType can also be `NULL`. In .CSV files `NULL` value is + # expressed as an empty string. + class DataType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StructType` defines the DataType-s of a {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT} type. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataType}] + # Unordered map of struct field names to their data types. + # Fields cannot be added or removed via Update. Their names and + # data types are still mutable. + class StructType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AutoML::V1beta1::DataType] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `TypeCode` is used as a part of + # {::Google::Cloud::AutoML::V1beta1::DataType DataType}. + module TypeCode + # Not specified. Should not be used. + TYPE_CODE_UNSPECIFIED = 0 + + # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or + # `"-Infinity"`. + FLOAT64 = 3 + + # Must be between 0AD and 9999AD. Encoded as `string` according to + # {::Google::Cloud::AutoML::V1beta1::DataType#time_format time_format}, or, if + # that format is not set, then in RFC 3339 `date-time` format, where + # `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). + TIMESTAMP = 4 + + # Encoded as `string`. + STRING = 6 + + # Encoded as `list`, where the list elements are represented according to + # + # {::Google::Cloud::AutoML::V1beta1::DataType#list_element_type list_element_type}. + ARRAY = 8 + + # Encoded as `struct`, where field values are represented according to + # {::Google::Cloud::AutoML::V1beta1::DataType#struct_type struct_type}. + STRUCT = 9 + + # Values of this type are not further understood by AutoML, + # e.g. AutoML is unable to tell the order of values (as it could with + # FLOAT64), or is unable to say if one value contains another (as it + # could with STRING). + # Encoded as `string` (bytes should be base64-encoded, as described in RFC + # 4648, section 4). + CATEGORY = 10 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb new file mode 100644 index 000000000000..66f98e62fd51 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A workspace for solving a single, particular machine learning (ML) problem. + # A workspace contains examples that may be annotated. + # @!attribute [rw] translation_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TranslationDatasetMetadata] + # Metadata for a dataset used for translation. + # + # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationDatasetMetadata] + # Metadata for a dataset used for image classification. + # + # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationDatasetMetadata] + # Metadata for a dataset used for text classification. + # + # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionDatasetMetadata] + # Metadata for a dataset used for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_classification_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationDatasetMetadata] + # Metadata for a dataset used for video classification. + # + # Note: The following fields are mutually exclusive: `video_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_object_tracking_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingDatasetMetadata] + # Metadata for a dataset used for video object tracking. + # + # Note: The following fields are mutually exclusive: `video_object_tracking_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionDatasetMetadata] + # Metadata for a dataset used for text extraction. + # + # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentDatasetMetadata] + # Metadata for a dataset used for text sentiment. + # + # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tables_dataset_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata] + # Metadata for a dataset used for Tables. + # + # Note: The following fields are mutually exclusive: `tables_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the dataset. + # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the dataset to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores + # (_), and ASCII digits 0-9. + # @!attribute [rw] description + # @return [::String] + # User-provided description of the dataset. The description can be up to + # 25000 characters long. + # @!attribute [rw] example_count + # @return [::Integer] + # Output only. The number of examples in the dataset. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this dataset was created. + # @!attribute [rw] etag + # @return [::String] + # Used to perform consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + class Dataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb new file mode 100644 index 000000000000..6f569cb06b5e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Annotation details for image object detection. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] + # Output only. The rectangle representing the object location. + # @!attribute [rw] score + # @return [::Float] + # Output only. The confidence that this annotation is positive for the parent example, + # value in [0, 1], higher means higher positivity confidence. + class ImageObjectDetectionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation details for video object tracking. + # @!attribute [rw] instance_id + # @return [::String] + # Optional. The instance of the object, expressed as a positive integer. Used to tell + # apart objects of the same type (i.e. AnnotationSpec) when multiple are + # present on a single example. + # NOTE: Instance ID prediction quality is not a part of model evaluation and + # is done as best effort. Especially in cases when an entity goes + # off-screen for a longer time (minutes), when it comes back it may be given + # a new instance ID. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Required. A time (frame) of a video to which this annotation pertains. + # Represented as the duration since the video's start. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] + # Required. The rectangle representing the object location on the frame (i.e. + # at the time_offset of the video). + # @!attribute [rw] score + # @return [::Float] + # Output only. The confidence that this annotation is positive for the video at + # the time_offset, value in [0, 1], higher means higher positivity + # confidence. For annotations created by the user the score is 1. When + # user approves an annotation, the original float score is kept (and not + # changed to 1). + class VideoObjectTrackingAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bounding box matching model metrics for a single intersection-over-union + # threshold and multiple label match confidence thresholds. + # @!attribute [rw] iou_threshold + # @return [::Float] + # Output only. The intersection-over-union threshold value used to compute + # this metrics entry. + # @!attribute [rw] mean_average_precision + # @return [::Float] + # Output only. The mean average precision, most often close to au_prc. + # @!attribute [rw] confidence_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] + # Output only. Metrics for each label-match confidence_threshold from + # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is + # derived from them. + class BoundingBoxMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. The confidence threshold value used to compute the metrics. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall under the given confidence threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision under the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Model evaluation metrics for image object detection problems. + # Evaluates prediction quality of labeled bounding boxes. + # @!attribute [rw] evaluated_bounding_box_count + # @return [::Integer] + # Output only. The total number of bounding boxes (i.e. summed over all + # images) the ground truth used to create this evaluation had. + # @!attribute [rw] bounding_box_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] + # Output only. The bounding boxes match metrics for each + # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # pair. + # @!attribute [rw] bounding_box_mean_average_precision + # @return [::Float] + # Output only. The single metric for bounding boxes evaluation: + # the mean_average_precision averaged over all bounding_box_metrics_entries. + class ImageObjectDetectionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for video object tracking problems. + # Evaluates prediction quality of both labeled bounding boxes and labeled + # tracks (i.e. series of bounding boxes sharing same label and instance ID). + # @!attribute [rw] evaluated_frame_count + # @return [::Integer] + # Output only. The number of video frames used to create this evaluation. + # @!attribute [rw] evaluated_bounding_box_count + # @return [::Integer] + # Output only. The total number of bounding boxes (i.e. summed over all + # frames) the ground truth used to create this evaluation had. + # @!attribute [rw] bounding_box_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] + # Output only. The bounding boxes match metrics for each + # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + # pair. + # @!attribute [rw] bounding_box_mean_average_precision + # @return [::Float] + # Output only. The single metric for bounding boxes evaluation: + # the mean_average_precision averaged over all bounding_box_metrics_entries. + class VideoObjectTrackingEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb new file mode 100644 index 000000000000..64cc3c7ae1f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A vertex represents a 2D point in the image. + # The normalized vertex coordinates are between 0 to 1 fractions relative to + # the original plane (image, video). E.g. if the plane (e.g. whole image) would + # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would + # be at the position (1, 6) on that plane. + # @!attribute [rw] x + # @return [::Float] + # Required. Horizontal coordinate. + # @!attribute [rw] y + # @return [::Float] + # Required. Vertical coordinate. + class NormalizedVertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A bounding polygon of a detected object on a plane. + # On output both vertices and normalized_vertices are provided. + # The polygon is formed by connecting vertices in the order they are listed. + # @!attribute [rw] normalized_vertices + # @return [::Array<::Google::Cloud::AutoML::V1beta1::NormalizedVertex>] + # Output only . The bounding polygon normalized vertices. + class BoundingPoly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb new file mode 100644 index 000000000000..e75d8c471c72 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Dataset metadata that is specific to image classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] + # Required. Type of the classification problem. + class ImageClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata specific to image object detection. + class ImageObjectDetectionDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata for image classification. + # @!attribute [rw] base_model_id + # @return [::String] + # Optional. The ID of the `base` model. If it is specified, the new model + # will be created based on the `base` model. Otherwise, the new model will be + # created from scratch. The `base` model must be in the same + # `project` and `location` as the new model to create, and have the same + # `model_type`. + # @!attribute [rw] train_budget + # @return [::Integer] + # Required. The train budget of creating this model, expressed in hours. The + # actual `train_cost` will be equal or less than this value. + # @!attribute [rw] train_cost + # @return [::Integer] + # Output only. The actual train cost of creating this model, expressed in + # hours. If this model is created from a `base` model, the train cost used + # to create the `base` model are not included. + # @!attribute [rw] stop_reason + # @return [::String] + # Output only. The reason that this create model operation stopped, + # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + # @!attribute [rw] model_type + # @return [::String] + # Optional. Type of the model. The available values are: + # * `cloud` - Model to be used via prediction calls to AutoML API. + # This is the default value. + # * `mobile-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have low latency, but + # may have lower prediction quality than other models. + # * `mobile-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. + # * `mobile-high-accuracy-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have a higher + # latency, but should also have a higher prediction quality + # than other models. + # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core + # ML afterwards. Expected to have low latency, but may have + # lower prediction quality than other models. + # * `mobile-core-ml-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core + # ML afterwards. + # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to + # providing prediction via AutoML API, can also be exported + # (see {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with + # Core ML afterwards. Expected to have a higher latency, but + # should also have a higher prediction quality than other + # models. + # @!attribute [rw] node_qps + # @return [::Float] + # Output only. An approximate number of online prediction QPS that can + # be supported by this model per each node on which it is deployed. + # @!attribute [rw] node_count + # @return [::Integer] + # Output only. The number of nodes this model is deployed on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the node_qps field. + class ImageClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata specific to image object detection. + # @!attribute [rw] model_type + # @return [::String] + # Optional. Type of the model. The available values are: + # * `cloud-high-accuracy-1` - (default) A model to be used via prediction + # calls to AutoML API. Expected to have a higher latency, but + # should also have a higher prediction quality than other + # models. + # * `cloud-low-latency-1` - A model to be used via prediction + # calls to AutoML API. Expected to have low latency, but may + # have lower prediction quality than other models. + # * `mobile-low-latency-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have low latency, but + # may have lower prediction quality than other models. + # * `mobile-versatile-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. + # * `mobile-high-accuracy-1` - A model that, in addition to providing + # prediction via AutoML API, can also be exported (see + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device + # with TensorFlow afterwards. Expected to have a higher + # latency, but should also have a higher prediction quality + # than other models. + # @!attribute [rw] node_count + # @return [::Integer] + # Output only. The number of nodes this model is deployed on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the qps_per_node field. + # @!attribute [rw] node_qps + # @return [::Float] + # Output only. An approximate number of online prediction QPS that can + # be supported by this model per each node on which it is deployed. + # @!attribute [rw] stop_reason + # @return [::String] + # Output only. The reason that this create model operation stopped, + # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + # @!attribute [rw] train_budget_milli_node_hours + # @return [::Integer] + # The train budget of creating this model, expressed in milli node + # hours i.e. 1,000 value in this field means 1 node hour. The actual + # `train_cost` will be equal or less than this value. If further model + # training ceases to provide any improvements, it will stop without using + # full budget and the stop_reason will be `MODEL_CONVERGED`. + # Note, node_hour = actual_hour * number_of_nodes_invovled. + # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, + # the train budget must be between 20,000 and 900,000 milli node hours, + # inclusive. The default value is 216, 000 which represents one day in + # wall time. + # For model type `mobile-low-latency-1`, `mobile-versatile-1`, + # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, + # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train + # budget must be between 1,000 and 100,000 milli node hours, inclusive. + # The default value is 24, 000 which represents one day in wall time. + # @!attribute [rw] train_cost_milli_node_hours + # @return [::Integer] + # Output only. The actual train cost of creating this model, expressed in + # milli node hours, i.e. 1,000 value in this field means 1 node hour. + # Guaranteed to not exceed the train budget. + class ImageObjectDetectionModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model deployment metadata specific to Image Classification. + # @!attribute [rw] node_count + # @return [::Integer] + # Input only. The number of nodes to deploy the model on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the model's + # + # {::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata#node_qps node_qps}. + # Must be between 1 and 100, inclusive on both ends. + class ImageClassificationModelDeploymentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model deployment metadata specific to Image Object Detection. + # @!attribute [rw] node_count + # @return [::Integer] + # Input only. The number of nodes to deploy the model on. A node is an + # abstraction of a machine resource, which can handle online prediction QPS + # as given in the model's + # + # [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node]. + # Must be between 1 and 100, inclusive on both ends. + class ImageObjectDetectionModelDeploymentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb new file mode 100644 index 000000000000..bb6c621d86fc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb @@ -0,0 +1,1214 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Input configuration for ImportData Action. + # + # The format of input depends on dataset_metadata the Dataset into which + # the import is happening has. As input source the + # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} + # is expected, unless specified otherwise. Additionally any input .CSV file + # by itself must be 100MB or smaller, unless specified otherwise. + # If an "example" file (that is, image, video etc.) with identical content + # (even if it had different GCS_FILE_PATH) is mentioned multiple times, then + # its label, bounding boxes etc. are appended. The same file should be always + # provided with the same ML_USE and GCS_FILE_PATH, if it is not, then + # these values are nondeterministically selected from the given ones. + # + # The formats are represented in EBNF with commas being literal and with + # non-terminal symbols defined near the end of this comment. The formats are: + # + # * For Image Classification: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... + # GCS_FILE_PATH leads to image of up to 30MB in size. Supported + # extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO + # For MULTICLASS classification type, at most one LABEL is allowed + # per image. If an image has not yet been labeled, then it should be + # mentioned just once with no LABEL. + # Some sample rows: + # TRAIN,gs://folder/image1.jpg,daisy + # TEST,gs://folder/image2.jpg,dandelion,tulip,rose + # UNASSIGNED,gs://folder/image3.jpg,daisy + # UNASSIGNED,gs://folder/image4.jpg + # + # * For Image Object Detection: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) + # GCS_FILE_PATH leads to image of up to 30MB in size. Supported + # extensions: .JPEG, .GIF, .PNG. + # Each image is assumed to be exhaustively labeled. The minimum + # allowed BOUNDING_BOX edge length is 0.01, and no more than 500 + # BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined + # per line). If an image has not yet been labeled, then it should be + # mentioned just once with no LABEL and the ",,,,,,," in place of the + # BOUNDING_BOX. For images which are known to not contain any + # bounding boxes, they should be labelled explictly as + # "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the + # BOUNDING_BOX. + # Sample rows: + # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, + # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, + # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 + # TEST,gs://folder/im3.png,,,,,,,,, + # TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, + # + # * For Video Classification: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH + # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH + # should lead to another .csv file which describes examples that have + # given ML_USE, using the following row format: + # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) + # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up + # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the + # length of the video, and end has to be after the start. Any segment + # of a video which has one or more labels on it, is considered a + # hard negative for all other labels. Any segment with no labels on + # it is considered to be unknown. If a whole video is unknown, then + # it shuold be mentioned just once with ",," in place of LABEL, + # TIME_SEGMENT_START,TIME_SEGMENT_END. + # Sample top level CSV file: + # TRAIN,gs://folder/train_videos.csv + # TEST,gs://folder/test_videos.csv + # UNASSIGNED,gs://folder/other_videos.csv + # Sample rows of a CSV file for a particular ML_USE: + # gs://folder/video1.avi,car,120,180.000021 + # gs://folder/video1.avi,bike,150,180.000021 + # gs://folder/vid2.avi,car,0,60.5 + # gs://folder/vid3.avi,,, + # + # * For Video Object Tracking: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH + # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH + # should lead to another .csv file which describes examples that have + # given ML_USE, using one of the following row format: + # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX + # or + # GCS_FILE_PATH,,,,,,,,,, + # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up + # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # Providing INSTANCE_IDs can help to obtain a better model. When + # a specific labeled entity leaves the video frame, and shows up + # afterwards it is not required, albeit preferable, that the same + # INSTANCE_ID is given to it. + # TIMESTAMP must be within the length of the video, the + # BOUNDING_BOX is assumed to be drawn on the closest video's frame + # to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected + # to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per + # frame are allowed. If a whole video is unknown, then it should be + # mentioned just once with ",,,,,,,,,," in place of LABEL, + # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX. + # Sample top level CSV file: + # TRAIN,gs://folder/train_videos.csv + # TEST,gs://folder/test_videos.csv + # UNASSIGNED,gs://folder/other_videos.csv + # Seven sample rows of a CSV file for a particular ML_USE: + # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 + # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 + # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 + # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, + # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, + # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, + # gs://folder/video2.avi,,,,,,,,,,, + # * For Text Extraction: + # CSV file(s) with each line in format: + # ML_USE,GCS_FILE_PATH + # GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which + # either imports text in-line or as documents. Any given + # .JSONL file must be 100MB or smaller. + # The in-line .JSONL file contains, per line, a proto that wraps a + # TextSnippet proto (in json representation) followed by one or more + # AnnotationPayload protos (called annotations), which have + # display_name and text_extraction detail populated. The given text + # is expected to be annotated exhaustively, for example, if you look + # for animals and text contains "dolphin" that is not labeled, then + # "dolphin" is assumed to not be an animal. Any given text snippet + # content must be 10KB or smaller, and also be UTF-8 NFC encoded + # (ASCII already is). + # The document .JSONL file contains, per line, a proto that wraps a + # Document proto. The Document proto must have either document_text + # or input_config set. In document_text case, the Document proto may + # also contain the spatial information of the document, including + # layout, document dimension and page number. In input_config case, + # only PDF documents are supported now, and each document may be up + # to 2MB large. Currently, annotations on documents cannot be + # specified at import. + # Three sample CSV rows: + # TRAIN,gs://folder/file1.jsonl + # VALIDATE,gs://folder/file2.jsonl + # TEST,gs://folder/file3.jsonl + # Sample in-line JSON Lines file for entity extraction (presented here + # with artificial line breaks, but the only actual line break is + # denoted by \n).: + # { + # "document": { + # "document_text": \\{"content": "dog cat"} + # "layout": [ + # { + # "text_segment": { + # "start_offset": 0, + # "end_offset": 3, + # }, + # "page_number": 1, + # "bounding_poly": { + # "normalized_vertices": [ + # \\{"x": 0.1, "y": 0.1}, + # \\{"x": 0.1, "y": 0.3}, + # \\{"x": 0.3, "y": 0.3}, + # \\{"x": 0.3, "y": 0.1}, + # ], + # }, + # "text_segment_type": TOKEN, + # }, + # { + # "text_segment": { + # "start_offset": 4, + # "end_offset": 7, + # }, + # "page_number": 1, + # "bounding_poly": { + # "normalized_vertices": [ + # \\{"x": 0.4, "y": 0.1}, + # \\{"x": 0.4, "y": 0.3}, + # \\{"x": 0.8, "y": 0.3}, + # \\{"x": 0.8, "y": 0.1}, + # ], + # }, + # "text_segment_type": TOKEN, + # } + # + # ], + # "document_dimensions": { + # "width": 8.27, + # "height": 11.69, + # "unit": INCH, + # } + # "page_count": 1, + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": {"text_segment": {"start_offset": 0, + # "end_offset": 3}} + # }, + # { + # "display_name": "animal", + # "text_extraction": {"text_segment": {"start_offset": 4, + # "end_offset": 7}} + # } + # ], + # }\n + # { + # "text_snippet": { + # "content": "This dog is good." + # }, + # "annotations": [ + # { + # "display_name": "animal", + # "text_extraction": { + # "text_segment": \\{"start_offset": 5, "end_offset": 8} + # } + # } + # ] + # } + # Sample document JSON Lines file (presented here with artificial line + # breaks, but the only actual line break is denoted by \n).: + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] + # } + # } + # } + # }\n + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] + # } + # } + # } + # } + # + # * For Text Classification: + # CSV file(s) with each line in format: + # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... + # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If + # the column content is a valid gcs file path, i.e. prefixed by + # "gs://", it will be treated as a GCS_FILE_PATH, else if the content + # is enclosed within double quotes (""), it is + # treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path + # must lead to a .txt file with UTF-8 encoding, for example, + # "gs://folder/content.txt", and the content in it is extracted + # as a text snippet. In TEXT_SNIPPET case, the column content + # excluding quotes is treated as to be imported text snippet. In + # both cases, the text snippet/file size must be within 128kB. + # Maximum 100 unique labels are allowed per CSV row. + # Sample rows: + # TRAIN,"They have bad food and very rude",RudeService,BadFood + # TRAIN,gs://folder/content.txt,SlowService + # TEST,"Typically always bad service there.",RudeService + # VALIDATE,"Stomach ache to go.",BadFood + # + # * For Text Sentiment: + # CSV file(s) with each line in format: + # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT + # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If + # the column content is a valid gcs file path, that is, prefixed by + # "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated + # as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path + # must lead to a .txt file with UTF-8 encoding, for example, + # "gs://folder/content.txt", and the content in it is extracted + # as a text snippet. In TEXT_SNIPPET case, the column content itself + # is treated as to be imported text snippet. In both cases, the + # text snippet must be up to 500 characters long. + # Sample rows: + # TRAIN,"@freewrytin this is way too good for your product",2 + # TRAIN,"I need this product so bad",3 + # TEST,"Thank you for this product.",4 + # VALIDATE,gs://folder/content.txt,2 + # + # * For Tables: + # Either + # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or + # + # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source} + # can be used. All inputs is concatenated into a single + # + # [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] + # For gcs_source: + # CSV file(s), where the first row of the first file is the header, + # containing unique column names. If the first row of a subsequent + # file is the same as the header, then it is also treated as a + # header. All other rows contain values for the corresponding + # columns. + # Each .CSV file by itself must be 10GB or smaller, and their total + # size must be 100GB or smaller. + # First three sample rows of a CSV file: + # "Id","First Name","Last Name","Dob","Addresses" + # + # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" + # + # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} + # For bigquery_source: + # An URI of a BigQuery table. The user data size of the BigQuery + # table must be 100GB or smaller. + # An imported table must have between 2 and 1,000 columns, inclusive, + # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 + # import data running in parallel. + # Definitions: + # ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" + # Describes how the given example (file) should be used for model + # training. "UNASSIGNED" can be used when user has no preference. + # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png". + # LABEL = A display name of an object on an image, video etc., e.g. "dog". + # Must be up to 32 characters long and can consist only of ASCII + # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. + # For each label an AnnotationSpec is created which display_name + # becomes the label; AnnotationSpecs are given back in predictions. + # INSTANCE_ID = A positive integer that identifies a specific instance of a + # labeled entity on an example. Used e.g. to track two cars on + # a video while being able to tell apart which one is which. + # BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,, + # A rectangle parallel to the frame of the example (image, + # video). If 4 vertices are given they are connected by edges + # in the order provided, if 2 are given they are recognized + # as diagonally opposite vertices of the rectangle. + # VERTEX = COORDINATE,COORDINATE + # First coordinate is horizontal (x), the second is vertical (y). + # COORDINATE = A float in 0 to 1 range, relative to total length of + # image or video in given dimension. For fractions the + # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). + # Point 0,0 is in top left. + # TIME_SEGMENT_START = TIME_OFFSET + # Expresses a beginning, inclusive, of a time segment + # within an example that has a time dimension + # (e.g. video). + # TIME_SEGMENT_END = TIME_OFFSET + # Expresses an end, exclusive, of a time segment within + # an example that has a time dimension (e.g. video). + # TIME_OFFSET = A number of seconds as measured from the start of an + # example (e.g. video). Fractions are allowed, up to a + # microsecond precision. "inf" is allowed, and it means the end + # of the example. + # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within + # double quotes (""). + # SENTIMENT = An integer between 0 and + # Dataset.text_sentiment_dataset_metadata.sentiment_max + # (inclusive). Describes the ordinal of the sentiment - higher + # value means a more positive sentiment. All the values are + # completely relative, i.e. neither 0 needs to mean a negative or + # neutral sentiment nor sentiment_max needs to mean a positive one + # - it is just required that 0 is the least positive sentiment + # in the data, and sentiment_max is the most positive one. + # The SENTIMENT shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + # All SENTIMENT values between 0 and sentiment_max must be + # represented in the imported data. On prediction the same 0 to + # sentiment_max range will be used. The difference between + # neighboring sentiment values needs not to be uniform, e.g. 1 and + # 2 may be similar whereas the difference between 2 and 3 may be + # huge. + # + # Errors: + # If any of the provided CSV files can't be parsed or if more than certain + # percent of CSV rows cannot be processed then the operation fails and + # nothing is imported. Regardless of overall success or failure the per-row + # failures, up to a certain count cap, is listed in + # Operation.metadata.partial_failures. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] + # The Google Cloud Storage location for the input content. + # In ImportData, the gcs_source points to a csv with structure described in + # the comment. + # + # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_source + # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] + # The BigQuery location for the input content. + # + # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters describing the semantic of the + # imported data, any string must be up to 25000 + # characters long. + # + # * For Tables: + # `schema_inference_version` - (integer) Required. The version of the + # algorithm that should be used for the initial inference of the + # schema (columns' DataTypes) of the table the data is being imported + # into. Allowed values: "1". + class InputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Input configuration for BatchPredict Action. + # + # The format of input depends on the ML problem of the model used for + # prediction. As input source the + # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} + # is expected, unless specified otherwise. + # + # The formats are represented in EBNF with commas being literal and with + # non-terminal symbols defined near the end of this comment. The formats + # are: + # + # * For Image Classification: + # CSV file(s) with each line having just a single column: + # GCS_FILE_PATH + # which leads to image of up to 30MB in size. Supported + # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in + # the Batch predict output. + # Three sample rows: + # gs://folder/image1.jpeg + # gs://folder/image2.gif + # gs://folder/image3.png + # + # * For Image Object Detection: + # CSV file(s) with each line having just a single column: + # GCS_FILE_PATH + # which leads to image of up to 30MB in size. Supported + # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in + # the Batch predict output. + # Three sample rows: + # gs://folder/image1.jpeg + # gs://folder/image2.gif + # gs://folder/image3.png + # * For Video Classification: + # CSV file(s) with each line in format: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END + # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h + # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the + # length of the video, and end has to be after the start. + # Three sample rows: + # gs://folder/video1.mp4,10,40 + # gs://folder/video1.mp4,20,60 + # gs://folder/vid2.mov,0,inf + # + # * For Video Object Tracking: + # CSV file(s) with each line in format: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END + # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h + # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. + # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the + # length of the video, and end has to be after the start. + # Three sample rows: + # gs://folder/video1.mp4,10,240 + # gs://folder/video1.mp4,300,360 + # gs://folder/vid2.mov,0,inf + # * For Text Classification: + # CSV file(s) with each line having just a single column: + # GCS_FILE_PATH | TEXT_SNIPPET + # Any given text file can have size upto 128kB. + # Any given text snippet content must have 60,000 characters or less. + # Three sample rows: + # gs://folder/text1.txt + # "Some text content to predict" + # gs://folder/text3.pdf + # Supported file extensions: .txt, .pdf + # + # * For Text Sentiment: + # CSV file(s) with each line having just a single column: + # GCS_FILE_PATH | TEXT_SNIPPET + # Any given text file can have size upto 128kB. + # Any given text snippet content must have 500 characters or less. + # Three sample rows: + # gs://folder/text1.txt + # "Some text content to predict" + # gs://folder/text3.pdf + # Supported file extensions: .txt, .pdf + # + # * For Text Extraction + # .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or + # as documents (for a single BatchPredict call only one of the these + # formats may be used). + # The in-line .JSONL file(s) contain per line a proto that + # wraps a temporary user-assigned TextSnippet ID (string up to 2000 + # characters long) called "id", a TextSnippet proto (in + # json representation) and zero or more TextFeature protos. Any given + # text snippet content must have 30,000 characters or less, and also + # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be + # unique. + # The document .JSONL file(s) contain, per line, a proto that wraps a + # Document proto with input_config set. Only PDF documents are + # supported now, and each document must be up to 2MB large. + # Any given .JSONL file must be 100MB or smaller, and no more than 20 + # files may be given. + # Sample in-line JSON Lines file (presented here with artificial line + # breaks, but the only actual line break is denoted by \n): + # { + # "id": "my_first_id", + # "text_snippet": { "content": "dog car cat"}, + # "text_features": [ + # { + # "text_segment": \\{"start_offset": 4, "end_offset": 6}, + # "structural_type": PARAGRAPH, + # "bounding_poly": { + # "normalized_vertices": [ + # \\{"x": 0.1, "y": 0.1}, + # \\{"x": 0.1, "y": 0.3}, + # \\{"x": 0.3, "y": 0.3}, + # \\{"x": 0.3, "y": 0.1}, + # ] + # }, + # } + # ], + # }\n + # { + # "id": "2", + # "text_snippet": { + # "content": "An elaborate content", + # "mime_type": "text/plain" + # } + # } + # Sample document JSON Lines file (presented here with artificial line + # breaks, but the only actual line break is denoted by \n).: + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] + # } + # } + # } + # }\n + # { + # "document": { + # "input_config": { + # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] + # } + # } + # } + # } + # + # * For Tables: + # Either + # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or + # + # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source}. + # GCS case: + # CSV file(s), each by itself 10GB or smaller and total size must be + # 100GB or smaller, where first file must have a header containing + # column names. If the first row of a subsequent file is the same as + # the header, then it is also treated as a header. All other rows + # contain values for the corresponding columns. + # The column names must contain the model's + # + # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} + # (order doesn't matter). The columns corresponding to the model's + # input feature column specs must contain values compatible with the + # column spec's data types. Prediction on all the rows, i.e. the CSV + # lines, will be attempted. For FORECASTING + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: + # all columns having + # + # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] + # type will be ignored. + # First three sample rows of a CSV file: + # "First Name","Last Name","Dob","Addresses" + # + # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" + # + # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} + # BigQuery case: + # An URI of a BigQuery table. The user data size of the BigQuery + # table must be 100GB or smaller. + # The column names must contain the model's + # + # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} + # (order doesn't matter). The columns corresponding to the model's + # input feature column specs must contain values compatible with the + # column spec's data types. Prediction on all the rows of the table + # will be attempted. For FORECASTING + # + # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: + # all columns having + # + # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] + # type will be ignored. + # + # Definitions: + # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". + # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within + # double quotes ("") + # TIME_SEGMENT_START = TIME_OFFSET + # Expresses a beginning, inclusive, of a time segment + # within an + # example that has a time dimension (e.g. video). + # TIME_SEGMENT_END = TIME_OFFSET + # Expresses an end, exclusive, of a time segment within + # an example that has a time dimension (e.g. video). + # TIME_OFFSET = A number of seconds as measured from the start of an + # example (e.g. video). Fractions are allowed, up to a + # microsecond precision. "inf" is allowed and it means the end + # of the example. + # + # Errors: + # If any of the provided CSV files can't be parsed or if more than certain + # percent of CSV rows cannot be processed then the operation fails and + # prediction does not happen. Regardless of overall success or failure the + # per-row failures, up to a certain count cap, will be listed in + # Operation.metadata.partial_failures. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] + # The Google Cloud Storage location for the input content. + # + # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_source + # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] + # The BigQuery location for the input content. + # + # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BatchPredictInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input configuration of a {::Google::Cloud::AutoML::V1beta1::Document Document}. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] + # The Google Cloud Storage location of the document file. Only a single path + # should be given. + # Max supported size: 512MB. + # Supported extensions: .PDF. + class DocumentInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # * For Translation: + # CSV file `translation.csv`, with each line in format: + # ML_USE,GCS_FILE_PATH + # GCS_FILE_PATH leads to a .TSV file which describes examples that have + # given ML_USE, using the following row format per line: + # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target + # language) + # + # * For Tables: + # Output depends on whether the dataset was imported from GCS or + # BigQuery. + # GCS case: + # + # {::Google::Cloud::AutoML::V1beta1::OutputConfig#gcs_destination gcs_destination} + # must be set. Exported are CSV file(s) `tables_1.csv`, + # `tables_2.csv`,...,`tables_N.csv` with each having as header line + # the table's column names, and all other lines contain values for + # the header columns. + # BigQuery case: + # + # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # + # `export_data__` + # where will be made + # BigQuery-dataset-name compatible (e.g. most special characters will + # become underscores), and timestamp will be in + # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that + # dataset a new table called `primary_table` will be created, and + # filled with precisely the same data as this obtained on import. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] + # The Google Cloud Storage location where the output is to be written to. + # For Image Object Detection, Text Extraction, Video Classification and + # Tables, in the given directory a new directory will be created with name: + # export_data-- where + # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export + # output will be written into that directory. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] + # The BigQuery location where the output is to be written to. + # + # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class OutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for BatchPredict Action. + # + # As destination the + # + # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} + # must be set unless specified otherwise for a domain. If gcs_destination is + # set then in the given directory a new directory is created. Its name + # will be + # "prediction--", + # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents + # of it depends on the ML problem the predictions are made for. + # + # * For Image Classification: + # In the created directory files `image_classification_1.jsonl`, + # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of the successfully predicted images and annotations. + # A single image will be listed only once with all its annotations, + # and its annotations will never be split across files. + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps image's "ID" : "" followed by a list of + # zero or more AnnotationPayload protos (called annotations), which + # have classification detail populated. + # If prediction for any image failed (partially or completely), then an + # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` + # files will be created (N depends on total number of failed + # predictions). These files will have a JSON representation of a proto + # that wraps the same "ID" : "" but here followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`fields. + # + # * For Image Object Detection: + # In the created directory files `image_object_detection_1.jsonl`, + # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of the successfully predicted images and annotations. + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps image's "ID" : "" followed by a list of + # zero or more AnnotationPayload protos (called annotations), which + # have image_object_detection detail populated. A single image will + # be listed only once with all its annotations, and its annotations + # will never be split across files. + # If prediction for any image failed (partially or completely), then + # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` + # files will be created (N depends on total number of failed + # predictions). These files will have a JSON representation of a proto + # that wraps the same "ID" : "" but here followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`fields. + # * For Video Classification: + # In the created directory a video_classification.csv file, and a .JSON + # file per each video classification requested in the input (i.e. each + # line in given CSV(s)), will be created. + # + # The format of video_classification.csv is: + # + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS + # where: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 + # the prediction input lines (i.e. video_classification.csv has + # precisely the same number of lines as the prediction input had.) + # JSON_FILE_NAME = Name of .JSON file in the output directory, which + # contains prediction responses for the video time segment. + # STATUS = "OK" if prediction completed successfully, or an error code + # with message otherwise. If STATUS is not "OK" then the .JSON file + # for that line may not exist or be empty. + # + # Each .JSON file, assuming STATUS is "OK", will contain a list of + # AnnotationPayload protos in JSON format, which are the predictions + # for the video time segment the file is assigned to in the + # video_classification.csv. All AnnotationPayload protos will have + # video_classification field set, and will be sorted by + # video_classification.type field (note that the returned types are + # governed by `classifaction_types` parameter in + # [PredictService.BatchPredictRequest.params][]). + # + # * For Video Object Tracking: + # In the created directory a video_object_tracking.csv file will be + # created, and multiple files video_object_trackinng_1.json, + # video_object_trackinng_2.json,..., video_object_trackinng_N.json, + # where N is the number of requests in the input (i.e. the number of + # lines in given CSV(s)). + # + # The format of video_object_tracking.csv is: + # + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS + # where: + # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 + # the prediction input lines (i.e. video_object_tracking.csv has + # precisely the same number of lines as the prediction input had.) + # JSON_FILE_NAME = Name of .JSON file in the output directory, which + # contains prediction responses for the video time segment. + # STATUS = "OK" if prediction completed successfully, or an error + # code with message otherwise. If STATUS is not "OK" then the .JSON + # file for that line may not exist or be empty. + # + # Each .JSON file, assuming STATUS is "OK", will contain a list of + # AnnotationPayload protos in JSON format, which are the predictions + # for each frame of the video time segment the file is assigned to in + # video_object_tracking.csv. All AnnotationPayload protos will have + # video_object_tracking field set. + # * For Text Classification: + # In the created directory files `text_classification_1.jsonl`, + # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps input text snippet or input text file and a list of + # zero or more AnnotationPayload protos (called annotations), which + # have classification detail populated. A single text snippet or file + # will be listed only once with all its annotations, and its + # annotations will never be split across files. + # + # If prediction for any text snippet or file failed (partially or + # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps input text snippet or input text file followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Text Sentiment: + # In the created directory files `text_sentiment_1.jsonl`, + # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # + # Each .JSONL file will contain, per line, a JSON representation of a + # proto that wraps input text snippet or input text file and a list of + # zero or more AnnotationPayload protos (called annotations), which + # have text_sentiment detail populated. A single text snippet or file + # will be listed only once with all its annotations, and its + # annotations will never be split across files. + # + # If prediction for any text snippet or file failed (partially or + # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps input text snippet or input text file followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Text Extraction: + # In the created directory files `text_extraction_1.jsonl`, + # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` + # will be created, where N may be 1, and depends on the + # total number of inputs and annotations found. + # The contents of these .JSONL file(s) depend on whether the input + # used inline text, or documents. + # If input was inline, then each .JSONL file will contain, per line, + # a JSON representation of a proto that wraps given in request text + # snippet's "id" (if specified), followed by input text snippet, + # and a list of zero or more + # AnnotationPayload protos (called annotations), which have + # text_extraction detail populated. A single text snippet will be + # listed only once with all its annotations, and its annotations will + # never be split across files. + # If input used documents, then each .JSONL file will contain, per + # line, a JSON representation of a proto that wraps given in request + # document proto, followed by its OCR-ed representation in the form + # of a text snippet, finally followed by a list of zero or more + # AnnotationPayload protos (called annotations), which have + # text_extraction detail populated and refer, via their indices, to + # the OCR-ed text snippet. A single document (and its text snippet) + # will be listed only once with all its annotations, and its + # annotations will never be split across files. + # If prediction for any text snippet failed (partially or completely), + # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., + # `errors_N.jsonl` files will be created (N depends on total number of + # failed predictions). These files will have a JSON representation of a + # proto that wraps either the "id" : "" (in case of inline) + # or the document proto (in case of document) but here followed by + # exactly one + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # containing only `code` and `message`. + # + # * For Tables: + # Output depends on whether + # + # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} + # or + # + # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#bigquery_destination bigquery_destination} + # is set (either is allowed). + # GCS case: + # In the created directory files `tables_1.csv`, `tables_2.csv`,..., + # `tables_N.csv` will be created, where N may be 1, and depends on + # the total number of the successfully predicted rows. + # For all CLASSIFICATION + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: + # Each .csv file will contain a header, listing all columns' + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} + # given on input followed by M target column names in the format of + # + # "<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>__score" where M is the number of distinct target values, + # i.e. number of distinct values in the target column of the table + # used to train the model. Subsequent lines will contain the + # respective values of successfully predicted rows, with the last, + # i.e. the target, columns having the corresponding prediction + # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation#score scores}. + # For REGRESSION and FORECASTING + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: + # Each .csv file will contain a header, listing all columns' + # [display_name-s][google.cloud.automl.v1beta1.display_name] given + # on input followed by the predicted target column with name in the + # format of + # + # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" + # Subsequent lines will contain the respective values of + # successfully predicted rows, with the last, i.e. the target, + # column having the predicted target value. + # If prediction for any rows failed, then an additional + # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be + # created (N depends on total number of failed rows). These files + # will have analogous format as `tables_*.csv`, but always with a + # single target column having + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # represented as a JSON string, and containing only `code` and + # `message`. + # BigQuery case: + # + # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # `prediction__` + # where will be made + # BigQuery-dataset-name compatible (e.g. most special characters will + # become underscores), and timestamp will be in + # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset + # two tables will be created, `predictions`, and `errors`. + # The `predictions` table's column names will be the input columns' + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} + # followed by the target column with name in the format of + # + # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" + # The input feature columns will contain the respective values of + # successfully predicted rows, with the target column having an + # ARRAY of + # + # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, + # represented as STRUCT-s, containing + # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. + # The `errors` table contains rows for which the prediction has + # failed, it has analogous input columns while the target column name + # is in the format of + # + # "errors_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} + # + # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>", + # and as a value has + # + # [`google.rpc.Status`](https: + # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) + # represented as a STRUCT, and containing only `code` and `message`. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] + # The Google Cloud Storage location of the directory where the output is to + # be written to. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] + # The BigQuery location where the output is to be written to. + # + # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BatchPredictOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for ModelExport Action. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] + # The Google Cloud Storage location where the model is to be written to. + # This location may only be set for the following model formats: + # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". + # + # Under the directory given as the destination a new one with name + # "model-export--", + # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, + # will be created. Inside the model and any of its supporting files + # will be written. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `gcr_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcr_destination + # @return [::Google::Cloud::AutoML::V1beta1::GcrDestination] + # The GCR location where model image is to be pushed to. This location + # may only be set for the following model formats: + # "docker". + # + # The model image will be created under the given URI. + # + # Note: The following fields are mutually exclusive: `gcr_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] model_format + # @return [::String] + # The format in which the model must be exported. The available, and default, + # formats depend on the problem and model type (if given problem and type + # combination doesn't have a format listed, it means its models are not + # exportable): + # + # * For Image Classification mobile-low-latency-1, mobile-versatile-1, + # mobile-high-accuracy-1: + # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", + # "docker". + # + # * For Image Classification mobile-core-ml-low-latency-1, + # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: + # "core_ml" (default). + # + # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, + # mobile-high-accuracy-1: + # "tflite", "tf_saved_model", "tf_js". + # + # * For Video Classification cloud, + # "tf_saved_model". + # + # * For Video Object Tracking cloud, + # "tf_saved_model". + # + # * For Video Object Tracking mobile-versatile-1: + # "tflite", "edgetpu_tflite", "tf_saved_model", "docker". + # + # * For Video Object Tracking mobile-coral-versatile-1: + # "tflite", "edgetpu_tflite", "docker". + # + # * For Video Object Tracking mobile-coral-low-latency-1: + # "tflite", "edgetpu_tflite", "docker". + # + # * For Video Object Tracking mobile-jetson-versatile-1: + # "tf_saved_model", "docker". + # + # * For Tables: + # "docker". + # + # Formats description: + # + # * tflite - Used for Android mobile devices. + # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) + # devices. + # * tf_saved_model - A tensorflow model in SavedModel format. + # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can + # be used in the browser and in Node.js using JavaScript. + # * docker - Used for Docker containers. Use the params field to customize + # the container. The container is verified to work correctly on + # ubuntu 16.04 operating system. See more at + # [containers + # + # quickstart](https: + # //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) + # * core_ml - Used for iOS mobile devices. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional model-type and format specific parameters describing the + # requirements for the to be exported model files, any string must be up to + # 25000 characters long. + # + # * For `docker` format: + # `cpu_architecture` - (string) "x86_64" (default). + # `gpu_architecture` - (string) "none" (default), "nvidia". + class ModelExportOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Output configuration for ExportEvaluatedExamples Action. Note that this call + # is available only for 30 days since the moment the model was evaluated. + # The output depends on the domain, as follows (note that only examples from + # the TEST set are exported): + # + # * For Tables: + # + # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} + # pointing to a BigQuery project must be set. In the given project a + # new dataset will be created with name + # + # `export_evaluated_examples__` + # where will be made BigQuery-dataset-name + # compatible (e.g. most special characters will become underscores), + # and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" + # format. In the dataset an `evaluated_examples` table will be + # created. It will have all the same columns as the + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id primary_table} + # of the + # {::Google::Cloud::AutoML::V1beta1::Model#dataset_id dataset} from which + # the model was created, as they were at the moment of model's + # evaluation (this includes the target column with its ground + # truth), followed by a column called "predicted_". That + # last column will contain the model's prediction result for each + # respective row, given as ARRAY of + # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, + # represented as STRUCT-s, containing + # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] + # The BigQuery location where the output is to be written to. + class ExportEvaluatedExamplesOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location for the input content. + # @!attribute [rw] input_uris + # @return [::Array<::String>] + # Required. Google Cloud Storage URIs to input files, up to 2000 characters + # long. Accepted forms: + # * Full object path, e.g. gs://bucket/directory/object.csv + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The BigQuery location for the input content. + # @!attribute [rw] input_uri + # @return [::String] + # Required. BigQuery URI to a table, up to 2000 characters long. + # Accepted forms: + # * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId + class BigQuerySource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location where the output is to be written to. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # Required. Google Cloud Storage URI to output directory, up to 2000 + # characters long. + # Accepted forms: + # * Prefix path: gs://bucket/directory + # The requesting user must have write permission to the bucket. + # The directory is created if it doesn't exist. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The BigQuery location for the output content. + # @!attribute [rw] output_uri + # @return [::String] + # Required. BigQuery URI to a project, up to 2000 characters long. + # Accepted forms: + # * BigQuery path e.g. bq://projectId + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The GCR location where the image must be pushed to. + # @!attribute [rw] output_uri + # @return [::String] + # Required. Google Contained Registry URI of the new image, up to 2000 + # characters long. See + # + # https: + # //cloud.google.com/container-registry/do + # // cs/pushing-and-pulling#pushing_an_image_to_a_registry + # Accepted forms: + # * [HOSTNAME]/[PROJECT-ID]/[IMAGE] + # * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] + # + # The requesting user must have permission to push images the project. + class GcrDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb new file mode 100644 index 000000000000..6e167f65d37b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # API proto representing a trained machine learning model. + # @!attribute [rw] translation_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TranslationModelMetadata] + # Metadata for translation models. + # + # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata] + # Metadata for image classification models. + # + # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationModelMetadata] + # Metadata for text classification models. + # + # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelMetadata] + # Metadata for image object detection models. + # + # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_classification_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationModelMetadata] + # Metadata for video classification models. + # + # Note: The following fields are mutually exclusive: `video_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_object_tracking_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingModelMetadata] + # Metadata for video object tracking models. + # + # Note: The following fields are mutually exclusive: `video_object_tracking_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionModelMetadata] + # Metadata for text extraction models. + # + # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tables_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TablesModelMetadata] + # Metadata for Tables models. + # + # Note: The following fields are mutually exclusive: `tables_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_model_metadata + # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentModelMetadata] + # Metadata for text sentiment models. + # + # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the model. + # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the model to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores + # (_), and ASCII digits 0-9. It must start with a letter. + # @!attribute [rw] dataset_id + # @return [::String] + # Required. The resource ID of the dataset used to create the model. The dataset must + # come from the same ancestor project and location. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the model training finished and can be used for prediction. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model was last updated. + # @!attribute [rw] deployment_state + # @return [::Google::Cloud::AutoML::V1beta1::Model::DeploymentState] + # Output only. Deployment state of the model. A model can only serve + # prediction requests after it gets deployed. + class Model + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Deployment state of the model. + module DeploymentState + # Should not be used, an un-set enum has this value by default. + DEPLOYMENT_STATE_UNSPECIFIED = 0 + + # Model is deployed. + DEPLOYED = 1 + + # Model is not deployed. + UNDEPLOYED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb new file mode 100644 index 000000000000..86132556d0f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb @@ -0,0 +1,117 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Evaluation results of a model. + # @!attribute [rw] classification_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics] + # Model evaluation metrics for image, text, video and tables + # classification. + # Tables problem is considered a classification when the target column + # is CATEGORY DataType. + # + # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regression_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::RegressionEvaluationMetrics] + # Model evaluation metrics for Tables regression. + # Tables problem is considered a regression when the target column + # has FLOAT64 DataType. + # + # Note: The following fields are mutually exclusive: `regression_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::TranslationEvaluationMetrics] + # Model evaluation metrics for translation. + # + # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_object_detection_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionEvaluationMetrics] + # Model evaluation metrics for image object detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] video_object_tracking_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingEvaluationMetrics] + # Model evaluation metrics for video object tracking. + # + # Note: The following fields are mutually exclusive: `video_object_tracking_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_sentiment_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentEvaluationMetrics] + # Evaluation metrics for text sentiment models. + # + # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_extraction_evaluation_metrics + # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics] + # Evaluation metrics for text extraction models. + # + # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Output only. Resource name of the model evaluation. + # Format: + # + # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` + # @!attribute [rw] annotation_spec_id + # @return [::String] + # Output only. The ID of the annotation spec that the model evaluation applies to. The + # The ID is empty for the overall model evaluation. + # For Tables annotation specs in the dataset do not exist and this ID is + # always not set, but for CLASSIFICATION + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + # the + # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#display_name display_name} + # field is used. + # @!attribute [rw] display_name + # @return [::String] + # Output only. The value of + # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} at + # the moment when the model was trained. Because this field returns a value + # at model training time, for different models trained from the same dataset, + # the values may differ, since display names could had been changed between + # the two model's trainings. + # For Tables CLASSIFICATION + # + # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + # distinct values of the target column at the moment of the model evaluation + # are populated here. + # The display_name is empty for the overall model evaluation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model evaluation was created. + # @!attribute [rw] evaluated_example_count + # @return [::Integer] + # Output only. The number of examples used for model evaluation, i.e. for + # which ground truth from time of model creation is compared against the + # predicted annotations created by the model. + # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is + # the total number of all examples used for evaluation. + # Otherwise, this is the count of examples that according to the ground + # truth were annotated by the + # + # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#annotation_spec_id annotation_spec_id}. + class ModelEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb new file mode 100644 index 000000000000..6920b67fbe65 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb @@ -0,0 +1,232 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Metadata used across all long running operations returned by AutoML API. + # @!attribute [rw] delete_details + # @return [::Google::Cloud::AutoML::V1beta1::DeleteOperationMetadata] + # Details of a Delete operation. + # + # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deploy_model_details + # @return [::Google::Cloud::AutoML::V1beta1::DeployModelOperationMetadata] + # Details of a DeployModel operation. + # + # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] undeploy_model_details + # @return [::Google::Cloud::AutoML::V1beta1::UndeployModelOperationMetadata] + # Details of an UndeployModel operation. + # + # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_model_details + # @return [::Google::Cloud::AutoML::V1beta1::CreateModelOperationMetadata] + # Details of CreateModel operation. + # + # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] import_data_details + # @return [::Google::Cloud::AutoML::V1beta1::ImportDataOperationMetadata] + # Details of ImportData operation. + # + # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] batch_predict_details + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata] + # Details of BatchPredict operation. + # + # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_data_details + # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata] + # Details of ExportData operation. + # + # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_model_details + # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata] + # Details of ExportModel operation. + # + # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_evaluated_examples_details + # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata] + # Details of ExportEvaluatedExamples operation. + # + # Note: The following fields are mutually exclusive: `export_evaluated_examples_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Output only. Progress of operation. Range: [0, 100]. + # Not used currently. + # @!attribute [rw] partial_failures + # @return [::Array<::Google::Rpc::Status>] + # Output only. Partial failures encountered. + # E.g. single files that couldn't be read. + # This field should never exceed 20 entries. + # Status details field will contain standard GCP error details. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was updated for the last time. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of operations that perform deletes of any entities. + class DeleteOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of DeployModel operation. + class DeployModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of UndeployModel operation. + class UndeployModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of CreateModel operation. + class CreateModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of ImportData operation. + class ImportDataOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of ExportData operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata::ExportDataOutputInfo] + # Output only. Information further describing this export data's output. + class ExportDataOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes this export data's output. + # Supplements + # {::Google::Cloud::AutoML::V1beta1::OutputConfig OutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the exported data is written. + # + # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_output_dataset + # @return [::String] + # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + # format, into which the exported data is written. + # + # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExportDataOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of BatchPredict operation. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] + # Output only. The input config that was given upon starting this + # batch predict operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata::BatchPredictOutputInfo] + # Output only. Information further describing this batch predict's output. + class BatchPredictOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes this batch predict's output. + # Supplements + # + # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig BatchPredictOutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the prediction output is written. + # + # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_output_dataset + # @return [::String] + # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + # format, into which the prediction output is written. + # + # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BatchPredictOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of ExportModel operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata::ExportModelOutputInfo] + # Output only. Information further describing the output of this model + # export. + class ExportModelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes the output of model export. + # Supplements + # + # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. + # @!attribute [rw] gcs_output_directory + # @return [::String] + # The full path of the Google Cloud Storage directory created, into which + # the model will be exported. + class ExportModelOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details of EvaluatedExamples operation. + # @!attribute [rw] output_info + # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo] + # Output only. Information further describing the output of this evaluated + # examples export. + class ExportEvaluatedExamplesOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Further describes the output of the evaluated examples export. + # Supplements + # + # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig ExportEvaluatedExamplesOutputConfig}. + # @!attribute [rw] bigquery_output_dataset + # @return [::String] + # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + # format, into which the output of export evaluated examples is written. + class ExportEvaluatedExamplesOutputInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb new file mode 100644 index 000000000000..87c78db799ad --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb @@ -0,0 +1,238 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the model requested to serve the prediction. + # @!attribute [rw] payload + # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] + # Required. Payload to perform a prediction on. The payload must match the + # problem type that the model was trained to solve. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific parameters, any string must be up to 25000 + # characters long. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that have + # at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned in the response. Default is 100, the + # requested value may be limited by server. + # * For Tables: + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotation. + # The default is false. + class PredictRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. + # @!attribute [rw] payload + # @return [::Array<::Google::Cloud::AutoML::V1beta1::AnnotationPayload>] + # Prediction result. + # Translation and Text Sentiment will return precisely one payload. + # @!attribute [rw] preprocessed_input + # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] + # The preprocessed example that AutoML actually makes prediction on. + # Empty if AutoML does not preprocess the input example. + # * For Text Extraction: + # If the input is a .pdf file, the OCR'ed text will be provided in + # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific prediction response metadata. + # + # * For Image Object Detection: + # `max_bounding_box_count` - (int64) At most that many bounding boxes per + # image could have been returned. + # + # * For Text Sentiment: + # `sentiment_score` - (float, deprecated) A value between -1 and 1, + # -1 maps to least positive sentiment, while 1 maps to the most positive + # one and the higher the score, the more positive the sentiment in the + # document is. Yet these values are relative to the training data, so + # e.g. if all data was positive then -1 will be also positive (though + # the least). + # The sentiment_score shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + class PredictResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the model requested to serve the batch prediction. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] + # Required. The input configuration for batch prediction. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig] + # Required. The Configuration specifying where output predictions should + # be written. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::String}] + # Required. Additional domain-specific parameters for the predictions, any string must + # be up to 25000 characters long. + # + # * For Text Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a text snippet, it will only produce results + # that have at least this confidence score. The default is 0.5. + # + # * For Image Classification: + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for an image, it will only produce results that + # have at least this confidence score. The default is 0.5. + # + # * For Image Object Detection: + # + # `score_threshold` - (float) When Model detects objects on the image, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be produced per image. Default is 100, the + # requested value may be limited by server. + # + # * For Video Classification : + # + # `score_threshold` - (float) A value from 0.0 to 1.0. When the model + # makes predictions for a video, it will only produce results that + # have at least this confidence score. The default is 0.5. + # `segment_classification` - (boolean) Set to true to request + # segment-level classification. AutoML Video Intelligence returns + # labels and their confidence scores for the entire segment of the + # video that user specified in the request configuration. + # The default is "true". + # `shot_classification` - (boolean) Set to true to request shot-level + # classification. AutoML Video Intelligence determines the boundaries + # for each camera shot in the entire segment of the video that user + # specified in the request configuration. AutoML Video Intelligence + # then returns labels and their confidence scores for each detected + # shot, along with the start and end time of the shot. + # WARNING: Model evaluation is not done for this classification type, + # the quality of it depends on training data, but there are no metrics + # provided to describe that quality. The default is "false". + # `1s_interval_classification` - (boolean) Set to true to request + # classification for a video at one-second intervals. AutoML Video + # Intelligence returns labels and their confidence scores for each + # second of the entire segment of the video that user specified in the + # request configuration. + # WARNING: Model evaluation is not done for this classification + # type, the quality of it depends on training data, but there are no + # metrics provided to describe that quality. The default is + # "false". + # + # * For Tables: + # + # feature_importance - (boolean) Whether feature importance + # should be populated in the returned TablesAnnotations. The + # default is false. + # + # * For Video Object Tracking: + # + # `score_threshold` - (float) When Model detects objects on video frames, + # it will only produce bounding boxes which have at least this + # confidence score. Value in 0 to 1 range, default is 0.5. + # `max_bounding_box_count` - (int64) No more than this number of bounding + # boxes will be returned per frame. Default is 100, the requested + # value may be limited by server. + # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge + # at least that long as a relative value of video frame size will be + # returned. Value in 0 to 1 range. Default is 0. + class BatchPredictRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of the Batch Predict. This message is returned in + # {::Google::Longrunning::Operation#response response} of the operation returned + # by the {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional domain-specific prediction response metadata. + # + # * For Image Object Detection: + # `max_bounding_box_count` - (int64) At most that many bounding boxes per + # image could have been returned. + # + # * For Video Object Tracking: + # `max_bounding_box_count` - (int64) At most that many bounding boxes per + # frame could have been returned. + class BatchPredictResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb new file mode 100644 index 000000000000..7fc488386a6c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A range between two double numbers. + # @!attribute [rw] start + # @return [::Float] + # Start of the range, inclusive. + # @!attribute [rw] end + # @return [::Float] + # End of the range, exclusive. + class DoubleRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb new file mode 100644 index 000000000000..147832f1fabb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Metrics for regression problems. + # @!attribute [rw] root_mean_squared_error + # @return [::Float] + # Output only. Root Mean Squared Error (RMSE). + # @!attribute [rw] mean_absolute_error + # @return [::Float] + # Output only. Mean Absolute Error (MAE). + # @!attribute [rw] mean_absolute_percentage_error + # @return [::Float] + # Output only. Mean absolute percentage error. Only set if all ground truth + # values are are positive. + # @!attribute [rw] r_squared + # @return [::Float] + # Output only. R squared. + # @!attribute [rw] root_mean_squared_log_error + # @return [::Float] + # Output only. Root mean squared log error. + class RegressionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb new file mode 100644 index 000000000000..1c76959322fb --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb @@ -0,0 +1,452 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset AutoMl.CreateDataset}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project to create the dataset for. + # @!attribute [rw] dataset + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # Required. The dataset to create. + class CreateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset AutoMl.GetDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to retrieve. + class GetDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project from which to list datasets. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `dataset_metadata` - for existence of the case (e.g. + # `image_classification_dataset_metadata:*`). Some examples of + # using the filter are: + # + # * `translation_dataset_metadata:*` --> The dataset has + # `translation_dataset_metadata`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer results than requested. + # If unspecified, server will pick a default size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. + class ListDatasetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::AutoML::V1beta1::Dataset>] + # The datasets read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. + class ListDatasetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset AutoMl.UpdateDataset} + # @!attribute [rw] dataset + # @return [::Google::Cloud::AutoML::V1beta1::Dataset] + # Required. The dataset which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. + class UpdateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to delete. + class DeleteDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData}. + # @!attribute [rw] name + # @return [::String] + # Required. Dataset name. Dataset must already exist. All imported + # annotations and examples will be added. + # @!attribute [rw] input_config + # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] + # Required. The desired input location and its domain specific semantics, + # if any. + class ImportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data AutoMl.ExportData}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1beta1::OutputConfig] + # Required. The desired output location. + class ExportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the annotation spec to retrieve. + class GetAnnotationSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec AutoMl.GetTableSpec}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the table spec to retrieve. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Mask specifying which fields to read. + class GetTableSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the dataset to list table specs from. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Mask specifying which fields to read. + # @!attribute [rw] filter + # @return [::String] + # Filter expression, see go/filtering. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. + class ListTableSpecsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. + # @!attribute [rw] table_specs + # @return [::Array<::Google::Cloud::AutoML::V1beta1::TableSpec>] + # The table specs read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest#page_token ListTableSpecsRequest.page_token} to obtain that page. + class ListTableSpecsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec AutoMl.UpdateTableSpec} + # @!attribute [rw] table_spec + # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] + # Required. The table spec which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. + class UpdateTableSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec AutoMl.GetColumnSpec}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the column spec to retrieve. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Mask specifying which fields to read. + class GetColumnSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the table spec to list column specs from. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Mask specifying which fields to read. + # @!attribute [rw] filter + # @return [::String] + # Filter expression, see go/filtering. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server can return fewer results than requested. + # If unspecified, the server will pick a default size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return. + # Typically obtained from the + # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. + class ListColumnSpecsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. + # @!attribute [rw] column_specs + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # The column specs read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest#page_token ListColumnSpecsRequest.page_token} to obtain that page. + class ListColumnSpecsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec AutoMl.UpdateColumnSpec} + # @!attribute [rw] column_spec + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # Required. The column spec which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. + class UpdateColumnSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model AutoMl.CreateModel}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent project where the model is being created. + # @!attribute [rw] model + # @return [::Google::Cloud::AutoML::V1beta1::Model] + # Required. The model to create. + class CreateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model AutoMl.GetModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model. + class GetModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project, from which to list the models. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `model_metadata` - for existence of the case (e.g. + # `video_classification_model_metadata:*`). + # * `dataset_id` - for = or !=. Some examples of using the filter are: + # + # * `image_classification_model_metadata:*` --> The model has + # `image_classification_model_metadata`. + # * `dataset_id=5` --> The model was created from a dataset with ID 5. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. + class ListModelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. + # @!attribute [rw] model + # @return [::Array<::Google::Cloud::AutoML::V1beta1::Model>] + # List of models in the requested page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to {::Google::Cloud::AutoML::V1beta1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. + class ListModelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model AutoMl.DeleteModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model being deleted. + class DeleteModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model AutoMl.DeployModel}. + # @!attribute [rw] image_object_detection_model_deployment_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata] + # Model deployment metadata specific to Image Object Detection. + # + # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_classification_model_deployment_metadata + # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata] + # Model deployment metadata specific to Image Classification. + # + # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model to deploy. + class DeployModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the model to undeploy. + class UndeployModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}. + # Models need to be enabled for exporting, otherwise an error code will be + # returned. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the model to export. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig] + # Required. The desired output location and configuration. + class ExportModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples AutoMl.ExportEvaluatedExamples}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the model whose evaluated examples are to + # be exported. + # @!attribute [rw] output_config + # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig] + # Required. The desired output location and configuration. + class ExportEvaluatedExamplesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the model evaluation. + class GetModelEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the model to list the model evaluations for. + # If modelId is set as "-", this will list model evaluations from across all + # models of the parent location. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. + # + # * `annotation_spec_id` - for =, != or existence. See example below for + # the last. + # + # Some examples of using the filter are: + # + # * `annotation_spec_id!=4` --> The model evaluation was done for + # annotation spec with ID different than 4. + # * `NOT annotation_spec_id:*` --> The model evaluation was done for + # aggregate of all annotation specs. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results for the server to return. + # Typically obtained via + # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. + class ListModelEvaluationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. + # @!attribute [rw] model_evaluation + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] + # List of model evaluations in the requested page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass to the {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. + class ListModelEvaluationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb new file mode 100644 index 000000000000..adc8f6e775c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A specification of a relational table. + # The table's schema is represented via its child column specs. It is + # pre-populated as part of ImportData by schema inference algorithm, the + # version of which is a required parameter of ImportData InputConfig. + # Note: While working with a table, at times the schema may be + # inconsistent with the data in the table (e.g. string in a FLOAT64 column). + # The consistency validation is done upon creation of a model. + # Used by: + # * Tables + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the table spec. + # Form: + # + # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` + # @!attribute [rw] time_column_spec_id + # @return [::String] + # column_spec_id of the time column. Only used if the parent dataset's + # ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE + # and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and + # those in between to VALIDATE. + # Required type: TIMESTAMP. + # If both this column and ml_use_column are not set, then ML use of all rows + # will be assigned by AutoML. NOTE: Updates of this field will instantly + # affect any other users concurrently working with the dataset. + # @!attribute [rw] row_count + # @return [::Integer] + # Output only. The number of rows (i.e. examples) in the table. + # @!attribute [rw] valid_row_count + # @return [::Integer] + # Output only. The number of valid rows (i.e. without values that don't match + # DataType-s of their columns). + # @!attribute [rw] column_count + # @return [::Integer] + # Output only. The number of columns of the table. That is, the number of + # child ColumnSpec-s. + # @!attribute [rw] input_configs + # @return [::Array<::Google::Cloud::AutoML::V1beta1::InputConfig>] + # Output only. Input configs via which data currently residing in the table + # had been imported. + # @!attribute [rw] etag + # @return [::String] + # Used to perform consistent read-modify-write updates. If not set, a blind + # "overwrite" update happens. + class TableSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb new file mode 100644 index 000000000000..cb70cab357c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb @@ -0,0 +1,304 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Metadata for a dataset used for AutoML Tables. + # @!attribute [rw] primary_table_spec_id + # @return [::String] + # Output only. The table_spec_id of the primary table of this dataset. + # @!attribute [rw] target_column_spec_id + # @return [::String] + # column_spec_id of the primary table's column that should be used as the + # training & prediction target. + # This column must be non-nullable and have one of following data types + # (otherwise model creation will error): + # + # * CATEGORY + # + # * FLOAT64 + # + # If the type is CATEGORY , only up to + # 100 unique values may exist in that column across all rows. + # + # NOTE: Updates of this field will instantly affect any other users + # concurrently working with the dataset. + # @!attribute [rw] weight_column_spec_id + # @return [::String] + # column_spec_id of the primary table's column that should be used as the + # weight column, i.e. the higher the value the more important the row will be + # during model training. + # Required type: FLOAT64. + # Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is + # ignored for training. + # If not set all rows are assumed to have equal weight of 1. + # NOTE: Updates of this field will instantly affect any other users + # concurrently working with the dataset. + # @!attribute [rw] ml_use_column_spec_id + # @return [::String] + # column_spec_id of the primary table column which specifies a possible ML + # use of the row, i.e. the column will be used to split the rows into TRAIN, + # VALIDATE and TEST sets. + # Required type: STRING. + # This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` + # among its values, or only have `TEST`, `UNASSIGNED` values. In the latter + # case the rows with `UNASSIGNED` value will be assigned by AutoML. Note + # that if a given ml use distribution makes it impossible to create a "good" + # model, that call will error describing the issue. + # If both this column_spec_id and primary table's time_column_spec_id are not + # set, then all rows are treated as `UNASSIGNED`. + # NOTE: Updates of this field will instantly affect any other users + # concurrently working with the dataset. + # @!attribute [rw] target_column_correlations + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::CorrelationStats}] + # Output only. Correlations between + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#target_column_spec_id TablesDatasetMetadata.target_column_spec_id}, + # and other columns of the + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id TablesDatasetMetadataprimary_table}. + # Only set if the target column is set. Mapping from other column spec id to + # its CorrelationStats with the target column. + # This field may be stale, see the stats_update_time field for + # for the timestamp at which these stats were last updated. + # @!attribute [rw] stats_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent timestamp when target_column_correlations + # field and all descendant ColumnSpec.data_stats and + # ColumnSpec.top_correlated_columns fields were last (re-)generated. Any + # changes that happened to the dataset afterwards are not reflected in these + # fields values. The regeneration happens in the background on a best effort + # basis. + class TablesDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] + class TargetColumnCorrelationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Model metadata specific to AutoML Tables. + # @!attribute [rw] optimization_objective_recall_value + # @return [::Float] + # Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". + # Must be between 0 and 1, inclusive. + # + # Note: The following fields are mutually exclusive: `optimization_objective_recall_value`, `optimization_objective_precision_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] optimization_objective_precision_value + # @return [::Float] + # Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". + # Must be between 0 and 1, inclusive. + # + # Note: The following fields are mutually exclusive: `optimization_objective_precision_value`, `optimization_objective_recall_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target_column_spec + # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] + # Column spec of the dataset's primary table's column the model is + # predicting. Snapshotted when model creation started. + # Only 3 fields are used: + # name - May be set on CreateModel, if it's not then the ColumnSpec + # corresponding to the current target_column_spec_id of the dataset + # the model is trained from is used. + # If neither is set, CreateModel will error. + # display_name - Output only. + # data_type - Output only. + # @!attribute [rw] input_feature_column_specs + # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] + # Column specs of the dataset's primary table's columns, on which + # the model is trained and which are used as the input for predictions. + # The + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column} + # as well as, according to dataset's state upon model creation, + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#weight_column_spec_id weight_column}, + # and + # + # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#ml_use_column_spec_id ml_use_column} + # must never be included here. + # + # Only 3 fields are used: + # + # * name - May be set on CreateModel, if set only the columns specified are + # used, otherwise all primary table's columns (except the ones listed + # above) are used for the training and prediction input. + # + # * display_name - Output only. + # + # * data_type - Output only. + # @!attribute [rw] optimization_objective + # @return [::String] + # Objective function the model is optimizing towards. The training process + # creates a model that maximizes/minimizes the value of the objective + # function over the validation set. + # + # The supported optimization objectives depend on the prediction type. + # If the field is not set, a default objective function is used. + # + # CLASSIFICATION_BINARY: + # "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver + # operating characteristic (ROC) curve. + # "MINIMIZE_LOG_LOSS" - Minimize log loss. + # "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve. + # "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified + # recall value. + # "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified + # precision value. + # + # CLASSIFICATION_MULTI_CLASS : + # "MINIMIZE_LOG_LOSS" (default) - Minimize log loss. + # + # + # REGRESSION: + # "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). + # "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). + # "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE). + # @!attribute [rw] tables_model_column_info + # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] + # Output only. Auxiliary information for each of the + # input_feature_column_specs with respect to this particular model. + # @!attribute [rw] train_budget_milli_node_hours + # @return [::Integer] + # Required. The train budget of creating this model, expressed in milli node + # hours i.e. 1,000 value in this field means 1 node hour. + # + # The training cost of the model will not exceed this budget. The final cost + # will be attempted to be close to the budget, though may end up being (even) + # noticeably smaller - at the backend's discretion. This especially may + # happen when further model training ceases to provide any improvements. + # + # If the budget is set to a value known to be insufficient to train a + # model for the given dataset, the training won't be attempted and + # will error. + # + # The train budget must be between 1,000 and 72,000 milli node hours, + # inclusive. + # @!attribute [rw] train_cost_milli_node_hours + # @return [::Integer] + # Output only. The actual training cost of the model, expressed in milli + # node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed + # to not exceed the train budget. + # @!attribute [rw] disable_early_stopping + # @return [::Boolean] + # Use the entire training budget. This disables the early stopping feature. + # By default, the early stopping feature is enabled, which means that AutoML + # Tables might stop training before the entire training budget has been used. + class TablesModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains annotation details specific to Tables. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher + # value means greater confidence in the returned value. + # For + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} + # of FLOAT64 data type the score is not populated. + # @!attribute [rw] prediction_interval + # @return [::Google::Cloud::AutoML::V1beta1::DoubleRange] + # Output only. Only populated when + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} + # has FLOAT64 data type. An interval in which the exactly correct target + # value has 95% chance to be in. + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + # The predicted value of the row's + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column}. + # The value depends on the column's DataType: + # + # * CATEGORY - the predicted (with the above confidence `score`) CATEGORY + # value. + # + # * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. + # @!attribute [rw] tables_model_column_info + # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] + # Output only. Auxiliary information for each of the model's + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs input_feature_column_specs} + # with respect to this particular prediction. + # If no other fields than + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_spec_name column_spec_name} + # and + # + # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_display_name column_display_name} + # would be populated, then this whole field is not. + # @!attribute [rw] baseline_score + # @return [::Float] + # Output only. Stores the prediction score for the baseline example, which + # is defined as the example with all values set to their baseline values. + # This is used as part of the Sampled Shapley explanation of the model's + # prediction. This field is populated only when feature importance is + # requested. For regression models, this holds the baseline prediction for + # the baseline example. For classification models, this holds the baseline + # prediction for the baseline example for the argmax class. + class TablesAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An information specific to given column and Tables Model, in context + # of the Model and the predictions created by it. + # @!attribute [rw] column_spec_name + # @return [::String] + # Output only. The name of the ColumnSpec describing the column. Not + # populated when this proto is outputted to BigQuery. + # @!attribute [rw] column_display_name + # @return [::String] + # Output only. The display name of the column (same as the display_name of + # its ColumnSpec). + # @!attribute [rw] feature_importance + # @return [::Float] + # Output only. When given as part of a Model (always populated): + # Measurement of how much model predictions correctness on the TEST data + # depend on values in this column. A value between 0 and 1, higher means + # higher influence. These values are normalized - for all input feature + # columns of a given model they add to 1. + # + # When given back by Predict (populated iff + # [feature_importance + # param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch + # Predict (populated iff + # {::Google::Cloud::AutoML::V1beta1::PredictRequest#params feature_importance} + # param is set): + # Measurement of how impactful for the prediction returned for the given row + # the value in this column was. Specifically, the feature importance + # specifies the marginal contribution that the feature made to the prediction + # score compared to the baseline score. These values are computed using the + # Sampled Shapley method. + class TablesModelColumnInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb new file mode 100644 index 000000000000..0214a830f15a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A time period inside of an example that has a time dimension (e.g. video). + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Start of the time segment (inclusive), represented as the duration since + # the example start. + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # End of the time segment (exclusive), represented as the duration since the + # example start. + class TimeSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb new file mode 100644 index 000000000000..1c3b18d079ef --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Dataset metadata for classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] + # Required. Type of the classification problem. + class TextClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text classification. + # @!attribute [rw] classification_type + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] + # Output only. Classification type of the dataset used to train this model. + class TextClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata that is specific to text extraction + class TextExtractionDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text extraction. + # @!attribute [rw] model_hint + # @return [::String] + # Indicates the scope of model use case. + # + # * `default`: Use to train a general text extraction model. Default value. + # + # * `health_care`: Use to train a text extraction model that is tuned for + # healthcare applications. + class TextExtractionModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata for text sentiment. + # @!attribute [rw] sentiment_max + # @return [::Integer] + # Required. A sentiment is expressed as an integer ordinal, where higher value + # means a more positive sentiment. The range of sentiments that will be used + # is between 0 and sentiment_max (inclusive on both ends), and all the values + # in the range must be represented in the dataset before a model can be + # created. + # sentiment_max value must be between 1 and 10 (inclusive). + class TextSentimentDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to text sentiment. + class TextSentimentModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb new file mode 100644 index 000000000000..ca5b21931f3b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Annotation for identifying spans of text. + # @!attribute [rw] text_segment + # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] + # An entity annotation will set this, which is the part of the original + # text to which the annotation pertains. + # @!attribute [rw] score + # @return [::Float] + # Output only. A confidence estimate between 0.0 and 1.0. A higher value + # means greater confidence in correctness of the annotation. + class TextExtractionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for text extraction problems. + # @!attribute [rw] au_prc + # @return [::Float] + # Output only. The Area under precision recall curve metric. + # @!attribute [rw] confidence_metrics_entries + # @return [::Array<::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] + # Output only. Metrics that have confidence thresholds. + # Precision-recall curve can be derived from it. + class TextExtractionEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single confidence threshold. + # @!attribute [rw] confidence_threshold + # @return [::Float] + # Output only. The confidence threshold value used to compute the metrics. + # Only annotations with score of at least this threshold are considered to + # be ones the model would return. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall under the given confidence threshold. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision under the given confidence threshold. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + class ConfidenceMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb new file mode 100644 index 000000000000..0ab880d1d0de --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. + # @!attribute [rw] content + # @return [::String] + # Output only. The content of the TextSegment. + # @!attribute [rw] start_offset + # @return [::Integer] + # Required. Zero-based character index of the first character of the text + # segment (counting characters from the beginning of the text). + # @!attribute [rw] end_offset + # @return [::Integer] + # Required. Zero-based character index of the first character past the end of + # the text segment (counting character from the beginning of the text). + # The character at the end_offset is NOT included in the text segment. + class TextSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb new file mode 100644 index 000000000000..9b48bef95e98 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Contains annotation details specific to text sentiment. + # @!attribute [rw] sentiment + # @return [::Integer] + # Output only. The sentiment with the semantic, as given to the + # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used + # for the prediction had been trained. + # The sentiment values are between 0 and + # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), + # with higher value meaning more positive sentiment. They are completely + # relative, i.e. 0 means least positive sentiment and sentiment_max means + # the most positive from the sentiments present in the train data. Therefore + # e.g. if train data had only negative sentiment, then sentiment_max, would + # be still negative (although least negative). + # The sentiment shouldn't be confused with "score" or "magnitude" + # from the previous Natural Language Sentiment Analysis API. + class TextSentimentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model evaluation metrics for text sentiment problems. + # @!attribute [rw] precision + # @return [::Float] + # Output only. Precision. + # @!attribute [rw] recall + # @return [::Float] + # Output only. Recall. + # @!attribute [rw] f1_score + # @return [::Float] + # Output only. The harmonic mean of recall and precision. + # @!attribute [rw] mean_absolute_error + # @return [::Float] + # Output only. Mean absolute error. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] mean_squared_error + # @return [::Float] + # Output only. Mean squared error. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] linear_kappa + # @return [::Float] + # Output only. Linear weighted kappa. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] quadratic_kappa + # @return [::Float] + # Output only. Quadratic weighted kappa. Only set for the overall model + # evaluation, not for evaluation of a single annotation spec. + # @!attribute [rw] confusion_matrix + # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] + # Output only. Confusion matrix of the evaluation. + # Only set for the overall model evaluation, not for evaluation of a single + # annotation spec. + # @!attribute [rw] annotation_spec_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # Output only. The annotation spec ids used for this evaluation. + # Deprecated . + class TextSentimentEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb new file mode 100644 index 000000000000..4826f3a2fb6f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Dataset metadata that is specific to translation. + # @!attribute [rw] source_language_code + # @return [::String] + # Required. The BCP-47 language code of the source language. + # @!attribute [rw] target_language_code + # @return [::String] + # Required. The BCP-47 language code of the target language. + class TranslationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluation metrics for the dataset. + # @!attribute [rw] bleu_score + # @return [::Float] + # Output only. BLEU score. + # @!attribute [rw] base_bleu_score + # @return [::Float] + # Output only. BLEU score for base model. + class TranslationEvaluationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata that is specific to translation. + # @!attribute [rw] base_model + # @return [::String] + # The resource name of the model to use as a baseline to train the custom + # model. If unset, we use the default base model provided by Google + # Translate. Format: + # `projects/{project_id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] source_language_code + # @return [::String] + # Output only. Inferred from the dataset. + # The source languge (The BCP-47 language code) that is used for training. + # @!attribute [rw] target_language_code + # @return [::String] + # Output only. The target languge (The BCP-47 language code) that is used for + # training. + class TranslationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation details specific to translation. + # @!attribute [rw] translated_content + # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] + # Output only . The translated content. + class TranslationAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb new file mode 100644 index 000000000000..8c029ee5303b --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + # Dataset metadata specific to video classification. + # All Video Classification datasets are treated as multi label. + class VideoClassificationDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dataset metadata specific to video object tracking. + class VideoObjectTrackingDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata specific to video classification. + class VideoClassificationModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model metadata specific to video object tracking. + class VideoObjectTrackingModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..4af8ecce5fb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-automl-v1beta1", path: "../" +else + gem "google-cloud-automl-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb new file mode 100644 index 000000000000..0a974be0868c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_CreateDataset_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the create_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset. +# +def create_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new + + # Call the create_dataset method. + result = client.create_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + p result +end +# [END automl_v1beta1_generated_AutoML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb new file mode 100644 index 000000000000..22cb436527e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_CreateModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the create_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model. +# +def create_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new + + # Call the create_model method. + result = client.create_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb new file mode 100644 index 000000000000..628da07c0d25 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_DeleteDataset_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the delete_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset. +# +def delete_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new + + # Call the delete_dataset method. + result = client.delete_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb new file mode 100644 index 000000000000..15ca9acb6cac --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_DeleteModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the delete_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model. +# +def delete_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new + + # Call the delete_model method. + result = client.delete_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb new file mode 100644 index 000000000000..140df82eb01c --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_DeployModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the deploy_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model. +# +def deploy_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new + + # Call the deploy_model method. + result = client.deploy_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_DeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb new file mode 100644 index 000000000000..d2be3e5b1a63 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ExportData_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the export_data call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data. +# +def export_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new + + # Call the export_data method. + result = client.export_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb new file mode 100644 index 000000000000..ba25ff7ba592 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the export_evaluated_examples call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples. +# +def export_evaluated_examples + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new + + # Call the export_evaluated_examples method. + result = client.export_evaluated_examples request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb new file mode 100644 index 000000000000..7c6e81cc84b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ExportModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the export_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model. +# +def export_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new + + # Call the export_model method. + result = client.export_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_ExportModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb new file mode 100644 index 000000000000..9a97355601b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_annotation_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec. +# +def get_annotation_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new + + # Call the get_annotation_spec method. + result = client.get_annotation_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb new file mode 100644 index 000000000000..2a52e3c32551 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetColumnSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_column_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec. +# +def get_column_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new + + # Call the get_column_spec method. + result = client.get_column_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_GetColumnSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb new file mode 100644 index 000000000000..68d3e53aa211 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetDataset_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset. +# +def get_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new + + # Call the get_dataset method. + result = client.get_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + p result +end +# [END automl_v1beta1_generated_AutoML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb new file mode 100644 index 000000000000..e50cdc32d622 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model. +# +def get_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new + + # Call the get_model method. + result = client.get_model request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. + p result +end +# [END automl_v1beta1_generated_AutoML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb new file mode 100644 index 000000000000..ca4f8591f907 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_model_evaluation call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation. +# +def get_model_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new + + # Call the get_model_evaluation method. + result = client.get_model_evaluation request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. + p result +end +# [END automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb new file mode 100644 index 000000000000..cfe8b2137d84 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_GetTableSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the get_table_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec. +# +def get_table_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new + + # Call the get_table_spec method. + result = client.get_table_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_GetTableSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb new file mode 100644 index 000000000000..1cb0abe33861 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ImportData_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the import_data call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data. +# +def import_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new + + # Call the import_data method. + result = client.import_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb new file mode 100644 index 000000000000..c74afd3280ca --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_column_specs call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs. +# +def list_column_specs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new + + # Call the list_column_specs method. + result = client.list_column_specs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb new file mode 100644 index 000000000000..87378a8792fc --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ListDatasets_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_datasets call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets. +# +def list_datasets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new + + # Call the list_datasets method. + result = client.list_datasets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb new file mode 100644 index 000000000000..528ea60d5c5d --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_model_evaluations call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations. +# +def list_model_evaluations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new + + # Call the list_model_evaluations method. + result = client.list_model_evaluations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb new file mode 100644 index 000000000000..82eec30e8372 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ListModels_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_models call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models. +# +def list_models + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new + + # Call the list_models method. + result = client.list_models request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb new file mode 100644 index 000000000000..b3ce41523371 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_ListTableSpecs_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the list_table_specs call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs. +# +def list_table_specs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new + + # Call the list_table_specs method. + result = client.list_table_specs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. + p item + end +end +# [END automl_v1beta1_generated_AutoML_ListTableSpecs_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb new file mode 100644 index 000000000000..c4dd0d5ccf13 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_UndeployModel_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the undeploy_model call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model. +# +def undeploy_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new + + # Call the undeploy_model method. + result = client.undeploy_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_AutoML_UndeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb new file mode 100644 index 000000000000..e2f0d1af6b69 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the update_column_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec. +# +def update_column_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new + + # Call the update_column_spec method. + result = client.update_column_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb new file mode 100644 index 000000000000..a8a8c79b852f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_UpdateDataset_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the update_dataset call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset. +# +def update_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new + + # Call the update_dataset method. + result = client.update_dataset request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. + p result +end +# [END automl_v1beta1_generated_AutoML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb new file mode 100644 index 000000000000..66268b4bfcd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the update_table_spec call in the AutoML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec. +# +def update_table_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new + + # Call the update_table_spec method. + result = client.update_table_spec request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. + p result +end +# [END automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb new file mode 100644 index 000000000000..181699c503a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_PredictionService_BatchPredict_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the batch_predict call in the PredictionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict. +# +def batch_predict + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new + + # Call the batch_predict method. + result = client.batch_predict request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END automl_v1beta1_generated_PredictionService_BatchPredict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb new file mode 100644 index 000000000000..aaba4299f11f --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START automl_v1beta1_generated_PredictionService_Predict_sync] +require "google/cloud/automl/v1beta1" + +## +# Snippet for the predict call in the PredictionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict. +# +def predict + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::AutoML::V1beta1::PredictRequest.new + + # Call the predict method. + result = client.predict request + + # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. + p result +end +# [END automl_v1beta1_generated_PredictionService_Predict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json new file mode 100644 index 000000000000..4b7ca3c8ef40 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json @@ -0,0 +1,1055 @@ +{ + "client_library": { + "name": "google-cloud-automl-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.automl.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "automl_v1beta1_generated_PredictionService_Predict_sync", + "title": "Snippet for the predict call in the PredictionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict.", + "file": "prediction_service/predict.rb", + "language": "RUBY", + "client_method": { + "short_name": "predict", + "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::PredictRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::PredictResponse", + "client": { + "short_name": "PredictionService::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" + }, + "method": { + "short_name": "Predict", + "full_name": "google.cloud.automl.v1beta1.PredictionService.Predict", + "service": { + "short_name": "PredictionService", + "full_name": "google.cloud.automl.v1beta1.PredictionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_PredictionService_BatchPredict_sync", + "title": "Snippet for the batch_predict call in the PredictionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict.", + "file": "prediction_service/batch_predict.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_predict", + "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::BatchPredictRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "PredictionService::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" + }, + "method": { + "short_name": "BatchPredict", + "full_name": "google.cloud.automl.v1beta1.PredictionService.BatchPredict", + "service": { + "short_name": "PredictionService", + "full_name": "google.cloud.automl.v1beta1.PredictionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_CreateDataset_sync", + "title": "Snippet for the create_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset.", + "file": "automl/create_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dataset", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "CreateDataset", + "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetDataset_sync", + "title": "Snippet for the get_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset.", + "file": "automl/get_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dataset", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetDataset", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListDatasets_sync", + "title": "Snippet for the list_datasets call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets.", + "file": "automl/list_datasets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_datasets", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListDatasets", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListDatasets", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_UpdateDataset_sync", + "title": "Snippet for the update_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset.", + "file": "automl/update_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_dataset", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "UpdateDataset", + "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_DeleteDataset_sync", + "title": "Snippet for the delete_dataset call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset.", + "file": "automl/delete_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dataset", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "DeleteDataset", + "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteDataset", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ImportData_sync", + "title": "Snippet for the import_data call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data.", + "file": "automl/import_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_data", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ImportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ImportData", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ImportData", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ExportData_sync", + "title": "Snippet for the export_data call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data.", + "file": "automl/export_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_data", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ExportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ExportData", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportData", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync", + "title": "Snippet for the get_annotation_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec.", + "file": "automl/get_annotation_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_annotation_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::AnnotationSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetAnnotationSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetTableSpec_sync", + "title": "Snippet for the get_table_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec.", + "file": "automl/get_table_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_table_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetTableSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetTableSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListTableSpecs_sync", + "title": "Snippet for the list_table_specs call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs.", + "file": "automl/list_table_specs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_table_specs", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListTableSpecs", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListTableSpecs", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_UpdateTableSpec_sync", + "title": "Snippet for the update_table_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec.", + "file": "automl/update_table_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_table_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "UpdateTableSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetColumnSpec_sync", + "title": "Snippet for the get_column_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec.", + "file": "automl/get_column_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_column_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetColumnSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetColumnSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListColumnSpecs_sync", + "title": "Snippet for the list_column_specs call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs.", + "file": "automl/list_column_specs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_column_specs", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListColumnSpecs", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync", + "title": "Snippet for the update_column_spec call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec.", + "file": "automl/update_column_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_column_spec", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "UpdateColumnSpec", + "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_CreateModel_sync", + "title": "Snippet for the create_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model.", + "file": "automl/create_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::CreateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "CreateModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetModel_sync", + "title": "Snippet for the get_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model.", + "file": "automl/get_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::Model", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListModels_sync", + "title": "Snippet for the list_models call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models.", + "file": "automl/list_models.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_models", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListModelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListModels", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModels", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_DeleteModel_sync", + "title": "Snippet for the delete_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model.", + "file": "automl/delete_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::DeleteModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "DeleteModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_DeployModel_sync", + "title": "Snippet for the deploy_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model.", + "file": "automl/deploy_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "deploy_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::DeployModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "DeployModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.DeployModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_UndeployModel_sync", + "title": "Snippet for the undeploy_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model.", + "file": "automl/undeploy_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "undeploy_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::UndeployModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "UndeployModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.UndeployModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ExportModel_sync", + "title": "Snippet for the export_model call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model.", + "file": "automl/export_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_model", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ExportModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ExportModel", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportModel", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync", + "title": "Snippet for the export_evaluated_examples call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples.", + "file": "automl/export_evaluated_examples.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_evaluated_examples", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ExportEvaluatedExamples", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_GetModelEvaluation_sync", + "title": "Snippet for the get_model_evaluation call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation.", + "file": "automl/get_model_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model_evaluation", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ModelEvaluation", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "GetModelEvaluation", + "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "automl_v1beta1_generated_AutoML_ListModelEvaluations_sync", + "title": "Snippet for the list_model_evaluations call in the AutoML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations.", + "file": "automl/list_model_evaluations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_model_evaluations", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse", + "client": { + "short_name": "AutoML::Client", + "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" + }, + "method": { + "short_name": "ListModelEvaluations", + "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations", + "service": { + "short_name": "AutoMl", + "full_name": "google.cloud.automl.v1beta1.AutoMl" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb new file mode 100644 index 000000000000..397f4a4200a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1beta1/service_pb" +require "google/cloud/automl/v1beta1/service_services_pb" +require "google/cloud/automl/v1beta1/automl" + +class ::Google::Cloud::AutoML::V1beta1::AutoML::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb new file mode 100644 index 000000000000..267b97d1fab1 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1beta1/automl" + +class ::Google::Cloud::AutoML::V1beta1::AutoML::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_annotation_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" + assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path + end + end + + def test_column_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.column_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3", column_spec: "value4" + assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3/columnSpecs/value4", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", location: "value1", dataset: "value2" + assert_equal "projects/value0/locations/value1/datasets/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end + + def test_model_evaluation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" + assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path + end + end + + def test_table_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3" + assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb new file mode 100644 index 000000000000..e24905c1f82a --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb @@ -0,0 +1,1424 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/automl/v1beta1/service_pb" +require "google/cloud/automl/v1beta1/automl/rest" + + +class ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset = {} + + create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_dataset parent: parent, dataset: dataset do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_dataset_client_stub.call_count + end + end + end + + def test_get_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dataset_client_stub.call_count + end + end + end + + def test_list_datasets + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_datasets_client_stub.call_count + end + end + end + + def test_update_dataset + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + dataset = {} + update_mask = {} + + update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_dataset_client_stub.call_count + end + end + end + + def test_delete_dataset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_dataset_client_stub.call_count + end + end + end + + def test_import_data + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + + import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_data_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_data({ name: name, input_config: input_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_data name: name, input_config: input_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_data_client_stub.call_count + end + end + end + + def test_export_data + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_data_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_data({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_data name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_count + end + end + end + + def test_get_annotation_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_annotation_spec({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_annotation_spec name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_annotation_spec({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_annotation_spec_client_stub.call_count + end + end + end + + def test_get_table_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + field_mask = {} + + get_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_table_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_table_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_table_spec({ name: name, field_mask: field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_table_spec name: name, field_mask: field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_table_spec({ name: name, field_mask: field_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_table_spec_client_stub.call_count + end + end + end + + def test_list_table_specs + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + field_mask = {} + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_table_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_table_specs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_table_specs_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_table_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_table_specs_client_stub.call_count + end + end + end + + def test_update_table_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + table_spec = {} + update_mask = {} + + update_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_table_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_table_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_table_spec table_spec: table_spec, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_table_spec({ table_spec: table_spec, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_table_spec_client_stub.call_count + end + end + end + + def test_get_column_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + field_mask = {} + + get_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_column_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_column_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_column_spec({ name: name, field_mask: field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_column_spec name: name, field_mask: field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_column_spec({ name: name, field_mask: field_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_column_spec_client_stub.call_count + end + end + end + + def test_list_column_specs + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + field_mask = {} + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_column_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_column_specs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_column_specs_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_column_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_column_specs_client_stub.call_count + end + end + end + + def test_update_column_spec + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + column_spec = {} + update_mask = {} + + update_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_column_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_column_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_column_spec column_spec: column_spec, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_column_spec({ column_spec: column_spec, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_column_spec_client_stub.call_count + end + end + end + + def test_create_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + model = {} + + create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_model({ parent: parent, model: model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_model parent: parent, model: model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_model({ parent: parent, model: model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_model_client_stub.call_count + end + end + end + + def test_get_model + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::Model.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_client_stub.call_count + end + end + end + + def test_list_models + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_models_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_models_client_stub.call_count + end + end + end + + def test_delete_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_model_client_stub.call_count + end + end + end + + def test_deploy_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + image_object_detection_model_deployment_metadata = {} + name = "hello world" + + deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, deploy_model_client_stub.call_count + end + end + end + + def test_undeploy_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.undeploy_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.undeploy_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.undeploy_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undeploy_model_client_stub.call_count + end + end + end + + def test_export_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_model({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_model name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_model_client_stub.call_count + end + end + end + + def test_export_evaluated_examples + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_evaluated_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_evaluated_examples_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_evaluated_examples_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_evaluated_examples({ name: name, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_evaluated_examples name: name, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_evaluated_examples({ name: name, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_evaluated_examples_client_stub.call_count + end + end + end + + def test_get_model_evaluation + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_model_evaluation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_model_evaluation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_model_evaluation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_evaluation_client_stub.call_count + end + end + end + + def test_list_model_evaluations + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_model_evaluations_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb new file mode 100644 index 000000000000..d3a2f90a5141 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb @@ -0,0 +1,1639 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1beta1/service_pb" +require "google/cloud/automl/v1beta1/automl" + +class ::Google::Cloud::AutoML::V1beta1::AutoML::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset = {} + + create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_dataset({ parent: parent, dataset: dataset }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_dataset parent: parent, dataset: dataset do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_dataset_client_stub.call_rpc_count + end + end + + def test_get_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dataset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dataset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dataset({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_dataset_client_stub.call_rpc_count + end + end + + def test_list_datasets + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_datasets, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_datasets_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_datasets_client_stub.call_rpc_count + end + end + + def test_update_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + dataset = {} + update_mask = {} + + update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_dataset({ dataset: dataset, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_dataset_client_stub.call_rpc_count + end + end + + def test_delete_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dataset, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dataset_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_dataset({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_dataset name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_dataset({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_dataset_client_stub.call_rpc_count + end + end + + def test_import_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + + import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_data, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::InputConfig), request["input_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_data_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_data({ name: name, input_config: input_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_data name: name, input_config: input_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_data({ name: name, input_config: input_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_data_client_stub.call_rpc_count + end + end + + def test_export_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_data, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::OutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_data_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_data({ name: name, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_data name: name, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_data({ name: name, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_rpc_count + end + end + + def test_get_annotation_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_annotation_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_annotation_spec({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_annotation_spec name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_annotation_spec({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_annotation_spec_client_stub.call_rpc_count + end + end + + def test_get_table_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + field_mask = {} + + get_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_table_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_table_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_table_spec({ name: name, field_mask: field_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_table_spec name: name, field_mask: field_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_table_spec({ name: name, field_mask: field_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_table_spec_client_stub.call_rpc_count + end + end + + def test_list_table_specs + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + field_mask = {} + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_table_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_table_specs, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_table_specs_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_table_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_table_specs_client_stub.call_rpc_count + end + end + + def test_update_table_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + table_spec = {} + update_mask = {} + + update_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_table_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::TableSpec), request["table_spec"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_table_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_table_spec table_spec: table_spec, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_table_spec({ table_spec: table_spec, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_table_spec_client_stub.call_rpc_count + end + end + + def test_get_column_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + field_mask = {} + + get_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_column_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_column_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_column_spec({ name: name, field_mask: field_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_column_spec name: name, field_mask: field_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_column_spec({ name: name, field_mask: field_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_column_spec_client_stub.call_rpc_count + end + end + + def test_list_column_specs + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + field_mask = {} + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_column_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_column_specs, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_column_specs_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_column_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_column_specs_client_stub.call_rpc_count + end + end + + def test_update_column_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + column_spec = {} + update_mask = {} + + update_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_column_spec, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ColumnSpec), request["column_spec"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_column_spec_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_column_spec column_spec: column_spec, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_column_spec({ column_spec: column_spec, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_column_spec_client_stub.call_rpc_count + end + end + + def test_create_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + model = {} + + create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Model), request["model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_model({ parent: parent, model: model }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_model parent: parent, model: model do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_model({ parent: parent, model: model }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_model_client_stub.call_rpc_count + end + end + + def test_get_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::Model.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_model({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_model name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_model({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_model_client_stub.call_rpc_count + end + end + + def test_list_models + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_models, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_models_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_models_client_stub.call_rpc_count + end + end + + def test_delete_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_model({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_model name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_model({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_model_client_stub.call_rpc_count + end + end + + def test_deploy_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + image_object_detection_model_deployment_metadata = {} + name = "hello world" + + deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :deploy_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] + assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, deploy_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, deploy_model_client_stub.call_rpc_count + end + end + + def test_undeploy_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undeploy_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undeploy_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.undeploy_model({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.undeploy_model name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.undeploy_model({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undeploy_model_client_stub.call_rpc_count + end + end + + def test_export_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_model, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_model_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_model({ name: name, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_model name: name, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_model({ name: name, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_model_client_stub.call_rpc_count + end + end + + def test_export_evaluated_examples + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + output_config = {} + + export_evaluated_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_evaluated_examples, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_evaluated_examples_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_evaluated_examples({ name: name, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_evaluated_examples name: name, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_evaluated_examples({ name: name, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_evaluated_examples_client_stub.call_rpc_count + end + end + + def test_get_model_evaluation + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model_evaluation, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_model_evaluation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_model_evaluation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_model_evaluation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_model_evaluation_client_stub.call_rpc_count + end + end + + def test_list_model_evaluations + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_model_evaluations, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_model_evaluations_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_model_evaluations_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb new file mode 100644 index 000000000000..6dcc59c6dd48 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1beta1/prediction_service_pb" +require "google/cloud/automl/v1beta1/prediction_service_services_pb" +require "google/cloud/automl/v1beta1/prediction_service" + +class ::Google::Cloud::AutoML::V1beta1::PredictionService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb new file mode 100644 index 000000000000..f82674af6532 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1beta1/prediction_service" + +class ::Google::Cloud::AutoML::V1beta1::PredictionService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb new file mode 100644 index 000000000000..4526b1744865 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/automl/v1beta1/prediction_service_pb" +require "google/cloud/automl/v1beta1/prediction_service/rest" + + +class ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_predict + # Create test objects. + client_result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + params = {} + + predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, predict_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.predict({ name: name, payload: payload, params: params }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.predict name: name, payload: payload, params: params do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, predict_client_stub.call_count + end + end + end + + def test_batch_predict + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + output_config = {} + params = {} + + batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_predict_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb new file mode 100644 index 000000000000..3405b16d3887 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb @@ -0,0 +1,249 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/automl/v1beta1/prediction_service_pb" +require "google/cloud/automl/v1beta1/prediction_service" + +class ::Google::Cloud::AutoML::V1beta1::PredictionService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_predict + # Create GRPC objects. + grpc_response = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + payload = {} + params = {} + + predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :predict, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExamplePayload), request["payload"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, predict_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.predict({ name: name, payload: payload, params: params }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.predict name: name, payload: payload, params: params do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, predict_client_stub.call_rpc_count + end + end + + def test_batch_predict + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + input_config = {} + output_config = {} + params = {} + + batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_predict, name + assert_kind_of ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig), request["input_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig), request["output_config"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_predict_client_stub do + # Create client + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_predict_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.gitignore b/owl-bot-staging/google-cloud-backupdr-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json new file mode 100644 index 000000000000..11a24894cf9d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json @@ -0,0 +1,19 @@ +{ + "api_id": "backupdr.googleapis.com", + "api_shortname": "backupdr", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest", + "distribution_name": "google-cloud-backupdr-v1", + "is_cloud": true, + "language": "ruby", + "name": "backupdr", + "name_pretty": "Backup and DR Service V1 API", + "product_documentation": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", + "ruby-cloud-path-override": "backup_dr=backupdr", + "ruby-cloud-namespace-override": "Backupdr=BackupDR", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml new file mode 100644 index 000000000000..cbd65e44ff07 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-backupdr-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-backupdr-v1.rb" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb b/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.yardopts b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts new file mode 100644 index 000000000000..17df553d8c78 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Backup and DR Service V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..d053ec6f167e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-backupdr-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-backupdr-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/backupdr/v1" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/backupdr/v1" + +::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-backupdr-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/backupdr/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md b/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/README.md b/owl-bot-staging/google-cloud-backupdr-v1/README.md new file mode 100644 index 000000000000..39e91f6e239b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Backup and DR Service V1 API + +API Client library for the Backup and DR Service V1 API + +google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Backup and DR Service V1 API. Most users should consider using +the main client gem, +[google-cloud-backupdr](https://rubygems.org/gems/google-cloud-backupdr). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-backupdr-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/backupdr.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/backupdr/v1" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new +request = ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new # (request fields as keyword arguments...) +response = client.list_management_servers request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/backupdr/v1" +require "logger" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-backupdr`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-backupdr-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-backupdr`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-backupdr-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Rakefile b/owl-bot-staging/google-cloud-backupdr-v1/Rakefile new file mode 100644 index 000000000000..7990877ac4bf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-backupdr-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/backupdr/v1/backupdr/credentials" + ::Google::Cloud::BackupDR::V1::BackupDR::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-backupdr-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-backupdr-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-backupdr-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-backupdr-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-backupdr-v1" + header "google-cloud-backupdr-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-backupdr-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-backupdr-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-backupdr-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-backupdr-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json new file mode 100644 index 000000000000..590f02f148a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json @@ -0,0 +1,217 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.backupdr.v1", + "libraryPackage": "::Google::Cloud::BackupDR::V1", + "services": { + "BackupDR": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDR::Client", + "rpcs": { + "ListManagementServers": { + "methods": [ + "list_management_servers" + ] + }, + "GetManagementServer": { + "methods": [ + "get_management_server" + ] + }, + "CreateManagementServer": { + "methods": [ + "create_management_server" + ] + }, + "DeleteManagementServer": { + "methods": [ + "delete_management_server" + ] + }, + "CreateBackupVault": { + "methods": [ + "create_backup_vault" + ] + }, + "ListBackupVaults": { + "methods": [ + "list_backup_vaults" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetch_usable_backup_vaults" + ] + }, + "GetBackupVault": { + "methods": [ + "get_backup_vault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "update_backup_vault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "delete_backup_vault" + ] + }, + "ListDataSources": { + "methods": [ + "list_data_sources" + ] + }, + "GetDataSource": { + "methods": [ + "get_data_source" + ] + }, + "UpdateDataSource": { + "methods": [ + "update_data_source" + ] + }, + "ListBackups": { + "methods": [ + "list_backups" + ] + }, + "FetchBackupsForResourceType": { + "methods": [ + "fetch_backups_for_resource_type" + ] + }, + "GetBackup": { + "methods": [ + "get_backup" + ] + }, + "UpdateBackup": { + "methods": [ + "update_backup" + ] + }, + "DeleteBackup": { + "methods": [ + "delete_backup" + ] + }, + "RestoreBackup": { + "methods": [ + "restore_backup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "create_backup_plan" + ] + }, + "UpdateBackupPlan": { + "methods": [ + "update_backup_plan" + ] + }, + "GetBackupPlan": { + "methods": [ + "get_backup_plan" + ] + }, + "ListBackupPlans": { + "methods": [ + "list_backup_plans" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "delete_backup_plan" + ] + }, + "GetBackupPlanRevision": { + "methods": [ + "get_backup_plan_revision" + ] + }, + "ListBackupPlanRevisions": { + "methods": [ + "list_backup_plan_revisions" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "create_backup_plan_association" + ] + }, + "UpdateBackupPlanAssociation": { + "methods": [ + "update_backup_plan_association" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "get_backup_plan_association" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "list_backup_plan_associations" + ] + }, + "FetchBackupPlanAssociationsForResourceType": { + "methods": [ + "fetch_backup_plan_associations_for_resource_type" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "delete_backup_plan_association" + ] + }, + "TriggerBackup": { + "methods": [ + "trigger_backup" + ] + }, + "GetDataSourceReference": { + "methods": [ + "get_data_source_reference" + ] + }, + "ListDataSourceReferences": { + "methods": [ + "list_data_source_references" + ] + }, + "FetchDataSourceReferencesForResourceType": { + "methods": [ + "fetch_data_source_references_for_resource_type" + ] + }, + "InitializeService": { + "methods": [ + "initialize_service" + ] + } + } + } + } + }, + "BackupDrProtectionSummary": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client", + "rpcs": { + "ListResourceBackupConfigs": { + "methods": [ + "list_resource_backup_configs" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec new file mode 100644 index 000000000000..a4514e81e956 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/backupdr/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-backupdr-v1" + gem.version = Google::Cloud::BackupDR::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details." + gem.summary = "API Client library for the Backup and DR Service V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb new file mode 100644 index 000000000000..7bea88dbd327 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/backupdr/v1" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb new file mode 100644 index 000000000000..978a9a0cc88f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/backupdr" +require "google/cloud/backupdr/v1/backup_dr_protection_summary" +require "google/cloud/backupdr/v1/version" + +module Google + module Cloud + module BackupDR + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/backupdr/v1" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/backupdr/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb new file mode 100644 index 000000000000..52b98449e819 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/backupdr/v1/version" + +require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/client" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The Protection Summary service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + module BackupDrProtectionSummary + end + end + end + end +end + +helper_path = ::File.join __dir__, "backup_dr_protection_summary", "helpers.rb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb new file mode 100644 index 000000000000..4c2e0d3c63ad --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb @@ -0,0 +1,530 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + ## + # Client for the BackupDrProtectionSummary service. + # + # The Protection Summary service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_protection_summary_stub + + ## + # Configure the BackupDrProtectionSummary Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDrProtectionSummary clients + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_resource_backup_configs.timeout = 60.0 + default_config.rpcs.list_resource_backup_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDrProtectionSummary Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @backup_dr_protection_summary_stub.universe_domain + end + + ## + # Create a new BackupDrProtectionSummary client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDrProtectionSummary client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/backupdr/v1/protection_summary_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @backup_dr_protection_summary_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @backup_dr_protection_summary_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @backup_dr_protection_summary_stub.logger + end + + # Service calls + + ## + # Lists ResourceBackupConfigs. + # + # @overload list_resource_backup_configs(request, options = nil) + # Pass arguments to `list_resource_backup_configs` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_resource_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + # + # # Call the list_resource_backup_configs method. + # result = client.list_resource_backup_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. + # p item + # end + # + def list_resource_backup_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_resource_backup_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_resource_backup_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_protection_summary_stub.call_rpc :list_resource_backup_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BackupDrProtectionSummary API. + # + # This class represents the configuration for BackupDrProtectionSummary, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_resource_backup_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BackupDrProtectionSummary API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_resource_backup_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_backup_configs + + # @private + def initialize parent_rpcs = nil + list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs + @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb new file mode 100644 index 000000000000..94614c32dfd5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + # Credentials for the BackupDrProtectionSummary API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb new file mode 100644 index 000000000000..cbaeba7a3956 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + # Path helper methods for the BackupDrProtectionSummary API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb new file mode 100644 index 000000000000..38b3a06e8a03 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/backupdr/v1/version" +require "google/cloud/backupdr/v1/bindings_override" + +require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The Protection Summary service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + module BackupDrProtectionSummary + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb new file mode 100644 index 000000000000..e4d6e17e4350 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb @@ -0,0 +1,489 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + module Rest + ## + # REST client for the BackupDrProtectionSummary service. + # + # The Protection Summary service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_protection_summary_stub + + ## + # Configure the BackupDrProtectionSummary Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDrProtectionSummary clients + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_resource_backup_configs.timeout = 60.0 + default_config.rpcs.list_resource_backup_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDrProtectionSummary Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @backup_dr_protection_summary_stub.universe_domain + end + + ## + # Create a new BackupDrProtectionSummary REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDrProtectionSummary client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @backup_dr_protection_summary_stub = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @backup_dr_protection_summary_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @backup_dr_protection_summary_stub.logger + end + + # Service calls + + ## + # Lists ResourceBackupConfigs. + # + # @overload list_resource_backup_configs(request, options = nil) + # Pass arguments to `list_resource_backup_configs` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_resource_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + # + # # Call the list_resource_backup_configs method. + # result = client.list_resource_backup_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. + # p item + # end + # + def list_resource_backup_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_resource_backup_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_resource_backup_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_protection_summary_stub.list_resource_backup_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, "resource_backup_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BackupDrProtectionSummary REST API. + # + # This class represents the configuration for BackupDrProtectionSummary REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_resource_backup_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BackupDrProtectionSummary API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_resource_backup_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_backup_configs + + # @private + def initialize parent_rpcs = nil + list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs + @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb new file mode 100644 index 000000000000..b788e5ec9af1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/protection_summary_pb" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + module Rest + ## + # REST service stub for the BackupDrProtectionSummary service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_resource_backup_configs REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] + # A result object deserialized from the server's reply + def list_resource_backup_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_backup_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_resource_backup_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_backup_configs REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_resource_backup_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceBackupConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb new file mode 100644 index 000000000000..9807b8cc2845 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/backupdr/v1/version" + +require "google/cloud/backupdr/v1/backupdr/credentials" +require "google/cloud/backupdr/v1/backupdr/paths" +require "google/cloud/backupdr/v1/backupdr/operations" +require "google/cloud/backupdr/v1/backupdr/client" +require "google/cloud/backupdr/v1/backupdr/rest" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The BackupDR Service + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1/backupdr" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/backupdr/v1/backupdr/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module BackupDR + end + end + end + end +end + +helper_path = ::File.join __dir__, "backupdr", "helpers.rb" +require "google/cloud/backupdr/v1/backupdr/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb new file mode 100644 index 000000000000..869e163a5b2c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb @@ -0,0 +1,4786 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + ## + # Client for the BackupDR service. + # + # The BackupDR Service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_stub + + ## + # Configure the BackupDR Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDR clients + # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_management_servers.timeout = 60.0 + default_config.rpcs.list_management_servers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_management_server.timeout = 60.0 + default_config.rpcs.get_management_server.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_management_server.timeout = 60.0 + + default_config.rpcs.delete_management_server.timeout = 60.0 + + default_config.rpcs.create_backup_vault.timeout = 60.0 + default_config.rpcs.create_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_backup_vaults.timeout = 60.0 + default_config.rpcs.list_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 + default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_vault.timeout = 60.0 + default_config.rpcs.get_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_vault.timeout = 60.0 + + default_config.rpcs.delete_backup_vault.timeout = 60.0 + default_config.rpcs.delete_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_sources.timeout = 60.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_source.timeout = 60.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_source.timeout = 60.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup.timeout = 60.0 + + default_config.rpcs.restore_backup.timeout = 60.0 + + default_config.rpcs.initialize_service.timeout = 60.0 + default_config.rpcs.initialize_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDR Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @backup_dr_stub.universe_domain + end + + ## + # Create a new BackupDR client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDR client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/backupdr/v1/backupdr_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @backup_dr_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BackupDR::V1::BackupDR::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @backup_dr_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BackupDR::V1::BackupDR::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @backup_dr_stub.logger + end + + # Service calls + + ## + # Lists ManagementServers in a given project and location. + # + # @overload list_management_servers(request, options = nil) + # Pass arguments to `list_management_servers` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_management_servers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve management servers + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud BackupDR, locations map to Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + # + # # Call the list_management_servers method. + # result = client.list_management_servers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + # p item + # end + # + def list_management_servers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_management_servers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_management_servers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_management_servers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_management_servers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ManagementServer. + # + # @overload get_management_server(request, options = nil) + # Pass arguments to `get_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_management_server(name: nil) + # Pass arguments to `get_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + # + # # Call the get_management_server method. + # result = client.get_management_server request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + # p result + # + def get_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_management_server, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new ManagementServer in a given project and location. + # + # @overload create_management_server(request, options = nil) + # Pass arguments to `create_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) + # Pass arguments to `create_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @param management_server_id [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + # + # # Call the create_management_server method. + # result = client.create_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_management_server, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ManagementServer. + # + # @overload delete_management_server(request, options = nil) + # Pass arguments to `delete_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_management_server(name: nil, request_id: nil) + # Pass arguments to `delete_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + # + # # Call the delete_management_server method. + # result = client.delete_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_management_server, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new BackupVault in a given project and location. + # + # @overload create_backup_vault(request, options = nil) + # Pass arguments to `create_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param backup_vault_id [::String] + # Required. ID of the requesting object + # If auto-generating ID server-side, remove this field and + # backup_vault_id from the method_signature of Create RPC + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + # + # # Call the create_backup_vault method. + # result = client.create_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupVaults in a given project and location. + # + # @overload list_backup_vaults(request, options = nil) + # Pass arguments to `list_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + # + # # Call the list_backup_vaults method. + # result = client.list_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def list_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + # + # @overload fetch_usable_backup_vaults(request, options = nil) + # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + # + # # Call the fetch_usable_backup_vaults method. + # result = client.fetch_usable_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def fetch_usable_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_usable_backup_vaults, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a BackupVault. + # + # @overload get_backup_vault(request, options = nil) + # Pass arguments to `get_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_vault(name: nil, view: nil) + # Pass arguments to `get_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + # + # # Call the get_backup_vault method. + # result = client.get_backup_vault request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + # p result + # + def get_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_vault, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a BackupVault. + # + # @overload update_backup_vault(request, options = nil) + # Pass arguments to `update_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) + # Pass arguments to `update_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # BackupVault resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param force [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @param force_update_access_restriction [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + # + # # Call the update_backup_vault method. + # result = client.update_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_vault&.name + header_params["backup_vault.name"] = request.backup_vault.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a BackupVault. + # + # @overload delete_backup_vault(request, options = nil) + # Pass arguments to `delete_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) + # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any data source from this backup vault will also + # be deleted. + # @param etag [::String] + # The current etag of the backup vault. + # If an etag is provided and does not match the current etag of the + # connection, deletion will be blocked. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param allow_missing [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @param ignore_backup_plan_references [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + # + # # Call the delete_backup_vault method. + # result = client.delete_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataSources in a given project and location. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve data + # sources information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_data_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a DataSource. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a DataSource. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # DataSource resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. Enable upsert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_source&.name + header_params["data_source.name"] = request.data_source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_data_source, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Backups in a given project and location. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backup + # information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch Backups for a given resource type. + # + # @overload fetch_backups_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + # + # # Call the fetch_backups_for_resource_type method. + # result = client.fetch_backups_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def fetch_backups_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_backups_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_backups_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_backups_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a Backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup(name: nil, view: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::Backup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a Backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup(update_mask: nil, backup: nil, request_id: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Backup resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup&.name + header_params["backup.name"] = request.backup.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup(name: nil, request_id: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restore from a Backup + # + # @overload restore_backup(request, options = nil) + # Pass arguments to `restore_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) + # Pass arguments to `restore_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] + # Compute Engine target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] + # Disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] + # Region disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] + # Disk properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + # + # # Call the restore_backup method. + # result = client.restore_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restore_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.restore_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :restore_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlan + # + # @overload create_backup_plan(request, options = nil) + # Pass arguments to `create_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) + # Pass arguments to `create_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The `BackupPlan` project and location in the format + # `projects/{project}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_id [::String] + # Required. The name of the `BackupPlan` to create. The name must be unique + # for the specified project and location.The name must start with a lowercase + # letter followed by up to 62 lowercase letters, numbers, or hyphens. + # Pattern, /[a-z][a-z0-9-]\\{,62}/. + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The `BackupPlan` resource object to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + # + # # Call the create_backup_plan method. + # result = client.create_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_plan&.name + header_params["backup_plan.name"] = request.backup_plan.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlan. + # + # @overload get_backup_plan(request, options = nil) + # Pass arguments to `get_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_plan(name: nil) + # Pass arguments to `get_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + # + # # Call the get_backup_plan method. + # result = client.get_backup_plan request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + # p result + # + def get_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlans in a given project and location. + # + # @overload list_backup_plans(request, options = nil) + # Pass arguments to `list_backup_plans` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve `BackupPlans` + # information. Format: `projects/{project}/locations/{location}`. In Cloud + # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + # retrieve backup plans for all locations, use "-" for the + # `{location}` value. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + # + # # Call the list_backup_plans method. + # result = client.list_backup_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + # p item + # end + # + def list_backup_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plans, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlan. + # + # @overload delete_backup_plan(request, options = nil) + # Pass arguments to `delete_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_plan(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + # + # # Call the delete_backup_plan method. + # result = client.delete_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanRevision. + # + # @overload get_backup_plan_revision(request, options = nil) + # Pass arguments to `get_backup_plan_revision` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_plan_revision(name: nil) + # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + # + # # Call the get_backup_plan_revision method. + # result = client.get_backup_plan_revision request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p result + # + def get_backup_plan_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan_revision, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlanRevisions in a given project and location. + # + # @overload list_backup_plan_revisions(request, options = nil) + # Pass arguments to `list_backup_plan_revisions` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + # + # # Call the list_backup_plan_revisions method. + # result = client.list_backup_plan_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p item + # end + # + def list_backup_plan_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plan_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlanAssociation + # + # @overload create_backup_plan_association(request, options = nil) + # Pass arguments to `create_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) + # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The backup plan association project and location in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_association_id [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # + # # Call the create_backup_plan_association method. + # result = client.create_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlanAssociation. + # + # @overload update_backup_plan_association(request, options = nil) + # Pass arguments to `update_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + # + # # Call the update_backup_plan_association method. + # result = client.update_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_plan_association&.name + header_params["backup_plan_association.name"] = request.backup_plan_association.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanAssociation. + # + # @overload get_backup_plan_association(request, options = nil) + # Pass arguments to `get_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_plan_association(name: nil) + # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + # + # # Call the get_backup_plan_association method. + # result = client.get_backup_plan_association request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p result + # + def get_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan_association, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlanAssociations in a given project and location. + # + # @overload list_backup_plan_associations(request, options = nil) + # Pass arguments to `list_backup_plan_associations` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backup Plan + # Associations information, in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + # map to GCP regions, for example **us-central1**. To retrieve backup plan + # associations for all locations, use "-" for the + # `{location}` value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + # + # # Call the list_backup_plan_associations method. + # result = client.list_backup_plan_associations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def list_backup_plan_associations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plan_associations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List BackupPlanAssociations for a given resource type. + # + # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + # + # # Call the fetch_backup_plan_associations_for_resource_type method. + # result = client.fetch_backup_plan_associations_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def fetch_backup_plan_associations_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_backup_plan_associations_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlanAssociation. + # + # @overload delete_backup_plan_association(request, options = nil) + # Pass arguments to `delete_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_plan_association(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + # + # # Call the delete_backup_plan_association method. + # result = client.delete_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Triggers a new Backup. + # + # @overload trigger_backup(request, options = nil) + # Pass arguments to `trigger_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) + # Pass arguments to `trigger_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param rule_id [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + # + # # Call the trigger_backup method. + # result = client.trigger_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def trigger_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.trigger_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.trigger_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :trigger_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single DataSourceReference. + # + # @overload get_data_source_reference(request, options = nil) + # Pass arguments to `get_data_source_reference` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source_reference(name: nil) + # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + # + # # Call the get_data_source_reference method. + # result = client.get_data_source_reference request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + # p result + # + def get_data_source_reference request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source_reference.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source_reference.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_data_source_reference, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataSourceReferences for a given project and location. + # + # @overload list_data_source_references(request, options = nil) + # Pass arguments to `list_data_source_references` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_source_references` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + # + # # Call the list_data_source_references method. + # result = client.list_data_source_references request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def list_data_source_references request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_source_references.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_source_references.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_data_source_references, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch DataSourceReferences for a given project, location and resource type. + # + # @overload fetch_data_source_references_for_resource_type(request, options = nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + # + # # Call the fetch_data_source_references_for_resource_type method. + # result = client.fetch_data_source_references_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def fetch_data_source_references_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_data_source_references_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Initializes the service related config for a project. + # + # @overload initialize_service(request, options = nil) + # Pass arguments to `initialize_service` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) + # Pass arguments to `initialize_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @param resource_type [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] + # Optional. The configuration for initializing a Cloud SQL instance. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + # + # # Call the initialize_service method. + # result = client.initialize_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def initialize_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.initialize_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.initialize_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :initialize_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BackupDR API. + # + # This class represents the configuration for BackupDR, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_management_servers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BackupDR API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_management_servers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_management_servers + ## + # RPC-specific configuration for `get_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :get_management_server + ## + # RPC-specific configuration for `create_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :create_management_server + ## + # RPC-specific configuration for `delete_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_management_server + ## + # RPC-specific configuration for `create_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_vault + ## + # RPC-specific configuration for `list_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_vaults + ## + # RPC-specific configuration for `fetch_usable_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_usable_backup_vaults + ## + # RPC-specific configuration for `get_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_vault + ## + # RPC-specific configuration for `update_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_vault + ## + # RPC-specific configuration for `delete_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_vault + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `fetch_backups_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backups_for_resource_type + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `restore_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_backup + ## + # RPC-specific configuration for `create_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan + ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## + # RPC-specific configuration for `get_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan + ## + # RPC-specific configuration for `list_backup_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plans + ## + # RPC-specific configuration for `delete_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan + ## + # RPC-specific configuration for `get_backup_plan_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_revision + ## + # RPC-specific configuration for `list_backup_plan_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_revisions + ## + # RPC-specific configuration for `create_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan_association + ## + # RPC-specific configuration for `update_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan_association + ## + # RPC-specific configuration for `get_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_association + ## + # RPC-specific configuration for `list_backup_plan_associations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_associations + ## + # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backup_plan_associations_for_resource_type + ## + # RPC-specific configuration for `delete_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan_association + ## + # RPC-specific configuration for `trigger_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_backup + ## + # RPC-specific configuration for `get_data_source_reference` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source_reference + ## + # RPC-specific configuration for `list_data_source_references` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_source_references + ## + # RPC-specific configuration for `fetch_data_source_references_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source_references_for_resource_type + ## + # RPC-specific configuration for `initialize_service` + # @return [::Gapic::Config::Method] + # + attr_reader :initialize_service + + # @private + def initialize parent_rpcs = nil + list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers + @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config + get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server + @get_management_server = ::Gapic::Config::Method.new get_management_server_config + create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server + @create_management_server = ::Gapic::Config::Method.new create_management_server_config + delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server + @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config + create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault + @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config + list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults + @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config + fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults + @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config + get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault + @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config + update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault + @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config + delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault + @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type + @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup + @restore_backup = ::Gapic::Config::Method.new restore_backup_config + create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan + @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config + get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan + @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config + list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans + @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config + delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan + @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision + @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config + list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions + @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config + create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association + @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config + update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association + @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config + get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association + @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config + list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations + @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config + fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type + @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config + delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association + @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config + trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup + @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config + get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference + @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config + list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references + @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config + fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type + @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config + initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service + @initialize_service = ::Gapic::Config::Method.new initialize_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb new file mode 100644 index 000000000000..f6fc3fd1ca69 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # Credentials for the BackupDR API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb new file mode 100644 index 000000000000..6eeece6aaa79 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BackupDR Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDR Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb new file mode 100644 index 000000000000..298a5882fa27 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb @@ -0,0 +1,309 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # Path helper methods for the BackupDR API. + module Paths + ## + # Create a fully-qualified Backup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # @param datasource [String] + # @param backup [String] + # + # @return [::String] + def backup_path project:, location:, backupvault:, datasource:, backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" + raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}/backups/#{backup}" + end + + ## + # Create a fully-qualified BackupPlan resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # + # @return [::String] + def backup_plan_path project:, location:, backup_plan: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}" + end + + ## + # Create a fully-qualified BackupPlanAssociation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}` + # + # @param project [String] + # @param location [String] + # @param backup_plan_association [String] + # + # @return [::String] + def backup_plan_association_path project:, location:, backup_plan_association: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlanAssociations/#{backup_plan_association}" + end + + ## + # Create a fully-qualified BackupPlanRevision resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # @param revision [String] + # + # @return [::String] + def backup_plan_revision_path project:, location:, backup_plan:, revision: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/revisions/#{revision}" + end + + ## + # Create a fully-qualified BackupVault resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # + # @return [::String] + def backup_vault_path project:, location:, backupvault: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}" + end + + ## + # Create a fully-qualified Cluster resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/clusters/{cluster}` + # + # @param project [String] + # @param location [String] + # @param cluster [String] + # + # @return [::String] + def cluster_path project:, location:, cluster: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/clusters/#{cluster}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}` + # + # @param project [String] + # @param location [String] + # @param ring [String] + # @param key [String] + # + # @return [::String] + def crypto_key_path project:, location:, ring:, key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "ring cannot contain /" if ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{ring}/cryptoKeys/#{key}" + end + + ## + # Create a fully-qualified CryptoKeyVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified DataSource resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # @param datasource [String] + # + # @return [::String] + def data_source_path project:, location:, backupvault:, datasource: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}" + end + + ## + # Create a fully-qualified DataSourceReference resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}` + # + # @param project [String] + # @param location [String] + # @param data_source_reference [String] + # + # @return [::String] + def data_source_reference_path project:, location:, data_source_reference: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataSourceReferences/#{data_source_reference}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}` + # + # @param project [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/instances/#{instance}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified ManagementServer resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/managementServers/{managementserver}` + # + # @param project [String] + # @param location [String] + # @param managementserver [String] + # + # @return [::String] + def management_server_path project:, location:, managementserver: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/managementServers/#{managementserver}" + end + + ## + # Create a fully-qualified StoragePool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/zones/{zone}/storagePools/{storage_pool}` + # + # @param project [String] + # @param zone [String] + # @param storage_pool [String] + # + # @return [::String] + def storage_pool_path project:, zone:, storage_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/zones/#{zone}/storagePools/#{storage_pool}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb new file mode 100644 index 000000000000..5b7fba263be4 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/backupdr/v1/version" +require "google/cloud/backupdr/v1/bindings_override" + +require "google/cloud/backupdr/v1/backupdr/credentials" +require "google/cloud/backupdr/v1/backupdr/paths" +require "google/cloud/backupdr/v1/backupdr/rest/operations" +require "google/cloud/backupdr/v1/backupdr/rest/client" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The BackupDR Service + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/backupdr/v1/backupdr/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module BackupDR + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/backupdr/v1/backupdr/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb new file mode 100644 index 000000000000..343bd216f57b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb @@ -0,0 +1,4493 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + module Rest + ## + # REST client for the BackupDR service. + # + # The BackupDR Service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_stub + + ## + # Configure the BackupDR Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDR clients + # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_management_servers.timeout = 60.0 + default_config.rpcs.list_management_servers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_management_server.timeout = 60.0 + default_config.rpcs.get_management_server.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_management_server.timeout = 60.0 + + default_config.rpcs.delete_management_server.timeout = 60.0 + + default_config.rpcs.create_backup_vault.timeout = 60.0 + default_config.rpcs.create_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_backup_vaults.timeout = 60.0 + default_config.rpcs.list_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 + default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_vault.timeout = 60.0 + default_config.rpcs.get_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_vault.timeout = 60.0 + + default_config.rpcs.delete_backup_vault.timeout = 60.0 + default_config.rpcs.delete_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_sources.timeout = 60.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_source.timeout = 60.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_source.timeout = 60.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup.timeout = 60.0 + + default_config.rpcs.restore_backup.timeout = 60.0 + + default_config.rpcs.initialize_service.timeout = 60.0 + default_config.rpcs.initialize_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDR Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @backup_dr_stub.universe_domain + end + + ## + # Create a new BackupDR REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDR client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @backup_dr_stub = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @backup_dr_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @backup_dr_stub.logger + end + + # Service calls + + ## + # Lists ManagementServers in a given project and location. + # + # @overload list_management_servers(request, options = nil) + # Pass arguments to `list_management_servers` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_management_servers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve management servers + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud BackupDR, locations map to Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + # + # # Call the list_management_servers method. + # result = client.list_management_servers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + # p item + # end + # + def list_management_servers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_management_servers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_management_servers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_management_servers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_management_servers, "management_servers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ManagementServer. + # + # @overload get_management_server(request, options = nil) + # Pass arguments to `get_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_management_server(name: nil) + # Pass arguments to `get_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + # + # # Call the get_management_server method. + # result = client.get_management_server request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + # p result + # + def get_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_management_server request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new ManagementServer in a given project and location. + # + # @overload create_management_server(request, options = nil) + # Pass arguments to `create_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) + # Pass arguments to `create_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @param management_server_id [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + # + # # Call the create_management_server method. + # result = client.create_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_management_server request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ManagementServer. + # + # @overload delete_management_server(request, options = nil) + # Pass arguments to `delete_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_management_server(name: nil, request_id: nil) + # Pass arguments to `delete_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + # + # # Call the delete_management_server method. + # result = client.delete_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_management_server request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new BackupVault in a given project and location. + # + # @overload create_backup_vault(request, options = nil) + # Pass arguments to `create_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param backup_vault_id [::String] + # Required. ID of the requesting object + # If auto-generating ID server-side, remove this field and + # backup_vault_id from the method_signature of Create RPC + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + # + # # Call the create_backup_vault method. + # result = client.create_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupVaults in a given project and location. + # + # @overload list_backup_vaults(request, options = nil) + # Pass arguments to `list_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + # + # # Call the list_backup_vaults method. + # result = client.list_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def list_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_vaults request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, "backup_vaults", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + # + # @overload fetch_usable_backup_vaults(request, options = nil) + # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + # + # # Call the fetch_usable_backup_vaults method. + # result = client.fetch_usable_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def fetch_usable_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_usable_backup_vaults request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, "backup_vaults", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a BackupVault. + # + # @overload get_backup_vault(request, options = nil) + # Pass arguments to `get_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_vault(name: nil, view: nil) + # Pass arguments to `get_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + # + # # Call the get_backup_vault method. + # result = client.get_backup_vault request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + # p result + # + def get_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_vault request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a BackupVault. + # + # @overload update_backup_vault(request, options = nil) + # Pass arguments to `update_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) + # Pass arguments to `update_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # BackupVault resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param force [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @param force_update_access_restriction [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + # + # # Call the update_backup_vault method. + # result = client.update_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a BackupVault. + # + # @overload delete_backup_vault(request, options = nil) + # Pass arguments to `delete_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) + # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any data source from this backup vault will also + # be deleted. + # @param etag [::String] + # The current etag of the backup vault. + # If an etag is provided and does not match the current etag of the + # connection, deletion will be blocked. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param allow_missing [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @param ignore_backup_plan_references [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + # + # # Call the delete_backup_vault method. + # result = client.delete_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataSources in a given project and location. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve data + # sources information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_data_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_sources, "data_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a DataSource. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a DataSource. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # DataSource resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. Enable upsert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_data_source request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Backups in a given project and location. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backup + # information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backups, "backups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch Backups for a given resource type. + # + # @overload fetch_backups_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + # + # # Call the fetch_backups_for_resource_type method. + # result = client.fetch_backups_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def fetch_backups_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_backups_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_backups_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_backups_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, "backups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a Backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup(name: nil, view: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a Backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup(update_mask: nil, backup: nil, request_id: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Backup resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup(name: nil, request_id: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restore from a Backup + # + # @overload restore_backup(request, options = nil) + # Pass arguments to `restore_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) + # Pass arguments to `restore_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] + # Compute Engine target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] + # Disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] + # Region disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] + # Disk properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + # + # # Call the restore_backup method. + # result = client.restore_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restore_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restore_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.restore_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlan + # + # @overload create_backup_plan(request, options = nil) + # Pass arguments to `create_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) + # Pass arguments to `create_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The `BackupPlan` project and location in the format + # `projects/{project}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_id [::String] + # Required. The name of the `BackupPlan` to create. The name must be unique + # for the specified project and location.The name must start with a lowercase + # letter followed by up to 62 lowercase letters, numbers, or hyphens. + # Pattern, /[a-z][a-z0-9-]\\{,62}/. + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The `BackupPlan` resource object to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + # + # # Call the create_backup_plan method. + # result = client.create_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlan. + # + # @overload get_backup_plan(request, options = nil) + # Pass arguments to `get_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_plan(name: nil) + # Pass arguments to `get_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + # + # # Call the get_backup_plan method. + # result = client.get_backup_plan request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + # p result + # + def get_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlans in a given project and location. + # + # @overload list_backup_plans(request, options = nil) + # Pass arguments to `list_backup_plans` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve `BackupPlans` + # information. Format: `projects/{project}/locations/{location}`. In Cloud + # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + # retrieve backup plans for all locations, use "-" for the + # `{location}` value. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + # + # # Call the list_backup_plans method. + # result = client.list_backup_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + # p item + # end + # + def list_backup_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plans request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, "backup_plans", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlan. + # + # @overload delete_backup_plan(request, options = nil) + # Pass arguments to `delete_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_plan(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + # + # # Call the delete_backup_plan method. + # result = client.delete_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanRevision. + # + # @overload get_backup_plan_revision(request, options = nil) + # Pass arguments to `get_backup_plan_revision` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_plan_revision(name: nil) + # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + # + # # Call the get_backup_plan_revision method. + # result = client.get_backup_plan_revision request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p result + # + def get_backup_plan_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan_revision request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlanRevisions in a given project and location. + # + # @overload list_backup_plan_revisions(request, options = nil) + # Pass arguments to `list_backup_plan_revisions` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @param page_size [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + # + # # Call the list_backup_plan_revisions method. + # result = client.list_backup_plan_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p item + # end + # + def list_backup_plan_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plan_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, "backup_plan_revisions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlanAssociation + # + # @overload create_backup_plan_association(request, options = nil) + # Pass arguments to `create_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) + # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The backup plan association project and location in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @param backup_plan_association_id [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # + # # Call the create_backup_plan_association method. + # result = client.create_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlanAssociation. + # + # @overload update_backup_plan_association(request, options = nil) + # Pass arguments to `update_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + # + # # Call the update_backup_plan_association method. + # result = client.update_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanAssociation. + # + # @overload get_backup_plan_association(request, options = nil) + # Pass arguments to `get_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_plan_association(name: nil) + # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + # + # # Call the get_backup_plan_association method. + # result = client.get_backup_plan_association request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p result + # + def get_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan_association request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlanAssociations in a given project and location. + # + # @overload list_backup_plan_associations(request, options = nil) + # Pass arguments to `list_backup_plan_associations` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backup Plan + # Associations information, in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + # map to GCP regions, for example **us-central1**. To retrieve backup plan + # associations for all locations, use "-" for the + # `{location}` value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + # + # # Call the list_backup_plan_associations method. + # result = client.list_backup_plan_associations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def list_backup_plan_associations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plan_associations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, "backup_plan_associations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List BackupPlanAssociations for a given resource type. + # + # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + # + # # Call the fetch_backup_plan_associations_for_resource_type method. + # result = client.fetch_backup_plan_associations_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def fetch_backup_plan_associations_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_backup_plan_associations_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, "backup_plan_associations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlanAssociation. + # + # @overload delete_backup_plan_association(request, options = nil) + # Pass arguments to `delete_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_plan_association(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + # + # # Call the delete_backup_plan_association method. + # result = client.delete_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Triggers a new Backup. + # + # @overload trigger_backup(request, options = nil) + # Pass arguments to `trigger_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) + # Pass arguments to `trigger_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param rule_id [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + # + # # Call the trigger_backup method. + # result = client.trigger_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def trigger_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.trigger_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.trigger_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.trigger_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single DataSourceReference. + # + # @overload get_data_source_reference(request, options = nil) + # Pass arguments to `get_data_source_reference` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source_reference(name: nil) + # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + # + # # Call the get_data_source_reference method. + # result = client.get_data_source_reference request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + # p result + # + def get_data_source_reference request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source_reference.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source_reference.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_data_source_reference request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataSourceReferences for a given project and location. + # + # @overload list_data_source_references(request, options = nil) + # Pass arguments to `list_data_source_references` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_source_references` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + # + # # Call the list_data_source_references method. + # result = client.list_data_source_references request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def list_data_source_references request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_source_references.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_source_references.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_data_source_references request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, "data_source_references", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch DataSourceReferences for a given project, location and resource type. + # + # @overload fetch_data_source_references_for_resource_type(request, options = nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + # + # # Call the fetch_data_source_references_for_resource_type method. + # result = client.fetch_data_source_references_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def fetch_data_source_references_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_data_source_references_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, "data_source_references", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Initializes the service related config for a project. + # + # @overload initialize_service(request, options = nil) + # Pass arguments to `initialize_service` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) + # Pass arguments to `initialize_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @param resource_type [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] + # Optional. The configuration for initializing a Cloud SQL instance. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + # + # # Call the initialize_service method. + # result = client.initialize_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def initialize_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.initialize_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.initialize_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.initialize_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BackupDR REST API. + # + # This class represents the configuration for BackupDR REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_management_servers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BackupDR API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_management_servers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_management_servers + ## + # RPC-specific configuration for `get_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :get_management_server + ## + # RPC-specific configuration for `create_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :create_management_server + ## + # RPC-specific configuration for `delete_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_management_server + ## + # RPC-specific configuration for `create_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_vault + ## + # RPC-specific configuration for `list_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_vaults + ## + # RPC-specific configuration for `fetch_usable_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_usable_backup_vaults + ## + # RPC-specific configuration for `get_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_vault + ## + # RPC-specific configuration for `update_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_vault + ## + # RPC-specific configuration for `delete_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_vault + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `fetch_backups_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backups_for_resource_type + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `restore_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_backup + ## + # RPC-specific configuration for `create_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan + ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## + # RPC-specific configuration for `get_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan + ## + # RPC-specific configuration for `list_backup_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plans + ## + # RPC-specific configuration for `delete_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan + ## + # RPC-specific configuration for `get_backup_plan_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_revision + ## + # RPC-specific configuration for `list_backup_plan_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_revisions + ## + # RPC-specific configuration for `create_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan_association + ## + # RPC-specific configuration for `update_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan_association + ## + # RPC-specific configuration for `get_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_association + ## + # RPC-specific configuration for `list_backup_plan_associations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_associations + ## + # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backup_plan_associations_for_resource_type + ## + # RPC-specific configuration for `delete_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan_association + ## + # RPC-specific configuration for `trigger_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_backup + ## + # RPC-specific configuration for `get_data_source_reference` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source_reference + ## + # RPC-specific configuration for `list_data_source_references` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_source_references + ## + # RPC-specific configuration for `fetch_data_source_references_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source_references_for_resource_type + ## + # RPC-specific configuration for `initialize_service` + # @return [::Gapic::Config::Method] + # + attr_reader :initialize_service + + # @private + def initialize parent_rpcs = nil + list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers + @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config + get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server + @get_management_server = ::Gapic::Config::Method.new get_management_server_config + create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server + @create_management_server = ::Gapic::Config::Method.new create_management_server_config + delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server + @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config + create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault + @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config + list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults + @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config + fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults + @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config + get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault + @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config + update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault + @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config + delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault + @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type + @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup + @restore_backup = ::Gapic::Config::Method.new restore_backup_config + create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan + @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config + get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan + @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config + list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans + @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config + delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan + @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision + @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config + list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions + @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config + create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association + @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config + update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association + @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config + get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association + @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config + list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations + @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config + fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type + @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config + delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association + @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config + trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup + @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config + get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference + @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config + list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references + @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config + fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type + @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config + initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service + @initialize_service = ::Gapic::Config::Method.new initialize_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb new file mode 100644 index 000000000000..382f29324032 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BackupDR Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDR Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb new file mode 100644 index 000000000000..c6ef2555cab9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb @@ -0,0 +1,2350 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/backupdr_pb" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + module Rest + ## + # REST service stub for the BackupDR service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_management_servers REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] + # A result object deserialized from the server's reply + def list_management_servers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_management_servers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_management_servers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # A result object deserialized from the server's reply + def get_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ManagementServer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_backup_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] + # A result object deserialized from the server's reply + def list_backup_vaults request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_vaults", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_usable_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] + # A result object deserialized from the server's reply + def fetch_usable_backup_vaults request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_usable_backup_vaults_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_usable_backup_vaults", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # A result object deserialized from the server's reply + def get_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupVault.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] + # A result object deserialized from the server's reply + def list_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # A result object deserialized from the server's reply + def get_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backups REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupsResponse] + # A result object deserialized from the server's reply + def list_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_backups_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_backups_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backups_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_backups_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::Backup] + # A result object deserialized from the server's reply + def get_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::Backup.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restore_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def restore_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restore_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # A result object deserialized from the server's reply + def get_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlan.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_plans REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] + # A result object deserialized from the server's reply + def list_backup_plans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_plans", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_plan_revision REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # A result object deserialized from the server's reply + def get_backup_plan_revision request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_revision_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_plan_revision", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_plan_revisions REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] + # A result object deserialized from the server's reply + def list_backup_plan_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_revisions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_plan_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # A result object deserialized from the server's reply + def get_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_plan_associations REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] + # A result object deserialized from the server's reply + def list_backup_plan_associations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_associations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_plan_associations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_backup_plan_associations_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_backup_plan_associations_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_backup_plan_associations_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the trigger_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def trigger_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_trigger_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "trigger_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_data_source_reference REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # A result object deserialized from the server's reply + def get_data_source_reference request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_reference_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source_reference", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::DataSourceReference.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_source_references REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] + # A result object deserialized from the server's reply + def list_data_source_references request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_source_references_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_source_references", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_data_source_references_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_data_source_references_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_references_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_data_source_references_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the initialize_service REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def initialize_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_initialize_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "initialize_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_management_servers REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_management_servers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/managementServers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/managementServers", + body: "management_server", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupVaults", + body: "backup_vault", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_vaults_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupVaults", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_usable_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_usable_backup_vaults_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupVaults:fetchUsable", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_vault.name}", + body: "backup_vault", + matches: [ + ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_source.name}", + body: "data_source", + matches: [ + ["data_source.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_backups_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_backups_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup.name}", + body: "backup", + matches: [ + ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restore_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:restore", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupPlans", + body: "backup_plan", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan.name}", + body: "backup_plan", + matches: [ + ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plans REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_plans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlans", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan_revision REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_plan_revision_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/revisions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plan_revisions REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_plan_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/revisions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupPlanAssociations", + body: "backup_plan_association", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan_association.name}", + body: "backup_plan_association", + matches: [ + ["backup_plan_association.name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plan_associations REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_plan_associations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlanAssociations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_backup_plan_associations_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlanAssociations:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the trigger_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_trigger_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:triggerBackup", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source_reference REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_reference_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataSourceReferences/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_source_references REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_source_references_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSourceReferences", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_data_source_references_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_data_source_references_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSourceReferences:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the initialize_service REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_initialize_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:initialize", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb new file mode 100644 index 000000000000..f53e679c2cb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupdr.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupplan_pb' +require 'google/cloud/backupdr/v1/backupplanassociation_pb' +require 'google/cloud/backupdr/v1/backupvault_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/cloud/backupdr/v1/datasourcereference_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n\'google/cloud/backupdr/v1/backupdr.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/backupdr/v1/backupplan.proto\x1a\x34google/cloud/backupdr/v1/backupplanassociation.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x32google/cloud/backupdr/v1/datasourcereference.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x01\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cpeering_mode\x18\x02 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.NetworkConfig.PeeringModeB\x03\xe0\x41\x01\"G\n\x0bPeeringMode\x12\x1c\n\x18PEERING_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x01\"6\n\rManagementURI\x12\x13\n\x06web_ui\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\"w\n#WorkforceIdentityBasedManagementURI\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"|\n$WorkforceIdentityBasedOAuth2ClientID\x12)\n\x1c\x66irst_party_oauth2_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1cthird_party_oauth2_client_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd1\n\n\x10ManagementServer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.ManagementServer.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x04type\x18\x0e \x01(\x0e\x32\x37.google.cloud.backupdr.v1.ManagementServer.InstanceTypeB\x03\xe0\x41\x01\x12\x44\n\x0emanagement_uri\x18\x0b \x01(\x0b\x32\'.google.cloud.backupdr.v1.ManagementURIB\x03\xe0\x41\x03\x12s\n\'workforce_identity_based_management_uri\x18\x10 \x01(\x0b\x32=.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURIB\x03\xe0\x41\x03\x12L\n\x05state\x18\x07 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.ManagementServer.InstanceStateB\x03\xe0\x41\x03\x12>\n\x08networks\x18\x08 \x03(\x0b\x32\'.google.cloud.backupdr.v1.NetworkConfigB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10oauth2_client_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12v\n)workforce_identity_based_oauth2_client_id\x18\x11 \x01(\x0b\x32>.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientIDB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61_proxy_uri\x18\x12 \x03(\tB\x03\xe0\x41\x03\x12\x36\n\rsatisfies_pzs\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41\x43KUP_RESTORE\x10\x01\"\x8f\x01\n\rInstanceState\x12\x1e\n\x1aINSTANCE_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\t\n\x05\x45RROR\x10\x07:\xa1\x01\xea\x41\x9d\x01\n(backupdr.googleapis.com/ManagementServer\x12Lprojects/{project}/locations/{location}/managementServers/{managementserver}*\x11managementServers2\x10managementServer\"\xdf\x01\n\x1cListManagementServersRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_filterB\x0b\n\t_order_by\"\x95\x01\n\x1dListManagementServersResponse\x12\x46\n\x12management_servers\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.ManagementServer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x1aGetManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\"\xe9\x01\n\x1d\x43reateManagementServerRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12!\n\x14management_server_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11management_server\x18\x03 \x01(\x0b\x32*.google.cloud.backupdr.v1.ManagementServerB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x1d\x44\x65leteManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xfc\x01\n\x18InitializeServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12w\n(cloud_sql_instance_initialization_config\x18\x04 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfigB\x03\xe0\x41\x01H\x00\x42\x17\n\x15initialization_config\"P\n\x19InitializeServiceResponse\x12\x19\n\x11\x62\x61\x63kup_vault_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_plan_name\x18\x02 \x01(\t\"\x96\x03\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0f\x61\x64\x64itional_info\x18\x08 \x03(\x0b\x32?.google.cloud.backupdr.v1.OperationMetadata.AdditionalInfoEntryB\x03\xe0\x41\x03\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xd4\x43\n\x08\x42\x61\x63kupDR\x12\xd0\x01\n\x15ListManagementServers\x12\x36.google.cloud.backupdr.v1.ListManagementServersRequest\x1a\x37.google.cloud.backupdr.v1.ListManagementServersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/managementServers\x12\xbd\x01\n\x13GetManagementServer\x12\x34.google.cloud.backupdr.v1.GetManagementServerRequest\x1a*.google.cloud.backupdr.v1.ManagementServer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/managementServers/*}\x12\x9b\x02\n\x16\x43reateManagementServer\x12\x37.google.cloud.backupdr.v1.CreateManagementServerRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10ManagementServer\x12\x11OperationMetadata\xda\x41-parent,management_server,management_server_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/managementServers:\x11management_server\x12\xe3\x01\n\x16\x44\x65leteManagementServer\x12\x37.google.cloud.backupdr.v1.DeleteManagementServerRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/managementServers/*}\x12\xf8\x01\n\x11\x43reateBackupVault\x12\x32.google.cloud.backupdr.v1.CreateBackupVaultRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x42\x61\x63kupVault\x12\x11OperationMetadata\xda\x41#parent,backup_vault,backup_vault_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/backupVaults:\x0c\x62\x61\x63kup_vault\x12\xbc\x01\n\x10ListBackupVaults\x12\x31.google.cloud.backupdr.v1.ListBackupVaultsRequest\x1a\x32.google.cloud.backupdr.v1.ListBackupVaultsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/backupVaults\x12\xdd\x01\n\x17\x46\x65tchUsableBackupVaults\x12\x38.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest\x1a\x39.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources\x12\xb4\x01\n\rGetDataSource\x12..google.cloud.backupdr.v1.GetDataSourceRequest\x1a$.google.cloud.backupdr.v1.DataSource\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\x12\x82\x02\n\x10UpdateDataSource\x12\x31.google.cloud.backupdr.v1.UpdateDataSourceRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nDataSource\x12\x11OperationMetadata\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xc5\x01\n\x0bListBackups\x12,.google.cloud.backupdr.v1.ListBackupsRequest\x1a-.google.cloud.backupdr.v1.ListBackupsResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\x12\x98\x02\n\x1b\x46\x65tchBackupsForResourceType\x12<.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest\x1a=.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse\"|\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02_\x12]/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType\x12\xb2\x01\n\tGetBackup\x12*.google.cloud.backupdr.v1.GetBackupRequest\x1a .google.cloud.backupdr.v1.Backup\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf1\x01\n\x0cUpdateBackup\x12-.google.cloud.backupdr.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02Y2O/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:\x06\x62\x61\x63kup\x12\xd3\x01\n\x0c\x44\x65leteBackup\x12-.google.cloud.backupdr.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf0\x01\n\rRestoreBackup\x12..google.cloud.backupdr.v1.RestoreBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15RestoreBackupResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore:\x01*\x12\xf1\x01\n\x10\x43reateBackupPlan\x12\x31.google.cloud.backupdr.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xf3\x01\n\x10UpdateBackupPlan\x12\x31.google.cloud.backupdr.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xa5\x01\n\rGetBackupPlan\x12..google.cloud.backupdr.v1.GetBackupPlanRequest\x1a$.google.cloud.backupdr.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xb8\x01\n\x0fListBackupPlans\x12\x30.google.cloud.backupdr.v1.ListBackupPlansRequest\x1a\x31.google.cloud.backupdr.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xd1\x01\n\x10\x44\x65leteBackupPlan\x12\x31.google.cloud.backupdr.v1.DeleteBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xc9\x01\n\x15GetBackupPlanRevision\x12\x36.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest\x1a,.google.cloud.backupdr.v1.BackupPlanRevision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/backupPlans/*/revisions/*}\x12\xdc\x01\n\x17ListBackupPlanRevisions\x12\x38.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest\x1a\x39.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/backupPlans/*}/revisions\x12\xc1\x02\n\x1b\x43reateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x39parent,backup_plan_association,backup_plan_association_id\x82\xd3\xe4\x93\x02U\":/v1/{parent=projects/*/locations/*}/backupPlanAssociations:\x17\x62\x61\x63kup_plan_association\x12\xc3\x02\n\x1bUpdateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc6\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41#backup_plan_association,update_mask\x82\xd3\xe4\x93\x02m2R/v1/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}:\x17\x62\x61\x63kup_plan_association\x12\xd1\x01\n\x18GetBackupPlanAssociation\x12\x39.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest\x1a/.google.cloud.backupdr.v1.BackupPlanAssociation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xe4\x01\n\x1aListBackupPlanAssociations\x12;.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest\x1a<.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/backupPlanAssociations\x12\xb7\x02\n*FetchBackupPlanAssociationsForResourceType\x12K.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest\x1aL.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse\"n\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02Q\x12O/v1/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType\x12\xf2\x01\n\x1b\x44\x65leteBackupPlanAssociation\x12<.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xf0\x01\n\rTriggerBackup\x12..google.cloud.backupdr.v1.TriggerBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x0cname,rule_id\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup:\x01*\x12\xc9\x01\n\x16GetDataSourceReference\x12\x37.google.cloud.backupdr.v1.GetDataSourceReferenceRequest\x1a-.google.cloud.backupdr.v1.DataSourceReference\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/dataSourceReferences/*}\x12\xdc\x01\n\x18ListDataSourceReferences\x12\x39.google.cloud.backupdr.v1.ListDataSourceReferencesRequest\x1a:.google.cloud.backupdr.v1.ListDataSourceReferencesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/dataSourceReferences\x12\xaf\x02\n(FetchDataSourceReferencesForResourceType\x12I.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest\x1aJ.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse\"l\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02O\x12M/v1/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType\x12\xde\x01\n\x11InitializeService\x12\x32.google.cloud.backupdr.v1.InitializeServiceRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41.\n\x19InitializeServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/serviceConfig}:initialize:\x01*\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.backupdr.v1B\rBackupDRProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig").msgclass + NetworkConfig::PeeringMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig.PeeringMode").enummodule + ManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementURI").msgclass + WorkforceIdentityBasedManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI").msgclass + WorkforceIdentityBasedOAuth2ClientID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID").msgclass + ManagementServer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer").msgclass + ManagementServer::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceType").enummodule + ManagementServer::InstanceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceState").enummodule + ListManagementServersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersRequest").msgclass + ListManagementServersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersResponse").msgclass + GetManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetManagementServerRequest").msgclass + CreateManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateManagementServerRequest").msgclass + DeleteManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteManagementServerRequest").msgclass + InitializeServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceRequest").msgclass + InitializeServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceResponse").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb new file mode 100644 index 000000000000..91bbec9bb35d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb @@ -0,0 +1,119 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/backupdr/v1/backupdr.proto for package 'Google.Cloud.BackupDR.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/backupdr/v1/backupdr_pb' + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # The BackupDR Service + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.backupdr.v1.BackupDR' + + # Lists ManagementServers in a given project and location. + rpc :ListManagementServers, ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Google::Cloud::BackupDR::V1::ListManagementServersResponse + # Gets details of a single ManagementServer. + rpc :GetManagementServer, ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Google::Cloud::BackupDR::V1::ManagementServer + # Creates a new ManagementServer in a given project and location. + rpc :CreateManagementServer, ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Google::Longrunning::Operation + # Deletes a single ManagementServer. + rpc :DeleteManagementServer, ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Google::Longrunning::Operation + # Creates a new BackupVault in a given project and location. + rpc :CreateBackupVault, ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Google::Longrunning::Operation + # Lists BackupVaults in a given project and location. + rpc :ListBackupVaults, ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + rpc :FetchUsableBackupVaults, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse + # Gets details of a BackupVault. + rpc :GetBackupVault, ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Google::Cloud::BackupDR::V1::BackupVault + # Updates the settings of a BackupVault. + rpc :UpdateBackupVault, ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Google::Longrunning::Operation + # Deletes a BackupVault. + rpc :DeleteBackupVault, ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Google::Longrunning::Operation + # Lists DataSources in a given project and location. + rpc :ListDataSources, ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse + # Gets details of a DataSource. + rpc :GetDataSource, ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Google::Cloud::BackupDR::V1::DataSource + # Updates the settings of a DataSource. + rpc :UpdateDataSource, ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Google::Longrunning::Operation + # Lists Backups in a given project and location. + rpc :ListBackups, ::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Google::Cloud::BackupDR::V1::ListBackupsResponse + # Fetch Backups for a given resource type. + rpc :FetchBackupsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse + # Gets details of a Backup. + rpc :GetBackup, ::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Google::Cloud::BackupDR::V1::Backup + # Updates the settings of a Backup. + rpc :UpdateBackup, ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Google::Longrunning::Operation + # Deletes a Backup. + rpc :DeleteBackup, ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Google::Longrunning::Operation + # Restore from a Backup + rpc :RestoreBackup, ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Google::Longrunning::Operation + # Create a BackupPlan + rpc :CreateBackupPlan, ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation + # Update a BackupPlan. + rpc :UpdateBackupPlan, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlan. + rpc :GetBackupPlan, ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Google::Cloud::BackupDR::V1::BackupPlan + # Lists BackupPlans in a given project and location. + rpc :ListBackupPlans, ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse + # Deletes a single BackupPlan. + rpc :DeleteBackupPlan, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlanRevision. + rpc :GetBackupPlanRevision, ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Google::Cloud::BackupDR::V1::BackupPlanRevision + # Lists BackupPlanRevisions in a given project and location. + rpc :ListBackupPlanRevisions, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse + # Create a BackupPlanAssociation + rpc :CreateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Update a BackupPlanAssociation. + rpc :UpdateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlanAssociation. + rpc :GetBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Google::Cloud::BackupDR::V1::BackupPlanAssociation + # Lists BackupPlanAssociations in a given project and location. + rpc :ListBackupPlanAssociations, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse + # List BackupPlanAssociations for a given resource type. + rpc :FetchBackupPlanAssociationsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse + # Deletes a single BackupPlanAssociation. + rpc :DeleteBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Triggers a new Backup. + rpc :TriggerBackup, ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Google::Longrunning::Operation + # Gets details of a single DataSourceReference. + rpc :GetDataSourceReference, ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Google::Cloud::BackupDR::V1::DataSourceReference + # Lists DataSourceReferences for a given project and location. + rpc :ListDataSourceReferences, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse + # Fetch DataSourceReferences for a given project, location and resource type. + rpc :FetchDataSourceReferencesForResourceType, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse + # Initializes the service related config for a project. + rpc :InitializeService, ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb new file mode 100644 index 000000000000..a17a1db88525 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupplan.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/dayofweek_pb' +require 'google/type/month_pb' + + +descriptor_data = "\n)google/cloud/backupdr/v1/backupplan.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x17google/type/month.proto\"\xa5\x07\n\nBackupPlan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.BackupPlan.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x0c\x62\x61\x63kup_rules\x18\x06 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupRuleB\x03\xe0\x41\x02\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.backupdr.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62\x61\x63kup_vault\x18\n \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12)\n\x1c\x62\x61\x63kup_vault_service_account\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12log_retention_days\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18supported_resource_types\x18\r \x03(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rrevision_name\x18\x0f \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x84\x01\xea\x41\x80\x01\n\"backupdr.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}*\x0b\x62\x61\x63kupPlans2\nbackupPlan\"\xb0\x01\n\nBackupRule\x12\x17\n\x07rule_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x15\x62\x61\x63kup_retention_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12L\n\x11standard_schedule\x18\x05 \x01(\x0b\x32*.google.cloud.backupdr.v1.StandardScheduleB\x03\xe0\x41\x01H\x00\x42\x17\n\x15\x62\x61\x63kup_schedule_oneof\"\x97\x04\n\x10StandardSchedule\x12W\n\x0frecurrence_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.backupdr.v1.StandardSchedule.RecurrenceTypeB\x03\xe0\x41\x02\x12\x1d\n\x10hourly_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x31\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x1a\n\rdays_of_month\x18\x04 \x03(\x05\x42\x03\xe0\x41\x01\x12H\n\x11week_day_of_month\x18\x05 \x01(\x0b\x32(.google.cloud.backupdr.v1.WeekDayOfMonthB\x03\xe0\x41\x01\x12\'\n\x06months\x18\x06 \x03(\x0e\x32\x12.google.type.MonthB\x03\xe0\x41\x01\x12\x42\n\rbackup_window\x18\x07 \x01(\x0b\x32&.google.cloud.backupdr.v1.BackupWindowB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x08 \x01(\tB\x03\xe0\x41\x02\"m\n\x0eRecurrenceType\x12\x1f\n\x1bRECURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\"L\n\x0c\x42\x61\x63kupWindow\x12\x1e\n\x11start_hour_of_day\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x65nd_hour_of_day\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xfa\x01\n\x0eWeekDayOfMonth\x12P\n\rweek_of_month\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonthB\x03\xe0\x41\x02\x12\x30\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"d\n\x0bWeekOfMonth\x12\x1d\n\x19WEEK_OF_MONTH_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IRST\x10\x01\x12\n\n\x06SECOND\x10\x02\x12\t\n\x05THIRD\x10\x03\x12\n\n\x06\x46OURTH\x10\x04\x12\x08\n\x04LAST\x10\x05\"\xd3\x01\n\x17\x43reateBackupPlanRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x62\x61\x63kup_plan\x18\x03 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb1\x01\n\x16ListBackupPlansRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListBackupPlansResponse\x12:\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\"t\n\x17\x44\x65leteBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n\x17UpdateBackupPlanRequest\x12>\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x90\x04\n\x12\x42\x61\x63kupPlanRevision\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupPlanRevision.StateB\x03\xe0\x41\x03\x12\x42\n\x14\x62\x61\x63kup_plan_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04:\xb1\x01\xea\x41\xad\x01\n*backupdr.googleapis.com/BackupPlanRevision\x12Vprojects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}*\x13\x62\x61\x63kupPlanRevisions2\x12\x62\x61\x63kupPlanRevision\"`\n\x1cGetBackupPlanRevisionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*backupdr.googleapis.com/BackupPlanRevision\"\x95\x01\n\x1eListBackupPlanRevisionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*backupdr.googleapis.com/BackupPlanRevision\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9c\x01\n\x1fListBackupPlanRevisionsResponse\x12K\n\x15\x62\x61\x63kup_plan_revisions\x18\x01 \x03(\x0b\x32,.google.cloud.backupdr.v1.BackupPlanRevision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xbf\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + BackupPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan").msgclass + BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan.State").enummodule + BackupRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupRule").msgclass + StandardSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule").msgclass + StandardSchedule::RecurrenceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule.RecurrenceType").enummodule + BackupWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupWindow").msgclass + WeekDayOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth").msgclass + WeekDayOfMonth::WeekOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth").enummodule + CreateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanRequest").msgclass + ListBackupPlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansRequest").msgclass + ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansResponse").msgclass + GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRequest").msgclass + DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanRequest").msgclass + UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanRequest").msgclass + BackupPlanRevision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision").msgclass + BackupPlanRevision::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision.State").enummodule + GetBackupPlanRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRevisionRequest").msgclass + ListBackupPlanRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest").msgclass + ListBackupPlanRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb new file mode 100644 index 000000000000..377b868210a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupplanassociation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_alloydb_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n4google/cloud/backupdr/v1/backupplanassociation.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/backupdr/v1/backupvault_alloydb.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xe9\x08\n\x15\x42\x61\x63kupPlanAssociation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1d\n\rresource_type\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x08resource\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12?\n\x0b\x62\x61\x63kup_plan\x18\x04 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.BackupPlanAssociation.StateB\x03\xe0\x41\x03\x12H\n\x11rules_config_info\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.RuleConfigInfoB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x8f\x01\n5cloud_sql_instance_backup_plan_association_properties\x18\n \x01(\x0b\x32I.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12\x8a\x01\n2alloydb_cluster_backup_plan_association_properties\x18\x0f \x01(\x0b\x32G.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12$\n\x17\x62\x61\x63kup_plan_revision_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x62\x61\x63kup_plan_revision_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xbc\x01\xea\x41\xb8\x01\n-backupdr.googleapis.com/BackupPlanAssociation\x12Xprojects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}*\x16\x62\x61\x63kupPlanAssociations2\x15\x62\x61\x63kupPlanAssociationB\x15\n\x13resource_properties\"\x89\x03\n\x0eRuleConfigInfo\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x11last_backup_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\x8c\x02\n\"CreateBackupPlanAssociationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\'\n\x1a\x62\x61\x63kup_plan_association_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n!ListBackupPlanAssociationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\"ListBackupPlanAssociationsResponse\x12Q\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xf3\x01\n1FetchBackupPlanAssociationsForResourceTypeRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n2FetchBackupPlanAssociationsForResourceTypeResponse\x12V\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"f\n\x1fGetBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\"\x8a\x01\n\"DeleteBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd2\x01\n\"UpdateBackupPlanAssociationRequest\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x01 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x92\x01\n\x14TriggerBackupRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x14\n\x07rule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xca\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x1a\x42\x61\x63kupPlanAssociationProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + BackupPlanAssociation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation").msgclass + BackupPlanAssociation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation.State").enummodule + RuleConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo").msgclass + RuleConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState").enummodule + CreateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest").msgclass + ListBackupPlanAssociationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest").msgclass + ListBackupPlanAssociationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse").msgclass + FetchBackupPlanAssociationsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest").msgclass + FetchBackupPlanAssociationsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse").msgclass + GetBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanAssociationRequest").msgclass + DeleteBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest").msgclass + UpdateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest").msgclass + TriggerBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TriggerBackupRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb new file mode 100644 index 000000000000..779033cb68ba --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_alloydb.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n2google/cloud/backupdr/v1/backupvault_alloydb.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\"Z\n\"AlloyDBClusterDataSourceProperties\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\"\x9b\x01\n\x1e\x41lloyDbClusterBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cstored_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08\x63hain_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x64\x61tabase_version\x18\x04 \x01(\tB\x03\xe0\x41\x03\x42\x0e\n\x0c_description\"Q\n-AlloyDBClusterBackupPlanAssociationProperties\x12 \n\x0b\x63luster_uid\x18\x01 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xa6\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x17\x42\x61\x63kupvaultAlloyDBProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\\\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + AlloyDBClusterDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties").msgclass + AlloyDbClusterBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDbClusterBackupProperties").msgclass + AlloyDBClusterBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb new file mode 100644 index 000000000000..54c592031980 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_ba.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/backupdr/v1/backupvault_ba.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\x02\n\x1f\x42\x61\x63kupApplianceBackupProperties\x12\x1f\n\rgeneration_id\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12;\n\rfinalize_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12G\n\x19recovery_range_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x45\n\x17recovery_range_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x10\n\x0e_generation_idB\x10\n\x0e_finalize_timeB\x1c\n\x1a_recovery_range_start_timeB\x1a\n\x18_recovery_range_end_timeB\xc2\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x12\x42\x61\x63kupvaultBaProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + BackupApplianceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb new file mode 100644 index 000000000000..74bfb355222d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_cloudsql.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/backupdr/v1/backupvault_cloudsql.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x01\n$CloudSqlInstanceDataSourceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xc3\x02\n CloudSqlInstanceBackupProperties\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x66inal_backup\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0fsource_instance\x18\x04 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12=\n\x14instance_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_delete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xeb\x01\n-CloudSqlInstanceDataSourceReferenceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n$CloudSqlInstanceInitializationConfig\x12\\\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x46.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.EditionB\x03\xe0\x41\x02\"G\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x02\"p\n/CloudSqlInstanceBackupPlanAssociationProperties\x12=\n\x14instance_create_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x96\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x42\x61\x63kupvaultCloudSqlProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41K\n sqladmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + CloudSqlInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties").msgclass + CloudSqlInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties").msgclass + CloudSqlInstanceDataSourceReferenceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties").msgclass + CloudSqlInstanceInitializationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig").msgclass + CloudSqlInstanceInitializationConfig::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition").enummodule + CloudSqlInstanceBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb new file mode 100644 index 000000000000..22dcc5473054 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_disk.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_gce_pb' + + +descriptor_data = "\n/google/cloud/backupdr/v1/backupvault_disk.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\"@\n\x15\x44iskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"d\n\x1bRegionDiskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rreplica_zones\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xa5\x0b\n\x15\x44iskRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x19\n\x07size_gb\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x15\n\x08licenses\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12G\n\x10guest_os_feature\x18\x05 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x06 \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12+\n\x19physical_block_size_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10provisioned_iops\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16provisioned_throughput\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12-\n\x1b\x65nable_confidential_compute\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x45\n\x0cstorage_pool\x18\x0b \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"compute.googleapis.com/StoragePoolH\x08\x88\x01\x01\x12Y\n\x0b\x61\x63\x63\x65ss_mode\x18\x0c \x01(\x0e\x32:.google.cloud.backupdr.v1.DiskRestoreProperties.AccessModeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\\\n\x0c\x61rchitecture\x18\x0e \x01(\x0e\x32<.google.cloud.backupdr.v1.DiskRestoreProperties.ArchitectureB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1c\n\x0fresource_policy\x18\x0f \x03(\tB\x03\xe0\x41\x01\x12\x16\n\x04type\x18\x10 \x01(\tB\x03\xe0\x41\x02H\x0b\x88\x01\x01\x12P\n\x06labels\x18\x11 \x03(\x0b\x32;.google.cloud.backupdr.v1.DiskRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12l\n\x15resource_manager_tags\x18\x12 \x03(\x0b\x32H.google.cloud.backupdr.v1.DiskRestoreProperties.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"L\n\nAccessMode\x12\x15\n\x11READ_WRITE_SINGLE\x10\x00\x12\x13\n\x0fREAD_WRITE_MANY\x10\x01\x12\x12\n\x0eREAD_ONLY_MANY\x10\x02\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\n\n\x08_size_gbB\x16\n\x14_disk_encryption_keyB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x1e\n\x1c_enable_confidential_computeB\x0f\n\r_storage_poolB\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x07\n\x05_type\"\xff\x03\n\x14\x44iskBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08licenses\x18\x02 \x03(\t\x12\x42\n\x10guest_os_feature\x18\x03 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeature\x12V\n\x0c\x61rchitecture\x18\x04 \x01(\x0e\x32;.google.cloud.backupdr.v1.DiskBackupProperties.ArchitectureH\x01\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07size_gb\x18\x06 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06region\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x11\n\x04zone\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x15\n\rreplica_zones\x18\t \x03(\t\x12\x18\n\x0bsource_disk\x18\n \x01(\tH\x06\x88\x01\x01\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x0e\n\x0c_descriptionB\x0f\n\r_architectureB\x07\n\x05_typeB\n\n\x08_size_gbB\t\n\x07_regionB\x07\n\x05_zoneB\x0e\n\x0c_source_disk\"\\\n\x18\x44iskDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0f\n\x07size_gb\x18\x04 \x01(\x03\x42\xa8\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x14\x42\x61\x63kupvaultDiskProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\x61\n\"compute.googleapis.com/StoragePool\x12;projects/{project}/zones/{zone}/storagePools/{storage_pool}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + DiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskTargetEnvironment").msgclass + RegionDiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RegionDiskTargetEnvironment").msgclass + DiskRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties").msgclass + DiskRestoreProperties::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode").enummodule + DiskRestoreProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.Architecture").enummodule + DiskBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties").msgclass + DiskBackupProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties.Architecture").enummodule + DiskDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskDataSourceProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb new file mode 100644 index 000000000000..06a571c45721 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_gce.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' + + +descriptor_data = "\n.google/cloud/backupdr/v1/backupvault_gce.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xe8\x07\n\x1f\x43omputeInstanceBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x04tags\x18\x02 \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsH\x01\x88\x01\x01\x12\x19\n\x0cmachine_type\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63\x61n_ip_forward\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x45\n\x11network_interface\x18\x05 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterface\x12\x34\n\x04\x64isk\x18\x06 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDisk\x12\x39\n\x08metadata\x18\x07 \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataH\x04\x88\x01\x01\x12\x41\n\x0fservice_account\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccount\x12=\n\nscheduling\x18\t \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingH\x05\x88\x01\x01\x12\x46\n\x11guest_accelerator\x18\n \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfig\x12\x1d\n\x10min_cpu_platform\x18\x0b \x01(\tH\x06\x88\x01\x01\x12Z\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeH\x07\x88\x01\x01\x12\x1c\n\x0fsource_instance\x18\r \x01(\tH\x08\x88\x01\x01\x12U\n\x06labels\x18\x0e \x03(\x0b\x32\x45.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\x07\n\x05_tagsB\x0f\n\r_machine_typeB\x11\n\x0f_can_ip_forwardB\x0b\n\t_metadataB\r\n\x0b_schedulingB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_key_revocation_action_typeB\x12\n\x10_source_instance\"\xc7\x12\n ComputeInstanceRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12^\n\x19\x61\x64vanced_machine_features\x18\x02 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.AdvancedMachineFeaturesB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0e\x63\x61n_ip_forward\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x64\n\x1c\x63onfidential_instance_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12%\n\x13\x64\x65letion_protection\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12:\n\x05\x64isks\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDiskB\x03\xe0\x41\x01\x12I\n\x0e\x64isplay_device\x18\x08 \x01(\x0b\x32\'.google.cloud.backupdr.v1.DisplayDeviceB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12L\n\x12guest_accelerators\x18\t \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1a\n\x08hostname\x18\n \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12Z\n\x17instance_encryption_key\x18\x0b \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12_\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12[\n\x06labels\x18\r \x03(\x0b\x32\x46.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x0cmachine_type\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x08metadata\x18\x0f \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\x10min_cpu_platform\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12K\n\x12network_interfaces\x18\x11 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterfaceB\x03\xe0\x41\x01\x12`\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.NetworkPerformanceConfigB\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x42\n\x06params\x18\x13 \x01(\x0b\x32(.google.cloud.backupdr.v1.InstanceParamsB\x03\xe0\x41\x04H\x0e\x88\x01\x01\x12\x88\x01\n\x1aprivate_ipv6_google_access\x18\x14 \x01(\x0e\x32Z.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccessB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12h\n\x13\x61llocation_affinity\x18\x15 \x01(\x0b\x32,.google.cloud.backupdr.v1.AllocationAffinityB\x03\xe0\x41\x01H\x10R\x13reservationAffinity\x88\x01\x01\x12\x1e\n\x11resource_policies\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\nscheduling\x18\x17 \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingB\x03\xe0\x41\x01H\x11\x88\x01\x01\x12G\n\x10service_accounts\x18\x18 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccountB\x03\xe0\x41\x01\x12\x36\n\x04tags\x18\x1a \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsB\x03\xe0\x41\x01H\x12\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc7\x01\n\x1fInstancePrivateIpv6GoogleAccess\x12\x33\n/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\'\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\x02\x12)\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\x03\x42\x07\n\x05_nameB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0b\n\t_hostnameB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x16\n\x14_allocation_affinityB\r\n\x0b_schedulingB\x07\n\x05_tags\"K\n ComputeInstanceTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n#ComputeInstanceDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cmachine_type\x18\x03 \x01(\t\x12\x18\n\x10total_disk_count\x18\x04 \x01(\x03\x12\x1a\n\x12total_disk_size_gb\x18\x05 \x01(\x03\"\xa5\x02\n\x17\x41\x64vancedMachineFeatures\x12.\n\x1c\x65nable_nested_virtualization\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10threads_per_core\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x12visible_core_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12(\n\x16\x65nable_uefi_networking\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x13\n\x11_threads_per_coreB\x15\n\x13_visible_core_countB\x19\n\x17_enable_uefi_networking\"k\n\x1a\x43onfidentialInstanceConfig\x12-\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1e\n\x1c_enable_confidential_compute\"D\n\rDisplayDevice\x12 \n\x0e\x65nable_display\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x87\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x10\x61\x63\x63\x65lerator_type\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_accelerator_typeB\x14\n\x12_accelerator_count\"\xbc\x01\n\x15\x43ustomerEncryptionKey\x12\x16\n\x07raw_key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12 \n\x11rsa_encrypted_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0ckms_key_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12)\n\x17kms_key_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x05\n\x03keyB\x1a\n\x18_kms_key_service_account\"I\n\x05\x45ntry\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"?\n\x08Metadata\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32\x1f.google.cloud.backupdr.v1.EntryB\x03\xe0\x41\x01\"\x96\t\n\x10NetworkInterface\x12\x19\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12/\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02H\x02R\tnetworkIP\x88\x01\x01\x12&\n\x0cipv6_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x03H\x03\x88\x01\x01\x12-\n\x1binternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63\x65ss_configs\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12H\n\x13ipv6_access_configs\x18\x08 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x61lias_ip_ranges\x18\t \x03(\x0b\x32&.google.cloud.backupdr.v1.AliasIpRangeB\x03\xe0\x41\x01\x12M\n\nstack_type\x18\n \x01(\x0e\x32\x34.google.cloud.backupdr.v1.NetworkInterface.StackTypeH\x06\x88\x01\x01\x12]\n\x10ipv6_access_type\x18\x0b \x01(\x0e\x32\x39.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessTypeB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0bqueue_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12N\n\x08nic_type\x18\r \x01(\x0e\x32\x32.google.cloud.backupdr.v1.NetworkInterface.NicTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12$\n\x12network_attachment\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\"E\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIPV4_ONLY\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIpv6AccessType\x12 \n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\">\n\x07NicType\x12\x18\n\x14NIC_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nVIRTIO_NET\x10\x01\x12\t\n\x05GVNIC\x10\x02\x42\n\n\x08_networkB\r\n\x0b_subnetworkB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x07\n\x05_nameB\r\n\x0b_stack_typeB\x13\n\x11_ipv6_access_typeB\x0e\n\x0c_queue_countB\x0b\n\t_nic_typeB\x15\n\x13_network_attachment\"\xd9\x01\n\x18NetworkPerformanceConfig\x12\x66\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.NetworkPerformanceConfig.TierB\x03\xe0\x41\x01H\x00\x88\x01\x01\"5\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06TIER_1\x10\x02\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\xb2\x05\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AccessConfig.AccessTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x0b\x65xternal_ip\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x05natIP\x88\x01\x01\x12\x1f\n\rexternal_ipv6\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x65xternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12 \n\x0eset_public_ptr\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16public_ptr_domain_name\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12R\n\x0cnetwork_tier\x18\x08 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.AccessConfig.NetworkTierB\x03\xe0\x41\x01H\x07\x88\x01\x01\"N\n\nAccessType\x12\x1b\n\x17\x41\x43\x43\x45SS_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eONE_TO_ONE_NAT\x10\x01\x12\x0f\n\x0b\x44IRECT_IPV6\x10\x02\"F\n\x0bNetworkTier\x12\x1c\n\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREMIUM\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x42\x07\n\x05_typeB\x07\n\x05_nameB\x0e\n\x0c_external_ipB\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x11\n\x0f_set_public_ptrB\x19\n\x17_public_ptr_domain_nameB\x0f\n\r_network_tier\"\x84\x01\n\x0c\x41liasIpRange\x12\x1f\n\rip_cidr_range\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15subnetwork_range_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\xb3\x01\n\x0eInstanceParams\x12\x65\n\x15resource_manager_tags\x18\x01 \x03(\x0b\x32\x41.google.cloud.backupdr.v1.InstanceParams.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x02\n\x12\x41llocationAffinity\x12t\n\x17\x63onsume_allocation_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AllocationAffinity.TypeB\x03\xe0\x41\x01H\x00R\x16\x63onsumeReservationType\x88\x01\x01\x12\x15\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x42\x1a\n\x18_consume_allocation_typeB\x06\n\x04_key\"\xdc\t\n\nScheduling\x12]\n\x13on_host_maintenance\x18\x01 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.OnHostMaintenanceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61utomatic_restart\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bpreemptible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12O\n\x0fnode_affinities\x18\x04 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.Scheduling.NodeAffinityB\x03\xe0\x41\x01\x12\x1f\n\rmin_node_cpus\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x12provisioning_model\x18\x06 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.ProvisioningModelB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12m\n\x1binstance_termination_action\x18\x07 \x01(\x0e\x32>.google.cloud.backupdr.v1.Scheduling.InstanceTerminationActionB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12Z\n\x1alocal_ssd_recovery_timeout\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.SchedulingDurationB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\xe1\x01\n\x0cNodeAffinity\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x08operator\x18\x02 \x01(\x0e\x32:.google.cloud.backupdr.v1.Scheduling.NodeAffinity.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x06\n\x04_keyB\x0b\n\t_operator\"U\n\x11OnHostMaintenance\x12#\n\x1fON_HOST_MAINTENANCE_UNSPECIFIED\x10\x00\x12\r\n\tTERMINATE\x10\x01\x12\x0c\n\x07MIGRATE\x10\xe8\x07\"O\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\"^\n\x19InstanceTerminationAction\x12+\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\x16\n\x14_on_host_maintenanceB\x14\n\x12_automatic_restartB\x0e\n\x0c_preemptibleB\x10\n\x0e_min_node_cpusB\x15\n\x13_provisioning_modelB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeout\"^\n\x12SchedulingDuration\x12\x19\n\x07seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05nanos\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_secondsB\x08\n\x06_nanos\"H\n\x0eServiceAccount\x12\x17\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x08\n\x06_email\"\x1a\n\x04Tags\x12\x12\n\x05items\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x91\x0c\n\x0c\x41ttachedDisk\x12\\\n\x11initialize_params\x18\x01 \x01(\x0b\x32\x37.google.cloud.backupdr.v1.AttachedDisk.InitializeParamsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65vice_name\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\x04kind\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14\x64isk_type_deprecated\x18\x06 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x02\x18\x01H\x03\x88\x01\x01\x12G\n\x04mode\x18\x07 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskModeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x18\n\x06source\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\x05index\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04\x62oot\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0b\x61uto_delete\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x14\n\x07license\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12V\n\x0e\x64isk_interface\x18\r \x01(\x0e\x32\x34.google.cloud.backupdr.v1.AttachedDisk.DiskInterfaceB\x03\xe0\x41\x01H\t\x88\x01\x01\x12G\n\x10guest_os_feature\x18\x0e \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x0f \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0c\x64isk_size_gb\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12W\n\x0bsaved_state\x18\x11 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.AttachedDisk.DiskSavedStateB\x06\xe0\x41\x01\xe0\x41\x03H\x0c\x88\x01\x01\x12\x1e\n\tdisk_type\x18\x12 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\r\x88\x01\x01\x12G\n\x04type\x18\x13 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x1aY\n\x10InitializeParams\x12\x1b\n\tdisk_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\rreplica_zones\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_disk_name\"B\n\x08\x44iskType\x12\x19\n\x15\x44ISK_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCRATCH\x10\x01\x12\x0e\n\nPERSISTENT\x10\x02\"P\n\x08\x44iskMode\x12\x19\n\x15\x44ISK_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\n\n\x06LOCKED\x10\x03\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\"A\n\x0e\x44iskSavedState\x12 \n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\x00\x12\r\n\tPRESERVED\x10\x01\x42\x14\n\x12_initialize_paramsB\x0e\n\x0c_device_nameB\x07\n\x05_kindB\x17\n\x15_disk_type_deprecatedB\x07\n\x05_modeB\t\n\x07_sourceB\x08\n\x06_indexB\x07\n\x05_bootB\x0e\n\x0c_auto_deleteB\x11\n\x0f_disk_interfaceB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0e\n\x0c_saved_stateB\x0c\n\n_disk_typeB\x07\n\x05_type\"\xb5\x03\n\x0eGuestOsFeature\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.GuestOsFeature.FeatureTypeH\x00\x88\x01\x01\"\xd0\x02\n\x0b\x46\x65\x61tureType\x12\x1c\n\x18\x46\x45\x41TURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VIRTIO_SCSI_MULTIQUEUE\x10\x01\x12\x0b\n\x07WINDOWS\x10\x02\x12\x13\n\x0fMULTI_IP_SUBNET\x10\x03\x12\x13\n\x0fUEFI_COMPATIBLE\x10\x04\x12\x0f\n\x0bSECURE_BOOT\x10\x05\x12\t\n\x05GVNIC\x10\x06\x12\x0f\n\x0bSEV_CAPABLE\x10\x07\x12\x1f\n\x1b\x42\x41RE_METAL_LINUX_COMPATIBLE\x10\x08\x12\x1d\n\x19SUSPEND_RESUME_COMPATIBLE\x10\t\x12\x17\n\x13SEV_LIVE_MIGRATABLE\x10\n\x12\x13\n\x0fSEV_SNP_CAPABLE\x10\x0b\x12\x0f\n\x0bTDX_CAPABLE\x10\x0c\x12\x08\n\x04IDPF\x10\r\x12\x1a\n\x16SEV_LIVE_MIGRATABLE_V2\x10\x0e\x42\x07\n\x05_type*Y\n\x17KeyRevocationActionType\x12*\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\xc3\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x13\x42\x61\x63kupvaultGceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + ComputeInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceBackupProperties").msgclass + ComputeInstanceRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties").msgclass + ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess").enummodule + ComputeInstanceTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment").msgclass + ComputeInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties").msgclass + AdvancedMachineFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AdvancedMachineFeatures").msgclass + ConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ConfidentialInstanceConfig").msgclass + DisplayDevice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DisplayDevice").msgclass + AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AcceleratorConfig").msgclass + CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CustomerEncryptionKey").msgclass + Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Entry").msgclass + Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Metadata").msgclass + NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface").msgclass + NetworkInterface::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.StackType").enummodule + NetworkInterface::Ipv6AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType").enummodule + NetworkInterface::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.NicType").enummodule + NetworkPerformanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig").msgclass + NetworkPerformanceConfig::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier").enummodule + AccessConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig").msgclass + AccessConfig::AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.AccessType").enummodule + AccessConfig::NetworkTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.NetworkTier").enummodule + AliasIpRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AliasIpRange").msgclass + InstanceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InstanceParams").msgclass + AllocationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity").msgclass + AllocationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity.Type").enummodule + Scheduling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling").msgclass + Scheduling::NodeAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity").msgclass + Scheduling::NodeAffinity::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator").enummodule + Scheduling::OnHostMaintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.OnHostMaintenance").enummodule + Scheduling::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.ProvisioningModel").enummodule + Scheduling::InstanceTerminationAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction").enummodule + SchedulingDuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.SchedulingDuration").msgclass + ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceAccount").msgclass + Tags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Tags").msgclass + AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk").msgclass + AttachedDisk::InitializeParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.InitializeParams").msgclass + AttachedDisk::DiskType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskType").enummodule + AttachedDisk::DiskMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskMode").enummodule + AttachedDisk::DiskInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskInterface").enummodule + AttachedDisk::DiskSavedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskSavedState").enummodule + GuestOsFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature").msgclass + GuestOsFeature::FeatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature.FeatureType").enummodule + KeyRevocationActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.KeyRevocationActionType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb new file mode 100644 index 000000000000..75f9ea85ef49 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_alloydb_pb' +require 'google/cloud/backupdr/v1/backupvault_ba_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/cloud/backupdr/v1/backupvault_disk_pb' +require 'google/cloud/backupdr/v1/backupvault_gce_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n*google/cloud/backupdr/v1/backupvault.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/backupdr/v1/backupvault_alloydb.proto\x1a-google/cloud/backupdr/v1/backupvault_ba.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a/google/cloud/backupdr/v1/backupvault_disk.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9f\x0f\n\x0b\x42\x61\x63kupVault\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.BackupVault.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12W\n*backup_minimum_enforced_retention_duration\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1b \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\tdeletable\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x16\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupVault.StateB\x03\xe0\x41\x03\x12<\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12total_stored_bytes\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x15 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12P\n\x0b\x61nnotations\x18\x16 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.AnnotationsEntryB\x03\xe0\x41\x01\x12X\n\x12\x61\x63\x63\x65ss_restriction\x18\x18 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.BackupVault.AccessRestrictionB\x03\xe0\x41\x01\x12[\n\x11\x65ncryption_config\x18\x1d \x01(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.EncryptionConfigB\x03\xe0\x41\x01H\x08\x88\x01\x01\x1ai\n\x10\x45ncryptionConfig\x12\x44\n\x0ckms_key_name\x18\x01 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x00\x88\x01\x01\x42\x0f\n\r_kms_key_name\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x1a\x42\x61\x63kupRetentionInheritance\x12,\n(BACKUP_RETENTION_INHERITANCE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_VAULT_RETENTION\x10\x01\x12\x1c\n\x18MATCH_BACKUP_EXPIRE_TIME\x10\x02\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\"\x9e\x01\n\x11\x41\x63\x63\x65ssRestriction\x12\"\n\x1e\x41\x43\x43\x45SS_RESTRICTION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWITHIN_PROJECT\x10\x01\x12\x17\n\x13WITHIN_ORGANIZATION\x10\x02\x12\x10\n\x0cUNRESTRICTED\x10\x03\x12&\n\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\x10\x04:\x88\x01\xea\x41\x84\x01\n#backupdr.googleapis.com/BackupVault\x12\x42projects/{project}/locations/{location}/backupVaults/{backupvault}*\x0c\x62\x61\x63kupVaults2\x0b\x62\x61\x63kupVaultB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB-\n+_backup_minimum_enforced_retention_durationB\x1f\n\x1d_backup_retention_inheritanceB\x0c\n\n_deletableB\x07\n\x05_etagB\x11\n\x0f_effective_timeB\x14\n\x12_encryption_config\"\x8c\t\n\nDataSource\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05state\x18\x15 \x01(\x0e\x32*.google.cloud.backupdr.v1.DataSource.StateB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.DataSource.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x07 \x01(\x03H\x03\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x12total_stored_bytes\x18\x17 \x01(\x03H\x05\x88\x01\x01\x12\x46\n\x0c\x63onfig_state\x18\x18 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12K\n\x12\x62\x61\x63kup_config_info\x18\x19 \x01(\x0b\x32*.google.cloud.backupdr.v1.BackupConfigInfoB\x03\xe0\x41\x03\x12S\n\x18\x64\x61ta_source_gcp_resource\x18\x1a \x01(\x0b\x32/.google.cloud.backupdr.v1.DataSourceGcpResourceH\x00\x12r\n(data_source_backup_appliance_application\x18\x1b \x01(\x0b\x32>.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationH\x00\x12\x37\n*backup_blocked_by_vault_access_restriction\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\x9e\x01\xea\x41\x9a\x01\n\"backupdr.googleapis.com/DataSource\x12[projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x11\n\x0fsource_resourceB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x0f\n\r_backup_countB\x07\n\x05_etagB\x15\n\x13_total_stored_bytes\"\xb1\x04\n\x10\x42\x61\x63kupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x11gcp_backup_config\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.GcpBackupConfigH\x00\x12_\n\x1e\x62\x61\x63kup_appliance_backup_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.BackupApplianceBackupConfigH\x00\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x0f\n\rbackup_config\"\xa4\x02\n\x0fGcpBackupConfig\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\x17\x62\x61\x63kup_plan_description\x18\x02 \x01(\t\x12S\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\tB2\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x19\n\x11\x62\x61\x63kup_plan_rules\x18\x04 \x03(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x05 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x06 \x01(\t\"\xba\x01\n\x1b\x42\x61\x63kupApplianceBackupConfig\x12\x1d\n\x15\x62\x61\x63kup_appliance_name\x18\x01 \x01(\t\x12\x1b\n\x13\x62\x61\x63kup_appliance_id\x18\x02 \x01(\x03\x12\x0e\n\x06sla_id\x18\x03 \x01(\x03\x12\x18\n\x10\x61pplication_name\x18\x04 \x01(\t\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x10\n\x08slt_name\x18\x06 \x01(\t\x12\x10\n\x08slp_name\x18\x07 \x01(\t\"\xaa\x04\n\x15\x44\x61taSourceGcpResource\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12o\n&compute_instance_datasource_properties\x18\x04 \x01(\x0b\x32=.google.cloud.backupdr.v1.ComputeInstanceDataSourcePropertiesH\x00\x12w\n(cloud_sql_instance_datasource_properties\x18\x05 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12s\n&alloy_db_cluster_datasource_properties\x18\x06 \x01(\x0b\x32<.google.cloud.backupdr.v1.AlloyDBClusterDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12X\n\x1a\x64isk_datasource_properties\x18\x07 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.DiskDataSourcePropertiesH\x00\x42\x19\n\x17gcp_resource_properties\"\xb9\x01\n$DataSourceBackupApplianceApplication\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_appliance\x18\x02 \x01(\t\x12\x14\n\x0c\x61ppliance_id\x18\x03 \x01(\x03\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x08 \x01(\x03\x12\x10\n\x08hostname\x18\x06 \x01(\t\x12\x0f\n\x07host_id\x18\x07 \x01(\x03\")\n\x0fServiceLockInfo\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x17\x42\x61\x63kupApplianceLockInfo\x12 \n\x13\x62\x61\x63kup_appliance_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\"\n\x15\x62\x61\x63kup_appliance_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0block_reason\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x08job_name\x18\x06 \x01(\tH\x00\x12\x16\n\x0c\x62\x61\x63kup_image\x18\x07 \x01(\tH\x00\x12\x10\n\x06sla_id\x18\x08 \x01(\x03H\x00\x42\r\n\x0block_source\"\xfe\x01\n\nBackupLock\x12\x38\n\x0flock_until_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12W\n\x1a\x62\x61\x63kup_appliance_lock_info\x18\x03 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.BackupApplianceLockInfoH\x00\x12K\n\x11service_lock_info\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.ServiceLockInfoB\x03\xe0\x41\x03H\x00\x42\x10\n\x0e\x43lientLockInfo\"\x80\x14\n\x06\x42\x61\x63kup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x41\n\x06labels\x18\x05 \x03(\x0b\x32,.google.cloud.backupdr.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12I\n\x1b\x65nforced_retention_end_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1e \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x39\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12>\n\x10\x63onsistency_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\t\x88\x01\x01\x12\x16\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12:\n\x05state\x18\x0f \x01(\x0e\x32&.google.cloud.backupdr.v1.Backup.StateB\x03\xe0\x41\x03\x12@\n\rservice_locks\x18\x11 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x03\x12I\n\x16\x62\x61\x63kup_appliance_locks\x18\x12 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x01\x12l\n\"compute_instance_backup_properties\x18\x13 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.ComputeInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12o\n$cloud_sql_instance_backup_properties\x18\x1a \x01(\x0b\x32:.google.cloud.backupdr.v1.CloudSqlInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12l\n\"backup_appliance_backup_properties\x18\x15 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.BackupApplianceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x63\n\x1a\x61lloy_db_backup_properties\x18\x1b \x01(\x0b\x32\x38.google.cloud.backupdr.v1.AlloyDbClusterBackupPropertiesB\x03\xe0\x41\x03H\x00\x12U\n\x16\x64isk_backup_properties\x18\x1c \x01(\x0b\x32..google.cloud.backupdr.v1.DiskBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x45\n\x0b\x62\x61\x63kup_type\x18\x14 \x01(\x0e\x32+.google.cloud.backupdr.v1.Backup.BackupTypeB\x03\xe0\x41\x03\x12W\n\x14gcp_backup_plan_info\x18\x16 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfoB\x03\xe0\x41\x03H\x01\x12 \n\x13resource_size_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x19 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12H\n\x0cgcp_resource\x18\x1f \x01(\x0b\x32+.google.cloud.backupdr.v1.BackupGcpResourceB\x03\xe0\x41\x03H\x02\x12J\n\x10kms_key_versions\x18! \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\xb2\x01\n\x11GCPBackupPlanInfo\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x13\x62\x61\x63kup_plan_rule_id\x18\x02 \x01(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x03 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x04 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\r\n\tUPLOADING\x10\x05\"b\n\nBackupType\x12\x1b\n\x17\x42\x41\x43KUP_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\r\n\tON_DEMAND\x10\x02\x12\x19\n\x15ON_DEMAND_OPERATIONAL\x10\x03:\xa3\x01\xea\x41\x9f\x01\n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12lprojects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupB\x13\n\x11\x62\x61\x63kup_propertiesB\x0b\n\tplan_infoB\x11\n\x0fsource_resourceB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x1e\n\x1c_enforced_retention_end_timeB\x1f\n\x1d_backup_retention_inheritanceB\x0e\n\x0c_expire_timeB\x13\n\x11_consistency_timeB\x07\n\x05_etagB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xf4\x01\n\x18\x43reateBackupVaultRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x1c\n\x0f\x62\x61\x63kup_vault_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x03 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xf1\x01\n\x17ListBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12<\n\x04view\x18\x06 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x86\x01\n\x18ListBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x1e\x46\x65tchUsableBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1f\x46\x65tchUsableBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8e\x02\n\"FetchBackupsForResourceTypeRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x07 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"q\n#FetchBackupsForResourceTypeResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x90\x01\n\x15GetBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12<\n\x04view\x18\x02 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x91\x02\n\x18UpdateBackupVaultRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x02 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x66orce_update_access_restriction\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xfc\x01\n\x18\x44\x65leteBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1dignore_backup_plan_references\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x16ListDataSourcesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/DataSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListDataSourcesResponse\x12:\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetDataSourceRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/DataSource\"\xcc\x01\n\x17UpdateDataSourceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12>\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32$.google.cloud.backupdr.v1.DataSourceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x01\n\x12ListBackupsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x06 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"v\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10GetBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x37\n\x04view\x18\x02 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"\xa3\x01\n\x13UpdateBackupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32 .google.cloud.backupdr.v1.BackupB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"l\n\x13\x44\x65leteBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xe2\x05\n\x14RestoreBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n#compute_instance_target_environment\x18\x03 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironmentH\x00\x12R\n\x17\x64isk_target_environment\x18\x05 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskTargetEnvironmentH\x00\x12_\n\x1eregion_disk_target_environment\x18\x06 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.RegionDiskTargetEnvironmentH\x00\x12i\n#compute_instance_restore_properties\x18\x04 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceRestorePropertiesH\x01\x12R\n\x17\x64isk_restore_properties\x18\x07 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskRestorePropertiesH\x01\x12H\n\x1a\x63lear_overrides_field_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x14\n\x12target_environmentB\x15\n\x13instance_propertiesB\x1d\n\x1b_clear_overrides_field_mask\"Z\n\x15RestoreBackupResponse\x12\x41\n\x0ftarget_resource\x18\x01 \x01(\x0b\x32(.google.cloud.backupdr.v1.TargetResource\"g\n\x0eTargetResource\x12=\n\x0cgcp_resource\x18\x01 \x01(\x0b\x32%.google.cloud.backupdr.v1.GcpResourceH\x00\x42\x16\n\x14target_resource_info\"G\n\x0bGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"M\n\x11\x42\x61\x63kupGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t*Q\n\x11\x42\x61\x63kupConfigState\x12#\n\x1f\x42\x41\x43KUP_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PASSIVE\x10\x02*V\n\nBackupView\x12\x1b\n\x17\x42\x41\x43KUP_VIEW_UNSPECIFIED\x10\x00\x12\x15\n\x11\x42\x41\x43KUP_VIEW_BASIC\x10\x01\x12\x14\n\x10\x42\x41\x43KUP_VIEW_FULL\x10\x02*m\n\x0f\x42\x61\x63kupVaultView\x12!\n\x1d\x42\x41\x43KUP_VAULT_VIEW_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42\x41\x43KUP_VAULT_VIEW_BASIC\x10\x01\x12\x1a\n\x16\x42\x41\x43KUP_VAULT_VIEW_FULL\x10\x02\x42\xda\x03\n\x1c\x63om.google.cloud.backupdr.v1B\x10\x42\x61\x63kupVaultProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41m\n!cloudkms.googleapis.com/CryptoKey\x12Hprojects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + BackupVault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault").msgclass + BackupVault::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.EncryptionConfig").msgclass + BackupVault::BackupRetentionInheritance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance").enummodule + BackupVault::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.State").enummodule + BackupVault::AccessRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.AccessRestriction").enummodule + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource").msgclass + DataSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource.State").enummodule + BackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo").msgclass + BackupConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState").enummodule + GcpBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpBackupConfig").msgclass + BackupApplianceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupConfig").msgclass + DataSourceGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResource").msgclass + DataSourceBackupApplianceApplication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupApplianceApplication").msgclass + ServiceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceLockInfo").msgclass + BackupApplianceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceLockInfo").msgclass + BackupLock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLock").msgclass + Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup").msgclass + Backup::GCPBackupPlanInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo").msgclass + Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.State").enummodule + Backup::BackupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.BackupType").enummodule + CreateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupVaultRequest").msgclass + ListBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsRequest").msgclass + ListBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsResponse").msgclass + FetchUsableBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest").msgclass + FetchUsableBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse").msgclass + FetchBackupsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest").msgclass + FetchBackupsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse").msgclass + GetBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupVaultRequest").msgclass + UpdateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupVaultRequest").msgclass + DeleteBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupVaultRequest").msgclass + ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesRequest").msgclass + ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesResponse").msgclass + GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceRequest").msgclass + UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateDataSourceRequest").msgclass + ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsRequest").msgclass + ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsResponse").msgclass + GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupRequest").msgclass + UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupRequest").msgclass + DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupRequest").msgclass + RestoreBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupRequest").msgclass + RestoreBackupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupResponse").msgclass + TargetResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TargetResource").msgclass + GcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpResource").msgclass + BackupGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupGcpResource").msgclass + BackupConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigState").enummodule + BackupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupView").enummodule + BackupVaultView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVaultView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb new file mode 100644 index 000000000000..ecfc1771ff13 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module BackupDR + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/backupdr/v1/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb new file mode 100644 index 000000000000..9186933eef02 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/datasourcereference.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/backupdr/v1/datasourcereference.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd7\x05\n\x13\x44\x61taSourceReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12?\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"backupdr.googleapis.com/DataSource\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x1f\x64\x61ta_source_backup_config_state\x18\x04 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12%\n\x18\x64\x61ta_source_backup_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x61\n\x1e\x64\x61ta_source_backup_config_info\x18\x06 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.DataSourceBackupConfigInfoB\x03\xe0\x41\x03\x12_\n\x1d\x64\x61ta_source_gcp_resource_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.backupdr.v1.DataSourceGcpResourceInfoB\x03\xe0\x41\x03\x12$\n\x12total_stored_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01:\xb2\x01\xea\x41\xae\x01\n+backupdr.googleapis.com/DataSourceReference\x12Tprojects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}*\x14\x64\x61taSourceReferences2\x13\x64\x61taSourceReferenceB\x15\n\x13_total_stored_bytes\"\xca\x01\n\x1a\x44\x61taSourceBackupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xf2\x01\n\x19\x44\x61taSourceGcpResourceInfo\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12u\n\x1d\x63loud_sql_instance_properties\x18\x04 \x01(\x0b\x32G.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferencePropertiesB\x03\xe0\x41\x03H\x00\x42\x15\n\x13resource_properties\"b\n\x1dGetDataSourceReferenceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+backupdr.googleapis.com/DataSourceReference\"\xc3\x01\n\x1fListDataSourceReferencesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9f\x01\n ListDataSourceReferencesResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xef\x01\n/FetchDataSourceReferencesForResourceTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n0FetchDataSourceReferencesForResourceTypeResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xc8\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x44\x61taSourceReferenceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceReference").msgclass + DataSourceBackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupConfigInfo").msgclass + DataSourceGcpResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResourceInfo").msgclass + GetDataSourceReferenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceReferenceRequest").msgclass + ListDataSourceReferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesRequest").msgclass + ListDataSourceReferencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesResponse").msgclass + FetchDataSourceReferencesForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest").msgclass + FetchDataSourceReferencesForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb new file mode 100644 index 000000000000..373529d726c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/protection_summary.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/cloud/backupdr/v1/protection_summary.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n ListResourceBackupConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n!ListResourceBackupConfigsResponse\x12O\n\x17resource_backup_configs\x18\x01 \x03(\x0b\x32..google.cloud.backupdr.v1.ResourceBackupConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xec\x06\n\x14ResourceBackupConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x14target_resource_type\x18\x05 \x01(\x0e\x32;.google.cloud.backupdr.v1.ResourceBackupConfig.ResourceTypeB\x03\xe0\x41\x03\x12h\n\x16target_resource_labels\x18\x06 \x03(\x0b\x32H.google.cloud.backupdr.v1.ResourceBackupConfig.TargetResourceLabelsEntry\x12M\n\x16\x62\x61\x63kup_configs_details\x18\x07 \x03(\x0b\x32-.google.cloud.backupdr.v1.BackupConfigDetails\x12\x1e\n\x11\x62\x61\x63kup_configured\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x07vaulted\x18\t \x01(\x08\x42\x03\xe0\x41\x03\x1a;\n\x19TargetResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x97\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x01\x12\x15\n\x11\x43OMPUTE_ENGINE_VM\x10\x02\x12\x17\n\x13\x43OMPUTE_ENGINE_DISK\x10\x03\x12 \n\x1c\x43OMPUTE_ENGINE_REGIONAL_DISK\x10\x04:\xb7\x01\xea\x41\xb3\x01\n,backupdr.googleapis.com/ResourceBackupConfig\x12Vprojects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}*\x15resourceBackupConfigs2\x14resourceBackupConfig\"\xa2\x07\n\x13\x42\x61\x63kupConfigDetails\x12!\n\x14\x62\x61\x63kup_config_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12.\n!backup_config_source_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupConfigDetails.TypeB\x03\xe0\x41\x03\x12G\n\x05state\x18\x04 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.BackupConfigDetails.StateB\x03\xe0\x41\x03\x12\x42\n\rpitr_settings\x18\x05 \x01(\x0b\x32&.google.cloud.backupdr.v1.PitrSettingsB\x03\xe0\x41\x03\x12\x46\n\x1dlatest_successful_backup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12 \n\x13\x61pplicable_resource\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61\x63kup_vault\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x10\x62\x61\x63kup_locations\x18\x0c \x03(\x0b\x32(.google.cloud.backupdr.v1.BackupLocation\x12M\n\x15\x62\x61\x63kup_dr_plan_config\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.BackupDrPlanConfigH\x00\x12U\n\x19\x62\x61\x63kup_dr_template_config\x18\x0b \x01(\x0b\x32\x30.google.cloud.backupdr.v1.BackupDrTemplateConfigH\x00\"\x97\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12$\n CLOUD_SQL_INSTANCE_BACKUP_CONFIG\x10\x01\x12\"\n\x1e\x43OMPUTE_ENGINE_RESOURCE_POLICY\x10\x02\x12\x18\n\x14\x42\x41\x43KUPDR_BACKUP_PLAN\x10\x03\x12\x15\n\x11\x42\x41\x43KUPDR_TEMPLATE\x10\x04\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\x16\n\x14plan_specific_config\"+\n\x0cPitrSettings\x12\x1b\n\x0eretention_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\"j\n\x16\x42\x61\x63kupDrTemplateConfig\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x12\x42\x61\x63kupDrPlanConfig\x12H\n\x14\x62\x61\x63kup_dr_plan_rules\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.BackupDrPlanRule\"n\n\x10\x42\x61\x63kupDrPlanRule\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x1blast_successful_backup_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xb7\x01\n\x0e\x42\x61\x63kupLocation\x12@\n\x04type\x18\x01 \x01(\x0e\x32-.google.cloud.backupdr.v1.BackupLocation.TypeB\x03\xe0\x41\x03\x12\x18\n\x0blocation_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"I\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\x12\x12\n\x0eMULTI_REGIONAL\x10\x03\x32\xcb\x02\n\x19\x42\x61\x63kupDrProtectionSummary\x12\xe0\x01\n\x19ListResourceBackupConfigs\x12:.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest\x1a;.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/resourceBackupConfigs\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x16ProtectionSummaryProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BackupDR + module V1 + ListResourceBackupConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsRequest").msgclass + ListResourceBackupConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsResponse").msgclass + ResourceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig").msgclass + ResourceBackupConfig::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig.ResourceType").enummodule + BackupConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails").msgclass + BackupConfigDetails::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.Type").enummodule + BackupConfigDetails::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.State").enummodule + PitrSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.PitrSettings").msgclass + BackupDrTemplateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrTemplateConfig").msgclass + BackupDrPlanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanConfig").msgclass + BackupDrPlanRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanRule").msgclass + BackupLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation").msgclass + BackupLocation::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation.Type").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb new file mode 100644 index 000000000000..6bad6df6a175 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/backupdr/v1/protection_summary.proto for package 'Google.Cloud.BackupDR.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/backupdr/v1/protection_summary_pb' + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + # The Protection Summary service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.backupdr.v1.BackupDrProtectionSummary' + + # Lists ResourceBackupConfigs. + rpc :ListResourceBackupConfigs, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb new file mode 100644 index 000000000000..9cc488ca2ae8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/backupdr/rest" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" +require "google/cloud/backupdr/v1/bindings_override" +require "google/cloud/backupdr/v1/version" + +module Google + module Cloud + module BackupDR + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/backupdr/v1/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb new file mode 100644 index 000000000000..e74b73cd9c04 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md new file mode 100644 index 000000000000..c891244acc73 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Backup and DR Service V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb new file mode 100644 index 000000000000..de97c93454cf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb @@ -0,0 +1,415 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Network configuration for ManagementServer instance. + # @!attribute [rw] network + # @return [::String] + # Optional. The resource name of the Google Compute Engine VPC network to + # which the ManagementServer instance is connected. + # @!attribute [rw] peering_mode + # @return [::Google::Cloud::BackupDR::V1::NetworkConfig::PeeringMode] + # Optional. The network connect mode of the ManagementServer instance. For + # this version, only PRIVATE_SERVICE_ACCESS is supported. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VPC peering modes supported by Cloud BackupDR. + module PeeringMode + # Peering mode not set. + PEERING_MODE_UNSPECIFIED = 0 + + # Connect using Private Service Access to the Management Server. Private + # services access provides an IP address range for multiple Google Cloud + # services, including Cloud BackupDR. + PRIVATE_SERVICE_ACCESS = 1 + end + end + + # ManagementURI for the Management Server resource. + # @!attribute [r] web_ui + # @return [::String] + # Output only. The ManagementServer AGM/RD WebUI URL. + # @!attribute [r] api + # @return [::String] + # Output only. The ManagementServer AGM/RD API URL. + class ManagementURI + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. + # @!attribute [r] first_party_management_uri + # @return [::String] + # Output only. First party Management URI for Google Identities. + # @!attribute [r] third_party_management_uri + # @return [::String] + # Output only. Third party Management URI for External Identity Providers. + class WorkforceIdentityBasedManagementURI + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, + # @!attribute [r] first_party_oauth2_client_id + # @return [::String] + # Output only. First party OAuth Client ID for Google Identities. + # @!attribute [r] third_party_oauth2_client_id + # @return [::String] + # Output only. Third party OAuth Client ID for External Identity Providers. + class WorkforceIdentityBasedOAuth2ClientID + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ManagementServer describes a single BackupDR ManagementServer instance. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the ManagementServer instance (2048 characters + # or less). + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # Labels currently defined: + # 1. migrate_from_go= + # If set to true, the MS is created in migration ready mode. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceType] + # Optional. The type of the ManagementServer resource. + # @!attribute [r] management_uri + # @return [::Google::Cloud::BackupDR::V1::ManagementURI] + # Output only. The hostname or ip address of the exposed AGM endpoints, used + # by clients to connect to AGM/RD graphical user interface and APIs. + # @!attribute [r] workforce_identity_based_management_uri + # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedManagementURI] + # Output only. The hostnames of the exposed AGM endpoints for both types of + # user i.e. 1p and 3p, used to connect AGM/RM UI. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceState] + # Output only. The ManagementServer state. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkConfig>] + # Optional. VPC networks to which the ManagementServer instance is connected. + # For this version, only a single network is supported. This field is + # optional if MS is created without PSA + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag for the ManagementServer resource to + # prevent simultaneous updates from overwiting each other. + # @!attribute [r] oauth2_client_id + # @return [::String] + # Output only. The OAuth 2.0 client id is required to make API calls to the + # BackupDR instance API of this ManagementServer. This is the value that + # should be provided in the 'aud' field of the OIDC ID Token (see openid + # specification + # https://openid.net/specs/openid-connect-core-1_0.html#IDToken). + # @!attribute [r] workforce_identity_based_oauth2_client_id + # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedOAuth2ClientID] + # Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. + # @!attribute [r] ba_proxy_uri + # @return [::Array<::String>] + # Output only. The hostname or ip address of the exposed AGM endpoints, used + # by BAs to connect to BA proxy. + # @!attribute [r] satisfies_pzs + # @return [::Google::Protobuf::BoolValue] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + class ManagementServer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of backup service resource. + module InstanceType + # Instance type is not mentioned. + INSTANCE_TYPE_UNSPECIFIED = 0 + + # Instance for backup and restore management (i.e., AGM). + BACKUP_RESTORE = 1 + end + + # State of Management server instance. + module InstanceState + # State not set. + INSTANCE_STATE_UNSPECIFIED = 0 + + # The instance is being created. + CREATING = 1 + + # The instance has been created and is fully usable. + READY = 2 + + # The instance configuration is being updated. Certain kinds of updates + # may cause the instance to become unusable while the update is in + # progress. + UPDATING = 3 + + # The instance is being deleted. + DELETING = 4 + + # The instance is being repaired and may be unstable. + REPAIRING = 5 + + # Maintenance is being performed on this instance. + MAINTENANCE = 6 + + # The instance is experiencing an issue and might be unusable. You can get + # further details from the statusMessage field of Instance resource. + ERROR = 7 + end + end + + # Request message for listing management servers. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve management servers + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud BackupDR, locations map to Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListManagementServersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing management servers. + # @!attribute [rw] management_servers + # @return [::Array<::Google::Cloud::BackupDR::V1::ManagementServer>] + # The list of ManagementServer instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return management servers in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListManagementServersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a management server instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + class GetManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a management server instance. + # @!attribute [rw] parent + # @return [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @!attribute [rw] management_server_id + # @return [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @!attribute [rw] management_server + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a management server instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for initializing the service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] cloud_sql_instance_initialization_config + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig] + # Optional. The configuration for initializing a Cloud SQL instance. + class InitializeServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for initializing the service. + # @!attribute [rw] backup_vault_name + # @return [::String] + # The resource name of the default `BackupVault` created. + # Format: + # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + # @!attribute [rw] backup_plan_name + # @return [::String] + # The resource name of the default `BackupPlan` created. + # Format: + # `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`. + class InitializeServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to 'Code.CANCELLED'. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + # @!attribute [r] additional_info + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. AdditionalInfo contains additional Info related to backup plan + # association resource. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AdditionalInfoEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb new file mode 100644 index 000000000000..f7ce82fba389 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb @@ -0,0 +1,588 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # A `BackupPlan` specifies some common fields, such as `description` as well + # as one or more `BackupRule` messages. Each `BackupRule` has a retention + # policy and defines a schedule by which the system is to perform backup + # workloads. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the `BackupPlan`. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the `BackupPlan` resource. + # + # The description allows for additional details about `BackupPlan` and its + # use cases to be provided. An example description is the following: "This + # is a backup plan that performs a daily backup at 6pm and retains data for 3 + # months". The description must be at most 2048 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. This collection of key/value pairs allows for custom labels to be + # supplied by the user. Example, \\{"tag": "Weekly"}. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the `BackupPlan` was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the `BackupPlan` was last updated. + # @!attribute [rw] backup_rules + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupRule>] + # Required. The backup rules for this `BackupPlan`. There must be at least + # one `BackupRule` message. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlan::State] + # Output only. The `State` for the `BackupPlan`. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The resource type to which the `BackupPlan` will be applied. + # Examples include, "compute.googleapis.com/Instance", + # "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", + # "compute.googleapis.com/Disk". + # @!attribute [rw] etag + # @return [::String] + # Optional. `etag` is returned from the service in the response. As a user of + # the service, you may provide an etag value in this field to prevent stale + # resources. + # @!attribute [rw] backup_vault + # @return [::String] + # Required. Resource name of backup vault which will be used as storage + # location for backups. Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault} + # @!attribute [r] backup_vault_service_account + # @return [::String] + # Output only. The Google Cloud Platform Service Account to be used by the + # BackupVault for taking backups. Specify the email address of the Backup + # Vault Service Account. + # @!attribute [rw] log_retention_days + # @return [::Integer] + # Optional. Applicable only for CloudSQL and AlloyDB resource_type. + # + # Configures how long logs will be stored. It is defined in “days”. This + # value should be greater than or equal to minimum enforced log retention + # duration of the backup vault. + # @!attribute [r] supported_resource_types + # @return [::Array<::String>] + # Output only. All resource types to which backupPlan can be applied. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] revision_name + # @return [::String] + # Output only. The resource id of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + class BackupPlan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `State` enumerates the possible states for a `BackupPlan`. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + + # The resource is being updated. + UPDATING = 5 + end + end + + # `BackupRule` binds the backup schedule to a retention policy. + # @!attribute [rw] rule_id + # @return [::String] + # Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is + # unique per `BackupPlan`.The `rule_id` must start with a lowercase letter + # followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, + # /[a-z][a-z0-9-]\\{,62}/. + # @!attribute [rw] backup_retention_days + # @return [::Integer] + # Required. Configures the duration for which backup data will be kept. It is + # defined in “days”. The value should be greater than or equal to minimum + # enforced retention of the backup vault. + # + # Minimum value is 1 and maximum value is 36159 for custom retention + # on-demand backup. + # Minimum and maximum values are workload specific for all other rules. + # @!attribute [rw] standard_schedule + # @return [::Google::Cloud::BackupDR::V1::StandardSchedule] + # Optional. Defines a schedule that runs within the confines of a defined + # window of time. + class BackupRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StandardSchedule` defines a schedule that run within the confines of a + # defined window of days. We can define recurrence type for schedule as + # HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. + # @!attribute [rw] recurrence_type + # @return [::Google::Cloud::BackupDR::V1::StandardSchedule::RecurrenceType] + # Required. Specifies the `RecurrenceType` for the schedule. + # @!attribute [rw] hourly_frequency + # @return [::Integer] + # Optional. Specifies frequency for hourly backups. A hourly frequency of 2 + # means jobs will run every 2 hours from start time till end time defined. + # + # This is required for `recurrence_type`, `HOURLY` and is not applicable + # otherwise. A validation error will occur if a value is supplied and + # `recurrence_type` is not `HOURLY`. + # + # Value of hourly frequency should be between 4 and 23. + # + # Reason for limit : We found that there is bandwidth limitation of 3GB/S for + # GMI while taking a backup and 5GB/S while doing a restore. Given the amount + # of parallel backups and restore we are targeting, this will potentially + # take the backup time to mins and hours (in worst case scenario). + # @!attribute [rw] days_of_week + # @return [::Array<::Google::Type::DayOfWeek>] + # Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs + # will run. + # + # This is required for `recurrence_type`, `WEEKLY` and is not applicable + # otherwise. A validation error will occur if a value is supplied and + # `recurrence_type` is not `WEEKLY`. + # @!attribute [rw] days_of_month + # @return [::Array<::Integer>] + # Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. + # + # Values for `days_of_month` are only applicable for `recurrence_type`, + # `MONTHLY` and `YEARLY`. A validation error will occur if other values are + # supplied. + # @!attribute [rw] week_day_of_month + # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth] + # Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST + # MONDAY, on which jobs will run. This will be specified by two fields in + # `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, + # e.g. `LAST`. + # + # This field is only applicable for `recurrence_type`, `MONTHLY` and + # `YEARLY`. A validation error will occur if other values are supplied. + # @!attribute [rw] months + # @return [::Array<::Google::Type::Month>] + # Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on + # which jobs will run. + # + # This field is only applicable when `recurrence_type` is `YEARLY`. A + # validation error will occur if other values are supplied. + # @!attribute [rw] backup_window + # @return [::Google::Cloud::BackupDR::V1::BackupWindow] + # Required. A BackupWindow defines the window of day during which backup jobs + # will run. Jobs are queued at the beginning of the window and will be marked + # as `NOT_RUN` if they do not start by the end of the window. + # + # Note: running jobs will not be cancelled at the end of the window. + # @!attribute [rw] time_zone + # @return [::String] + # Required. The time zone to be used when interpreting the schedule. + # The value of this field must be a time zone name from the IANA tz database. + # See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the + # list of valid timezone names. For e.g., Europe/Paris. + class StandardSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `RecurrenceTypes` enumerates the applicable periodicity for the schedule. + module RecurrenceType + # recurrence type not set + RECURRENCE_TYPE_UNSPECIFIED = 0 + + # The `BackupRule` is to be applied hourly. + HOURLY = 1 + + # The `BackupRule` is to be applied daily. + DAILY = 2 + + # The `BackupRule` is to be applied weekly. + WEEKLY = 3 + + # The `BackupRule` is to be applied monthly. + MONTHLY = 4 + + # The `BackupRule` is to be applied yearly. + YEARLY = 5 + end + end + + # `BackupWindow` defines a window of the day during which backup jobs will run. + # @!attribute [rw] start_hour_of_day + # @return [::Integer] + # Required. The hour of day (0-23) when the window starts for e.g. if value + # of start hour of day is 6 that mean backup window start at 6:00. + # @!attribute [rw] end_hour_of_day + # @return [::Integer] + # Required. The hour of day (1-24) when the window end for e.g. if value of + # end hour of day is 10 that mean backup window end time is 10:00. + # + # End hour of day should be greater than start hour of day. + # 0 <= start_hour_of_day < end_hour_of_day <= 24 + # + # End hour of day is not include in backup window that mean if + # end_hour_of_day= 10 jobs should start before 10:00. + class BackupWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `WeekDayOfMonth` defines the week day of the month on which the backups will + # run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values + # like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. + # @!attribute [rw] week_of_month + # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth::WeekOfMonth] + # Required. Specifies the week of the month. + # @!attribute [rw] day_of_week + # @return [::Google::Type::DayOfWeek] + # Required. Specifies the day of the week. + class WeekDayOfMonth + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, + # third, or last week of the month. + module WeekOfMonth + # The zero value. Do not use. + WEEK_OF_MONTH_UNSPECIFIED = 0 + + # The first week of the month. + FIRST = 1 + + # The second week of the month. + SECOND = 2 + + # The third week of the month. + THIRD = 3 + + # The fourth week of the month. + FOURTH = 4 + + # The last week of the month. + LAST = 5 + end + end + + # The request message for creating a `BackupPlan`. + # @!attribute [rw] parent + # @return [::String] + # Required. The `BackupPlan` project and location in the format + # `projects/{project}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @!attribute [rw] backup_plan_id + # @return [::String] + # Required. The name of the `BackupPlan` to create. The name must be unique + # for the specified project and location.The name must start with a lowercase + # letter followed by up to 62 lowercase letters, numbers, or hyphens. + # Pattern, /[a-z][a-z0-9-]\\{,62}/. + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # Required. The `BackupPlan` resource object to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a list `BackupPlan`. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve `BackupPlans` + # information. Format: `projects/{project}/locations/{location}`. In Cloud + # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + # retrieve backup plans for all locations, use "-" for the + # `{location}` value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListBackupPlansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for getting a list of `BackupPlan`. + # @!attribute [rw] backup_plans + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlan>] + # The list of `BackupPlans` in the project for the specified + # location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of resources from all locations. In case any location is unreachable, + # the response will only return backup plans in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # BackupPlan + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest#page_token page_token} in + # a subsequent `ListBackupPlans` call to retrieve the next page of results. + # If this field is omitted or empty, then there are no more results to + # return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlansResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a `BackupPlan`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + class GetBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for deleting a `BackupPlan`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a backup plan. + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # Required. The resource being updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in + # time. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # @!attribute [r] revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision::State] + # Output only. Resource State + # @!attribute [rw] backup_plan_snapshot + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # The Backup Plan being encompassed by this revision. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp that the revision was created. + class BackupPlanRevision + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the `BackupPlanRevision`. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + end + end + + # The request message for getting a `BackupPlanRevision`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + class GetBackupPlanRevisionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a list of `BackupPlanRevision`. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `BackupPlans` to return in a single + # response. If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + class ListBackupPlanRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for getting a list of `BackupPlanRevision`. + # @!attribute [rw] backup_plan_revisions + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # The list of `BackupPlanRevisions` in the project for the specified + # location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of resources from all locations. In case any location is unreachable, + # the response will only return backup plans in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest#page_token page_token} + # in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlanRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb new file mode 100644 index 000000000000..b6e38383477c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb @@ -0,0 +1,388 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # A BackupPlanAssociation represents a single BackupPlanAssociation which + # contains details like workload, backup plan etc + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of BackupPlanAssociation in + # below format Format : + # projects/\\{project}/locations/\\{location}/backupPlanAssociations/\\{backupPlanAssociationId} + # @!attribute [rw] resource_type + # @return [::String] + # Required. Immutable. Resource type of workload on which backupplan is + # applied + # @!attribute [rw] resource + # @return [::String] + # Required. Immutable. Resource name of workload on which the backup plan is + # applied. + # + # The format can either be the resource name (e.g., + # "projects/my-project/zones/us-central1-a/instances/my-instance") or the + # full resource URI (e.g., + # "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). + # @!attribute [rw] backup_plan + # @return [::String] + # Required. Resource name of backup plan which needs to be applied on + # workload. Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation::State] + # Output only. The BackupPlanAssociation resource state. + # @!attribute [r] rules_config_info + # @return [::Array<::Google::Cloud::BackupDR::V1::RuleConfigInfo>] + # Output only. The config info related to backup rules. + # @!attribute [r] data_source + # @return [::String] + # Output only. Resource name of data source which will be used as storage + # location for backups taken. Format : + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault}/dataSources/\\{datasource} + # @!attribute [r] cloud_sql_instance_backup_plan_association_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupPlanAssociationProperties] + # Output only. Cloud SQL instance's backup plan association properties. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_plan_association_properties`, `alloydb_cluster_backup_plan_association_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] alloydb_cluster_backup_plan_association_properties + # @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterBackupPlanAssociationProperties] + # Output only. AlloyDB cluster's backup plan association properties. + # + # Note: The following fields are mutually exclusive: `alloydb_cluster_backup_plan_association_properties`, `cloud_sql_instance_backup_plan_association_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_plan_revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] backup_plan_revision_name + # @return [::String] + # Output only. The resource id of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + class BackupPlanAssociation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for State of BackupPlan Association + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + + # The resource is being updated. + UPDATING = 5 + end + end + + # Message for rules config info. + # @!attribute [r] rule_id + # @return [::String] + # Output only. Backup Rule id fetched from backup plan. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::RuleConfigInfo::LastBackupState] + # Output only. The last backup state for rule. + # @!attribute [r] last_backup_error + # @return [::Google::Rpc::Status] + # Output only. google.rpc.Status object to store the last backup error. + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The point in time when the last successful backup was captured + # from the source. + class RuleConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for LastBackupState + module LastBackupState + # State not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0 + + # The first backup is pending. + FIRST_BACKUP_PENDING = 1 + + # The most recent backup could not be run/failed because of the lack of + # permissions. + PERMISSION_DENIED = 2 + + # The last backup operation succeeded. + SUCCEEDED = 3 + + # The last backup operation failed. + FAILED = 4 + end + end + + # Request message for creating a backup plan. + # @!attribute [rw] parent + # @return [::String] + # Required. The backup plan association project and location in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + # map to GCP regions, for example **us-central1**. + # @!attribute [rw] backup_plan_association_id + # @return [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @!attribute [rw] backup_plan_association + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for List BackupPlanAssociation + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backup Plan + # Associations information, in the format + # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + # map to GCP regions, for example **us-central1**. To retrieve backup plan + # associations for all locations, use "-" for the + # `{location}` value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + class ListBackupPlanAssociationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for List BackupPlanAssociation + # @!attribute [rw] backup_plan_associations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # The list of Backup Plan Associations in the project for the specified + # location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return backup plan associations in reachable + # locations and the 'unreachable' field will be populated with a list of + # unreachable locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlanAssociationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchBackupPlanAssociationsForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + class FetchBackupPlanAssociationsForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchBackupPlanAssociationsForResourceType method. + # @!attribute [r] backup_plan_associations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # Output only. The BackupPlanAssociations from the specified parent. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. A token, which can be sent as `page_token` to retrieve the + # next page. If this field is omitted, there are no subsequent pages. + class FetchBackupPlanAssociationsForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a BackupPlanAssociation resource. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + class GetBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a backup plan association. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a backup plan association. + # @!attribute [rw] backup_plan_association + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # Required. The resource being updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for triggering a backup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @!attribute [rw] rule_id + # @return [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class TriggerBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb new file mode 100644 index 000000000000..688246d5f3d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb @@ -0,0 +1,1366 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Message describing a BackupVault object. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the backup vault to create. It must have + # the + # format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. + # `{backupvault}` cannot be changed after creation. It must be between 3-63 + # characters long and must be unique within the project and location. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the BackupVault instance (2048 characters or + # less). + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined: + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] backup_minimum_enforced_retention_duration + # @return [::Google::Protobuf::Duration] + # Required. The default and minimum enforced retention for each backup within + # the backup vault. The enforced retention for each backup can be extended. + # @!attribute [rw] backup_retention_inheritance + # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] + # Optional. Setting for how a backup's enforced retention end time is + # inherited. + # @!attribute [r] deletable + # @return [::Boolean] + # Output only. Set to true when there are no backups nested under this + # resource. + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag for the backup vault resource to + # prevent simultaneous updates from overwiting each other. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupVault::State] + # Output only. The BackupVault resource instance state. + # @!attribute [rw] effective_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Time after which the BackupVault resource is locked. + # @!attribute [r] backup_count + # @return [::Integer] + # Output only. The number of backups in this backup vault. + # @!attribute [r] service_account + # @return [::String] + # Output only. Service account used by the BackupVault Service for this + # BackupVault. The user should grant this account permissions in their + # workload project to enable the service to run backups and restores there. + # @!attribute [r] total_stored_bytes + # @return [::Integer] + # Output only. Total size of the storage used by all backup resources. + # @!attribute [r] uid + # @return [::String] + # Output only. Immutable after resource creation until resource deletion. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User annotations. See https://google.aip.dev/128#annotations + # Stores small amounts of arbitrary data. + # @!attribute [rw] access_restriction + # @return [::Google::Cloud::BackupDR::V1::BackupVault::AccessRestriction] + # Optional. Note: This field is added for future use case and will not be + # supported in the current release. + # + # Access restriction for the backup vault. + # Default value is WITHIN_ORGANIZATION if not provided during creation. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::BackupDR::V1::BackupVault::EncryptionConfig] + # Optional. The encryption config of the backup vault. + class BackupVault + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message describing the EncryptionConfig of backup vault. + # This determines how data within the vault is encrypted at rest. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The Cloud KMS key name to encrypt backups in this backup vault. + # Must be in the same region as the vault. Some workload backups like + # compute disk backups may use their inherited source key instead. Format: + # projects/\\{project}/locations/\\{location}/keyRings/\\{ring}/cryptoKeys/\\{key} + class EncryptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How a backup's enforced retention end time is inherited. + module BackupRetentionInheritance + # Inheritance behavior not set. This will default to + # `INHERIT_VAULT_RETENTION`. + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0 + + # The enforced retention end time of a backup will be inherited from the + # backup vault's `backup_minimum_enforced_retention_duration` field. + # + # This is the default behavior. + INHERIT_VAULT_RETENTION = 1 + + # The enforced retention end time of a backup will always match the expire + # time of the backup. + # + # If this is set, the backup's enforced retention end time will be set to + # match the expire time during creation of the backup. When updating, the + # ERET and expire time must be updated together and have the same value. + # Invalid update requests will be rejected by the server. + MATCH_BACKUP_EXPIRE_TIME = 2 + end + + # Holds the state of the backup vault resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The backup vault is being created. + CREATING = 1 + + # The backup vault has been created and is fully usable. + ACTIVE = 2 + + # The backup vault is being deleted. + DELETING = 3 + + # The backup vault is experiencing an issue and might be unusable. + ERROR = 4 + + # The backup vault is being updated. + UPDATING = 5 + end + + # Holds the access restriction for the backup vault. + module AccessRestriction + # Access restriction not set. If user does not provide any value or pass + # this value, it will be changed to WITHIN_ORGANIZATION. + ACCESS_RESTRICTION_UNSPECIFIED = 0 + + # Access to or from resources outside your current project will be denied. + WITHIN_PROJECT = 1 + + # Access to or from resources outside your current organization will be + # denied. + WITHIN_ORGANIZATION = 2 + + # No access restriction. + UNRESTRICTED = 3 + + # Access to or from resources outside your current organization will be + # denied except for backup appliance. + WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4 + end + end + + # Message describing a DataSource object. + # Datasource object used to represent Datasource details for both admin and + # basic view. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the datasource to create. + # It must have the + # format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. + # `{datasource}` cannot be changed after creation. It must be between 3-63 + # characters long and must be unique within the backup vault. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::DataSource::State] + # Output only. The DataSource resource instance state. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined: + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] backup_count + # @return [::Integer] + # Number of backups in the data source. + # @!attribute [rw] etag + # @return [::String] + # Server specified ETag for the ManagementServer resource to prevent + # simultaneous updates from overwiting each other. + # @!attribute [rw] total_stored_bytes + # @return [::Integer] + # The number of bytes (metadata and data) stored in this datasource. + # @!attribute [r] config_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] + # Output only. The backup configuration state. + # @!attribute [r] backup_config_info + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo] + # Output only. Details of how the resource is configured for backup. + # @!attribute [rw] data_source_gcp_resource + # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResource] + # The backed up resource is a Google Cloud resource. + # The word 'DataSource' was included in the names to indicate that this is + # the representation of the Google Cloud resource used within the + # DataSource object. + # + # Note: The following fields are mutually exclusive: `data_source_gcp_resource`, `data_source_backup_appliance_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_source_backup_appliance_application + # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupApplianceApplication] + # The backed up resource is a backup appliance application. + # + # Note: The following fields are mutually exclusive: `data_source_backup_appliance_application`, `data_source_gcp_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_blocked_by_vault_access_restriction + # @return [::Boolean] + # Output only. This field is set to true if the backup is blocked by vault + # access restriction. + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds the state of the data source resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The data source is being created. + CREATING = 1 + + # The data source has been created and is fully usable. + ACTIVE = 2 + + # The data source is being deleted. + DELETING = 3 + + # The data source is experiencing an issue and might be unusable. + ERROR = 4 + end + end + + # BackupConfigInfo has information about how the resource is configured + # for Backup and about the most recent backup to this vault. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] + # Output only. The status of the last backup to this BackupVault + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. If the last backup were successful, this field has the + # consistency date. + # @!attribute [r] last_backup_error + # @return [::Google::Rpc::Status] + # Output only. If the last backup failed, this field has the error message. + # @!attribute [rw] gcp_backup_config + # @return [::Google::Cloud::BackupDR::V1::GcpBackupConfig] + # Configuration for a Google Cloud resource. + # + # Note: The following fields are mutually exclusive: `gcp_backup_config`, `backup_appliance_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_appliance_backup_config + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupConfig] + # Configuration for an application backed up by a Backup Appliance. + # + # Note: The following fields are mutually exclusive: `backup_appliance_backup_config`, `gcp_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # LastBackupstate tracks whether the last backup was not yet started, + # successful, failed, or could not be run because of the lack of permissions. + module LastBackupState + # Status not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0 + + # The first backup has not yet completed + FIRST_BACKUP_PENDING = 1 + + # The most recent backup was successful + SUCCEEDED = 2 + + # The most recent backup failed + FAILED = 3 + + # The most recent backup could not be run/failed because of the lack of + # permissions + PERMISSION_DENIED = 4 + end + end + + # GcpBackupConfig captures the Backup configuration details for Google Cloud + # resources. All Google Cloud resources regardless of type are protected with + # backup plan associations. + # @!attribute [rw] backup_plan + # @return [::String] + # The name of the backup plan. + # @!attribute [rw] backup_plan_description + # @return [::String] + # The description of the backup plan. + # @!attribute [rw] backup_plan_association + # @return [::String] + # The name of the backup plan association. + # @!attribute [rw] backup_plan_rules + # @return [::Array<::String>] + # The names of the backup plan rules which point to this backupvault + # @!attribute [rw] backup_plan_revision_name + # @return [::String] + # The name of the backup plan revision. + # @!attribute [rw] backup_plan_revision_id + # @return [::String] + # The user friendly id of the backup plan revision. + # E.g. v0, v1 etc. + class GcpBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceBackupConfig captures the backup configuration for + # applications that are protected by Backup Appliances. + # @!attribute [rw] backup_appliance_name + # @return [::String] + # The name of the backup appliance. + # @!attribute [rw] backup_appliance_id + # @return [::Integer] + # The ID of the backup appliance. + # @!attribute [rw] sla_id + # @return [::Integer] + # The ID of the SLA of this application. + # @!attribute [rw] application_name + # @return [::String] + # The name of the application. + # @!attribute [rw] host_name + # @return [::String] + # The name of the host where the application is running. + # @!attribute [rw] slt_name + # @return [::String] + # The name of the SLT associated with the application. + # @!attribute [rw] slp_name + # @return [::String] + # The name of the SLP associated with the application. + class BackupApplianceBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataSourceGcpResource is used for protected resources that are Google Cloud + # Resources. This name is easeier to understand than GcpResourceDataSource or + # GcpDataSourceResource + # @!attribute [r] gcp_resourcename + # @return [::String] + # Output only. Full resource pathname URL of the source Google Cloud + # resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # The type of the Google Cloud resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + # @!attribute [rw] compute_instance_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceDataSourceProperties] + # ComputeInstanceDataSourceProperties has a subset of Compute Instance + # properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cloud_sql_instance_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceProperties] + # Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud + # SQL Instance properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_datasource_properties`, `compute_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] alloy_db_cluster_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterDataSourceProperties] + # Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB + # cluster properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `alloy_db_cluster_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::DiskDataSourceProperties] + # DiskDataSourceProperties has a subset of Disk properties that are useful + # at the Datasource level. + # + # Note: The following fields are mutually exclusive: `disk_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataSourceGcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceApplication describes a Source Resource when it is an + # application backed up by a BackupAppliance. + # @!attribute [rw] application_name + # @return [::String] + # The name of the Application as known to the Backup Appliance. + # @!attribute [rw] backup_appliance + # @return [::String] + # Appliance name. + # @!attribute [rw] appliance_id + # @return [::Integer] + # Appliance Id of the Backup Appliance. + # @!attribute [rw] type + # @return [::String] + # The type of the application. e.g. VMBackup + # @!attribute [rw] application_id + # @return [::Integer] + # The appid field of the application within the Backup Appliance. + # @!attribute [rw] hostname + # @return [::String] + # Hostname of the host where the application is running. + # @!attribute [rw] host_id + # @return [::Integer] + # Hostid of the application host. + class DataSourceBackupApplianceApplication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ServiceLockInfo represents the details of a lock taken by the service on a + # Backup resource. + # @!attribute [r] operation + # @return [::String] + # Output only. The name of the operation that created this lock. + # The lock will automatically be released when the operation completes. + class ServiceLockInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceLockInfo contains metadata about the backupappliance that + # created the lock. + # @!attribute [rw] backup_appliance_id + # @return [::Integer] + # Required. The ID of the backup/recovery appliance that created this lock. + # @!attribute [rw] backup_appliance_name + # @return [::String] + # Required. The name of the backup/recovery appliance that created this lock. + # @!attribute [rw] lock_reason + # @return [::String] + # Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The + # value of this string is only meaningful to the client and it is not + # interpreted by the BackupVault service. + # @!attribute [rw] job_name + # @return [::String] + # The job name on the backup/recovery appliance that created this lock. + # + # Note: The following fields are mutually exclusive: `job_name`, `backup_image`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_image + # @return [::String] + # The image name that depends on this Backup. + # + # Note: The following fields are mutually exclusive: `backup_image`, `job_name`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sla_id + # @return [::Integer] + # The SLA on the backup/recovery appliance that owns the lock. + # + # Note: The following fields are mutually exclusive: `sla_id`, `job_name`, `backup_image`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupApplianceLockInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupLock represents a single lock on a Backup resource. An unexpired + # lock on a Backup prevents the Backup from being deleted. + # @!attribute [rw] lock_until_time + # @return [::Google::Protobuf::Timestamp] + # Required. The time after which this lock is not considered valid and will + # no longer protect the Backup from deletion. + # @!attribute [rw] backup_appliance_lock_info + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo] + # If the client is a backup and recovery appliance, this + # contains metadata about why the lock exists. + # + # Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] service_lock_info + # @return [::Google::Cloud::BackupDR::V1::ServiceLockInfo] + # Output only. Contains metadata about the lock exist for Google Cloud + # native backups. + # + # Note: The following fields are mutually exclusive: `service_lock_info`, `backup_appliance_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupLock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message describing a Backup object. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the backup to create. It must have the + # format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. + # `{backup}` cannot be changed after creation. It must be between 3-63 + # characters long and must be unique within the datasource. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the Backup instance (2048 characters or + # less). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined. + # @!attribute [rw] enforced_retention_end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The backup can not be deleted before this time. + # @!attribute [r] backup_retention_inheritance + # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] + # Output only. Setting for how the enforced retention end time is inherited. + # This value is copied from this backup's BackupVault. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Optional. When this backup is automatically expired. + # @!attribute [r] consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The point in time when this backup was captured from the + # source. + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag to prevent updates from overwriting each + # other. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::Backup::State] + # Output only. The Backup resource instance state. + # @!attribute [r] service_locks + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] + # Output only. The list of BackupLocks taken by the service to prevent the + # deletion of the backup. + # @!attribute [rw] backup_appliance_locks + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] + # Optional. The list of BackupLocks taken by the accessor Backup Appliance. + # @!attribute [r] compute_instance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties] + # Output only. Compute Engine specific backup properties. + # + # Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cloud_sql_instance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties] + # Output only. Cloud SQL specific backup properties. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_appliance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties] + # Output only. Backup Appliance specific backup properties. + # + # Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] alloy_db_backup_properties + # @return [::Google::Cloud::BackupDR::V1::AlloyDbClusterBackupProperties] + # Output only. AlloyDB specific backup properties. + # + # Note: The following fields are mutually exclusive: `alloy_db_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] disk_backup_properties + # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties] + # Output only. Disk specific backup properties. + # + # Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_type + # @return [::Google::Cloud::BackupDR::V1::Backup::BackupType] + # Output only. Type of the backup, unspecified, scheduled or ondemand. + # @!attribute [r] gcp_backup_plan_info + # @return [::Google::Cloud::BackupDR::V1::Backup::GCPBackupPlanInfo] + # Output only. Configuration for a Google Cloud resource. + # @!attribute [r] resource_size_bytes + # @return [::Integer] + # Output only. source resource size in bytes at the time of the backup. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [r] gcp_resource + # @return [::Google::Cloud::BackupDR::V1::BackupGcpResource] + # Output only. Unique identifier of the GCP resource that is being backed + # up. + # @!attribute [r] kms_key_versions + # @return [::Array<::String>] + # Optional. Output only. The list of KMS key versions used to encrypt the + # backup. + class Backup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # GCPBackupPlanInfo captures the plan configuration details of Google Cloud + # resources at the time of backup. + # @!attribute [rw] backup_plan + # @return [::String] + # Resource name of backup plan by which workload is protected at the time + # of the backup. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} + # @!attribute [rw] backup_plan_rule_id + # @return [::String] + # The rule id of the backup plan which triggered this backup in case of + # scheduled backup or used for + # @!attribute [rw] backup_plan_revision_name + # @return [::String] + # Resource name of the backup plan revision which triggered this backup in + # case of scheduled backup or used for on demand backup. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId}/revisions/\\{revisionId} + # @!attribute [rw] backup_plan_revision_id + # @return [::String] + # The user friendly id of the backup plan revision which triggered this + # backup in case of scheduled backup or used for on demand backup. + class GCPBackupPlanInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds the state of the backup resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The backup is being created. + CREATING = 1 + + # The backup has been created and is fully usable. + ACTIVE = 2 + + # The backup is being deleted. + DELETING = 3 + + # The backup is experiencing an issue and might be unusable. + ERROR = 4 + + # The backup is being uploaded. + UPLOADING = 5 + end + + # Type of the backup, scheduled or ondemand. + module BackupType + # Backup type is unspecified. + BACKUP_TYPE_UNSPECIFIED = 0 + + # Scheduled backup. + SCHEDULED = 1 + + # On demand backup. + ON_DEMAND = 2 + + # Operational backup. + ON_DEMAND_OPERATIONAL = 3 + end + end + + # Message for creating a BackupVault. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] backup_vault_id + # @return [::String] + # Required. ID of the requesting object + # If auto-generating ID server-side, remove this field and + # backup_vault_id from the method_signature of Create RPC + # @!attribute [rw] backup_vault + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + class CreateBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing backupvault stores. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + class ListBackupVaultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing BackupVaults. + # @!attribute [rw] backup_vaults + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] + # The list of BackupVault instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return backup vaults in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupVaultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for fetching usable BackupVaults. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backupvault stores + # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # To retrieve backupvault stores for all locations, use "-" for the + # '\\{location}' value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class FetchUsableBackupVaultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for fetching usable BackupVaults. + # @!attribute [rw] backup_vaults + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] + # The list of BackupVault instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return backup vaults in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class FetchUsableBackupVaultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchBackupsForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + class FetchBackupsForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchBackupsForResourceType method. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] + # The Backups from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class FetchBackupsForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a BackupVault. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + class GetBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a BackupVault. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # BackupVault resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @!attribute [rw] backup_vault + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @!attribute [rw] force_update_access_restriction + # @return [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + class UpdateBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a BackupVault. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any data source from this backup vault will also + # be deleted. + # @!attribute [rw] etag + # @return [::String] + # The current etag of the backup vault. + # If an etag is provided and does not match the current etag of the + # connection, deletion will be blocked. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @!attribute [rw] ignore_backup_plan_references + # @return [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + class DeleteBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing DataSources. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve data + # sources information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing DataSources. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSource>] + # The list of DataSource instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return data sources in reachable locations + # and the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a DataSource instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + class GetDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a data source instance. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # DataSource resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @!attribute [rw] data_source + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. Enable upsert. + class UpdateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing Backups. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backup + # information, in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, + # locations map to Google Cloud regions, for example **us-central1**. + # To retrieve data sources for all locations, use "-" for the + # '\\{location}' value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + class ListBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing Backups. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] + # The list of Backup instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return data sources in reachable locations + # and the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a Backup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + class GetBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a Backup. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Backup resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # @!attribute [rw] backup + # @return [::Google::Cloud::BackupDR::V1::Backup] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a Backup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for restoring from a Backup. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] compute_instance_target_environment + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment] + # Compute Engine target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_target_environment + # @return [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment] + # Disk target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] region_disk_target_environment + # @return [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment] + # Region disk target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] compute_instance_restore_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following fields are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_restore_properties + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties] + # Disk properties to be overridden during restore. + # + # Note: The following fields are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] clear_overrides_field_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + class RestoreBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for restoring from a Backup. + # @!attribute [rw] target_resource + # @return [::Google::Cloud::BackupDR::V1::TargetResource] + # Details of the target resource created/modified as part of restore. + class RestoreBackupResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of the target resource created/modified as part of restore. + # @!attribute [rw] gcp_resource + # @return [::Google::Cloud::BackupDR::V1::GcpResource] + # Details of the native Google Cloud resource created as part of restore. + class TargetResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Minimum details to identify a Google Cloud resource + # @!attribute [rw] gcp_resourcename + # @return [::String] + # Name of the Google Cloud resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # Type of the resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + class GcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Minimum details to identify a Google Cloud resource for a backup. + # @!attribute [rw] gcp_resourcename + # @return [::String] + # Name of the Google Cloud resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # Type of the resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + class BackupGcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Backup configuration state. Is the resource configured for backup? + module BackupConfigState + # The possible states of backup configuration. + # Status not set. + BACKUP_CONFIG_STATE_UNSPECIFIED = 0 + + # The data source is actively protected (i.e. there is a + # BackupPlanAssociation or Appliance SLA pointing to it) + ACTIVE = 1 + + # The data source is no longer protected (but may have backups under it) + PASSIVE = 2 + end + + # BackupView contains enum options for Partial and Full view. + module BackupView + # If the value is not set, the default 'FULL' view is used. + BACKUP_VIEW_UNSPECIFIED = 0 + + # Includes basic data about the Backup, but not the full contents. + BACKUP_VIEW_BASIC = 1 + + # Includes all data about the Backup. + # This is the default value (for both ListBackups and GetBackup). + BACKUP_VIEW_FULL = 2 + end + + # BackupVaultView contains enum options for Partial and Full view. + module BackupVaultView + # If the value is not set, the default 'FULL' view is used. + BACKUP_VAULT_VIEW_UNSPECIFIED = 0 + + # Includes basic data about the Backup Vault, but not the full contents. + BACKUP_VAULT_VIEW_BASIC = 1 + + # Includes all data about the Backup Vault. + # This is the default value (for both ListBackupVaults and GetBackupVault). + BACKUP_VAULT_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb new file mode 100644 index 000000000000..1498cae8a4ff --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # AlloyDBClusterDataSourceProperties represents the properties of a + # AlloyDB cluster resource that are stored in the DataSource. + # . + # @!attribute [r] name + # @return [::String] + # Output only. Name of the AlloyDB cluster backed up by the datasource. + class AlloyDBClusterDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AlloyDbClusterBackupProperties represents AlloyDB cluster + # backup properties. + # . + # @!attribute [rw] description + # @return [::String] + # An optional text description for the backup. + # @!attribute [r] stored_bytes + # @return [::Integer] + # Output only. Storage usage of this particular backup + # @!attribute [r] chain_id + # @return [::String] + # Output only. The chain id of this backup. Backups belonging to the same + # chain are sharing the same chain id. This property is calculated and + # maintained by BackupDR. + # @!attribute [r] database_version + # @return [::String] + # Output only. The PostgreSQL major version of the AlloyDB cluster when the + # backup was taken. + class AlloyDbClusterBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties for an AlloyDB cluster backup plan association. + # @!attribute [r] cluster_uid + # @return [::String] + # Output only. The cluster UID of the AlloyDB cluster. + class AlloyDBClusterBackupPlanAssociationProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb new file mode 100644 index 000000000000..787b36f74c08 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # BackupApplianceBackupProperties represents BackupDR backup appliance's + # properties. + # @!attribute [r] generation_id + # @return [::Integer] + # Output only. The numeric generation ID of the backup (monotonically + # increasing). + # @!attribute [r] finalize_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when this backup object was finalized (if none, + # backup is not finalized). + # @!attribute [rw] recovery_range_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The earliest timestamp of data available in this Backup. + # @!attribute [rw] recovery_range_end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The latest timestamp of data available in this Backup. + class BackupApplianceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb new file mode 100644 index 000000000000..c11daec87a93 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # CloudSqlInstanceDataSourceProperties represents the properties of a + # Cloud SQL resource that are stored in the DataSource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the Cloud SQL instance backed up by the datasource. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceBackupProperties represents Cloud SQL Instance + # Backup properties. + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance + # when the backup was taken. + # @!attribute [r] final_backup + # @return [::Boolean] + # Output only. Whether the backup is a final backup. + # @!attribute [r] source_instance + # @return [::String] + # Output only. The source instance of the backup. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + # @!attribute [r] instance_delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance delete timestamp. + class CloudSqlInstanceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceDataSourceReferenceProperties represents the properties of a + # Cloud SQL resource that are stored in the DataSourceReference. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the Cloud SQL instance backed up by the datasource. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceDataSourceReferenceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceInitializationConfig contains the configuration for + # initializing a Cloud SQL instance. + # @!attribute [rw] edition + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig::Edition] + # Required. The edition of the Cloud SQL instance. + class CloudSqlInstanceInitializationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The edition of the Cloud SQL instance. For details, see + # https://cloud.google.com/sql/docs/editions-intro. + module Edition + # Unspecified edition. + EDITION_UNSPECIFIED = 0 + + # Enterprise edition. + ENTERPRISE = 1 + + # Enterprise Plus edition. + ENTERPRISE_PLUS = 2 + end + end + + # Cloud SQL instance's BPA properties. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + class CloudSqlInstanceBackupPlanAssociationProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb new file mode 100644 index 000000000000..d5590a9a587f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb @@ -0,0 +1,241 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # DiskTargetEnvironment represents the target environment for the disk. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the disk. + # @!attribute [rw] zone + # @return [::String] + # Required. Target zone for the disk. + class DiskTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RegionDiskTargetEnvironment represents the target environment for the disk. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the disk. + # @!attribute [rw] region + # @return [::String] + # Required. Target region for the disk. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Required. Target URLs of the replica zones for the disk. + class RegionDiskTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DiskRestoreProperties represents the properties of a Disk restore. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the disk. + # @!attribute [rw] description + # @return [::String] + # Optional. An optional description of this resource. Provide this property + # when you create the resource. + # @!attribute [rw] size_gb + # @return [::Integer] + # Required. The size of the disk in GB. + # @!attribute [rw] licenses + # @return [::Array<::String>] + # Optional. A list of publicly available licenses that are applicable to this + # backup. This is applicable if the original image had licenses attached, + # e.g. Windows image + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # Optional. A list of features to enable in the guest operating system. This + # is applicable only for bootable images. + # @!attribute [rw] disk_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts the disk using a + # customer-supplied encryption key or a customer-managed encryption key. + # @!attribute [rw] physical_block_size_bytes + # @return [::Integer] + # Optional. Physical block size of the persistent disk, in bytes. + # If not present in a request, a default value is used. + # Currently, the supported size is 4096. + # @!attribute [rw] provisioned_iops + # @return [::Integer] + # Optional. Indicates how many IOPS to provision for the disk. This sets the + # number of I/O operations per second that the disk can handle. + # @!attribute [rw] provisioned_throughput + # @return [::Integer] + # Optional. Indicates how much throughput to provision for the disk. This + # sets the number of throughput MB per second that the disk can handle. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Indicates whether this disk is using confidential compute mode. + # Encryption with a Cloud KMS key is required to enable this option. + # @!attribute [rw] storage_pool + # @return [::String] + # Optional. The storage pool in which the new disk is created. You can + # provide this as a partial or full URL to the resource. + # @!attribute [rw] access_mode + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::AccessMode] + # Optional. The access mode of the disk. + # @!attribute [rw] architecture + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::Architecture] + # Optional. The architecture of the source disk. Valid values are + # ARM64 or X86_64. + # @!attribute [rw] resource_policy + # @return [::Array<::String>] + # Optional. Resource policies applied to this disk. + # @!attribute [rw] type + # @return [::String] + # Required. URL of the disk type resource describing which disk type to use + # to create the disk. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to apply to this disk. These can be modified later using + # setLabels method. Label values can be empty. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to the disk. + class DiskRestoreProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The supported access modes of the disk. + module AccessMode + # The default AccessMode, means the disk can be attached to single instance + # in RW mode. + READ_WRITE_SINGLE = 0 + + # The AccessMode means the disk can be attached to multiple instances in RW + # mode. + READ_WRITE_MANY = 1 + + # The AccessMode means the disk can be attached to multiple instances in RO + # mode. + READ_ONLY_MANY = 2 + end + + # Architecture of the source disk. + module Architecture + # Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0 + + # Disks with architecture X86_64 + X86_64 = 1 + + # Disks with architecture ARM64 + ARM64 = 2 + end + end + + # DiskBackupProperties represents the properties of a Disk backup. + # @!attribute [rw] description + # @return [::String] + # A description of the source disk. + # @!attribute [rw] licenses + # @return [::Array<::String>] + # A list of publicly available licenses that are applicable to this backup. + # This is applicable if the original image had licenses attached, e.g. + # Windows image. + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # A list of guest OS features that are applicable to this backup. + # @!attribute [rw] architecture + # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties::Architecture] + # The architecture of the source disk. Valid values are + # ARM64 or X86_64. + # @!attribute [rw] type + # @return [::String] + # The URL of the type of the disk. + # @!attribute [rw] size_gb + # @return [::Integer] + # Size(in GB) of the source disk. + # @!attribute [rw] region + # @return [::String] + # Region and zone are mutually exclusive fields. + # The URL of the region of the source disk. + # @!attribute [rw] zone + # @return [::String] + # The URL of the Zone where the source disk. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # The URL of the Zones where the source disk should be replicated. + # @!attribute [rw] source_disk + # @return [::String] + # The source disk used to create this backup. + class DiskBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Architecture of the source disk. + module Architecture + # Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0 + + # Disks with architecture X86_64 + X86_64 = 1 + + # Disks with architecture ARM64 + ARM64 = 2 + end + end + + # DiskDataSourceProperties represents the properties of a + # Disk resource that are stored in the DataSource. + # . + # @!attribute [rw] name + # @return [::String] + # Name of the disk backed up by the datasource. + # @!attribute [rw] description + # @return [::String] + # The description of the disk. + # @!attribute [rw] type + # @return [::String] + # The type of the disk. + # @!attribute [rw] size_gb + # @return [::Integer] + # The size of the disk in GB. + class DiskDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb new file mode 100644 index 000000000000..bc9fe21300c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb @@ -0,0 +1,1001 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # ComputeInstanceBackupProperties represents Compute Engine instance backup + # properties. + # @!attribute [rw] description + # @return [::String] + # An optional text description for the instances that are created from these + # properties. + # @!attribute [rw] tags + # @return [::Google::Cloud::BackupDR::V1::Tags] + # A list of tags to apply to the instances that are created from these + # properties. The tags identify valid sources or targets for network + # firewalls. The setTags method can modify this list of tags. Each tag within + # the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). + # @!attribute [rw] machine_type + # @return [::String] + # The machine type to use for instances that are created from these + # properties. + # @!attribute [rw] can_ip_forward + # @return [::Boolean] + # Enables instances created based on these properties to send packets with + # source IP addresses other than their own and receive packets with + # destination IP addresses other than their own. If these instances will be + # used as an IP gateway or it will be set as the next-hop in a Route + # resource, specify `true`. If unsure, leave this set to `false`. See the + # https://cloud.google.com/vpc/docs/using-routes#canipforward + # documentation for more information. + # @!attribute [rw] network_interface + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] + # An array of network access configurations for this interface. + # @!attribute [rw] disk + # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] + # An array of disks that are associated with the instances that are created + # from these properties. + # @!attribute [rw] metadata + # @return [::Google::Cloud::BackupDR::V1::Metadata] + # The metadata key/value pairs to assign to instances that are created from + # these properties. These pairs can consist of custom metadata or predefined + # keys. See https://cloud.google.com/compute/docs/metadata/overview for more + # information. + # @!attribute [rw] service_account + # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] + # A list of service accounts with specified scopes. Access tokens for these + # service accounts are available to the instances that are created from + # these properties. Use metadata queries to obtain the access tokens for + # these instances. + # @!attribute [rw] scheduling + # @return [::Google::Cloud::BackupDR::V1::Scheduling] + # Specifies the scheduling options for the instances that are created from + # these properties. + # @!attribute [rw] guest_accelerator + # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] + # A list of guest accelerator cards' type and count to use for instances + # created from these properties. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # Minimum cpu/platform to be used by instances. The instance may be + # scheduled on the specified or newer cpu/platform. Applicable values are the + # friendly names of CPU platforms, such as + # `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. + # For more information, read + # https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + # @!attribute [rw] key_revocation_action_type + # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] + # KeyRevocationActionType of the instance. Supported options are "STOP" and + # "NONE". The default value is "NONE" if it is not specified. + # @!attribute [rw] source_instance + # @return [::String] + # The source instance used to create this backup. This can be a partial or + # full URL to the resource. For example, the following are valid values: + # -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + # -projects/project/zones/zone/instances/instance + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels to apply to instances that are created from these properties. + class ComputeInstanceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # ComputeInstanceRestoreProperties represents Compute Engine instance + # properties to be overridden during restore. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the compute instance. + # @!attribute [rw] advanced_machine_features + # @return [::Google::Cloud::BackupDR::V1::AdvancedMachineFeatures] + # Optional. Controls for advanced machine-related behavior features. + # @!attribute [rw] can_ip_forward + # @return [::Boolean] + # Optional. Allows this instance to send and receive packets with + # non-matching destination or source IPs. + # @!attribute [rw] confidential_instance_config + # @return [::Google::Cloud::BackupDR::V1::ConfidentialInstanceConfig] + # Optional. Controls Confidential compute options on the instance + # @!attribute [rw] deletion_protection + # @return [::Boolean] + # Optional. Whether the resource should be protected against deletion. + # @!attribute [rw] description + # @return [::String] + # Optional. An optional description of this resource. Provide this property + # when you create the resource. + # @!attribute [rw] disks + # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] + # Optional. Array of disks associated with this instance. Persistent disks + # must be created before you can assign them. Source regional persistent + # disks will be restored with default replica zones if not specified. + # @!attribute [rw] display_device + # @return [::Google::Cloud::BackupDR::V1::DisplayDevice] + # Optional. Enables display device for the instance. + # @!attribute [rw] guest_accelerators + # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] + # Optional. A list of the type and count of accelerator cards attached to the + # instance. + # @!attribute [rw] hostname + # @return [::String] + # Optional. Specifies the hostname of the instance. The specified hostname + # must be RFC1035 compliant. If hostname is not specified, the default + # hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global + # DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal + # DNS. + # @!attribute [rw] instance_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts suspended data for an instance with a + # customer-managed encryption key. + # @!attribute [rw] key_revocation_action_type + # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] + # Optional. KeyRevocationActionType of the instance. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to apply to this instance. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. Full or partial URL of the machine type resource to use for this + # instance. + # @!attribute [rw] metadata + # @return [::Google::Cloud::BackupDR::V1::Metadata] + # Optional. This includes custom metadata and predefined keys. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # Optional. Minimum CPU platform to use for this instance. + # @!attribute [rw] network_interfaces + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] + # Optional. An array of network configurations for this instance. These + # specify how interfaces are configured to interact with other network + # services, such as connecting to the internet. Multiple interfaces are + # supported per instance. Required to restore in different project or region. + # @!attribute [rw] network_performance_config + # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig] + # Optional. Configure network performance such as egress bandwidth tier. + # @!attribute [rw] params + # @return [::Google::Cloud::BackupDR::V1::InstanceParams] + # Input only. Additional params passed with the request, but not persisted + # as part of resource payload. + # @!attribute [rw] private_ipv6_google_access + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess] + # Optional. The private IPv6 google access type for the VM. + # If not specified, use INHERIT_FROM_SUBNETWORK as default. + # @!attribute [rw] allocation_affinity + # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity] + # Optional. Specifies the reservations that this instance can consume from. + # @!attribute [rw] resource_policies + # @return [::Array<::String>] + # Optional. Resource policies applied to this instance. + # By default, no resource policies will be applied. + # @!attribute [rw] scheduling + # @return [::Google::Cloud::BackupDR::V1::Scheduling] + # Optional. Sets the scheduling options for this instance. + # @!attribute [rw] service_accounts + # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] + # Optional. A list of service accounts, with their specified scopes, + # authorized for this instance. Only one service account per VM instance is + # supported. + # @!attribute [rw] tags + # @return [::Google::Cloud::BackupDR::V1::Tags] + # Optional. Tags to apply to this instance. Tags are used to identify valid + # sources or targets for network firewalls and are specified by the client + # during instance creation. + class ComputeInstanceRestoreProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The private IPv6 google access type for the VMs. + module InstancePrivateIpv6GoogleAccess + # Default value. This value is unused. + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0 + + # Each network interface inherits PrivateIpv6GoogleAccess from its + # subnetwork. + INHERIT_FROM_SUBNETWORK = 1 + + # Outbound private IPv6 access from VMs in this subnet to Google services. + # If specified, the subnetwork who is attached to the instance's default + # network interface will be assigned an internal IPv6 prefix if it doesn't + # have before. + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2 + + # Bidirectional private IPv6 access to/from Google services. If + # specified, the subnetwork who is attached to the instance's default + # network interface will be assigned an internal IPv6 prefix if it doesn't + # have before. + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + end + end + + # ComputeInstanceTargetEnvironment represents Compute Engine target + # environment to be used during restore. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the Compute Engine instance. + # @!attribute [rw] zone + # @return [::String] + # Required. The zone of the Compute Engine instance. + class ComputeInstanceTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ComputeInstanceDataSourceProperties represents the properties of a + # ComputeEngine resource that are stored in the DataSource. + # @!attribute [rw] name + # @return [::String] + # Name of the compute instance backed up by the datasource. + # @!attribute [rw] description + # @return [::String] + # The description of the Compute Engine instance. + # @!attribute [rw] machine_type + # @return [::String] + # The machine type of the instance. + # @!attribute [rw] total_disk_count + # @return [::Integer] + # The total number of disks attached to the Instance. + # @!attribute [rw] total_disk_size_gb + # @return [::Integer] + # The sum of all the disk sizes. + class ComputeInstanceDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies options for controlling advanced machine features. + # @!attribute [rw] enable_nested_virtualization + # @return [::Boolean] + # Optional. Whether to enable nested virtualization or not (default is + # false). + # @!attribute [rw] threads_per_core + # @return [::Integer] + # Optional. The number of threads per physical core. To disable simultaneous + # multithreading (SMT) set this to 1. If unset, the maximum number + # of threads supported per core by the underlying processor is + # assumed. + # @!attribute [rw] visible_core_count + # @return [::Integer] + # Optional. The number of physical cores to expose to an instance. Multiply + # by the number of threads per core to compute the total number of virtual + # CPUs to expose to the instance. If unset, the number of cores is + # inferred from the instance's nominal CPU count and the underlying + # platform's SMT width. + # @!attribute [rw] enable_uefi_networking + # @return [::Boolean] + # Optional. Whether to enable UEFI networking for instance creation. + class AdvancedMachineFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of Confidential Instance options. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Defines whether the instance should have confidential compute + # enabled. + class ConfidentialInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of Display Device options + # @!attribute [rw] enable_display + # @return [::Boolean] + # Optional. Enables display for the Compute Engine VM + class DisplayDevice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A specification of the type and number of accelerator cards attached to the + # instance. + # @!attribute [rw] accelerator_type + # @return [::String] + # Optional. Full or partial URL of the accelerator type resource to attach to + # this instance. + # @!attribute [rw] accelerator_count + # @return [::Integer] + # Optional. The number of the guest accelerator cards exposed to this + # instance. + class AcceleratorConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A customer-supplied encryption key. + # @!attribute [rw] raw_key + # @return [::String] + # Optional. Specifies a 256-bit customer-supplied + # encryption key. + # + # Note: The following fields are mutually exclusive: `raw_key`, `rsa_encrypted_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] rsa_encrypted_key + # @return [::String] + # Optional. RSA-wrapped 2048-bit + # customer-supplied encryption key to either encrypt or decrypt this + # resource. + # + # Note: The following fields are mutually exclusive: `rsa_encrypted_key`, `raw_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The name of the encryption key that is stored in Google Cloud + # KMS. + # + # Note: The following fields are mutually exclusive: `kms_key_name`, `raw_key`, `rsa_encrypted_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kms_key_service_account + # @return [::String] + # Optional. The service account being used for the encryption request for the + # given KMS key. If absent, the Compute Engine default service account is + # used. + class CustomerEncryptionKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A key/value pair to be used for storing metadata. + # @!attribute [rw] key + # @return [::String] + # Optional. Key for the metadata entry. + # @!attribute [rw] value + # @return [::String] + # Optional. Value for the metadata entry. These are free-form strings, and + # only have meaning as interpreted by the image running in the instance. The + # only restriction placed on values is that their size must be less than + # or equal to 262144 bytes (256 KiB). + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A metadata key/value entry. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::BackupDR::V1::Entry>] + # Optional. Array of key/value pairs. The total size of all keys and values + # must be less than 512 KB. + class Metadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A network interface resource attached to an instance. + # s + # @!attribute [rw] network + # @return [::String] + # Optional. URL of the VPC network resource for this instance. + # @!attribute [rw] subnetwork + # @return [::String] + # Optional. The URL of the Subnetwork resource for this instance. + # @!attribute [rw] ip_address + # @return [::String] + # Optional. An IPv4 internal IP address to assign to the instance for this + # network interface. If not specified by the user, an unused internal IP is + # assigned by the system. + # @!attribute [rw] ipv6_address + # @return [::String] + # Optional. An IPv6 internal network address for this network interface. To + # use a static internal IP address, it must be unused and in the same region + # as the instance's zone. If not specified, Google Cloud will automatically + # assign an internal IPv6 address from the instance's subnetwork. + # @!attribute [rw] internal_ipv6_prefix_length + # @return [::Integer] + # Optional. The prefix length of the primary internal IPv6 range. + # @!attribute [r] name + # @return [::String] + # Output only. [Output Only] The name of the network interface, which is + # generated by the server. + # @!attribute [rw] access_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] + # Optional. An array of configurations for this interface. Currently, only + # one access config,ONE_TO_ONE_NAT is supported. If there are no + # accessConfigs specified, then this instance will have + # no external internet access. + # @!attribute [rw] ipv6_access_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] + # Optional. An array of IPv6 access configurations for this interface. + # Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there + # is no ipv6AccessConfig specified, then this instance will + # have no external IPv6 Internet access. + # @!attribute [rw] alias_ip_ranges + # @return [::Array<::Google::Cloud::BackupDR::V1::AliasIpRange>] + # Optional. An array of alias IP ranges for this network interface. + # You can only specify this field for network interfaces in VPC networks. + # @!attribute [rw] stack_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::StackType] + # The stack type for this network interface. + # @!attribute [rw] ipv6_access_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::Ipv6AccessType] + # Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the + # IP can be accessed from the Internet. This field is always inherited from + # its subnetwork. + # @!attribute [rw] queue_count + # @return [::Integer] + # Optional. The networking queue count that's specified by users for the + # network interface. Both Rx and Tx queues will be set to this number. It'll + # be empty if not specified by the users. + # @!attribute [rw] nic_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::NicType] + # Optional. The type of vNIC to be used on this interface. This may be gVNIC + # or VirtioNet. + # @!attribute [rw] network_attachment + # @return [::String] + # Optional. The URL of the network attachment that this interface should + # connect to in the following format: + # projects/\\{project_number}/regions/\\{region_name}/networkAttachments/\\{network_attachment_name}. + class NetworkInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stack type for this network interface. + module StackType + # Default should be STACK_TYPE_UNSPECIFIED. + STACK_TYPE_UNSPECIFIED = 0 + + # The network interface will be assigned IPv4 address. + IPV4_ONLY = 1 + + # The network interface can have both IPv4 and IPv6 addresses. + IPV4_IPV6 = 2 + end + + # IPv6 access type for this network interface. + module Ipv6AccessType + # IPv6 access type not set. Means this network interface hasn't been + # turned on IPv6 yet. + UNSPECIFIED_IPV6_ACCESS_TYPE = 0 + + # This network interface can have internal IPv6. + INTERNAL = 1 + + # This network interface can have external IPv6. + EXTERNAL = 2 + end + + # Nic type for this network interface. + module NicType + # Default should be NIC_TYPE_UNSPECIFIED. + NIC_TYPE_UNSPECIFIED = 0 + + # VIRTIO + VIRTIO_NET = 1 + + # GVNIC + GVNIC = 2 + end + end + + # Network performance configuration. + # @!attribute [rw] total_egress_bandwidth_tier + # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig::Tier] + # Optional. The tier of the total egress bandwidth. + class NetworkPerformanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Network performance tier. + module Tier + # This value is unused. + TIER_UNSPECIFIED = 0 + + # Default network performance config. + DEFAULT = 1 + + # Tier 1 network performance config. + TIER_1 = 2 + end + end + + # An access configuration attached to an instance's network interface. + # Only one access config per instance is supported. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::AccessConfig::AccessType] + # Optional. In accessConfigs (IPv4), the + # default and only option is ONE_TO_ONE_NAT. In + # ipv6AccessConfigs, the default and only option is + # DIRECT_IPV6. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of this access configuration. + # @!attribute [rw] external_ip + # @return [::String] + # Optional. The external IP address of this access configuration. + # @!attribute [rw] external_ipv6 + # @return [::String] + # Optional. The external IPv6 address of this access configuration. + # @!attribute [rw] external_ipv6_prefix_length + # @return [::Integer] + # Optional. The prefix length of the external IPv6 range. + # @!attribute [rw] set_public_ptr + # @return [::Boolean] + # Optional. Specifies whether a public DNS 'PTR' record should be created to + # map the external IP address of the instance to a DNS domain name. + # @!attribute [rw] public_ptr_domain_name + # @return [::String] + # Optional. The DNS domain name for the public PTR record. + # @!attribute [rw] network_tier + # @return [::Google::Cloud::BackupDR::V1::AccessConfig::NetworkTier] + # Optional. This signifies the networking tier used for configuring this + # access + class AccessConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of configuration. + module AccessType + # Default value. This value is unused. + ACCESS_TYPE_UNSPECIFIED = 0 + + # ONE_TO_ONE_NAT + ONE_TO_ONE_NAT = 1 + + # Direct IPv6 access. + DIRECT_IPV6 = 2 + end + + # Network tier property used by addresses, instances and forwarding rules. + module NetworkTier + # Default value. This value is unused. + NETWORK_TIER_UNSPECIFIED = 0 + + # High quality, Google-grade network tier, support for all networking + # products. + PREMIUM = 1 + + # Public internet quality, only limited support for other networking + # products. + STANDARD = 2 + end + end + + # An alias IP range attached to an instance's network interface. + # @!attribute [rw] ip_cidr_range + # @return [::String] + # Optional. The IP alias ranges to allocate for this interface. + # @!attribute [rw] subnetwork_range_name + # @return [::String] + # Optional. The name of a subnetwork secondary IP range from which to + # allocate an IP alias range. If not specified, the primary range of the + # subnetwork is used. + class AliasIpRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional instance params. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to the instance. + class InstanceParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Specifies the reservations that this instance can consume from. + # @!attribute [rw] consume_allocation_type + # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity::Type] + # Optional. Specifies the type of reservation from which this instance can + # consume + # @!attribute [rw] key + # @return [::String] + # Optional. Corresponds to the label key of a reservation resource. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Corresponds to the label values of a reservation resource. + class AllocationAffinity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates whether to consume from a reservation or not. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # Do not consume from any allocated capacity. + NO_RESERVATION = 1 + + # Consume any allocation available. + ANY_RESERVATION = 2 + + # Must consume from a specific reservation. Must specify key value fields + # for specifying the reservations. + SPECIFIC_RESERVATION = 3 + end + end + + # Sets the scheduling options for an Instance. + # @!attribute [rw] on_host_maintenance + # @return [::Google::Cloud::BackupDR::V1::Scheduling::OnHostMaintenance] + # Optional. Defines the maintenance behavior for this instance. + # @!attribute [rw] automatic_restart + # @return [::Boolean] + # Optional. Specifies whether the instance should be automatically restarted + # if it is terminated by Compute Engine (not terminated by a user). + # @!attribute [rw] preemptible + # @return [::Boolean] + # Optional. Defines whether the instance is preemptible. + # @!attribute [rw] node_affinities + # @return [::Array<::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity>] + # Optional. A set of node affinity and anti-affinity configurations. + # Overrides reservationAffinity. + # @!attribute [rw] min_node_cpus + # @return [::Integer] + # Optional. The minimum number of virtual CPUs this instance will consume + # when running on a sole-tenant node. + # @!attribute [rw] provisioning_model + # @return [::Google::Cloud::BackupDR::V1::Scheduling::ProvisioningModel] + # Optional. Specifies the provisioning model of the instance. + # @!attribute [rw] instance_termination_action + # @return [::Google::Cloud::BackupDR::V1::Scheduling::InstanceTerminationAction] + # Optional. Specifies the termination action for the instance. + # @!attribute [rw] local_ssd_recovery_timeout + # @return [::Google::Cloud::BackupDR::V1::SchedulingDuration] + # Optional. Specifies the maximum amount of time a Local Ssd Vm should wait + # while recovery of the Local Ssd state is attempted. Its value should be in + # between 0 and 168 hours with hour granularity and the default value being 1 + # hour. + class Scheduling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Node Affinity: the configuration of desired nodes onto which this Instance + # could be scheduled. + # @!attribute [rw] key + # @return [::String] + # Optional. Corresponds to the label key of Node resource. + # @!attribute [rw] operator + # @return [::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity::Operator] + # Optional. Defines the operation of node selection. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Corresponds to the label values of Node resource. + class NodeAffinity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the type of node selections. + module Operator + # Default value. This value is unused. + OPERATOR_UNSPECIFIED = 0 + + # Requires Compute Engine to seek for matched nodes. + IN = 1 + + # Requires Compute Engine to avoid certain nodes. + NOT_IN = 2 + end + end + + # Defines the maintenance behavior for this instance= + module OnHostMaintenance + # Default value. This value is unused. + ON_HOST_MAINTENANCE_UNSPECIFIED = 0 + + # Tells Compute Engine to terminate and (optionally) restart the instance + # away from the maintenance activity. + TERMINATE = 1 + + # Default, Allows Compute Engine to automatically migrate instances + # out of the way of maintenance events. + MIGRATE = 1000 + end + + # Defines the provisioning model for an instance. + module ProvisioningModel + # Default value. This value is not used. + PROVISIONING_MODEL_UNSPECIFIED = 0 + + # Standard provisioning with user controlled runtime, no discounts. + STANDARD = 1 + + # Heavily discounted, no guaranteed runtime. + SPOT = 2 + end + + # Defines the supported termination actions for an instance. + module InstanceTerminationAction + # Default value. This value is unused. + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0 + + # Delete the VM. + DELETE = 1 + + # Stop the VM without storing in-memory content. default action. + STOP = 2 + end + end + + # A SchedulingDuration represents a fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". Range is approximately 10,000 years. + # @!attribute [rw] seconds + # @return [::Integer] + # Optional. Span of time at a resolution of a second. + # @!attribute [rw] nanos + # @return [::Integer] + # Optional. Span of time that's a fraction of a second at nanosecond + # resolution. + class SchedulingDuration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A service account. + # @!attribute [rw] email + # @return [::String] + # Optional. Email address of the service account. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Optional. The list of scopes to be made available for this service account. + class ServiceAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of instance tags. + # @!attribute [rw] items + # @return [::Array<::String>] + # Optional. An array of tags. Each tag must be 1-63 characters long, and + # comply with RFC1035. + class Tags + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An instance-attached disk resource. + # @!attribute [rw] initialize_params + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::InitializeParams] + # Optional. Specifies the parameters to initialize this disk. + # @!attribute [rw] device_name + # @return [::String] + # Optional. This is used as an identifier for the disks. This is the unique + # name has to provided to modify disk parameters like disk_name and + # replica_zones (in case of RePDs) + # @!attribute [rw] kind + # @return [::String] + # Optional. Type of the resource. + # @!attribute [rw] disk_type_deprecated + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] + # Specifies the type of the disk. + # @!attribute [rw] mode + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskMode] + # Optional. The mode in which to attach this disk. + # @!attribute [rw] source + # @return [::String] + # Optional. Specifies a valid partial or full URL to an existing Persistent + # Disk resource. + # @!attribute [rw] index + # @return [::Integer] + # Optional. A zero-based index to this disk, where 0 is reserved for the + # boot disk. + # @!attribute [rw] boot + # @return [::Boolean] + # Optional. Indicates that this is a boot disk. The virtual machine will use + # the first partition of the disk for its root filesystem. + # @!attribute [rw] auto_delete + # @return [::Boolean] + # Optional. Specifies whether the disk will be auto-deleted when the instance + # is deleted (but not when the disk is detached from the instance). + # @!attribute [rw] license + # @return [::Array<::String>] + # Optional. Any valid publicly visible licenses. + # @!attribute [rw] disk_interface + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskInterface] + # Optional. Specifies the disk interface to use for attaching this disk. + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # Optional. A list of features to enable on the guest operating system. + # Applicable only for bootable images. + # @!attribute [rw] disk_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts or decrypts a disk using a customer-supplied + # encryption key. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Optional. The size of the disk in GB. + # @!attribute [r] saved_state + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskSavedState] + # Optional. Output only. The state of the disk. + # @!attribute [r] disk_type + # @return [::String] + # Optional. Output only. The URI of the disk type resource. For example: + # projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] + # Optional. Specifies the type of the disk. + class AttachedDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the parameters to initialize this disk. + # @!attribute [rw] disk_name + # @return [::String] + # Optional. Specifies the disk name. If not specified, the default is to + # use the name of the instance. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Optional. URL of the zone where the disk should be created. + # Required for each regional disk associated with the instance. + class InitializeParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of the Disk Types. + module DiskType + # Default value, which is unused. + DISK_TYPE_UNSPECIFIED = 0 + + # A scratch disk type. + SCRATCH = 1 + + # A persistent disk type. + PERSISTENT = 2 + end + + # List of the Disk Modes. + module DiskMode + # Default value, which is unused. + DISK_MODE_UNSPECIFIED = 0 + + # Attaches this disk in read-write mode. Only one + # virtual machine at a time can be attached to a disk in read-write mode. + READ_WRITE = 1 + + # Attaches this disk in read-only mode. Multiple virtual machines can use + # a disk in read-only mode at a time. + READ_ONLY = 2 + + # The disk is locked for administrative reasons. Nobody else + # can use the disk. This mode is used (for example) when taking + # a snapshot of a disk to prevent mounting the disk while it is + # being snapshotted. + LOCKED = 3 + end + + # List of the Disk Interfaces. + module DiskInterface + # Default value, which is unused. + DISK_INTERFACE_UNSPECIFIED = 0 + + # SCSI Disk Interface. + SCSI = 1 + + # NVME Disk Interface. + NVME = 2 + + # NVDIMM Disk Interface. + NVDIMM = 3 + + # ISCSI Disk Interface. + ISCSI = 4 + end + + # List of the states of the Disk. + module DiskSavedState + # Default Disk state has not been preserved. + DISK_SAVED_STATE_UNSPECIFIED = 0 + + # Disk state has been preserved. + PRESERVED = 1 + end + end + + # Feature type of the Guest OS. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::GuestOsFeature::FeatureType] + # The ID of a supported feature. + class GuestOsFeature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # List of the Feature Types. + module FeatureType + # Default value, which is unused. + FEATURE_TYPE_UNSPECIFIED = 0 + + # VIRTIO_SCSI_MULTIQUEUE feature type. + VIRTIO_SCSI_MULTIQUEUE = 1 + + # WINDOWS feature type. + WINDOWS = 2 + + # MULTI_IP_SUBNET feature type. + MULTI_IP_SUBNET = 3 + + # UEFI_COMPATIBLE feature type. + UEFI_COMPATIBLE = 4 + + # SECURE_BOOT feature type. + SECURE_BOOT = 5 + + # GVNIC feature type. + GVNIC = 6 + + # SEV_CAPABLE feature type. + SEV_CAPABLE = 7 + + # BARE_METAL_LINUX_COMPATIBLE feature type. + BARE_METAL_LINUX_COMPATIBLE = 8 + + # SUSPEND_RESUME_COMPATIBLE feature type. + SUSPEND_RESUME_COMPATIBLE = 9 + + # SEV_LIVE_MIGRATABLE feature type. + SEV_LIVE_MIGRATABLE = 10 + + # SEV_SNP_CAPABLE feature type. + SEV_SNP_CAPABLE = 11 + + # TDX_CAPABLE feature type. + TDX_CAPABLE = 12 + + # IDPF feature type. + IDPF = 13 + + # SEV_LIVE_MIGRATABLE_V2 feature type. + SEV_LIVE_MIGRATABLE_V2 = 14 + end + end + + # Specifies whether the virtual machine instance will be shut down on key + # revocation. It is currently used in instance, instance properties and GMI + # protos + module KeyRevocationActionType + # Default value. This value is unused. + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0 + + # Indicates user chose no operation. + NONE = 1 + + # Indicates user chose to opt for VM shutdown on key revocation. + STOP = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb new file mode 100644 index 000000000000..d6e8a8da44c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb @@ -0,0 +1,228 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # DataSourceReference is a reference to a DataSource resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the DataSourceReference. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # @!attribute [r] data_source + # @return [::String] + # Output only. The resource name of the DataSource. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{dataSource} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataSourceReference was created. + # @!attribute [r] data_source_backup_config_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] + # Output only. The backup configuration state of the DataSource. + # @!attribute [r] data_source_backup_count + # @return [::Integer] + # Output only. Number of backups in the DataSource. + # @!attribute [r] data_source_backup_config_info + # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupConfigInfo] + # Output only. Information of backup configuration on the DataSource. + # @!attribute [r] data_source_gcp_resource_info + # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResourceInfo] + # Output only. The GCP resource that the DataSource is associated with. + # @!attribute [r] total_stored_bytes + # @return [::Integer] + # Output only. Total size of the storage used by all backup resources for the + # referenced datasource. + class DataSourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information of backup configuration on the DataSource. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] + # Output only. The status of the last backup in this DataSource + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the last successful backup to this DataSource. + class DataSourceBackupConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The GCP resource that the DataSource is associated with. + # @!attribute [r] gcp_resourcename + # @return [::String] + # Output only. The resource name of the GCP resource. + # Ex: projects/\\{project}/zones/\\{zone}/instances/\\{instance} + # @!attribute [r] type + # @return [::String] + # Output only. The type of the GCP resource. + # Ex: compute.googleapis.com/Instance + # @!attribute [r] location + # @return [::String] + # Output only. The location of the GCP resource. + # Ex: //"global"/"unspecified" + # @!attribute [r] cloud_sql_instance_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceReferenceProperties] + # Output only. The properties of the Cloud SQL instance. + class DataSourceGcpResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the GetDataSourceReference method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + class GetDataSourceReferenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the ListDataSourceReferences method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + class ListDataSourceReferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the ListDataSourceReferences method. + # @!attribute [rw] data_source_references + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # The DataSourceReferences from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataSourceReferencesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchDataSourceReferencesForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + class FetchDataSourceReferencesForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchDataSourceReferencesForResourceType method. + # @!attribute [rw] data_source_references + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # The DataSourceReferences from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class FetchDataSourceReferencesForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb new file mode 100644 index 000000000000..79acc54ee206 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb @@ -0,0 +1,309 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Request for ListResourceBackupConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListResourceBackupConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListResourceBackupConfigs. + # @!attribute [rw] resource_backup_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # The list of ResourceBackupConfigs for the specified scope. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListResourceBackupConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ResourceBackupConfig represents a resource along with its backup + # configurations. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the ResourceBackupConfig. + # Format: + # projects/\\{project}/locations/\\{location}/resourceBackupConfigs/\\{uid} + # @!attribute [r] uid + # @return [::String] + # Output only. The unique identifier of the resource backup config. + # @!attribute [r] target_resource + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the cloud resource that this configuration applies to. Supported + # resource types are + # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType ResourceBackupConfig.ResourceType}. + # @!attribute [r] target_resource_display_name + # @return [::String] + # Output only. The human friendly name of the target resource. + # @!attribute [r] target_resource_type + # @return [::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType] + # Output only. The type of the target resource. + # @!attribute [rw] target_resource_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with the target resource. + # @!attribute [rw] backup_configs_details + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupConfigDetails>] + # Backup configurations applying to the target resource, including those + # targeting its related/child resources. For example, backup configuration + # applicable to Compute Engine disks will be populated in this field for a + # Compute Engine VM which has the disk associated. + # @!attribute [r] backup_configured + # @return [::Boolean] + # Output only. Whether the target resource is configured for backup. This is + # true if the backup_configs_details is not empty. + # @!attribute [r] vaulted + # @return [::Boolean] + # Output only. Whether the target resource is protected by a backup vault. + # This is true if the backup_configs_details is not empty and any of the + # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig#backup_configs_details ResourceBackupConfig.backup_configs_details} + # has a backup configuration with + # {::Google::Cloud::BackupDR::V1::BackupConfigDetails#backup_vault BackupConfigDetails.backup_vault} + # set. set. + class ResourceBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TargetResourceLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the cloud resource. + module ResourceType + # Resource type not set. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # Cloud SQL instance. + CLOUD_SQL_INSTANCE = 1 + + # Compute Engine VM. + COMPUTE_ENGINE_VM = 2 + + # Compute Engine Disk. + COMPUTE_ENGINE_DISK = 3 + + # Compute Engine Regional Disk. + COMPUTE_ENGINE_REGIONAL_DISK = 4 + end + end + + # BackupConfigDetails has information about how the resource is configured + # for backups and about the most recent backup taken for this configuration. + # @!attribute [r] backup_config_source + # @return [::String] + # Output only. The full resource name of the backup config source resource. + # For example, + # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupPlans/\\{backupplanId}" + # or + # "//compute.googleapis.com/projects/\\{project}/locations/\\{region}/resourcePolicies/\\{resourcePolicyId}". + # @!attribute [r] backup_config_source_display_name + # @return [::String] + # Output only. The display name of the backup config source resource. + # @!attribute [r] type + # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::Type] + # Output only. The type of the backup config resource. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::State] + # Output only. The state of the backup config resource. + # @!attribute [r] pitr_settings + # @return [::Google::Cloud::BackupDR::V1::PitrSettings] + # Output only. Point in time recovery settings of the backup configuration + # resource. + # @!attribute [r] latest_successful_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the latest successful backup created via this + # backup configuration. + # @!attribute [r] applicable_resource + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the resource that is applicable for the backup configuration. Example: + # "//compute.googleapis.com/projects/\\{project}/zones/\\{zone}/instances/\\{instance}" + # @!attribute [r] backup_vault + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the backup vault that will store the backups generated through this + # backup configuration. Example: + # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupVaults/\\{backupvaultId}" + # @!attribute [rw] backup_locations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLocation>] + # The locations where the backups are to be stored. + # @!attribute [rw] backup_dr_plan_config + # @return [::Google::Cloud::BackupDR::V1::BackupDrPlanConfig] + # Google Cloud Backup and DR's Backup Plan specific data. + # + # Note: The following fields are mutually exclusive: `backup_dr_plan_config`, `backup_dr_template_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_dr_template_config + # @return [::Google::Cloud::BackupDR::V1::BackupDrTemplateConfig] + # Google Cloud Backup and DR's Template specific data. + # + # Note: The following fields are mutually exclusive: `backup_dr_template_config`, `backup_dr_plan_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of the backup configuration. + # This enum may receive new values in the future. + module Type + # Backup config type is unspecified. + TYPE_UNSPECIFIED = 0 + + # Backup config is Cloud SQL instance's automated backup config. + CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1 + + # Backup config is Compute Engine Resource Policy. + COMPUTE_ENGINE_RESOURCE_POLICY = 2 + + # Backup config is Google Cloud Backup and DR's Backup Plan. + BACKUPDR_BACKUP_PLAN = 3 + + # Backup config is Google Cloud Backup and DR's Template. + BACKUPDR_TEMPLATE = 4 + end + + # The state tells whether the backup config is active or not. + module State + # Backup config state not set. + STATE_UNSPECIFIED = 0 + + # The config is in an active state protecting the resource + ACTIVE = 1 + + # The config is currently not protecting the resource. Either because it is + # disabled or the owning project has been deleted without cleanup of the + # actual resource. + INACTIVE = 2 + + # The config still exists but because of some error state it is not + # protecting the resource. Like the source project is deleted. For eg. + # PlanAssociation, BackupPlan is deleted. + ERROR = 3 + end + end + + # Point in time recovery settings of the backup configuration resource. + # @!attribute [r] retention_days + # @return [::Integer] + # Output only. Number of days to retain the backup. + class PitrSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides additional information about Google Cloud Backup + # and DR's Template backup configuration. + # @!attribute [r] first_party_management_uri + # @return [::String] + # Output only. The URI of the BackupDr template resource for the first party + # identity users. + # @!attribute [r] third_party_management_uri + # @return [::String] + # Output only. The URI of the BackupDr template resource for the third party + # identity users. + class BackupDrTemplateConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupDrPlanConfig has additional information about Google Cloud Backup and + # DR's Plan backup configuration. + # @!attribute [rw] backup_dr_plan_rules + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupDrPlanRule>] + # Backup rules of the backup plan resource. + class BackupDrPlanConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupDrPlanRule has rule specific information of the backup plan resource. + # @!attribute [r] rule_id + # @return [::String] + # Output only. Unique Id of the backup rule. + # @!attribute [r] last_successful_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the latest successful backup created via this + # backup rule. + class BackupDrPlanRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupLocation represents a cloud location where a backup can be stored. + # @!attribute [r] type + # @return [::Google::Cloud::BackupDR::V1::BackupLocation::Type] + # Output only. The type of the location. + # @!attribute [r] location_id + # @return [::String] + # Output only. The id of the cloud location. Example: "us-central1" + class BackupLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the location. + module Type + # Location type is unspecified. + TYPE_UNSPECIFIED = 0 + + # Location type is zonal. + ZONAL = 1 + + # Location type is regional. + REGIONAL = 2 + + # Location type is multi regional. + MULTI_REGIONAL = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb new file mode 100644 index 000000000000..3e27c902551d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a month in the Gregorian calendar. + module Month + # The unspecified month. + MONTH_UNSPECIFIED = 0 + + # The month of January. + JANUARY = 1 + + # The month of February. + FEBRUARY = 2 + + # The month of March. + MARCH = 3 + + # The month of April. + APRIL = 4 + + # The month of May. + MAY = 5 + + # The month of June. + JUNE = 6 + + # The month of July. + JULY = 7 + + # The month of August. + AUGUST = 8 + + # The month of September. + SEPTEMBER = 9 + + # The month of October. + OCTOBER = 10 + + # The month of November. + NOVEMBER = 11 + + # The month of December. + DECEMBER = 12 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile new file mode 100644 index 000000000000..4febd3ff4e67 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-backupdr-v1", path: "../" +else + gem "google-cloud-backupdr-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb new file mode 100644 index 000000000000..2b79d9a8674f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs. +# +def list_resource_backup_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + + # Call the list_resource_backup_configs method. + result = client.list_resource_backup_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. + p item + end +end +# [END backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb new file mode 100644 index 000000000000..e5b889a4dfa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan. +# +def create_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + + # Call the create_backup_plan method. + result = client.create_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb new file mode 100644 index 000000000000..628c925da9e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association. +# +def create_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + + # Call the create_backup_plan_association method. + result = client.create_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb new file mode 100644 index 000000000000..30f7bcaa3098 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_CreateBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault. +# +def create_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + + # Call the create_backup_vault method. + result = client.create_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb new file mode 100644 index 000000000000..8eb6c732f376 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_CreateManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server. +# +def create_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + + # Call the create_management_server method. + result = client.create_management_server request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb new file mode 100644 index 000000000000..d920bccbb83b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup. +# +def delete_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + + # Call the delete_backup method. + result = client.delete_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb new file mode 100644 index 000000000000..a1585e7a803b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan. +# +def delete_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + + # Call the delete_backup_plan method. + result = client.delete_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb new file mode 100644 index 000000000000..68037dc3c1c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association. +# +def delete_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + + # Call the delete_backup_plan_association method. + result = client.delete_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb new file mode 100644 index 000000000000..bfc3d415812f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault. +# +def delete_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + + # Call the delete_backup_vault method. + result = client.delete_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb new file mode 100644 index 000000000000..6e0a6c8cea65 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server. +# +def delete_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + + # Call the delete_management_server method. + result = client.delete_management_server request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb new file mode 100644 index 000000000000..0caa4cac2125 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type. +# +def fetch_backup_plan_associations_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + + # Call the fetch_backup_plan_associations_for_resource_type method. + result = client.fetch_backup_plan_associations_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb new file mode 100644 index 000000000000..8cd5de148567 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_backups_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type. +# +def fetch_backups_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + + # Call the fetch_backups_for_resource_type method. + result = client.fetch_backups_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb new file mode 100644 index 000000000000..dfcab2575125 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type. +# +def fetch_data_source_references_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + + # Call the fetch_data_source_references_for_resource_type method. + result = client.fetch_data_source_references_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb new file mode 100644 index 000000000000..a69bc309bc34 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_usable_backup_vaults call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults. +# +def fetch_usable_backup_vaults + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + + # Call the fetch_usable_backup_vaults method. + result = client.fetch_usable_backup_vaults request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb new file mode 100644 index 000000000000..657958fff3c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup. +# +def get_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + + # Call the get_backup method. + result = client.get_backup request + + # The returned object is of type Google::Cloud::BackupDR::V1::Backup. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb new file mode 100644 index 000000000000..7f12d19c6466 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan. +# +def get_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + + # Call the get_backup_plan method. + result = client.get_backup_plan request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb new file mode 100644 index 000000000000..95a3715c6d53 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association. +# +def get_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + + # Call the get_backup_plan_association method. + result = client.get_backup_plan_association request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb new file mode 100644 index 000000000000..d9bdfc3ff576 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan_revision call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision. +# +def get_backup_plan_revision + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + + # Call the get_backup_plan_revision method. + result = client.get_backup_plan_revision request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb new file mode 100644 index 000000000000..b42028f7c351 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault. +# +def get_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + + # Call the get_backup_vault method. + result = client.get_backup_vault request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb new file mode 100644 index 000000000000..d86a885d8a7f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetDataSource_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_data_source call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source. +# +def get_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + + # Call the get_data_source method. + result = client.get_data_source request + + # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + p result +end +# [END backupdr_v1_generated_BackupDR_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb new file mode 100644 index 000000000000..789a665be9b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_data_source_reference call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference. +# +def get_data_source_reference + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + + # Call the get_data_source_reference method. + result = client.get_data_source_reference request + + # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + p result +end +# [END backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb new file mode 100644 index 000000000000..0ab70b155c06 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server. +# +def get_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + + # Call the get_management_server method. + result = client.get_management_server request + + # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + p result +end +# [END backupdr_v1_generated_BackupDR_GetManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb new file mode 100644 index 000000000000..1a6248e10433 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_InitializeService_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the initialize_service call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service. +# +def initialize_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + + # Call the initialize_service method. + result = client.initialize_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_InitializeService_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb new file mode 100644 index 000000000000..1be14c9502b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plan_associations call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations. +# +def list_backup_plan_associations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + + # Call the list_backup_plan_associations method. + result = client.list_backup_plan_associations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb new file mode 100644 index 000000000000..523bdada0405 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plan_revisions call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions. +# +def list_backup_plan_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + + # Call the list_backup_plan_revisions method. + result = client.list_backup_plan_revisions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb new file mode 100644 index 000000000000..68a2931714bf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupPlans_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plans call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans. +# +def list_backup_plans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + + # Call the list_backup_plans method. + result = client.list_backup_plans request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlans_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb new file mode 100644 index 000000000000..bd68d0f95f72 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupVaults_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_vaults call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults. +# +def list_backup_vaults + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + + # Call the list_backup_vaults method. + result = client.list_backup_vaults request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb new file mode 100644 index 000000000000..865ebe38ae19 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackups_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backups call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups. +# +def list_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new + + # Call the list_backups method. + result = client.list_backups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb new file mode 100644 index 000000000000..c0cbb790e2d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_data_source_references call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references. +# +def list_data_source_references + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + + # Call the list_data_source_references method. + result = client.list_data_source_references request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb new file mode 100644 index 000000000000..5607c9beb443 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListDataSources_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_data_sources call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources. +# +def list_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + + # Call the list_data_sources method. + result = client.list_data_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb new file mode 100644 index 000000000000..c026e846fb03 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListManagementServers_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_management_servers call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers. +# +def list_management_servers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + + # Call the list_management_servers method. + result = client.list_management_servers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListManagementServers_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb new file mode 100644 index 000000000000..0f57a119d916 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_RestoreBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the restore_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup. +# +def restore_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + + # Call the restore_backup method. + result = client.restore_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_RestoreBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb new file mode 100644 index 000000000000..d5b2a0664bef --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_TriggerBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the trigger_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup. +# +def trigger_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + + # Call the trigger_backup method. + result = client.trigger_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_TriggerBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb new file mode 100644 index 000000000000..90ba04ae397e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup. +# +def update_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + + # Call the update_backup method. + result = client.update_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb new file mode 100644 index 000000000000..f2bdd1d70e64 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan. +# +def update_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + + # Call the update_backup_plan method. + result = client.update_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb new file mode 100644 index 000000000000..eaf3f010e273 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association. +# +def update_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + + # Call the update_backup_plan_association method. + result = client.update_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb new file mode 100644 index 000000000000..5b0d5a057c05 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault. +# +def update_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + + # Call the update_backup_vault method. + result = client.update_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb new file mode 100644 index 000000000000..1167757bc2d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateDataSource_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_data_source call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source. +# +def update_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + + # Call the update_data_source method. + result = client.update_data_source request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json new file mode 100644 index 000000000000..fa4385c64a8c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json @@ -0,0 +1,1535 @@ +{ + "client_library": { + "name": "google-cloud-backupdr-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.backupdr.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "backupdr_v1_generated_BackupDR_ListManagementServers_sync", + "title": "Snippet for the list_management_servers call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers.", + "file": "backupdr/list_management_servers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_management_servers", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListManagementServersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListManagementServersResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListManagementServers", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetManagementServer_sync", + "title": "Snippet for the get_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server.", + "file": "backupdr/get_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ManagementServer", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateManagementServer_sync", + "title": "Snippet for the create_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server.", + "file": "backupdr/create_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_sync", + "title": "Snippet for the delete_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server.", + "file": "backupdr/delete_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupVault_sync", + "title": "Snippet for the create_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault.", + "file": "backupdr/create_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupVaults_sync", + "title": "Snippet for the list_backup_vaults call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults.", + "file": "backupdr/list_backup_vaults.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_vaults", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupVaults", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync", + "title": "Snippet for the fetch_usable_backup_vaults call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults.", + "file": "backupdr/fetch_usable_backup_vaults.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_usable_backup_vaults", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchUsableBackupVaults", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupVault_sync", + "title": "Snippet for the get_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault.", + "file": "backupdr/get_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupVault", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_sync", + "title": "Snippet for the update_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault.", + "file": "backupdr/update_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_sync", + "title": "Snippet for the delete_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault.", + "file": "backupdr/delete_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListDataSources_sync", + "title": "Snippet for the list_data_sources call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources.", + "file": "backupdr/list_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_sources", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourcesResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListDataSources", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetDataSource_sync", + "title": "Snippet for the get_data_source call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source.", + "file": "backupdr/get_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::DataSource", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetDataSource", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateDataSource_sync", + "title": "Snippet for the update_data_source call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source.", + "file": "backupdr/update_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_source", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateDataSource", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackups_sync", + "title": "Snippet for the list_backups call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups.", + "file": "backupdr/list_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backups", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackups", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync", + "title": "Snippet for the fetch_backups_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type.", + "file": "backupdr/fetch_backups_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_backups_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchBackupsForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackup_sync", + "title": "Snippet for the get_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup.", + "file": "backupdr/get_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::Backup", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackup_sync", + "title": "Snippet for the update_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup.", + "file": "backupdr/update_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackup_sync", + "title": "Snippet for the delete_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup.", + "file": "backupdr/delete_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_RestoreBackup_sync", + "title": "Snippet for the restore_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup.", + "file": "backupdr/restore_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::RestoreBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "RestoreBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_sync", + "title": "Snippet for the create_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan.", + "file": "backupdr/create_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync", + "title": "Snippet for the update_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan.", + "file": "backupdr/update_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlan_sync", + "title": "Snippet for the get_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan.", + "file": "backupdr/get_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlan", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlans_sync", + "title": "Snippet for the list_backup_plans call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans.", + "file": "backupdr/list_backup_plans.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plans", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlansRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlansResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlans", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync", + "title": "Snippet for the delete_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan.", + "file": "backupdr/delete_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync", + "title": "Snippet for the get_backup_plan_revision call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision.", + "file": "backupdr/get_backup_plan_revision.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan_revision", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanRevision", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlanRevision", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanRevision", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync", + "title": "Snippet for the list_backup_plan_revisions call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions.", + "file": "backupdr/list_backup_plan_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plan_revisions", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlanRevisions", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanRevisions", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync", + "title": "Snippet for the create_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association.", + "file": "backupdr/create_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync", + "title": "Snippet for the update_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association.", + "file": "backupdr/update_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync", + "title": "Snippet for the get_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association.", + "file": "backupdr/get_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanAssociation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync", + "title": "Snippet for the list_backup_plan_associations call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations.", + "file": "backupdr/list_backup_plan_associations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plan_associations", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlanAssociations", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync", + "title": "Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type.", + "file": "backupdr/fetch_backup_plan_associations_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_backup_plan_associations_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchBackupPlanAssociationsForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupPlanAssociationsForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync", + "title": "Snippet for the delete_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association.", + "file": "backupdr/delete_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_TriggerBackup_sync", + "title": "Snippet for the trigger_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup.", + "file": "backupdr/trigger_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "trigger_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::TriggerBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "TriggerBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetDataSourceReference_sync", + "title": "Snippet for the get_data_source_reference call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference.", + "file": "backupdr/get_data_source_reference.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source_reference", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::DataSourceReference", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetDataSourceReference", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSourceReference", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync", + "title": "Snippet for the list_data_source_references call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references.", + "file": "backupdr/list_data_source_references.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_source_references", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListDataSourceReferences", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSourceReferences", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync", + "title": "Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type.", + "file": "backupdr/fetch_data_source_references_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_data_source_references_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchDataSourceReferencesForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchDataSourceReferencesForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_InitializeService_sync", + "title": "Snippet for the initialize_service call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service.", + "file": "backupdr/initialize_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "initialize_service", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::InitializeServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "InitializeService", + "full_name": "google.cloud.backupdr.v1.BackupDR.InitializeService", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync", + "title": "Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs.", + "file": "backup_dr_protection_summary/list_resource_backup_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_backup_configs", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse", + "client": { + "short_name": "BackupDrProtectionSummary::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client" + }, + "method": { + "short_name": "ListResourceBackupConfigs", + "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary.ListResourceBackupConfigs", + "service": { + "short_name": "BackupDrProtectionSummary", + "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb new file mode 100644 index 000000000000..9d979a3cfce6 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/backup_dr_protection_summary" + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb new file mode 100644 index 000000000000..1d7d6c2b8954 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_resource_backup_configs + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_backup_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.stub :transcode_list_resource_backup_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_backup_configs_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_resource_backup_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_backup_configs_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb new file mode 100644 index 000000000000..721fe7b5b877 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary" + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_resource_backup_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_backup_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_backup_configs, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_backup_configs_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_resource_backup_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_resource_backup_configs_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb new file mode 100644 index 000000000000..93faecb1e332 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr_services_pb" +require "google/cloud/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb new file mode 100644 index 000000000000..5c155040928d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb @@ -0,0 +1,211 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_backup_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3", backup: "value4" + assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3/backups/value4", path + end + end + + def test_backup_plan_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_path project: "value0", location: "value1", backup_plan: "value2" + assert_equal "projects/value0/locations/value1/backupPlans/value2", path + end + end + + def test_backup_plan_association_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_association_path project: "value0", location: "value1", backup_plan_association: "value2" + assert_equal "projects/value0/locations/value1/backupPlanAssociations/value2", path + end + end + + def test_backup_plan_revision_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_revision_path project: "value0", location: "value1", backup_plan: "value2", revision: "value3" + assert_equal "projects/value0/locations/value1/backupPlans/value2/revisions/value3", path + end + end + + def test_backup_vault_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_vault_path project: "value0", location: "value1", backupvault: "value2" + assert_equal "projects/value0/locations/value1/backupVaults/value2", path + end + end + + def test_cluster_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cluster_path project: "value0", location: "value1", cluster: "value2" + assert_equal "projects/value0/locations/value1/clusters/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", ring: "value2", key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_crypto_key_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + + def test_data_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3" + assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3", path + end + end + + def test_data_source_reference_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_reference_path project: "value0", location: "value1", data_source_reference: "value2" + assert_equal "projects/value0/locations/value1/dataSourceReferences/value2", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", instance: "value1" + assert_equal "projects/value0/instances/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_management_server_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.management_server_path project: "value0", location: "value1", managementserver: "value2" + assert_equal "projects/value0/locations/value1/managementServers/value2", path + end + end + + def test_storage_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.storage_pool_path project: "value0", zone: "value1", storage_pool: "value2" + assert_equal "projects/value0/zones/value1/storagePools/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb new file mode 100644 index 000000000000..4e67aa6b660d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb @@ -0,0 +1,2196 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr/rest" + + +class ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_management_servers + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_management_servers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_management_servers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_management_servers_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_management_servers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_management_servers_client_stub.call_count + end + end + end + + def test_get_management_server + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ManagementServer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_management_server({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_management_server name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_management_server({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_management_server_client_stub.call_count + end + end + end + + def test_create_management_server + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + management_server_id = "hello world" + management_server = {} + request_id = "hello world" + + create_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_management_server_client_stub.call_count + end + end + end + + def test_delete_management_server + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_management_server({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_management_server name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_management_server({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_management_server_client_stub.call_count + end + end + end + + def test_create_backup_vault + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_vault_id = "hello world" + backup_vault = {} + request_id = "hello world" + validate_only = true + + create_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_vault_client_stub.call_count + end + end + end + + def test_list_backup_vaults + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + list_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_vaults_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_vaults_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_vaults_client_stub.call_count + end + end + end + + def test_fetch_usable_backup_vaults + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_usable_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_usable_backup_vaults_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_usable_backup_vaults_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_usable_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_usable_backup_vaults_client_stub.call_count + end + end + end + + def test_get_backup_vault + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupVault.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + get_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_vault({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_vault name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_vault({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_vault_client_stub.call_count + end + end + end + + def test_update_backup_vault + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + backup_vault = {} + request_id = "hello world" + validate_only = true + force = true + force_update_access_restriction = true + + update_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_vault_client_stub.call_count + end + end + end + + def test_delete_backup_vault + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + etag = "hello world" + validate_only = true + allow_missing = true + ignore_backup_plan_references = true + + delete_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_vault_client_stub.call_count + end + end + end + + def test_list_data_sources + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_sources parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_sources_client_stub.call_count + end + end + end + + def test_get_data_source + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_count + end + end + end + + def test_update_data_source + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_source = {} + request_id = "hello world" + allow_missing = true + + update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_count + end + end + end + + def test_list_backups + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_count + end + end + end + + def test_fetch_backups_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + fetch_backups_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backups_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_backups_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_backups_for_resource_type_client_stub.call_count + end + end + end + + def test_get_backup + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_count + end + end + end + + def test_update_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + backup = {} + request_id = "hello world" + + update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_client_stub.call_count + end + end + end + + def test_delete_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_count + end + end + end + + def test_restore_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + compute_instance_target_environment = {} + compute_instance_restore_properties = {} + clear_overrides_field_mask = {} + + restore_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_restore_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_backup_client_stub.call_count + end + end + end + + def test_create_backup_plan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan_id = "hello world" + backup_plan = {} + request_id = "hello world" + + create_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_plan_client_stub.call_count + end + end + end + + def test_update_backup_plan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_plan = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_plan_client_stub.call_count + end + end + end + + def test_get_backup_plan + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlan.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_client_stub.call_count + end + end + end + + def test_list_backup_plans + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_backup_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plans_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_plans_client_stub.call_count + end + end + end + + def test_delete_backup_plan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_plan({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_plan name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_plan({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_plan_client_stub.call_count + end + end + end + + def test_get_backup_plan_revision + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_revision_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_revision_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan_revision({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan_revision name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan_revision({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_revision_client_stub.call_count + end + end + end + + def test_list_backup_plan_revisions + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_plan_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plan_revisions_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_plan_revisions_client_stub.call_count + end + end + end + + def test_create_backup_plan_association + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan_association_id = "hello world" + backup_plan_association = {} + request_id = "hello world" + + create_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_plan_association_client_stub.call_count + end + end + end + + def test_update_backup_plan_association + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_plan_association = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_plan_association_client_stub.call_count + end + end + end + + def test_get_backup_plan_association + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan_association({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan_association name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan_association({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_association_client_stub.call_count + end + end + end + + def test_list_backup_plan_associations + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_backup_plan_associations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_associations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plan_associations_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_plan_associations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_plan_associations_client_stub.call_count + end + end + end + + def test_fetch_backup_plan_associations_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backup_plan_associations_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_count + end + end + end + + def test_delete_backup_plan_association + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_plan_association({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_plan_association name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_plan_association({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_plan_association_client_stub.call_count + end + end + end + + def test_trigger_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + rule_id = "hello world" + request_id = "hello world" + + trigger_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_trigger_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, trigger_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, trigger_backup_client_stub.call_count + end + end + end + + def test_get_data_source_reference + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::DataSourceReference.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_reference_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_reference_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_reference_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source_reference({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source_reference name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source_reference({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_reference_client_stub.call_count + end + end + end + + def test_list_data_source_references + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_source_references_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_source_references_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_source_references_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_source_references parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_source_references_client_stub.call_count + end + end + end + + def test_fetch_data_source_references_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_data_source_references_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_data_source_references_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_count + end + end + end + + def test_initialize_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + resource_type = "hello world" + request_id = "hello world" + cloud_sql_instance_initialization_config = {} + + initialize_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_initialize_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, initialize_service_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, initialize_service_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb new file mode 100644 index 000000000000..0e7a35ab8959 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb @@ -0,0 +1,2613 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_management_servers + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_management_servers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_management_servers, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert request.has_filter? + assert_equal "hello world", request["order_by"] + assert request.has_order_by? + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_management_servers_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_management_servers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_management_servers_client_stub.call_rpc_count + end + end + + def test_get_management_server + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ManagementServer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_management_server({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_management_server name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_management_server({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_management_server_client_stub.call_rpc_count + end + end + + def test_create_management_server + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + management_server_id = "hello world" + management_server = {} + request_id = "hello world" + + create_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["management_server_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ManagementServer), request["management_server"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_management_server_client_stub.call_rpc_count + end + end + + def test_delete_management_server + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_management_server({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_management_server name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_management_server({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_management_server_client_stub.call_rpc_count + end + end + + def test_create_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_vault_id = "hello world" + backup_vault = {} + request_id = "hello world" + validate_only = true + + create_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_vault_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_vault_client_stub.call_rpc_count + end + end + + def test_list_backup_vaults + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + list_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_vaults, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_vaults_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_vaults_client_stub.call_rpc_count + end + end + + def test_fetch_usable_backup_vaults + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_usable_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_usable_backup_vaults, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_usable_backup_vaults_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_usable_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_usable_backup_vaults_client_stub.call_rpc_count + end + end + + def test_get_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupVault.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + get_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, request + assert_equal "hello world", request["name"] + assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_vault({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_vault name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_vault({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_vault_client_stub.call_rpc_count + end + end + + def test_update_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + backup_vault = {} + request_id = "hello world" + validate_only = true + force = true + force_update_access_restriction = true + + update_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + assert_equal true, request["force_update_access_restriction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_vault_client_stub.call_rpc_count + end + end + + def test_delete_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + etag = "hello world" + validate_only = true + allow_missing = true + ignore_backup_plan_references = true + + delete_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + assert_equal true, request["ignore_backup_plan_references"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_vault_client_stub.call_rpc_count + end + end + + def test_list_data_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_sources, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_sources parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_sources_client_stub.call_rpc_count + end + end + + def test_get_data_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_rpc_count + end + end + + def test_update_data_source + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_source = {} + request_id = "hello world" + allow_missing = true + + update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_source, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::DataSource), request["data_source"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_rpc_count + end + end + + def test_list_backups + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backups, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_rpc_count + end + end + + def test_fetch_backups_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + fetch_backups_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_backups_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_backups_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_backups_for_resource_type_client_stub.call_rpc_count + end + end + + def test_get_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::Backup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + get_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_rpc_count + end + end + + def test_update_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + backup = {} + request_id = "hello world" + + update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::Backup), request["backup"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_client_stub.call_rpc_count + end + end + + def test_delete_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_rpc_count + end + end + + def test_restore_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + compute_instance_target_environment = {} + compute_instance_restore_properties = {} + clear_overrides_field_mask = {} + + restore_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment), request["compute_instance_target_environment"] + assert_equal :compute_instance_target_environment, request.target_environment + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties), request["compute_instance_restore_properties"] + assert_equal :compute_instance_restore_properties, request.instance_properties + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["clear_overrides_field_mask"] + assert request.has_clear_overrides_field_mask? + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restore_backup_client_stub.call_rpc_count + end + end + + def test_create_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan_id = "hello world" + backup_plan = {} + request_id = "hello world" + + create_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_plan_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_plan_client_stub.call_rpc_count + end + end + + def test_update_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup_plan = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_plan_client_stub.call_rpc_count + end + end + + def test_get_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlan.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_plan_client_stub.call_rpc_count + end + end + + def test_list_backup_plans + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_backup_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plans, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_plans_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_plans_client_stub.call_rpc_count + end + end + + def test_delete_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_plan({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup_plan name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup_plan({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_plan_client_stub.call_rpc_count + end + end + + def test_get_backup_plan_revision + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan_revision, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_revision_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan_revision({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan_revision name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan_revision({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_plan_revision_client_stub.call_rpc_count + end + end + + def test_list_backup_plan_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_plan_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plan_revisions, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_plan_revisions_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_plan_revisions_client_stub.call_rpc_count + end + end + + def test_create_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan_association_id = "hello world" + backup_plan_association = {} + request_id = "hello world" + + create_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_plan_association_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_update_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup_plan_association = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_get_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan_association({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan_association name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan_association({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_list_backup_plan_associations + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_backup_plan_associations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plan_associations, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_plan_associations_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_plan_associations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_plan_associations_client_stub.call_rpc_count + end + end + + def test_fetch_backup_plan_associations_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_backup_plan_associations_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_rpc_count + end + end + + def test_delete_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_plan_association({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup_plan_association name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup_plan_association({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_trigger_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + rule_id = "hello world" + request_id = "hello world" + + trigger_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :trigger_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["rule_id"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, trigger_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, trigger_backup_client_stub.call_rpc_count + end + end + + def test_get_data_source_reference + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::DataSourceReference.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_reference_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source_reference, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_reference_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source_reference({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source_reference name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source_reference({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_reference_client_stub.call_rpc_count + end + end + + def test_list_data_source_references + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_source_references_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_source_references, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_source_references_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_source_references parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_source_references_client_stub.call_rpc_count + end + end + + def test_fetch_data_source_references_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_data_source_references_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_data_source_references_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_rpc_count + end + end + + def test_initialize_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + resource_type = "hello world" + request_id = "hello world" + cloud_sql_instance_initialization_config = {} + + initialize_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :initialize_service, name + assert_kind_of ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["resource_type"] + assert_equal "hello world", request["request_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig), request["cloud_sql_instance_initialization_config"] + assert_equal :cloud_sql_instance_initialization_config, request.initialization_config + refute_nil options + end + + Gapic::ServiceStub.stub :new, initialize_service_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, initialize_service_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json new file mode 100644 index 000000000000..484136c8a856 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "baremetalsolution.googleapis.com", + "api_shortname": "baremetalsolution", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bare_metal_solution-v2/latest", + "distribution_name": "google-cloud-bare_metal_solution-v2", + "is_cloud": true, + "language": "ruby", + "name": "baremetalsolution", + "name_pretty": "Bare Metal Solution V2 API", + "product_documentation": "https://cloud.google.com/bare-metal/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. Note that google-cloud-bare_metal_solution-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bare_metal_solution instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bare-metal/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml new file mode 100644 index 000000000000..1d57d709ce5b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bare_metal_solution-v2.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bare_metal_solution-v2.rb" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts new file mode 100644 index 000000000000..54f5b5f1015c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Bare Metal Solution V2 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..ae79d1ebde45 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bare_metal_solution-v2 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bare_metal_solution-v2 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bare_metal_solution/v2" + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bare_metal_solution/v2" + +::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-bare_metal_solution-v2 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bare_metal_solution/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md new file mode 100644 index 000000000000..6e660d5c7876 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Bare Metal Solution V2 API + +Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center. + +Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Bare Metal Solution V2 API. Most users should consider using +the main client gem, +[google-cloud-bare_metal_solution](https://rubygems.org/gems/google-cloud-bare_metal_solution). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bare_metal_solution-v2 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/baremetalsolution.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bare_metal_solution/v2" + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new +request = ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bare_metal_solution-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bare-metal/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/bare_metal_solution/v2" +require "logger" + +client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-bare_metal_solution`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bare_metal_solution-v2`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bare_metal_solution`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-bare_metal_solution-v2`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile new file mode 100644 index 000000000000..c38c913d0c54 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bare_metal_solution-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bare_metal_solution-v2 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bare_metal_solution-v2 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bare_metal_solution-v2 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bare_metal_solution-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bare_metal_solution-v2" + header "google-cloud-bare_metal_solution-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bare_metal_solution-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bare_metal_solution-v2 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bare_metal_solution-v2 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bare_metal_solution-v2 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json new file mode 100644 index 000000000000..7c860b1ff908 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json @@ -0,0 +1,238 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.baremetalsolution.v2", + "libraryPackage": "::Google::Cloud::BareMetalSolution::V2", + "services": { + "BareMetalSolution": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client", + "rpcs": { + "ListInstances": { + "methods": [ + "list_instances" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + }, + "UpdateInstance": { + "methods": [ + "update_instance" + ] + }, + "RenameInstance": { + "methods": [ + "rename_instance" + ] + }, + "ResetInstance": { + "methods": [ + "reset_instance" + ] + }, + "StartInstance": { + "methods": [ + "start_instance" + ] + }, + "StopInstance": { + "methods": [ + "stop_instance" + ] + }, + "EnableInteractiveSerialConsole": { + "methods": [ + "enable_interactive_serial_console" + ] + }, + "DisableInteractiveSerialConsole": { + "methods": [ + "disable_interactive_serial_console" + ] + }, + "DetachLun": { + "methods": [ + "detach_lun" + ] + }, + "ListSSHKeys": { + "methods": [ + "list_ssh_keys" + ] + }, + "CreateSSHKey": { + "methods": [ + "create_ssh_key" + ] + }, + "DeleteSSHKey": { + "methods": [ + "delete_ssh_key" + ] + }, + "ListVolumes": { + "methods": [ + "list_volumes" + ] + }, + "GetVolume": { + "methods": [ + "get_volume" + ] + }, + "UpdateVolume": { + "methods": [ + "update_volume" + ] + }, + "RenameVolume": { + "methods": [ + "rename_volume" + ] + }, + "EvictVolume": { + "methods": [ + "evict_volume" + ] + }, + "ResizeVolume": { + "methods": [ + "resize_volume" + ] + }, + "ListNetworks": { + "methods": [ + "list_networks" + ] + }, + "ListNetworkUsage": { + "methods": [ + "list_network_usage" + ] + }, + "GetNetwork": { + "methods": [ + "get_network" + ] + }, + "UpdateNetwork": { + "methods": [ + "update_network" + ] + }, + "CreateVolumeSnapshot": { + "methods": [ + "create_volume_snapshot" + ] + }, + "RestoreVolumeSnapshot": { + "methods": [ + "restore_volume_snapshot" + ] + }, + "DeleteVolumeSnapshot": { + "methods": [ + "delete_volume_snapshot" + ] + }, + "GetVolumeSnapshot": { + "methods": [ + "get_volume_snapshot" + ] + }, + "ListVolumeSnapshots": { + "methods": [ + "list_volume_snapshots" + ] + }, + "GetLun": { + "methods": [ + "get_lun" + ] + }, + "ListLuns": { + "methods": [ + "list_luns" + ] + }, + "EvictLun": { + "methods": [ + "evict_lun" + ] + }, + "GetNfsShare": { + "methods": [ + "get_nfs_share" + ] + }, + "ListNfsShares": { + "methods": [ + "list_nfs_shares" + ] + }, + "UpdateNfsShare": { + "methods": [ + "update_nfs_share" + ] + }, + "CreateNfsShare": { + "methods": [ + "create_nfs_share" + ] + }, + "RenameNfsShare": { + "methods": [ + "rename_nfs_share" + ] + }, + "DeleteNfsShare": { + "methods": [ + "delete_nfs_share" + ] + }, + "ListProvisioningQuotas": { + "methods": [ + "list_provisioning_quotas" + ] + }, + "SubmitProvisioningConfig": { + "methods": [ + "submit_provisioning_config" + ] + }, + "GetProvisioningConfig": { + "methods": [ + "get_provisioning_config" + ] + }, + "CreateProvisioningConfig": { + "methods": [ + "create_provisioning_config" + ] + }, + "UpdateProvisioningConfig": { + "methods": [ + "update_provisioning_config" + ] + }, + "RenameNetwork": { + "methods": [ + "rename_network" + ] + }, + "ListOSImages": { + "methods": [ + "list_os_images" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec b/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec new file mode 100644 index 000000000000..21eb37c2677d --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bare_metal_solution/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bare_metal_solution-v2" + gem.version = Google::Cloud::BareMetalSolution::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. Note that google-cloud-bare_metal_solution-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bare_metal_solution instead. See the readme for more details." + gem.summary = "Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb new file mode 100644 index 000000000000..e3cbed72515b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bare_metal_solution/v2" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb new file mode 100644 index 000000000000..4decd222cabc --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bare_metal_solution/v2/bare_metal_solution" +require "google/cloud/bare_metal_solution/v2/version" + +module Google + module Cloud + module BareMetalSolution + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bare_metal_solution/v2" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bare_metal_solution/v2" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/bare_metal_solution/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb new file mode 100644 index 000000000000..0ef9b283c295 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bare_metal_solution/v2/version" + +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/paths" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/operations" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/client" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" + +module Google + module Cloud + module BareMetalSolution + module V2 + ## + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bare_metal_solution/v2/bare_metal_solution" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module BareMetalSolution + end + end + end + end +end + +helper_path = ::File.join __dir__, "bare_metal_solution", "helpers.rb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb new file mode 100644 index 000000000000..6f875fa5f30e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb @@ -0,0 +1,4836 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + ## + # Client for the BareMetalSolution service. + # + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bare_metal_solution_stub + + ## + # Configure the BareMetalSolution Client class. + # + # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BareMetalSolution clients + # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BareMetalSolution", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BareMetalSolution Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @bare_metal_solution_stub.universe_domain + end + + ## + # Create a new BareMetalSolution client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BareMetalSolution client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/baremetalsolution/v2/baremetalsolution_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @bare_metal_solution_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @bare_metal_solution_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @bare_metal_solution_stub.endpoint + config.universe_domain = @bare_metal_solution_stub.universe_domain + config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @bare_metal_solution_stub.endpoint + config.universe_domain = @bare_metal_solution_stub.universe_domain + config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @bare_metal_solution_stub.logger + end + + # Service calls + + ## + # List servers in a given project and location. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListInstancesRequest. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_instances.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_instances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_instances, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details about a single server. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_instance, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single server. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_instance(instance: nil, update_mask: nil) + # Pass arguments to `update_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance [::Google::Cloud::BareMetalSolution::V2::Instance, ::Hash] + # Required. The server to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The currently supported fields are: + # `labels` + # `hyperthreading_enabled` + # `os_image` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance&.name + header_params["instance.name"] = request.instance.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameInstance sets a new name for an instance. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_instance(request, options = nil) + # Pass arguments to `rename_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_instance(name: nil, new_instance_id: nil) + # Pass arguments to `rename_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the instance. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param new_instance_id [::String] + # Required. The new `id` of the instance. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new + # + # # Call the rename_instance method. + # result = client.rename_instance request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + # p result + # + def rename_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rename_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.rename_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :rename_instance, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform an ungraceful, hard reset on a server. Equivalent to shutting the + # power off and then turning it back on. + # + # @overload reset_instance(request, options = nil) + # Pass arguments to `reset_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload reset_instance(name: nil) + # Pass arguments to `reset_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new + # + # # Call the reset_instance method. + # result = client.reset_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def reset_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.reset_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.reset_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reset_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :reset_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts a server that was shutdown. + # + # @overload start_instance(request, options = nil) + # Pass arguments to `start_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_instance(name: nil) + # Pass arguments to `start_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new + # + # # Call the start_instance method. + # result = client.start_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :start_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stop a running server. + # + # @overload stop_instance(request, options = nil) + # Pass arguments to `stop_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload stop_instance(name: nil) + # Pass arguments to `stop_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new + # + # # Call the stop_instance method. + # result = client.stop_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def stop_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.stop_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.stop_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :stop_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable the interactive serial console feature on an instance. + # + # @overload enable_interactive_serial_console(request, options = nil) + # Pass arguments to `enable_interactive_serial_console` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_interactive_serial_console(name: nil) + # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new + # + # # Call the enable_interactive_serial_console method. + # result = client.enable_interactive_serial_console request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def enable_interactive_serial_console request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_interactive_serial_console.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_interactive_serial_console.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :enable_interactive_serial_console, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable the interactive serial console feature on an instance. + # + # @overload disable_interactive_serial_console(request, options = nil) + # Pass arguments to `disable_interactive_serial_console` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_interactive_serial_console(name: nil) + # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new + # + # # Call the disable_interactive_serial_console method. + # result = client.disable_interactive_serial_console request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def disable_interactive_serial_console request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_interactive_serial_console.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_interactive_serial_console.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :disable_interactive_serial_console, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detach LUN from Instance. + # + # @overload detach_lun(request, options = nil) + # Pass arguments to `detach_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil) + # Pass arguments to `detach_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance [::String] + # Required. Name of the instance. + # @param lun [::String] + # Required. Name of the Lun to detach. + # @param skip_reboot [::Boolean] + # If true, performs lun unmapping without instance reboot. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new + # + # # Call the detach_lun method. + # result = client.detach_lun request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def detach_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.detach_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance + header_params["instance"] = request.instance + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.detach_lun.timeout, + metadata: metadata, + retry_policy: @config.rpcs.detach_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :detach_lun, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the public SSH keys registered for the specified project. + # These SSH keys are used only for the interactive serial console feature. + # + # @overload list_ssh_keys(request, options = nil) + # Pass arguments to `list_ssh_keys` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent containing the SSH keys. + # Currently, the only valid value for the location is "global". + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new + # + # # Call the list_ssh_keys method. + # result = client.list_ssh_keys request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. + # p item + # end + # + def list_ssh_keys request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_ssh_keys.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_ssh_keys.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_ssh_keys.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_ssh_keys, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Register a public SSH key in the specified project for use with the + # interactive serial console feature. + # + # @overload create_ssh_key(request, options = nil) + # Pass arguments to `create_ssh_key` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) + # Pass arguments to `create_ssh_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent containing the SSH keys. + # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash] + # Required. The SSH key to register. + # @param ssh_key_id [::String] + # Required. The ID to use for the key, which will become the final component + # of the key's resource name. + # + # This value must match the regex: + # [a-zA-Z0-9@.\-_]\\{1,64} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new + # + # # Call the create_ssh_key method. + # result = client.create_ssh_key request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. + # p result + # + def create_ssh_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_ssh_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_ssh_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_ssh_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :create_ssh_key, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a public SSH key registered in the specified project. + # + # @overload delete_ssh_key(request, options = nil) + # Pass arguments to `delete_ssh_key` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_ssh_key(name: nil) + # Pass arguments to `delete_ssh_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the SSH key to delete. + # Currently, the only valid value for the location is "global". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new + # + # # Call the delete_ssh_key method. + # result = client.delete_ssh_key request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_ssh_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_ssh_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_ssh_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_ssh_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :delete_ssh_key, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List storage volumes in a given project and location. + # + # @overload list_volumes(request, options = nil) + # Pass arguments to `list_volumes` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_volumes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListVolumesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new + # + # # Call the list_volumes method. + # result = client.list_volumes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. + # p item + # end + # + def list_volumes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_volumes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_volumes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_volumes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_volumes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single storage volume. + # + # @overload get_volume(request, options = nil) + # Pass arguments to `get_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_volume(name: nil) + # Pass arguments to `get_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new + # + # # Call the get_volume method. + # result = client.get_volume request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + # p result + # + def get_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_volume, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single storage volume. + # + # @overload update_volume(request, options = nil) + # Pass arguments to `update_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_volume(volume: nil, update_mask: nil) + # Pass arguments to `update_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash] + # Required. The volume to update. + # + # The `name` field is used to identify the volume to update. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # 'labels' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new + # + # # Call the update_volume method. + # result = client.update_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.volume&.name + header_params["volume.name"] = request.volume.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_volume, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameVolume sets a new name for a volume. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_volume(request, options = nil) + # Pass arguments to `rename_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_volume(name: nil, new_volume_id: nil) + # Pass arguments to `rename_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the volume. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @param new_volume_id [::String] + # Required. The new `id` of the volume. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new + # + # # Call the rename_volume method. + # result = client.rename_volume request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + # p result + # + def rename_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rename_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.rename_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :rename_volume, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Skips volume's cooloff and deletes it now. + # Volume must be in cooloff state. + # + # @overload evict_volume(request, options = nil) + # Pass arguments to `evict_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload evict_volume(name: nil) + # Pass arguments to `evict_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Volume. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new + # + # # Call the evict_volume method. + # result = client.evict_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def evict_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.evict_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.evict_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.evict_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :evict_volume, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Emergency Volume resize. + # + # @overload resize_volume(request, options = nil) + # Pass arguments to `resize_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resize_volume(volume: nil, size_gib: nil) + # Pass arguments to `resize_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume [::String] + # Required. Volume to resize. + # @param size_gib [::Integer] + # New Volume size, in GiB. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new + # + # # Call the resize_volume method. + # result = client.resize_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resize_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resize_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.volume + header_params["volume"] = request.volume + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resize_volume.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resize_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :resize_volume, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List network in a given project and location. + # + # @overload list_networks(request, options = nil) + # Pass arguments to `list_networks` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_networks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListNetworksRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new + # + # # Call the list_networks method. + # result = client.list_networks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. + # p item + # end + # + def list_networks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_networks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_networks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_networks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_networks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all Networks (and used IPs for each Network) in the vendor account + # associated with the specified project. + # + # @overload list_network_usage(request, options = nil) + # Pass arguments to `list_network_usage` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_network_usage(location: nil) + # Pass arguments to `list_network_usage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. Parent value (project and location). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new + # + # # Call the list_network_usage method. + # result = client.list_network_usage request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. + # p result + # + def list_network_usage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_network_usage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.location + header_params["location"] = request.location + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_network_usage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_network_usage, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single network. + # + # @overload get_network(request, options = nil) + # Pass arguments to `get_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_network(name: nil) + # Pass arguments to `get_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new + # + # # Call the get_network method. + # result = client.get_network request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + # p result + # + def get_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_network.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_network, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single network. + # + # @overload update_network(request, options = nil) + # Pass arguments to `update_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_network(network: nil, update_mask: nil) + # Pass arguments to `update_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash] + # Required. The network to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # `labels`, `reservations`, `vrf.vlan_attachments` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new + # + # # Call the update_network method. + # result = client.update_network request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.network&.name + header_params["network.name"] = request.network.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_network.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_network, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Takes a snapshot of a boot volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload create_volume_snapshot(request, options = nil) + # Pass arguments to `create_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil) + # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The volume to snapshot. + # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash] + # Required. The snapshot to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new + # + # # Call the create_volume_snapshot method. + # result = client.create_volume_snapshot request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p result + # + def create_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_volume_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :create_volume_snapshot, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Uses the specified snapshot to restore its parent volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload restore_volume_snapshot(request, options = nil) + # Pass arguments to `restore_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restore_volume_snapshot(volume_snapshot: nil) + # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume_snapshot [::String] + # Required. Name of the snapshot which will be used to restore its parent + # volume. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new + # + # # Call the restore_volume_snapshot method. + # result = client.restore_volume_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restore_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.volume_snapshot + header_params["volume_snapshot"] = request.volume_snapshot + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.restore_volume_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :restore_volume_snapshot, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a volume snapshot. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload delete_volume_snapshot(request, options = nil) + # Pass arguments to `delete_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_volume_snapshot(name: nil) + # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the snapshot to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new + # + # # Call the delete_volume_snapshot method. + # result = client.delete_volume_snapshot request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_volume_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :delete_volume_snapshot, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified snapshot resource. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload get_volume_snapshot(request, options = nil) + # Pass arguments to `get_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_volume_snapshot(name: nil) + # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the snapshot. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new + # + # # Call the get_volume_snapshot method. + # result = client.get_volume_snapshot request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p result + # + def get_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_volume_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_volume_snapshot, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of snapshots for the specified volume. + # Returns a response with an empty list of snapshots if called + # for a non-boot volume. + # + # @overload list_volume_snapshots(request, options = nil) + # Pass arguments to `list_volume_snapshots` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListVolumesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new + # + # # Call the list_volume_snapshots method. + # result = client.list_volume_snapshots request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p item + # end + # + def list_volume_snapshots request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_volume_snapshots.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_volume_snapshots.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_volume_snapshots.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_volume_snapshots, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single storage logical unit number(LUN). + # + # @overload get_lun(request, options = nil) + # Pass arguments to `get_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lun(name: nil) + # Pass arguments to `get_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Lun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Lun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new + # + # # Call the get_lun method. + # result = client.get_lun request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. + # p result + # + def get_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lun.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_lun, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List storage volume luns for given storage volume. + # + # @overload list_luns(request, options = nil) + # Pass arguments to `list_luns` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_luns(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_luns` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListLunsRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new + # + # # Call the list_luns method. + # result = client.list_luns request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. + # p item + # end + # + def list_luns request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_luns.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_luns.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_luns.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_luns, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Skips lun's cooloff and deletes it now. + # Lun must be in cooloff state. + # + # @overload evict_lun(request, options = nil) + # Pass arguments to `evict_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload evict_lun(name: nil) + # Pass arguments to `evict_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the lun. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new + # + # # Call the evict_lun method. + # result = client.evict_lun request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def evict_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.evict_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.evict_lun.timeout, + metadata: metadata, + retry_policy: @config.rpcs.evict_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :evict_lun, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single NFS share. + # + # @overload get_nfs_share(request, options = nil) + # Pass arguments to `get_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_nfs_share(name: nil) + # Pass arguments to `get_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new + # + # # Call the get_nfs_share method. + # result = client.get_nfs_share request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + # p result + # + def get_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_nfs_share, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List NFS shares. + # + # @overload list_nfs_shares(request, options = nil) + # Pass arguments to `list_nfs_shares` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListNfsSharesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new + # + # # Call the list_nfs_shares method. + # result = client.list_nfs_shares request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. + # p item + # end + # + def list_nfs_shares request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_nfs_shares.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_nfs_shares.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_nfs_shares.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_nfs_shares, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single NFS share. + # + # @overload update_nfs_share(request, options = nil) + # Pass arguments to `update_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_nfs_share(nfs_share: nil, update_mask: nil) + # Pass arguments to `update_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] + # Required. The NFS share to update. + # + # The `name` field is used to identify the NFS share to update. + # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # `labels` + # `allowed_clients` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new + # + # # Call the update_nfs_share method. + # result = client.update_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.nfs_share&.name + header_params["nfs_share.name"] = request.nfs_share.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_nfs_share, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create an NFS share. + # + # @overload create_nfs_share(request, options = nil) + # Pass arguments to `create_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_nfs_share(parent: nil, nfs_share: nil) + # Pass arguments to `create_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location. + # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] + # Required. The NfsShare to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new + # + # # Call the create_nfs_share method. + # result = client.create_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :create_nfs_share, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameNfsShare sets a new name for an nfsshare. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_nfs_share(request, options = nil) + # Pass arguments to `rename_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil) + # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the nfsshare. + # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} + # @param new_nfsshare_id [::String] + # Required. The new `id` of the nfsshare. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new + # + # # Call the rename_nfs_share method. + # result = client.rename_nfs_share request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + # p result + # + def rename_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rename_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.rename_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :rename_nfs_share, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete an NFS share. The underlying volume is automatically deleted. + # + # @overload delete_nfs_share(request, options = nil) + # Pass arguments to `delete_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_nfs_share(name: nil) + # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the NFS share to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new + # + # # Call the delete_nfs_share method. + # result = client.delete_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_nfs_share.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :delete_nfs_share, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List the budget details to provision resources on a given project. + # + # @overload list_provisioning_quotas(request, options = nil) + # Pass arguments to `list_provisioning_quotas` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListProvisioningQuotasRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @param page_token [::String] + # A token identifying a page of results from the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new + # + # # Call the list_provisioning_quotas method. + # result = client.list_provisioning_quotas request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. + # p item + # end + # + def list_provisioning_quotas request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_provisioning_quotas.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_provisioning_quotas, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Submit a provisiong configuration for a given project. + # + # @overload submit_provisioning_config(request, options = nil) + # Pass arguments to `submit_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload submit_provisioning_config(parent: nil, provisioning_config: nil, email: nil) + # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to create. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new + # + # # Call the submit_provisioning_config method. + # result = client.submit_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. + # p result + # + def submit_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.submit_provisioning_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.submit_provisioning_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.submit_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :submit_provisioning_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get ProvisioningConfig by name. + # + # @overload get_provisioning_config(request, options = nil) + # Pass arguments to `get_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_provisioning_config(name: nil) + # Pass arguments to `get_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the ProvisioningConfig. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new + # + # # Call the get_provisioning_config method. + # result = client.get_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def get_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_provisioning_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_provisioning_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :get_provisioning_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create new ProvisioningConfig. + # + # @overload create_provisioning_config(request, options = nil) + # Pass arguments to `create_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) + # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to create. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new + # + # # Call the create_provisioning_config method. + # result = client.create_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def create_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_provisioning_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_provisioning_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :create_provisioning_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update existing ProvisioningConfig. + # + # @overload update_provisioning_config(request, options = nil) + # Pass arguments to `update_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) + # Pass arguments to `update_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new + # + # # Call the update_provisioning_config method. + # result = client.update_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def update_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_provisioning_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.provisioning_config&.name + header_params["provisioning_config.name"] = request.provisioning_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_provisioning_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :update_provisioning_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameNetwork sets a new name for a network. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_network(request, options = nil) + # Pass arguments to `rename_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_network(name: nil, new_network_id: nil) + # Pass arguments to `rename_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the network. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @param new_network_id [::String] + # Required. The new `id` of the network. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new + # + # # Call the rename_network method. + # result = client.rename_network request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + # p result + # + def rename_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rename_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.rename_network.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :rename_network, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of OS images which are currently approved. + # + # @overload list_os_images(request, options = nil) + # Pass arguments to `list_os_images` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_os_images(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_os_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListProvisioningQuotasRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @param page_token [::String] + # A token identifying a page of results from the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new + # + # # Call the list_os_images method. + # result = client.list_os_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. + # p item + # end + # + def list_os_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_os_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_os_images.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_os_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.call_rpc :list_os_images, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BareMetalSolution API. + # + # This class represents the configuration for BareMetalSolution, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "baremetalsolution.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BareMetalSolution API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `rename_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_instance + ## + # RPC-specific configuration for `reset_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :reset_instance + ## + # RPC-specific configuration for `start_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :start_instance + ## + # RPC-specific configuration for `stop_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_instance + ## + # RPC-specific configuration for `enable_interactive_serial_console` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_interactive_serial_console + ## + # RPC-specific configuration for `disable_interactive_serial_console` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_interactive_serial_console + ## + # RPC-specific configuration for `detach_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :detach_lun + ## + # RPC-specific configuration for `list_ssh_keys` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ssh_keys + ## + # RPC-specific configuration for `create_ssh_key` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ssh_key + ## + # RPC-specific configuration for `delete_ssh_key` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ssh_key + ## + # RPC-specific configuration for `list_volumes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volumes + ## + # RPC-specific configuration for `get_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume + ## + # RPC-specific configuration for `update_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :update_volume + ## + # RPC-specific configuration for `rename_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_volume + ## + # RPC-specific configuration for `evict_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :evict_volume + ## + # RPC-specific configuration for `resize_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :resize_volume + ## + # RPC-specific configuration for `list_networks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_networks + ## + # RPC-specific configuration for `list_network_usage` + # @return [::Gapic::Config::Method] + # + attr_reader :list_network_usage + ## + # RPC-specific configuration for `get_network` + # @return [::Gapic::Config::Method] + # + attr_reader :get_network + ## + # RPC-specific configuration for `update_network` + # @return [::Gapic::Config::Method] + # + attr_reader :update_network + ## + # RPC-specific configuration for `create_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :create_volume_snapshot + ## + # RPC-specific configuration for `restore_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_volume_snapshot + ## + # RPC-specific configuration for `delete_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_volume_snapshot + ## + # RPC-specific configuration for `get_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume_snapshot + ## + # RPC-specific configuration for `list_volume_snapshots` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volume_snapshots + ## + # RPC-specific configuration for `get_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lun + ## + # RPC-specific configuration for `list_luns` + # @return [::Gapic::Config::Method] + # + attr_reader :list_luns + ## + # RPC-specific configuration for `evict_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :evict_lun + ## + # RPC-specific configuration for `get_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :get_nfs_share + ## + # RPC-specific configuration for `list_nfs_shares` + # @return [::Gapic::Config::Method] + # + attr_reader :list_nfs_shares + ## + # RPC-specific configuration for `update_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :update_nfs_share + ## + # RPC-specific configuration for `create_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :create_nfs_share + ## + # RPC-specific configuration for `rename_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_nfs_share + ## + # RPC-specific configuration for `delete_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_nfs_share + ## + # RPC-specific configuration for `list_provisioning_quotas` + # @return [::Gapic::Config::Method] + # + attr_reader :list_provisioning_quotas + ## + # RPC-specific configuration for `submit_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_provisioning_config + ## + # RPC-specific configuration for `get_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_provisioning_config + ## + # RPC-specific configuration for `create_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_provisioning_config + ## + # RPC-specific configuration for `update_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_provisioning_config + ## + # RPC-specific configuration for `rename_network` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_network + ## + # RPC-specific configuration for `list_os_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_os_images + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance + @rename_instance = ::Gapic::Config::Method.new rename_instance_config + reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance + @reset_instance = ::Gapic::Config::Method.new reset_instance_config + start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance + @start_instance = ::Gapic::Config::Method.new start_instance_config + stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance + @stop_instance = ::Gapic::Config::Method.new stop_instance_config + enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console + @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config + disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console + @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config + detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun + @detach_lun = ::Gapic::Config::Method.new detach_lun_config + list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys + @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config + create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key + @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config + delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key + @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config + list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes + @list_volumes = ::Gapic::Config::Method.new list_volumes_config + get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume + @get_volume = ::Gapic::Config::Method.new get_volume_config + update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume + @update_volume = ::Gapic::Config::Method.new update_volume_config + rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume + @rename_volume = ::Gapic::Config::Method.new rename_volume_config + evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume + @evict_volume = ::Gapic::Config::Method.new evict_volume_config + resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume + @resize_volume = ::Gapic::Config::Method.new resize_volume_config + list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks + @list_networks = ::Gapic::Config::Method.new list_networks_config + list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage + @list_network_usage = ::Gapic::Config::Method.new list_network_usage_config + get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network + @get_network = ::Gapic::Config::Method.new get_network_config + update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network + @update_network = ::Gapic::Config::Method.new update_network_config + create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot + @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config + restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot + @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config + delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot + @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config + get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot + @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config + list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots + @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config + get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun + @get_lun = ::Gapic::Config::Method.new get_lun_config + list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns + @list_luns = ::Gapic::Config::Method.new list_luns_config + evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun + @evict_lun = ::Gapic::Config::Method.new evict_lun_config + get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share + @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config + list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares + @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config + update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share + @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config + create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share + @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config + rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share + @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config + delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share + @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config + list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas + @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config + submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config + @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config + get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config + @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config + create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config + @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config + update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config + @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config + rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network + @rename_network = ::Gapic::Config::Method.new rename_network_config + list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images + @list_os_images = ::Gapic::Config::Method.new list_os_images_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb new file mode 100644 index 000000000000..ca17fd2fa097 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + # Credentials for the BareMetalSolution API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb new file mode 100644 index 000000000000..9e1381e38069 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BareMetalSolution Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BareMetalSolution Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "baremetalsolution.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb new file mode 100644 index 000000000000..ed6067ff8440 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb @@ -0,0 +1,301 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + # Path helper methods for the BareMetalSolution API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified InstanceConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instanceConfigs/{instance_config}` + # + # @param project [String] + # @param location [String] + # @param instance_config [String] + # + # @return [::String] + def instance_config_path project:, location:, instance_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instanceConfigs/#{instance_config}" + end + + ## + # Create a fully-qualified InterconnectAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}` + # + # @param project [String] + # @param region [String] + # @param interconnect_attachment [String] + # + # @return [::String] + def interconnect_attachment_path project:, region:, interconnect_attachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/interconnectAttachments/#{interconnect_attachment}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Lun resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}` + # + # @param project [String] + # @param location [String] + # @param volume [String] + # @param lun [String] + # + # @return [::String] + def lun_path project:, location:, volume:, lun: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "volume cannot contain /" if volume.to_s.include? "/" + + "projects/#{project}/locations/#{location}/volumes/#{volume}/luns/#{lun}" + end + + ## + # Create a fully-qualified NFSShare resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/nfsShares/{nfs_share}` + # + # @param project [String] + # @param location [String] + # @param nfs_share [String] + # + # @return [::String] + def nfs_share_path project:, location:, nfs_share: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/nfsShares/#{nfs_share}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/networks/{network}` + # + # @param project [String] + # @param location [String] + # @param network [String] + # + # @return [::String] + def network_path project:, location:, network: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/networks/#{network}" + end + + ## + # Create a fully-qualified NetworkConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/networkConfigs/{network_config}` + # + # @param project [String] + # @param location [String] + # @param network_config [String] + # + # @return [::String] + def network_config_path project:, location:, network_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/networkConfigs/#{network_config}" + end + + ## + # Create a fully-qualified ProvisioningConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}` + # + # @param project [String] + # @param location [String] + # @param provisioning_config [String] + # + # @return [::String] + def provisioning_config_path project:, location:, provisioning_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/provisioningConfigs/#{provisioning_config}" + end + + ## + # Create a fully-qualified ServerNetworkTemplate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + # + # @param project [String] + # @param location [String] + # @param server_network_template [String] + # + # @return [::String] + def server_network_template_path project:, location:, server_network_template: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/serverNetworkTemplate/#{server_network_template}" + end + + ## + # Create a fully-qualified SshKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sshKeys/{ssh_key}` + # + # @param project [String] + # @param location [String] + # @param ssh_key [String] + # + # @return [::String] + def ssh_key_path project:, location:, ssh_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sshKeys/#{ssh_key}" + end + + ## + # Create a fully-qualified Volume resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/volumes/{volume}` + # + # @param project [String] + # @param location [String] + # @param volume [String] + # + # @return [::String] + def volume_path project:, location:, volume: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/volumes/#{volume}" + end + + ## + # Create a fully-qualified VolumeConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/volumeConfigs/{volume_config}` + # + # @param project [String] + # @param location [String] + # @param volume_config [String] + # + # @return [::String] + def volume_config_path project:, location:, volume_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/volumeConfigs/#{volume_config}" + end + + ## + # Create a fully-qualified VolumeSnapshot resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}` + # + # @param project [String] + # @param location [String] + # @param volume [String] + # @param snapshot [String] + # + # @return [::String] + def volume_snapshot_path project:, location:, volume:, snapshot: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "volume cannot contain /" if volume.to_s.include? "/" + + "projects/#{project}/locations/#{location}/volumes/#{volume}/snapshots/#{snapshot}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb new file mode 100644 index 000000000000..7f95f0aebf5e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bare_metal_solution/v2/version" +require "google/cloud/bare_metal_solution/v2/bindings_override" + +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/paths" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client" + +module Google + module Cloud + module BareMetalSolution + module V2 + ## + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module BareMetalSolution + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb new file mode 100644 index 000000000000..ec4dc017406e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb @@ -0,0 +1,4493 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + module Rest + ## + # REST client for the BareMetalSolution service. + # + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bare_metal_solution_stub + + ## + # Configure the BareMetalSolution Client class. + # + # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BareMetalSolution clients + # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BareMetalSolution", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BareMetalSolution Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @bare_metal_solution_stub.universe_domain + end + + ## + # Create a new BareMetalSolution REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BareMetalSolution client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @bare_metal_solution_stub = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @bare_metal_solution_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @bare_metal_solution_stub.endpoint + config.universe_domain = @bare_metal_solution_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @bare_metal_solution_stub.endpoint + config.universe_domain = @bare_metal_solution_stub.universe_domain + config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @bare_metal_solution_stub.logger + end + + # Service calls + + ## + # List servers in a given project and location. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListInstancesRequest. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_instances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_instances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_instances, "instances", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details about a single server. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_instance request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single server. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_instance(instance: nil, update_mask: nil) + # Pass arguments to `update_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance [::Google::Cloud::BareMetalSolution::V2::Instance, ::Hash] + # Required. The server to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The currently supported fields are: + # `labels` + # `hyperthreading_enabled` + # `os_image` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameInstance sets a new name for an instance. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_instance(request, options = nil) + # Pass arguments to `rename_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_instance(name: nil, new_instance_id: nil) + # Pass arguments to `rename_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the instance. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param new_instance_id [::String] + # Required. The new `id` of the instance. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new + # + # # Call the rename_instance method. + # result = client.rename_instance request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + # p result + # + def rename_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rename_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.rename_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.rename_instance request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Perform an ungraceful, hard reset on a server. Equivalent to shutting the + # power off and then turning it back on. + # + # @overload reset_instance(request, options = nil) + # Pass arguments to `reset_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload reset_instance(name: nil) + # Pass arguments to `reset_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new + # + # # Call the reset_instance method. + # result = client.reset_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def reset_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.reset_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.reset_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reset_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.reset_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts a server that was shutdown. + # + # @overload start_instance(request, options = nil) + # Pass arguments to `start_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_instance(name: nil) + # Pass arguments to `start_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new + # + # # Call the start_instance method. + # result = client.start_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.start_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stop a running server. + # + # @overload stop_instance(request, options = nil) + # Pass arguments to `stop_instance` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload stop_instance(name: nil) + # Pass arguments to `stop_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new + # + # # Call the stop_instance method. + # result = client.stop_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def stop_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.stop_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.stop_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stop_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.stop_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable the interactive serial console feature on an instance. + # + # @overload enable_interactive_serial_console(request, options = nil) + # Pass arguments to `enable_interactive_serial_console` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_interactive_serial_console(name: nil) + # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new + # + # # Call the enable_interactive_serial_console method. + # result = client.enable_interactive_serial_console request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def enable_interactive_serial_console request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_interactive_serial_console.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_interactive_serial_console.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.enable_interactive_serial_console request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable the interactive serial console feature on an instance. + # + # @overload disable_interactive_serial_console(request, options = nil) + # Pass arguments to `disable_interactive_serial_console` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_interactive_serial_console(name: nil) + # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new + # + # # Call the disable_interactive_serial_console method. + # result = client.disable_interactive_serial_console request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def disable_interactive_serial_console request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_interactive_serial_console.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_interactive_serial_console.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.disable_interactive_serial_console request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detach LUN from Instance. + # + # @overload detach_lun(request, options = nil) + # Pass arguments to `detach_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil) + # Pass arguments to `detach_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance [::String] + # Required. Name of the instance. + # @param lun [::String] + # Required. Name of the Lun to detach. + # @param skip_reboot [::Boolean] + # If true, performs lun unmapping without instance reboot. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new + # + # # Call the detach_lun method. + # result = client.detach_lun request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def detach_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.detach_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.detach_lun.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.detach_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.detach_lun request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the public SSH keys registered for the specified project. + # These SSH keys are used only for the interactive serial console feature. + # + # @overload list_ssh_keys(request, options = nil) + # Pass arguments to `list_ssh_keys` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent containing the SSH keys. + # Currently, the only valid value for the location is "global". + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new + # + # # Call the list_ssh_keys method. + # result = client.list_ssh_keys request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. + # p item + # end + # + def list_ssh_keys request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_ssh_keys.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_ssh_keys.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_ssh_keys.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_ssh_keys request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, "ssh_keys", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Register a public SSH key in the specified project for use with the + # interactive serial console feature. + # + # @overload create_ssh_key(request, options = nil) + # Pass arguments to `create_ssh_key` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) + # Pass arguments to `create_ssh_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent containing the SSH keys. + # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash] + # Required. The SSH key to register. + # @param ssh_key_id [::String] + # Required. The ID to use for the key, which will become the final component + # of the key's resource name. + # + # This value must match the regex: + # [a-zA-Z0-9@.\-_]\\{1,64} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new + # + # # Call the create_ssh_key method. + # result = client.create_ssh_key request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. + # p result + # + def create_ssh_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_ssh_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_ssh_key.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_ssh_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.create_ssh_key request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a public SSH key registered in the specified project. + # + # @overload delete_ssh_key(request, options = nil) + # Pass arguments to `delete_ssh_key` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_ssh_key(name: nil) + # Pass arguments to `delete_ssh_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the SSH key to delete. + # Currently, the only valid value for the location is "global". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new + # + # # Call the delete_ssh_key method. + # result = client.delete_ssh_key request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_ssh_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_ssh_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_ssh_key.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_ssh_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.delete_ssh_key request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List storage volumes in a given project and location. + # + # @overload list_volumes(request, options = nil) + # Pass arguments to `list_volumes` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_volumes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListVolumesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new + # + # # Call the list_volumes method. + # result = client.list_volumes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. + # p item + # end + # + def list_volumes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_volumes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_volumes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_volumes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_volumes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, "volumes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single storage volume. + # + # @overload get_volume(request, options = nil) + # Pass arguments to `get_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_volume(name: nil) + # Pass arguments to `get_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new + # + # # Call the get_volume method. + # result = client.get_volume request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + # p result + # + def get_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_volume request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single storage volume. + # + # @overload update_volume(request, options = nil) + # Pass arguments to `update_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_volume(volume: nil, update_mask: nil) + # Pass arguments to `update_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash] + # Required. The volume to update. + # + # The `name` field is used to identify the volume to update. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # 'labels' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new + # + # # Call the update_volume method. + # result = client.update_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_volume request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameVolume sets a new name for a volume. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_volume(request, options = nil) + # Pass arguments to `rename_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_volume(name: nil, new_volume_id: nil) + # Pass arguments to `rename_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the volume. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @param new_volume_id [::String] + # Required. The new `id` of the volume. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new + # + # # Call the rename_volume method. + # result = client.rename_volume request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + # p result + # + def rename_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rename_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.rename_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.rename_volume request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Skips volume's cooloff and deletes it now. + # Volume must be in cooloff state. + # + # @overload evict_volume(request, options = nil) + # Pass arguments to `evict_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload evict_volume(name: nil) + # Pass arguments to `evict_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Volume. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new + # + # # Call the evict_volume method. + # result = client.evict_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def evict_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.evict_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.evict_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.evict_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.evict_volume request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Emergency Volume resize. + # + # @overload resize_volume(request, options = nil) + # Pass arguments to `resize_volume` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload resize_volume(volume: nil, size_gib: nil) + # Pass arguments to `resize_volume` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume [::String] + # Required. Volume to resize. + # @param size_gib [::Integer] + # New Volume size, in GiB. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new + # + # # Call the resize_volume method. + # result = client.resize_volume request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resize_volume request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.resize_volume.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.resize_volume.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resize_volume.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.resize_volume request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List network in a given project and location. + # + # @overload list_networks(request, options = nil) + # Pass arguments to `list_networks` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_networks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListNetworksRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new + # + # # Call the list_networks method. + # result = client.list_networks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. + # p item + # end + # + def list_networks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_networks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_networks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_networks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_networks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, "networks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all Networks (and used IPs for each Network) in the vendor account + # associated with the specified project. + # + # @overload list_network_usage(request, options = nil) + # Pass arguments to `list_network_usage` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_network_usage(location: nil) + # Pass arguments to `list_network_usage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. Parent value (project and location). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new + # + # # Call the list_network_usage method. + # result = client.list_network_usage request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. + # p result + # + def list_network_usage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_network_usage.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_network_usage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_network_usage request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single network. + # + # @overload get_network(request, options = nil) + # Pass arguments to `get_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_network(name: nil) + # Pass arguments to `get_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new + # + # # Call the get_network method. + # result = client.get_network request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + # p result + # + def get_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_network.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_network request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single network. + # + # @overload update_network(request, options = nil) + # Pass arguments to `update_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_network(network: nil, update_mask: nil) + # Pass arguments to `update_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash] + # Required. The network to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # `labels`, `reservations`, `vrf.vlan_attachments` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new + # + # # Call the update_network method. + # result = client.update_network request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_network.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_network request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Takes a snapshot of a boot volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload create_volume_snapshot(request, options = nil) + # Pass arguments to `create_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil) + # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The volume to snapshot. + # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash] + # Required. The snapshot to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new + # + # # Call the create_volume_snapshot method. + # result = client.create_volume_snapshot request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p result + # + def create_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_volume_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.create_volume_snapshot request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Uses the specified snapshot to restore its parent volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload restore_volume_snapshot(request, options = nil) + # Pass arguments to `restore_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restore_volume_snapshot(volume_snapshot: nil) + # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param volume_snapshot [::String] + # Required. Name of the snapshot which will be used to restore its parent + # volume. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new + # + # # Call the restore_volume_snapshot method. + # result = client.restore_volume_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restore_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restore_volume_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.restore_volume_snapshot request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a volume snapshot. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload delete_volume_snapshot(request, options = nil) + # Pass arguments to `delete_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_volume_snapshot(name: nil) + # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the snapshot to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new + # + # # Call the delete_volume_snapshot method. + # result = client.delete_volume_snapshot request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_volume_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.delete_volume_snapshot request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified snapshot resource. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + # + # @overload get_volume_snapshot(request, options = nil) + # Pass arguments to `get_volume_snapshot` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_volume_snapshot(name: nil) + # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the snapshot. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new + # + # # Call the get_volume_snapshot method. + # result = client.get_volume_snapshot request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p result + # + def get_volume_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_volume_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_volume_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_volume_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_volume_snapshot request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of snapshots for the specified volume. + # Returns a response with an empty list of snapshots if called + # for a non-boot volume. + # + # @overload list_volume_snapshots(request, options = nil) + # Pass arguments to `list_volume_snapshots` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListVolumesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new + # + # # Call the list_volume_snapshots method. + # result = client.list_volume_snapshots request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + # p item + # end + # + def list_volume_snapshots request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_volume_snapshots.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_volume_snapshots.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_volume_snapshots.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_volume_snapshots request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, "volume_snapshots", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single storage logical unit number(LUN). + # + # @overload get_lun(request, options = nil) + # Pass arguments to `get_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lun(name: nil) + # Pass arguments to `get_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Lun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Lun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new + # + # # Call the get_lun method. + # result = client.get_lun request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. + # p result + # + def get_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_lun.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_lun request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List storage volume luns for given storage volume. + # + # @overload list_luns(request, options = nil) + # Pass arguments to `list_luns` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_luns(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_luns` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListLunsRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new + # + # # Call the list_luns method. + # result = client.list_luns request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. + # p item + # end + # + def list_luns request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_luns.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_luns.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_luns.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_luns request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, "luns", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Skips lun's cooloff and deletes it now. + # Lun must be in cooloff state. + # + # @overload evict_lun(request, options = nil) + # Pass arguments to `evict_lun` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload evict_lun(name: nil) + # Pass arguments to `evict_lun` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the lun. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new + # + # # Call the evict_lun method. + # result = client.evict_lun request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def evict_lun request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.evict_lun.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.evict_lun.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.evict_lun.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.evict_lun request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a single NFS share. + # + # @overload get_nfs_share(request, options = nil) + # Pass arguments to `get_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_nfs_share(name: nil) + # Pass arguments to `get_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new + # + # # Call the get_nfs_share method. + # result = client.get_nfs_share request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + # p result + # + def get_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_nfs_share request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List NFS shares. + # + # @overload list_nfs_shares(request, options = nil) + # Pass arguments to `list_nfs_shares` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListNfsSharesRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new + # + # # Call the list_nfs_shares method. + # result = client.list_nfs_shares request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. + # p item + # end + # + def list_nfs_shares request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_nfs_shares.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_nfs_shares.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_nfs_shares.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_nfs_shares request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, "nfs_shares", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update details of a single NFS share. + # + # @overload update_nfs_share(request, options = nil) + # Pass arguments to `update_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_nfs_share(nfs_share: nil, update_mask: nil) + # Pass arguments to `update_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] + # Required. The NFS share to update. + # + # The `name` field is used to identify the NFS share to update. + # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # The only currently supported fields are: + # `labels` + # `allowed_clients` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new + # + # # Call the update_nfs_share method. + # result = client.update_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_nfs_share request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create an NFS share. + # + # @overload create_nfs_share(request, options = nil) + # Pass arguments to `create_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_nfs_share(parent: nil, nfs_share: nil) + # Pass arguments to `create_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location. + # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] + # Required. The NfsShare to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new + # + # # Call the create_nfs_share method. + # result = client.create_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.create_nfs_share request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameNfsShare sets a new name for an nfsshare. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_nfs_share(request, options = nil) + # Pass arguments to `rename_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil) + # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the nfsshare. + # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} + # @param new_nfsshare_id [::String] + # Required. The new `id` of the nfsshare. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new + # + # # Call the rename_nfs_share method. + # result = client.rename_nfs_share request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + # p result + # + def rename_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rename_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.rename_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.rename_nfs_share request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete an NFS share. The underlying volume is automatically deleted. + # + # @overload delete_nfs_share(request, options = nil) + # Pass arguments to `delete_nfs_share` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_nfs_share(name: nil) + # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the NFS share to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new + # + # # Call the delete_nfs_share method. + # result = client.delete_nfs_share request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_nfs_share request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_nfs_share.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_nfs_share.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_nfs_share.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.delete_nfs_share request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List the budget details to provision resources on a given project. + # + # @overload list_provisioning_quotas(request, options = nil) + # Pass arguments to `list_provisioning_quotas` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListProvisioningQuotasRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new + # + # # Call the list_provisioning_quotas method. + # result = client.list_provisioning_quotas request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. + # p item + # end + # + def list_provisioning_quotas request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_provisioning_quotas.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_provisioning_quotas request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, "provisioning_quotas", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Submit a provisiong configuration for a given project. + # + # @overload submit_provisioning_config(request, options = nil) + # Pass arguments to `submit_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload submit_provisioning_config(parent: nil, provisioning_config: nil, email: nil) + # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to create. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new + # + # # Call the submit_provisioning_config method. + # result = client.submit_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. + # p result + # + def submit_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.submit_provisioning_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.submit_provisioning_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.submit_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.submit_provisioning_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get ProvisioningConfig by name. + # + # @overload get_provisioning_config(request, options = nil) + # Pass arguments to `get_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_provisioning_config(name: nil) + # Pass arguments to `get_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the ProvisioningConfig. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new + # + # # Call the get_provisioning_config method. + # result = client.get_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def get_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_provisioning_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_provisioning_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.get_provisioning_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create new ProvisioningConfig. + # + # @overload create_provisioning_config(request, options = nil) + # Pass arguments to `create_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) + # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to create. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new + # + # # Call the create_provisioning_config method. + # result = client.create_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def create_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_provisioning_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_provisioning_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.create_provisioning_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update existing ProvisioningConfig. + # + # @overload update_provisioning_config(request, options = nil) + # Pass arguments to `update_provisioning_config` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) + # Pass arguments to `update_provisioning_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] + # Required. The ProvisioningConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @param email [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new + # + # # Call the update_provisioning_config method. + # result = client.update_provisioning_config request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + # p result + # + def update_provisioning_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_provisioning_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_provisioning_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_provisioning_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.update_provisioning_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # RenameNetwork sets a new name for a network. + # Use with caution, previous names become immediately invalidated. + # + # @overload rename_network(request, options = nil) + # Pass arguments to `rename_network` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_network(name: nil, new_network_id: nil) + # Pass arguments to `rename_network` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` field is used to identify the network. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @param new_network_id [::String] + # Required. The new `id` of the network. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new + # + # # Call the rename_network method. + # result = client.rename_network request + # + # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + # p result + # + def rename_network request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rename_network.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.rename_network.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_network.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.rename_network request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves the list of OS images which are currently approved. + # + # @overload list_os_images(request, options = nil) + # Pass arguments to `list_os_images` via a request object, either of type + # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_os_images(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_os_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListProvisioningQuotasRequest. + # @param page_size [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @param page_token [::String] + # A token identifying a page of results from the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bare_metal_solution/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new + # + # # Call the list_os_images method. + # result = client.list_os_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. + # p item + # end + # + def list_os_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_os_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_os_images.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_os_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bare_metal_solution_stub.list_os_images request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, "os_images", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BareMetalSolution REST API. + # + # This class represents the configuration for BareMetalSolution REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "baremetalsolution.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BareMetalSolution API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `rename_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_instance + ## + # RPC-specific configuration for `reset_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :reset_instance + ## + # RPC-specific configuration for `start_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :start_instance + ## + # RPC-specific configuration for `stop_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_instance + ## + # RPC-specific configuration for `enable_interactive_serial_console` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_interactive_serial_console + ## + # RPC-specific configuration for `disable_interactive_serial_console` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_interactive_serial_console + ## + # RPC-specific configuration for `detach_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :detach_lun + ## + # RPC-specific configuration for `list_ssh_keys` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ssh_keys + ## + # RPC-specific configuration for `create_ssh_key` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ssh_key + ## + # RPC-specific configuration for `delete_ssh_key` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ssh_key + ## + # RPC-specific configuration for `list_volumes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volumes + ## + # RPC-specific configuration for `get_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume + ## + # RPC-specific configuration for `update_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :update_volume + ## + # RPC-specific configuration for `rename_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_volume + ## + # RPC-specific configuration for `evict_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :evict_volume + ## + # RPC-specific configuration for `resize_volume` + # @return [::Gapic::Config::Method] + # + attr_reader :resize_volume + ## + # RPC-specific configuration for `list_networks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_networks + ## + # RPC-specific configuration for `list_network_usage` + # @return [::Gapic::Config::Method] + # + attr_reader :list_network_usage + ## + # RPC-specific configuration for `get_network` + # @return [::Gapic::Config::Method] + # + attr_reader :get_network + ## + # RPC-specific configuration for `update_network` + # @return [::Gapic::Config::Method] + # + attr_reader :update_network + ## + # RPC-specific configuration for `create_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :create_volume_snapshot + ## + # RPC-specific configuration for `restore_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_volume_snapshot + ## + # RPC-specific configuration for `delete_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_volume_snapshot + ## + # RPC-specific configuration for `get_volume_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume_snapshot + ## + # RPC-specific configuration for `list_volume_snapshots` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volume_snapshots + ## + # RPC-specific configuration for `get_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lun + ## + # RPC-specific configuration for `list_luns` + # @return [::Gapic::Config::Method] + # + attr_reader :list_luns + ## + # RPC-specific configuration for `evict_lun` + # @return [::Gapic::Config::Method] + # + attr_reader :evict_lun + ## + # RPC-specific configuration for `get_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :get_nfs_share + ## + # RPC-specific configuration for `list_nfs_shares` + # @return [::Gapic::Config::Method] + # + attr_reader :list_nfs_shares + ## + # RPC-specific configuration for `update_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :update_nfs_share + ## + # RPC-specific configuration for `create_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :create_nfs_share + ## + # RPC-specific configuration for `rename_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_nfs_share + ## + # RPC-specific configuration for `delete_nfs_share` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_nfs_share + ## + # RPC-specific configuration for `list_provisioning_quotas` + # @return [::Gapic::Config::Method] + # + attr_reader :list_provisioning_quotas + ## + # RPC-specific configuration for `submit_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_provisioning_config + ## + # RPC-specific configuration for `get_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_provisioning_config + ## + # RPC-specific configuration for `create_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_provisioning_config + ## + # RPC-specific configuration for `update_provisioning_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_provisioning_config + ## + # RPC-specific configuration for `rename_network` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_network + ## + # RPC-specific configuration for `list_os_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_os_images + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance + @rename_instance = ::Gapic::Config::Method.new rename_instance_config + reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance + @reset_instance = ::Gapic::Config::Method.new reset_instance_config + start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance + @start_instance = ::Gapic::Config::Method.new start_instance_config + stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance + @stop_instance = ::Gapic::Config::Method.new stop_instance_config + enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console + @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config + disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console + @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config + detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun + @detach_lun = ::Gapic::Config::Method.new detach_lun_config + list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys + @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config + create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key + @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config + delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key + @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config + list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes + @list_volumes = ::Gapic::Config::Method.new list_volumes_config + get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume + @get_volume = ::Gapic::Config::Method.new get_volume_config + update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume + @update_volume = ::Gapic::Config::Method.new update_volume_config + rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume + @rename_volume = ::Gapic::Config::Method.new rename_volume_config + evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume + @evict_volume = ::Gapic::Config::Method.new evict_volume_config + resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume + @resize_volume = ::Gapic::Config::Method.new resize_volume_config + list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks + @list_networks = ::Gapic::Config::Method.new list_networks_config + list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage + @list_network_usage = ::Gapic::Config::Method.new list_network_usage_config + get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network + @get_network = ::Gapic::Config::Method.new get_network_config + update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network + @update_network = ::Gapic::Config::Method.new update_network_config + create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot + @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config + restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot + @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config + delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot + @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config + get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot + @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config + list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots + @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config + get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun + @get_lun = ::Gapic::Config::Method.new get_lun_config + list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns + @list_luns = ::Gapic::Config::Method.new list_luns_config + evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun + @evict_lun = ::Gapic::Config::Method.new evict_lun_config + get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share + @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config + list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares + @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config + update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share + @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config + create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share + @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config + rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share + @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config + delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share + @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config + list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas + @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config + submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config + @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config + get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config + @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config + create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config + @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config + update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config + @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config + rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network + @rename_network = ::Gapic::Config::Method.new rename_network_config + list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images + @list_os_images = ::Gapic::Config::Method.new list_os_images_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb new file mode 100644 index 000000000000..5c11be0bebf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BareMetalSolution Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BareMetalSolution Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "baremetalsolution.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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(?:/.*)?$}, 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(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb new file mode 100644 index 000000000000..5dc3748f6217 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb @@ -0,0 +1,2789 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + module Rest + ## + # REST service stub for the BareMetalSolution service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_instances REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse] + # A result object deserialized from the server's reply + def list_instances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_instances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Instance.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rename_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # A result object deserialized from the server's reply + def rename_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rename_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Instance.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the reset_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def reset_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reset_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "reset_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the start_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def start_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the stop_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def stop_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stop_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "stop_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_interactive_serial_console REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def enable_interactive_serial_console request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_interactive_serial_console_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_interactive_serial_console", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_interactive_serial_console REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def disable_interactive_serial_console request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_interactive_serial_console_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_interactive_serial_console", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the detach_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def detach_lun request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_detach_lun_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "detach_lun", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_ssh_keys REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse] + # A result object deserialized from the server's reply + def list_ssh_keys request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_ssh_keys_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_ssh_keys", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_ssh_key REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # A result object deserialized from the server's reply + def create_ssh_key request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_ssh_key_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_ssh_key", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::SSHKey.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_ssh_key REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_ssh_key request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_ssh_key_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_ssh_key", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_volumes REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse] + # A result object deserialized from the server's reply + def list_volumes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_volumes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_volumes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # A result object deserialized from the server's reply + def get_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Volume.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rename_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # A result object deserialized from the server's reply + def rename_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rename_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Volume.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the evict_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def evict_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_evict_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "evict_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resize_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def resize_volume request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resize_volume_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "resize_volume", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_networks REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse] + # A result object deserialized from the server's reply + def list_networks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_networks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_networks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_network_usage REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] + # A result object deserialized from the server's reply + def list_network_usage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_network_usage_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_network_usage", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # A result object deserialized from the server's reply + def get_network request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_network_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_network", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Network.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_network request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_network_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_network", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # A result object deserialized from the server's reply + def create_volume_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_volume_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_volume_snapshot", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restore_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def restore_volume_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_volume_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restore_volume_snapshot", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_volume_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_volume_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_volume_snapshot", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # A result object deserialized from the server's reply + def get_volume_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_volume_snapshot", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_volume_snapshots REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse] + # A result object deserialized from the server's reply + def list_volume_snapshots request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_volume_snapshots_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_volume_snapshots", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetLunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Lun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Lun] + # A result object deserialized from the server's reply + def get_lun request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lun_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_lun", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Lun.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_luns REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse] + # A result object deserialized from the server's reply + def list_luns request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_luns_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_luns", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the evict_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def evict_lun request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_evict_lun_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "evict_lun", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # A result object deserialized from the server's reply + def get_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_nfs_shares REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse] + # A result object deserialized from the server's reply + def list_nfs_shares request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_nfs_shares_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_nfs_shares", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rename_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # A result object deserialized from the server's reply + def rename_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rename_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_nfs_share request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_nfs_share_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_nfs_share", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_provisioning_quotas REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse] + # A result object deserialized from the server's reply + def list_provisioning_quotas request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_provisioning_quotas_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_provisioning_quotas", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the submit_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] + # A result object deserialized from the server's reply + def submit_provisioning_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_submit_provisioning_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "submit_provisioning_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # A result object deserialized from the server's reply + def get_provisioning_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_provisioning_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_provisioning_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # A result object deserialized from the server's reply + def create_provisioning_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_provisioning_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_provisioning_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # A result object deserialized from the server's reply + def update_provisioning_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_provisioning_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_provisioning_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rename_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # A result object deserialized from the server's reply + def rename_network request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_network_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rename_network", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::Network.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_os_images REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse] + # A result object deserialized from the server's reply + def list_os_images request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_os_images_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_os_images", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_instances REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_instances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/instances", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{instance.name}", + body: "instance", + matches: [ + ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reset_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_reset_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:reset", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stop_instance REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_stop_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:stop", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_interactive_serial_console REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_interactive_serial_console_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:enableInteractiveSerialConsole", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_interactive_serial_console REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_interactive_serial_console_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:disableInteractiveSerialConsole", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the detach_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_detach_lun_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{instance}:detachLun", + body: "*", + matches: [ + ["instance", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_ssh_keys REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_ssh_keys_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/sshKeys", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_ssh_key REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_ssh_key_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/sshKeys", + body: "ssh_key", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_ssh_key REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_ssh_key_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/sshKeys/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_volumes REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_volumes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/volumes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{volume.name}", + body: "volume", + matches: [ + ["volume.name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the evict_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_evict_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:evict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the resize_volume REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resize_volume_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{volume}:resize", + body: "*", + matches: [ + ["volume", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_networks REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_networks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/networks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_network_usage REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_network_usage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{location}/networks:listNetworkUsage", + matches: [ + ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_network_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_network_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{network.name}", + body: "network", + matches: [ + ["network.name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_volume_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/snapshots", + body: "volume_snapshot", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restore_volume_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{volume_snapshot}:restoreVolumeSnapshot", + body: "*", + matches: [ + ["volume_snapshot", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_volume_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_volume_snapshot REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_volume_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_volume_snapshots REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_volume_snapshots_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/snapshots", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetLunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lun_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/luns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_luns REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_luns_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/luns", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the evict_lun REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_evict_lun_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:evict", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/luns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_nfs_shares REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_nfs_shares_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/nfsShares", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{nfs_share.name}", + body: "nfs_share", + matches: [ + ["nfs_share.name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/nfsShares", + body: "nfs_share", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_nfs_share REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_nfs_share_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_provisioning_quotas REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_provisioning_quotas_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/provisioningQuotas", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the submit_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_submit_provisioning_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/provisioningConfigs:submit", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_provisioning_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_provisioning_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/provisioningConfigs", + body: "provisioning_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_provisioning_config REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_provisioning_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{provisioning_config.name}", + body: "provisioning_config", + matches: [ + ["provisioning_config.name", %r{^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_network REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_network_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_os_images REST call + # + # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_os_images_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/osImages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb new file mode 100644 index 000000000000..37345efedc50 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module BareMetalSolution + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/bare_metal_solution/v2/rest" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module V2 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BareMetalSolution"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v2/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb new file mode 100644 index 000000000000..980745ed179a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" +require "google/cloud/bare_metal_solution/v2/bindings_override" +require "google/cloud/bare_metal_solution/v2/version" + +module Google + module Cloud + module BareMetalSolution + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bare_metal_solution/v2/rest" + # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new + # + module V2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb new file mode 100644 index 000000000000..8c3694d57a2e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb new file mode 100644 index 000000000000..ea11c0b2c2e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/baremetalsolution.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/cloud/baremetalsolution/v2/instance_pb' +require 'google/cloud/baremetalsolution/v2/lun_pb' +require 'google/cloud/baremetalsolution/v2/network_pb' +require 'google/cloud/baremetalsolution/v2/nfs_share_pb' +require 'google/cloud/baremetalsolution/v2/osimage_pb' +require 'google/cloud/baremetalsolution/v2/provisioning_pb' +require 'google/cloud/baremetalsolution/v2/ssh_key_pb' +require 'google/cloud/baremetalsolution/v2/volume_pb' +require 'google/cloud/baremetalsolution/v2/volume_snapshot_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/cloud/baremetalsolution/v2/baremetalsolution.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x30google/cloud/baremetalsolution/v2/instance.proto\x1a+google/cloud/baremetalsolution/v2/lun.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a\x31google/cloud/baremetalsolution/v2/nfs_share.proto\x1a/google/cloud/baremetalsolution/v2/osimage.proto\x1a\x34google/cloud/baremetalsolution/v2/provisioning.proto\x1a/google/cloud/baremetalsolution/v2/ssh_key.proto\x1a.google/cloud/baremetalsolution/v2/volume.proto\x1a\x37google/cloud/baremetalsolution/v2/volume_snapshot.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x17\n\x15ResetInstanceResponse2\xbaK\n\x11\x42\x61reMetalSolution\x12\xc2\x01\n\rListInstances\x12\x37.google.cloud.baremetalsolution.v2.ListInstancesRequest\x1a\x38.google.cloud.baremetalsolution.v2.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/instances\x12\xaf\x01\n\x0bGetInstance\x12\x35.google.cloud.baremetalsolution.v2.GetInstanceRequest\x1a+.google.cloud.baremetalsolution.v2.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/instances/*}\x12\xea\x01\n\x0eUpdateInstance\x12\x38.google.cloud.baremetalsolution.v2.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v2/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xcf\x01\n\x0eRenameInstance\x12\x38.google.cloud.baremetalsolution.v2.RenameInstanceRequest\x1a+.google.cloud.baremetalsolution.v2.Instance\"V\xda\x41\x14name,new_instance_id\x82\xd3\xe4\x93\x02\x39\"4/v2/{name=projects/*/locations/*/instances/*}:rename:\x01*\x12\xdb\x01\n\rResetInstance\x12\x37.google.cloud.baremetalsolution.v2.ResetInstanceRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15ResetInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/instances/*}:reset:\x01*\x12\xdb\x01\n\rStartInstance\x12\x37.google.cloud.baremetalsolution.v2.StartInstanceRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15StartInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/instances/*}:start:\x01*\x12\xd7\x01\n\x0cStopInstance\x12\x36.google.cloud.baremetalsolution.v2.StopInstanceRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41)\n\x14StopInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/instances/*}:stop:\x01*\x12\xa8\x02\n\x1e\x45nableInteractiveSerialConsole\x12H.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest\x1a\x1d.google.longrunning.Operation\"\x9c\x01\xca\x41;\n&EnableInteractiveSerialConsoleResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v2/{name=projects/*/locations/*/instances/*}:enableInteractiveSerialConsole:\x01*\x12\xac\x02\n\x1f\x44isableInteractiveSerialConsole\x12I.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41<\n\'DisableInteractiveSerialConsoleResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v2/{name=projects/*/locations/*/instances/*}:disableInteractiveSerialConsole:\x01*\x12\xd6\x01\n\tDetachLun\x12\x33.google.cloud.baremetalsolution.v2.DetachLunRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x0cinstance,lun\x82\xd3\xe4\x93\x02@\";/v2/{instance=projects/*/locations/*/instances/*}:detachLun:\x01*\x12\xba\x01\n\x0bListSSHKeys\x12\x35.google.cloud.baremetalsolution.v2.ListSSHKeysRequest\x1a\x36.google.cloud.baremetalsolution.v2.ListSSHKeysResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v2/{parent=projects/*/locations/*}/sshKeys\x12\xcb\x01\n\x0c\x43reateSSHKey\x12\x36.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest\x1a).google.cloud.baremetalsolution.v2.SSHKey\"X\xda\x41\x19parent,ssh_key,ssh_key_id\x82\xd3\xe4\x93\x02\x36\"+/v2/{parent=projects/*/locations/*}/sshKeys:\x07ssh_key\x12\x9a\x01\n\x0c\x44\x65leteSSHKey\x12\x36.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v2/{name=projects/*/locations/*/sshKeys/*}\x12\xba\x01\n\x0bListVolumes\x12\x35.google.cloud.baremetalsolution.v2.ListVolumesRequest\x1a\x36.google.cloud.baremetalsolution.v2.ListVolumesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v2/{parent=projects/*/locations/*}/volumes\x12\xa7\x01\n\tGetVolume\x12\x33.google.cloud.baremetalsolution.v2.GetVolumeRequest\x1a).google.cloud.baremetalsolution.v2.Volume\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v2/{name=projects/*/locations/*/volumes/*}\x12\xdc\x01\n\x0cUpdateVolume\x12\x36.google.cloud.baremetalsolution.v2.UpdateVolumeRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06Volume\x12\x11OperationMetadata\xda\x41\x12volume,update_mask\x82\xd3\xe4\x93\x02<22/v2/{volume.name=projects/*/locations/*/volumes/*}:\x06volume\x12\xc5\x01\n\x0cRenameVolume\x12\x36.google.cloud.baremetalsolution.v2.RenameVolumeRequest\x1a).google.cloud.baremetalsolution.v2.Volume\"R\xda\x41\x12name,new_volume_id\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/volumes/*}:rename:\x01*\x12\xd5\x01\n\x0b\x45victVolume\x12\x35.google.cloud.baremetalsolution.v2.EvictVolumeRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v2/{name=projects/*/locations/*/volumes/*}:evict:\x01*\x12\xd6\x01\n\x0cResizeVolume\x12\x36.google.cloud.baremetalsolution.v2.ResizeVolumeRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x1b\n\x06Volume\x12\x11OperationMetadata\xda\x41\x0fvolume,size_gib\x82\xd3\xe4\x93\x02\x39\"4/v2/{volume=projects/*/locations/*/volumes/*}:resize:\x01*\x12\xbe\x01\n\x0cListNetworks\x12\x36.google.cloud.baremetalsolution.v2.ListNetworksRequest\x1a\x37.google.cloud.baremetalsolution.v2.ListNetworksResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/networks\x12\xdf\x01\n\x10ListNetworkUsage\x12:.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest\x1a;.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse\"R\xda\x41\x08location\x82\xd3\xe4\x93\x02\x41\x12?/v2/{location=projects/*/locations/*}/networks:listNetworkUsage\x12\xab\x01\n\nGetNetwork\x12\x34.google.cloud.baremetalsolution.v2.GetNetworkRequest\x1a*.google.cloud.baremetalsolution.v2.Network\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v2/{name=projects/*/locations/*/networks/*}\x12\xe3\x01\n\rUpdateNetwork\x12\x37.google.cloud.baremetalsolution.v2.UpdateNetworkRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07Network\x12\x11OperationMetadata\xda\x41\x13network,update_mask\x82\xd3\xe4\x93\x02?24/v2/{network.name=projects/*/locations/*/networks/*}:\x07network\x12\xf4\x01\n\x14\x43reateVolumeSnapshot\x12>.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest\x1a\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\"i\xda\x41\x16parent,volume_snapshot\x82\xd3\xe4\x93\x02J\"7/v2/{parent=projects/*/locations/*/volumes/*}/snapshots:\x0fvolume_snapshot\x12\x95\x02\n\x15RestoreVolumeSnapshot\x12?.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41#\n\x0eVolumeSnapshot\x12\x11OperationMetadata\xda\x41\x0fvolume_snapshot\x82\xd3\xe4\x93\x02]\"X/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot:\x01*\x12\xb6\x01\n\x14\x44\x65leteVolumeSnapshot\x12>.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}\x12\xcb\x01\n\x11GetVolumeSnapshot\x12;.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest\x1a\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}\x12\xde\x01\n\x13ListVolumeSnapshots\x12=.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest\x1a>.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{parent=projects/*/locations/*/volumes/*}/snapshots\x12\xa5\x01\n\x06GetLun\x12\x30.google.cloud.baremetalsolution.v2.GetLunRequest\x1a&.google.cloud.baremetalsolution.v2.Lun\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{name=projects/*/locations/*/volumes/*/luns/*}\x12\xb8\x01\n\x08ListLuns\x12\x32.google.cloud.baremetalsolution.v2.ListLunsRequest\x1a\x33.google.cloud.baremetalsolution.v2.ListLunsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{parent=projects/*/locations/*/volumes/*}/luns\x12\xd6\x01\n\x08\x45victLun\x12\x32.google.cloud.baremetalsolution.v2.EvictLunRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v2/{name=projects/*/locations/*/volumes/*/luns/*}:evict:\x01*\x12\xaf\x01\n\x0bGetNfsShare\x12\x35.google.cloud.baremetalsolution.v2.GetNfsShareRequest\x1a+.google.cloud.baremetalsolution.v2.NfsShare\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/nfsShares/*}\x12\xc2\x01\n\rListNfsShares\x12\x37.google.cloud.baremetalsolution.v2.ListNfsSharesRequest\x1a\x38.google.cloud.baremetalsolution.v2.ListNfsSharesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/nfsShares\x12\xee\x01\n\x0eUpdateNfsShare\x12\x38.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x1d\n\x08NfsShare\x12\x11OperationMetadata\xda\x41\x15nfs_share,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}:\tnfs_share\x12\xde\x01\n\x0e\x43reateNfsShare\x12\x38.google.cloud.baremetalsolution.v2.CreateNfsShareRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x1d\n\x08NfsShare\x12\x11OperationMetadata\xda\x41\x10parent,nfs_share\x82\xd3\xe4\x93\x02:\"-/v2/{parent=projects/*/locations/*}/nfsShares:\tnfs_share\x12\xcf\x01\n\x0eRenameNfsShare\x12\x38.google.cloud.baremetalsolution.v2.RenameNfsShareRequest\x1a+.google.cloud.baremetalsolution.v2.NfsShare\"V\xda\x41\x14name,new_nfsshare_id\x82\xd3\xe4\x93\x02\x39\"4/v2/{name=projects/*/locations/*/nfsShares/*}:rename:\x01*\x12\xd4\x01\n\x0e\x44\x65leteNfsShare\x12\x38.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/nfsShares/*}\x12\xe6\x01\n\x16ListProvisioningQuotas\x12@.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest\x1a\x41.google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v2/{parent=projects/*/locations/*}/provisioningQuotas\x12\x8b\x02\n\x18SubmitProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest\x1a\x43.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse\"f\xda\x41\x1aparent,provisioning_config\x82\xd3\xe4\x93\x02\x43\">/v2/{parent=projects/*/locations/*}/provisioningConfigs:submit:\x01*\x12\xd7\x01\n\x15GetProvisioningConfig\x12?.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/provisioningConfigs/*}\x12\x88\x02\n\x18\x43reateProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"q\xda\x41\x1aparent,provisioning_config\x82\xd3\xe4\x93\x02N\"7/v2/{parent=projects/*/locations/*}/provisioningConfigs:\x13provisioning_config\x12\xa2\x02\n\x18UpdateProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"\x8a\x01\xda\x41\x1fprovisioning_config,update_mask\x82\xd3\xe4\x93\x02\x62\x32K/v2/{provisioning_config.name=projects/*/locations/*/provisioningConfigs/*}:\x13provisioning_config\x12\xca\x01\n\rRenameNetwork\x12\x37.google.cloud.baremetalsolution.v2.RenameNetworkRequest\x1a*.google.cloud.baremetalsolution.v2.Network\"T\xda\x41\x13name,new_network_id\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/networks/*}:rename:\x01*\x12\xbe\x01\n\x0cListOSImages\x12\x36.google.cloud.baremetalsolution.v2.ListOSImagesRequest\x1a\x37.google.cloud.baremetalsolution.v2.ListOSImagesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/osImages\x1aT\xca\x41 baremetalsolution.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x02\n%com.google.cloud.baremetalsolution.v2B\x16\x42\x61reMetalSolutionProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.OperationMetadata").msgclass + ResetInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResetInstanceResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb new file mode 100644 index 000000000000..7a1a2a562afe --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb @@ -0,0 +1,154 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/baremetalsolution/v2/baremetalsolution.proto for package 'Google.Cloud.BareMetalSolution.V2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/baremetalsolution/v2/baremetalsolution_pb' + +module Google + module Cloud + module BareMetalSolution + module V2 + module BareMetalSolution + # Performs management operations on Bare Metal Solution servers. + # + # The `baremetalsolution.googleapis.com` service provides management + # capabilities for Bare Metal Solution servers. To access the API methods, you + # must assign Bare Metal Solution IAM roles containing the desired permissions + # to your staff in your Google Cloud project. You must also enable the Bare + # Metal Solution API. Once enabled, the methods act + # upon specific servers in your Bare Metal Solution environment. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.baremetalsolution.v2.BareMetalSolution' + + # List servers in a given project and location. + rpc :ListInstances, ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse + # Get details about a single server. + rpc :GetInstance, ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Google::Cloud::BareMetalSolution::V2::Instance + # Update details of a single server. + rpc :UpdateInstance, ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Google::Longrunning::Operation + # RenameInstance sets a new name for an instance. + # Use with caution, previous names become immediately invalidated. + rpc :RenameInstance, ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Google::Cloud::BareMetalSolution::V2::Instance + # Perform an ungraceful, hard reset on a server. Equivalent to shutting the + # power off and then turning it back on. + rpc :ResetInstance, ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Google::Longrunning::Operation + # Starts a server that was shutdown. + rpc :StartInstance, ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Google::Longrunning::Operation + # Stop a running server. + rpc :StopInstance, ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Google::Longrunning::Operation + # Enable the interactive serial console feature on an instance. + rpc :EnableInteractiveSerialConsole, ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Google::Longrunning::Operation + # Disable the interactive serial console feature on an instance. + rpc :DisableInteractiveSerialConsole, ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Google::Longrunning::Operation + # Detach LUN from Instance. + rpc :DetachLun, ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Google::Longrunning::Operation + # Lists the public SSH keys registered for the specified project. + # These SSH keys are used only for the interactive serial console feature. + rpc :ListSSHKeys, ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse + # Register a public SSH key in the specified project for use with the + # interactive serial console feature. + rpc :CreateSSHKey, ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Google::Cloud::BareMetalSolution::V2::SSHKey + # Deletes a public SSH key registered in the specified project. + rpc :DeleteSSHKey, ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Google::Protobuf::Empty + # List storage volumes in a given project and location. + rpc :ListVolumes, ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse + # Get details of a single storage volume. + rpc :GetVolume, ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Google::Cloud::BareMetalSolution::V2::Volume + # Update details of a single storage volume. + rpc :UpdateVolume, ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Google::Longrunning::Operation + # RenameVolume sets a new name for a volume. + # Use with caution, previous names become immediately invalidated. + rpc :RenameVolume, ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Google::Cloud::BareMetalSolution::V2::Volume + # Skips volume's cooloff and deletes it now. + # Volume must be in cooloff state. + rpc :EvictVolume, ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Google::Longrunning::Operation + # Emergency Volume resize. + rpc :ResizeVolume, ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Google::Longrunning::Operation + # List network in a given project and location. + rpc :ListNetworks, ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse + # List all Networks (and used IPs for each Network) in the vendor account + # associated with the specified project. + rpc :ListNetworkUsage, ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse + # Get details of a single network. + rpc :GetNetwork, ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Google::Cloud::BareMetalSolution::V2::Network + # Update details of a single network. + rpc :UpdateNetwork, ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Google::Longrunning::Operation + # Takes a snapshot of a boot volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + rpc :CreateVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot + # Uses the specified snapshot to restore its parent volume. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + rpc :RestoreVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Google::Longrunning::Operation + # Deletes a volume snapshot. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + rpc :DeleteVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Google::Protobuf::Empty + # Returns the specified snapshot resource. + # Returns INVALID_ARGUMENT if called for a non-boot volume. + rpc :GetVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot + # Retrieves the list of snapshots for the specified volume. + # Returns a response with an empty list of snapshots if called + # for a non-boot volume. + rpc :ListVolumeSnapshots, ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse + # Get details of a single storage logical unit number(LUN). + rpc :GetLun, ::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Google::Cloud::BareMetalSolution::V2::Lun + # List storage volume luns for given storage volume. + rpc :ListLuns, ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse + # Skips lun's cooloff and deletes it now. + # Lun must be in cooloff state. + rpc :EvictLun, ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Google::Longrunning::Operation + # Get details of a single NFS share. + rpc :GetNfsShare, ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Google::Cloud::BareMetalSolution::V2::NfsShare + # List NFS shares. + rpc :ListNfsShares, ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse + # Update details of a single NFS share. + rpc :UpdateNfsShare, ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Google::Longrunning::Operation + # Create an NFS share. + rpc :CreateNfsShare, ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Google::Longrunning::Operation + # RenameNfsShare sets a new name for an nfsshare. + # Use with caution, previous names become immediately invalidated. + rpc :RenameNfsShare, ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Google::Cloud::BareMetalSolution::V2::NfsShare + # Delete an NFS share. The underlying volume is automatically deleted. + rpc :DeleteNfsShare, ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Google::Longrunning::Operation + # List the budget details to provision resources on a given project. + rpc :ListProvisioningQuotas, ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse + # Submit a provisiong configuration for a given project. + rpc :SubmitProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse + # Get ProvisioningConfig by name. + rpc :GetProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig + # Create new ProvisioningConfig. + rpc :CreateProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig + # Update existing ProvisioningConfig. + rpc :UpdateProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig + # RenameNetwork sets a new name for a network. + # Use with caution, previous names become immediately invalidated. + rpc :RenameNetwork, ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Google::Cloud::BareMetalSolution::V2::Network + # Retrieves the list of OS images which are currently approved. + rpc :ListOSImages, ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb new file mode 100644 index 000000000000..6dcab60b7988 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/common.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/baremetalsolution/v2/common.proto\x12!google.cloud.baremetalsolution.v2*\xaa\x01\n\x15VolumePerformanceTier\x12\'\n#VOLUME_PERFORMANCE_TIER_UNSPECIFIED\x10\x00\x12\"\n\x1eVOLUME_PERFORMANCE_TIER_SHARED\x10\x01\x12$\n VOLUME_PERFORMANCE_TIER_ASSIGNED\x10\x02\x12\x1e\n\x1aVOLUME_PERFORMANCE_TIER_HT\x10\x03*l\n\x0fWorkloadProfile\x12 \n\x1cWORKLOAD_PROFILE_UNSPECIFIED\x10\x00\x12\x1c\n\x18WORKLOAD_PROFILE_GENERIC\x10\x01\x12\x19\n\x15WORKLOAD_PROFILE_HANA\x10\x02\x42\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0b\x43ommonProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + VolumePerformanceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumePerformanceTier").enummodule + WorkloadProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.WorkloadProfile").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb new file mode 100644 index 000000000000..a8f5ce8b427a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/instance.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/baremetalsolution/v2/common_pb' +require 'google/cloud/baremetalsolution/v2/lun_pb' +require 'google/cloud/baremetalsolution/v2/network_pb' +require 'google/cloud/baremetalsolution/v2/volume_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/baremetalsolution/v2/instance.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a+google/cloud/baremetalsolution/v2/lun.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a.google/cloud/baremetalsolution/v2/volume.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\t\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x0f\n\x02id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0cmachine_type\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x45\n\x05state\x18\x05 \x01(\x0e\x32\x31.google.cloud.baremetalsolution.v2.Instance.StateB\x03\xe0\x41\x03\x12\x1e\n\x16hyperthreading_enabled\x18\x06 \x01(\x08\x12G\n\x06labels\x18\x07 \x03(\x0b\x32\x37.google.cloud.baremetalsolution.v2.Instance.LabelsEntry\x12\x39\n\x04luns\x18\x08 \x03(\x0b\x32&.google.cloud.baremetalsolution.v2.LunB\x03\xe0\x41\x05\x12?\n\x07volumes\x18\x10 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.VolumeB\x03\xe0\x41\x04\x12\x41\n\x08networks\x18\t \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.NetworkB\x03\xe0\x41\x03\x12/\n\"interactive_serial_console_enabled\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12\x10\n\x08os_image\x18\x0c \x01(\t\x12\x10\n\x03pod\x18\r \x01(\tB\x03\xe0\x41\x05\x12U\n\x10network_template\x18\x0e \x01(\tB;\xfa\x41\x38\n6baremetalsolution.googleapis.com/ServerNetworkTemplate\x12O\n\x12logical_interfaces\x18\x0f \x03(\x0b\x32\x33.google.cloud.baremetalsolution.v2.LogicalInterface\x12\x17\n\nlogin_info\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12L\n\x10workload_profile\x18\x12 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.WorkloadProfile\x12\x1d\n\x10\x66irmware_version\x18\x13 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x82\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08STARTING\x10\x05\x12\x0c\n\x08STOPPING\x10\x06\x12\x0c\n\x08SHUTDOWN\x10\x07:l\xea\x41i\n)baremetalsolution.googleapis.com/Instance\x12\n\tinstances\x18\x01 \x03(\x0b\x32+.google.cloud.baremetalsolution.v2.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8c\x01\n\x15UpdateInstanceRequest\x12\x42\n\x08instance\x18\x01 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.InstanceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x15RenameInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x1c\n\x0fnew_instance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"W\n\x14ResetInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"W\n\x14StartInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"\x17\n\x15StartInstanceResponse\"V\n\x13StopInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"\x16\n\x14StopInstanceResponse\"h\n%EnableInteractiveSerialConsoleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"(\n&EnableInteractiveSerialConsoleResponse\"i\n&DisableInteractiveSerialConsoleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\")\n\'DisableInteractiveSerialConsoleResponse\"\xa7\x01\n\x10\x44\x65tachLunRequest\x12\x43\n\x08instance\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x39\n\x03lun\x18\x02 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/Lun\x12\x13\n\x0bskip_reboot\x18\x03 \x01(\x08\"\xac\x04\n\x15ServerNetworkTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12!\n\x19\x61pplicable_instance_types\x18\x02 \x03(\t\x12\x65\n\x12logical_interfaces\x18\x03 \x03(\x0b\x32I.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface\x1a\xdd\x01\n\x10LogicalInterface\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x65\n\x04type\x18\x02 \x01(\x0e\x32W.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType\x12\x10\n\x08required\x18\x03 \x01(\x08\"B\n\rInterfaceType\x12\x1e\n\x1aINTERFACE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OND\x10\x01\x12\x07\n\x03NIC\x10\x02:\x95\x01\xea\x41\x91\x01\n6baremetalsolution.googleapis.com/ServerNetworkTemplate\x12Wprojects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}B\xfc\x01\n%com.google.cloud.baremetalsolution.v2B\rInstanceProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Instance").msgclass + Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Instance.State").enummodule + GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetInstanceRequest").msgclass + ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListInstancesRequest").msgclass + ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListInstancesResponse").msgclass + UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateInstanceRequest").msgclass + RenameInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameInstanceRequest").msgclass + ResetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResetInstanceRequest").msgclass + StartInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StartInstanceRequest").msgclass + StartInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StartInstanceResponse").msgclass + StopInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StopInstanceRequest").msgclass + StopInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StopInstanceResponse").msgclass + EnableInteractiveSerialConsoleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest").msgclass + EnableInteractiveSerialConsoleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse").msgclass + DisableInteractiveSerialConsoleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest").msgclass + DisableInteractiveSerialConsoleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse").msgclass + DetachLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DetachLunRequest").msgclass + ServerNetworkTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate").msgclass + ServerNetworkTemplate::LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface").msgclass + ServerNetworkTemplate::LogicalInterface::InterfaceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb new file mode 100644 index 000000000000..36f0a6678470 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/lun.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n+google/cloud/baremetalsolution/v2/lun.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdd\x06\n\x03Lun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\n \x01(\t\x12;\n\x05state\x18\x02 \x01(\x0e\x32,.google.cloud.baremetalsolution.v2.Lun.State\x12\x0f\n\x07size_gb\x18\x03 \x01(\x03\x12T\n\x12multiprotocol_type\x18\x04 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType\x12\x44\n\x0estorage_volume\x18\x05 \x01(\tB,\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tshareable\x18\x06 \x01(\x08\x12\x10\n\x08\x62oot_lun\x18\x07 \x01(\x08\x12H\n\x0cstorage_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.Lun.StorageType\x12\x0c\n\x04wwid\x18\t \x01(\t\x12\x34\n\x0b\x65xpire_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x0c \x03(\tB1\xe0\x41\x03\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\t\n\x05READY\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0c\n\x08\x43OOL_OFF\x10\x05\"B\n\x11MultiprotocolType\x12\"\n\x1eMULTIPROTOCOL_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05LINUX\x10\x01\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02:n\xea\x41k\n$baremetalsolution.googleapis.com/Lun\x12\x43projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}\"K\n\rGetLunRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/Lun\"y\n\x0fListLunsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"v\n\x10ListLunsResponse\x12\x34\n\x04luns\x18\x01 \x03(\x0b\x32&.google.cloud.baremetalsolution.v2.Lun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x0f\x45victLunRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/LunB\xf7\x01\n%com.google.cloud.baremetalsolution.v2B\x08LunProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + Lun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun").msgclass + Lun::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.State").enummodule + Lun::MultiprotocolType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.MultiprotocolType").enummodule + Lun::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.StorageType").enummodule + GetLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetLunRequest").msgclass + ListLunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListLunsRequest").msgclass + ListLunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListLunsResponse").msgclass + EvictLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EvictLunRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb new file mode 100644 index 000000000000..309def4c477c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/network.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n/google/cloud/baremetalsolution/v2/network.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa8\x07\n\x07Network\x12\x11\n\x04name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\n \x01(\t\x12=\n\x04type\x18\x02 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Network.Type\x12\x12\n\nip_address\x18\x03 \x01(\t\x12\x13\n\x0bmac_address\x18\x04 \x03(\t\x12?\n\x05state\x18\x06 \x01(\x0e\x32\x30.google.cloud.baremetalsolution.v2.Network.State\x12\x0f\n\x07vlan_id\x18\x07 \x01(\t\x12\x0c\n\x04\x63idr\x18\x08 \x01(\t\x12\x33\n\x03vrf\x18\t \x01(\x0b\x32&.google.cloud.baremetalsolution.v2.VRF\x12\x46\n\x06labels\x18\x0b \x03(\x0b\x32\x36.google.cloud.baremetalsolution.v2.Network.LabelsEntry\x12\x15\n\rservices_cidr\x18\x0c \x01(\t\x12R\n\x0creservations\x18\r \x03(\x0b\x32<.google.cloud.baremetalsolution.v2.NetworkAddressReservation\x12\x10\n\x03pod\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12O\n\x0cmount_points\x18\x0f \x03(\x0b\x32\x34.google.cloud.baremetalsolution.v2.NetworkMountPointB\x03\xe0\x41\x04\x12\x1c\n\x14jumbo_frames_enabled\x18\x10 \x01(\x08\x12\x17\n\ngateway_ip\x18\x11 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\"c\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0f\n\x0bPROVISIONED\x10\x02\x12\x12\n\x0e\x44\x45PROVISIONING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04:i\xea\x41\x66\n(baremetalsolution.googleapis.com/Network\x12:projects/{project}/locations/{location}/networks/{network}\"U\n\x19NetworkAddressReservation\x12\x15\n\rstart_address\x18\x01 \x01(\t\x12\x13\n\x0b\x65nd_address\x18\x02 \x01(\t\x12\x0c\n\x04note\x18\x03 \x01(\t\"\xe5\x04\n\x03VRF\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x05state\x18\x05 \x01(\x0e\x32,.google.cloud.baremetalsolution.v2.VRF.State\x12\x44\n\nqos_policy\x18\x06 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.VRF.QosPolicy\x12O\n\x10vlan_attachments\x18\x07 \x03(\x0b\x32\x35.google.cloud.baremetalsolution.v2.VRF.VlanAttachment\x1a#\n\tQosPolicy\x12\x16\n\x0e\x62\x61ndwidth_gbps\x18\x01 \x01(\x01\x1a\x93\x02\n\x0eVlanAttachment\x12\x14\n\x0cpeer_vlan_id\x18\x01 \x01(\x03\x12\x0f\n\x07peer_ip\x18\x02 \x01(\t\x12\x11\n\trouter_ip\x18\x03 \x01(\t\x12\x18\n\x0bpairing_key\x18\x04 \x01(\tB\x03\xe0\x41\x04\x12\x44\n\nqos_policy\x18\x05 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.VRF.QosPolicy\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x05\x12V\n\x17interconnect_attachment\x18\x07 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-compute.googleapis.com/InterconnectAttachment\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0f\n\x0bPROVISIONED\x10\x02\"\xdb\x02\n\x10LogicalInterface\x12o\n\x1alogical_network_interfaces\x18\x01 \x03(\x0b\x32K.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1b\n\x0finterface_index\x18\x03 \x01(\x05\x42\x02\x18\x01\x1a\xaa\x01\n\x17LogicalNetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nip_address\x18\x02 \x01(\t\x12\x17\n\x0f\x64\x65\x66\x61ult_gateway\x18\x03 \x01(\x08\x12\x45\n\x0cnetwork_type\x18\x04 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Network.Type\x12\n\n\x02id\x18\x05 \x01(\t\"S\n\x11GetNetworkRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(baremetalsolution.googleapis.com/Network\"\x87\x01\n\x13ListNetworksRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x82\x01\n\x14ListNetworksResponse\x12<\n\x08networks\x18\x01 \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.Network\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x89\x01\n\x14UpdateNetworkRequest\x12@\n\x07network\x18\x01 \x01(\x0b\x32*.google.cloud.baremetalsolution.v2.NetworkB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"]\n\x0cNetworkUsage\x12;\n\x07network\x18\x01 \x01(\x0b\x32*.google.cloud.baremetalsolution.v2.Network\x12\x10\n\x08used_ips\x18\x02 \x03(\t\"V\n\x17ListNetworkUsageRequest\x12;\n\x08location\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"]\n\x18ListNetworkUsageResponse\x12\x41\n\x08networks\x18\x01 \x03(\x0b\x32/.google.cloud.baremetalsolution.v2.NetworkUsage\"\x9d\x01\n\x11NetworkMountPoint\x12@\n\x08instance\x18\x01 \x01(\tB.\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x19\n\x11logical_interface\x18\x02 \x01(\t\x12\x17\n\x0f\x64\x65\x66\x61ult_gateway\x18\x03 \x01(\x08\x12\x12\n\nip_address\x18\x04 \x01(\t\"s\n\x14RenameNetworkRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(baremetalsolution.googleapis.com/Network\x12\x1b\n\x0enew_network_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x85\x03\n%com.google.cloud.baremetalsolution.v2B\x0cNetworkProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2\xea\x41\x86\x01\n-compute.googleapis.com/InterconnectAttachment\x12Uprojects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network").msgclass + Network::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.Type").enummodule + Network::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.State").enummodule + NetworkAddressReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkAddressReservation").msgclass + VRF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF").msgclass + VRF::QosPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.QosPolicy").msgclass + VRF::VlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.VlanAttachment").msgclass + VRF::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.State").enummodule + LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface").msgclass + LogicalInterface::LogicalNetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface").msgclass + GetNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNetworkRequest").msgclass + ListNetworksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksRequest").msgclass + ListNetworksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksResponse").msgclass + UpdateNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNetworkRequest").msgclass + NetworkUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkUsage").msgclass + ListNetworkUsageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageRequest").msgclass + ListNetworkUsageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageResponse").msgclass + NetworkMountPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkMountPoint").msgclass + RenameNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameNetworkRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb new file mode 100644 index 000000000000..2039cd5c0463 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/nfs_share.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n1google/cloud/baremetalsolution/v2/nfs_share.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x9d\t\n\x08NfsShare\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0cnfs_share_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x03 \x01(\x0e\x32\x31.google.cloud.baremetalsolution.v2.NfsShare.StateB\x03\xe0\x41\x03\x12?\n\x06volume\x18\x04 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12R\n\x0f\x61llowed_clients\x18\x05 \x03(\x0b\x32\x39.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient\x12G\n\x06labels\x18\x06 \x03(\x0b\x32\x37.google.cloud.baremetalsolution.v2.NfsShare.LabelsEntry\x12\x1a\n\x12requested_size_gib\x18\x07 \x01(\x03\x12R\n\x0cstorage_type\x18\t \x01(\x0e\x32\x37.google.cloud.baremetalsolution.v2.NfsShare.StorageTypeB\x03\xe0\x41\x05\x1a\xb3\x02\n\rAllowedClient\x12>\n\x07network\x18\x01 \x01(\tB-\xfa\x41*\n(baremetalsolution.googleapis.com/Network\x12\x15\n\x08share_ip\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x61llowed_clients_cidr\x18\x03 \x01(\t\x12W\n\x11mount_permissions\x18\x04 \x01(\x0e\x32<.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions\x12\x11\n\tallow_dev\x18\x05 \x01(\x08\x12\x12\n\nallow_suid\x18\x06 \x01(\x08\x12\x16\n\x0eno_root_squash\x18\x07 \x01(\x08\x12\x15\n\x08nfs_path\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROVISIONED\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"O\n\x10MountPermissions\x12!\n\x1dMOUNT_PERMISSIONS_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02:m\xea\x41j\n)baremetalsolution.googleapis.com/NFSShare\x12=projects/{project}/locations/{location}/nfsShares/{nfs_share}\"U\n\x12GetNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShare\"\x88\x01\n\x14ListNfsSharesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x86\x01\n\x15ListNfsSharesResponse\x12?\n\nnfs_shares\x18\x01 \x03(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShare\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8d\x01\n\x15UpdateNfsShareRequest\x12\x43\n\tnfs_share\x18\x01 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShareB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x15RenameNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShare\x12\x1c\n\x0fnew_nfsshare_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n\x15\x43reateNfsShareRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\tnfs_share\x18\x02 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShareB\x03\xe0\x41\x02\"X\n\x15\x44\x65leteNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShareB\xfc\x01\n%com.google.cloud.baremetalsolution.v2B\rNfsShareProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + NfsShare = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare").msgclass + NfsShare::AllowedClient = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.AllowedClient").msgclass + NfsShare::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.State").enummodule + NfsShare::MountPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.MountPermissions").enummodule + NfsShare::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.StorageType").enummodule + GetNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNfsShareRequest").msgclass + ListNfsSharesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesRequest").msgclass + ListNfsSharesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesResponse").msgclass + UpdateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNfsShareRequest").msgclass + RenameNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameNfsShareRequest").msgclass + CreateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateNfsShareRequest").msgclass + DeleteNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteNfsShareRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb new file mode 100644 index 000000000000..2d966313407d --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/osimage.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n/google/cloud/baremetalsolution/v2/osimage.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x86\x02\n\x07OSImage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12!\n\x19\x61pplicable_instance_types\x18\x04 \x03(\t\x12#\n\x1bsupported_network_templates\x18\x05 \x03(\t:}\xea\x41z\n(baremetalsolution.googleapis.com/OsImage\x12;projects/{project}/locations/{location}/osImages/{os_image}*\x08osImages2\x07osImage\"w\n\x13ListOSImagesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n\x14ListOSImagesResponse\x12=\n\tos_images\x18\x01 \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.OSImage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xfb\x01\n%com.google.cloud.baremetalsolution.v2B\x0cOsImageProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + OSImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.OSImage").msgclass + ListOSImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListOSImagesRequest").msgclass + ListOSImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListOSImagesResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb new file mode 100644 index 000000000000..9167b7547176 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/provisioning.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/baremetalsolution/v2/common_pb' +require 'google/cloud/baremetalsolution/v2/network_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/baremetalsolution/v2/provisioning.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x12ProvisioningConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x02 \x03(\x0b\x32\x31.google.cloud.baremetalsolution.v2.InstanceConfig\x12\x42\n\x08networks\x18\x03 \x03(\x0b\x32\x30.google.cloud.baremetalsolution.v2.NetworkConfig\x12@\n\x07volumes\x18\x04 \x03(\x0b\x32/.google.cloud.baremetalsolution.v2.VolumeConfig\x12\x11\n\tticket_id\x18\x05 \x01(\t\x12 \n\x18handover_service_account\x18\x06 \x01(\t\x12\x11\n\x05\x65mail\x18\x07 \x01(\tB\x02\x18\x01\x12O\n\x05state\x18\x08 \x01(\x0e\x32;.google.cloud.baremetalsolution.v2.ProvisioningConfig.StateB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11\x63loud_console_uri\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0evpc_sc_enabled\x18\x0c \x01(\x08\x12\x16\n\x0estatus_message\x18\r \x01(\t\x12\x16\n\tcustom_id\x18\x0e \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\r\n\tSUBMITTED\x10\x02\x12\x10\n\x0cPROVISIONING\x10\x03\x12\x0f\n\x0bPROVISIONED\x10\x04\x12\r\n\tVALIDATED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07:\x8c\x01\xea\x41\x88\x01\n3baremetalsolution.googleapis.com/ProvisioningConfig\x12Qprojects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}\"\xc9\x01\n\x1fSubmitProvisioningConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12W\n\x13provisioning_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\"v\n SubmitProvisioningConfigResponse\x12R\n\x13provisioning_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"\xe7\x04\n\x11ProvisioningQuota\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12R\n\nasset_type\x18\x02 \x01(\x0e\x32>.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType\x12\x13\n\x0bgcp_service\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x17\n\x0f\x61vailable_count\x18\x05 \x01(\x05\x12J\n\x0einstance_quota\x18\x06 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.InstanceQuotaH\x00\x12\x16\n\x0cserver_count\x18\x07 \x01(\x03H\x01\x12\x1b\n\x11network_bandwidth\x18\x08 \x01(\x03H\x01\x12\x15\n\x0bstorage_gib\x18\t \x01(\x03H\x01\"n\n\tAssetType\x12\x1a\n\x16\x41SSET_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41SSET_TYPE_SERVER\x10\x01\x12\x16\n\x12\x41SSET_TYPE_STORAGE\x10\x02\x12\x16\n\x12\x41SSET_TYPE_NETWORK\x10\x03:\x89\x01\xea\x41\x85\x01\n2baremetalsolution.googleapis.com/ProvisioningQuota\x12Oprojects/{project}/locations/{location}/provisioningQuotas/{provisioning_quota}B\x07\n\x05quotaB\x0e\n\x0c\x61vailability\"\x81\x01\n\x1dListProvisioningQuotasRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8c\x01\n\x1eListProvisioningQuotasResponse\x12Q\n\x13provisioning_quotas\x18\x01 \x03(\x0b\x32\x34.google.cloud.baremetalsolution.v2.ProvisioningQuota\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe3\x06\n\x0eInstanceConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x15\n\rinstance_type\x18\x03 \x01(\t\x12\x16\n\x0ehyperthreading\x18\x04 \x01(\x08\x12\x10\n\x08os_image\x18\x05 \x01(\t\x12\\\n\x0e\x63lient_network\x18\x06 \x01(\x0b\x32@.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressB\x02\x18\x01\x12]\n\x0fprivate_network\x18\x07 \x01(\x0b\x32@.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressB\x02\x18\x01\x12\x11\n\tuser_note\x18\x08 \x01(\t\x12 \n\x18\x61\x63\x63ount_networks_enabled\x18\t \x01(\x08\x12W\n\x0enetwork_config\x18\n \x01(\x0e\x32?.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig\x12\x18\n\x10network_template\x18\x0b \x01(\t\x12O\n\x12logical_interfaces\x18\x0c \x03(\x0b\x32\x33.google.cloud.baremetalsolution.v2.LogicalInterface\x12\x15\n\rssh_key_names\x18\r \x03(\t\x1aR\n\x0eNetworkAddress\x12\x12\n\nnetwork_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x1b\n\x13\x65xisting_network_id\x18\x03 \x01(\t\"O\n\rNetworkConfig\x12\x1d\n\x19NETWORKCONFIG_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSINGLE_VLAN\x10\x01\x12\x0e\n\nMULTI_VLAN\x10\x02:\x7f\xea\x41|\n/baremetalsolution.googleapis.com/InstanceConfig\x12Iprojects/{project}/locations/{location}/instanceConfigs/{instance_config}\"\xf6\x08\n\x0cVolumeConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x19\n\x11snapshots_enabled\x18\x03 \x01(\x08\x12\x42\n\x04type\x18\x04 \x01(\x0e\x32\x34.google.cloud.baremetalsolution.v2.VolumeConfig.Type\x12J\n\x08protocol\x18\x05 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol\x12\x0f\n\x07size_gb\x18\x06 \x01(\x05\x12L\n\nlun_ranges\x18\x07 \x03(\x0b\x32\x38.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange\x12\x13\n\x0bmachine_ids\x18\x08 \x03(\t\x12N\n\x0bnfs_exports\x18\t \x03(\x0b\x32\x39.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport\x12\x11\n\tuser_note\x18\n \x01(\t\x12\x13\n\x0bgcp_service\x18\x0b \x01(\t\x12R\n\x10performance_tier\x18\x0c \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumePerformanceTier\x1a-\n\x08LunRange\x12\x10\n\x08quantity\x18\x01 \x01(\x05\x12\x0f\n\x07size_gb\x18\x02 \x01(\x05\x1a\xb5\x02\n\tNfsExport\x12\x12\n\nnetwork_id\x18\x01 \x01(\t\x12\x14\n\nmachine_id\x18\x02 \x01(\tH\x00\x12\x0e\n\x04\x63idr\x18\x03 \x01(\tH\x00\x12Z\n\x0bpermissions\x18\x04 \x01(\x0e\x32\x45.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions\x12\x16\n\x0eno_root_squash\x18\x05 \x01(\x08\x12\x12\n\nallow_suid\x18\x06 \x01(\x08\x12\x11\n\tallow_dev\x18\x07 \x01(\x08\"I\n\x0bPermissions\x12\x1b\n\x17PERMISSIONS_UNSPECIFIED\x10\x00\x12\r\n\tREAD_ONLY\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\x42\x08\n\x06\x63lient\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x46LASH\x10\x01\x12\x08\n\x04\x44ISK\x10\x02\"G\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROTOCOL_FC\x10\x01\x12\x10\n\x0cPROTOCOL_NFS\x10\x02:y\xea\x41v\n-baremetalsolution.googleapis.com/VolumeConfig\x12\x45projects/{project}/locations/{location}/volumeConfigs/{volume_config}\"\x9b\x07\n\rNetworkConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x43\n\x04type\x18\x03 \x01(\x0e\x32\x35.google.cloud.baremetalsolution.v2.NetworkConfig.Type\x12M\n\tbandwidth\x18\x04 \x01(\x0e\x32:.google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth\x12_\n\x10vlan_attachments\x18\x05 \x03(\x0b\x32\x45.google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment\x12\x0c\n\x04\x63idr\x18\x06 \x01(\t\x12R\n\x0cservice_cidr\x18\x07 \x01(\x0e\x32<.google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr\x12\x11\n\tuser_note\x18\x08 \x01(\t\x12\x13\n\x0bgcp_service\x18\t \x01(\t\x12\x19\n\x11vlan_same_project\x18\n \x01(\x08\x12\x1c\n\x14jumbo_frames_enabled\x18\x0b \x01(\x08\x1a\x37\n\x14IntakeVlanAttachment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bpairing_key\x18\x02 \x01(\t\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\"c\n\tBandwidth\x12\x19\n\x15\x42\x41NDWIDTH_UNSPECIFIED\x10\x00\x12\r\n\tBW_1_GBPS\x10\x01\x12\r\n\tBW_2_GBPS\x10\x02\x12\r\n\tBW_5_GBPS\x10\x03\x12\x0e\n\nBW_10_GBPS\x10\x04\"`\n\x0bServiceCidr\x12\x1c\n\x18SERVICE_CIDR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07HIGH_26\x10\x02\x12\x0b\n\x07HIGH_27\x10\x03\x12\x0b\n\x07HIGH_28\x10\x04:|\xea\x41y\n.baremetalsolution.googleapis.com/NetworkConfig\x12Gprojects/{project}/locations/{location}/networkConfigs/{network_config}\"\x83\x02\n\rInstanceQuota\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\rinstance_type\x18\x02 \x01(\tB\x02\x18\x01\x12\x13\n\x0bgcp_service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12\x1f\n\x17\x61vailable_machine_count\x18\x04 \x01(\x05:|\xea\x41y\n.baremetalsolution.googleapis.com/InstanceQuota\x12Gprojects/{project}/locations/{location}/instanceQuotas/{instance_quota}\"i\n\x1cGetProvisioningConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3baremetalsolution.googleapis.com/ProvisioningConfig\"\xc9\x01\n\x1f\x43reateProvisioningConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12W\n\x13provisioning_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x1fUpdateProvisioningConfigRequest\x12W\n\x13provisioning_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x80\x02\n%com.google.cloud.baremetalsolution.v2B\x11ProvisioningProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + ProvisioningConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningConfig").msgclass + ProvisioningConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningConfig.State").enummodule + SubmitProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest").msgclass + SubmitProvisioningConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse").msgclass + ProvisioningQuota = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningQuota").msgclass + ProvisioningQuota::AssetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType").enummodule + ListProvisioningQuotasRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest").msgclass + ListProvisioningQuotasResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse").msgclass + InstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig").msgclass + InstanceConfig::NetworkAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress").msgclass + InstanceConfig::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig").enummodule + VolumeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig").msgclass + VolumeConfig::LunRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.LunRange").msgclass + VolumeConfig::NfsExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport").msgclass + VolumeConfig::NfsExport::Permissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions").enummodule + VolumeConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.Type").enummodule + VolumeConfig::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.Protocol").enummodule + NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig").msgclass + NetworkConfig::IntakeVlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment").msgclass + NetworkConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.Type").enummodule + NetworkConfig::Bandwidth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth").enummodule + NetworkConfig::ServiceCidr = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr").enummodule + InstanceQuota = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceQuota").msgclass + GetProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest").msgclass + CreateProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest").msgclass + UpdateProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb new file mode 100644 index 000000000000..47a5792e89d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/ssh_key.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n/google/cloud/baremetalsolution/v2/ssh_key.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x06SSHKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\npublic_key\x18\x02 \x01(\t:g\xea\x41\x64\n\'baremetalsolution.googleapis.com/SshKey\x12\x39projects/{project}/locations/{location}/sshKeys/{ssh_key}\"v\n\x12ListSSHKeysRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x13ListSSHKeysResponse\x12;\n\x08ssh_keys\x18\x01 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.SSHKey\x12\x17\n\x0fnext_page_token\x18Z \x01(\t\"\xaa\x01\n\x13\x43reateSSHKeyRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12?\n\x07ssh_key\x18\x02 \x01(\x0b\x32).google.cloud.baremetalsolution.v2.SSHKeyB\x03\xe0\x41\x02\x12\x17\n\nssh_key_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"T\n\x13\x44\x65leteSSHKeyRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/SshKeyB\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0bSshKeyProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + SSHKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SSHKey").msgclass + ListSSHKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListSSHKeysRequest").msgclass + ListSSHKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListSSHKeysResponse").msgclass + CreateSSHKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateSSHKeyRequest").msgclass + DeleteSSHKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb new file mode 100644 index 000000000000..1456dbe6e009 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/volume.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/baremetalsolution/v2/common_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/baremetalsolution/v2/volume.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xec\x0e\n\x06Volume\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x0b \x01(\t\x12K\n\x0cstorage_type\x18\x02 \x01(\x0e\x32\x35.google.cloud.baremetalsolution.v2.Volume.StorageType\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Volume.State\x12\x1a\n\x12requested_size_gib\x18\x04 \x01(\x03\x12%\n\x1doriginally_requested_size_gib\x18\x10 \x01(\x03\x12\x18\n\x10\x63urrent_size_gib\x18\x05 \x01(\x03\x12\x1a\n\x12\x65mergency_size_gib\x18\x0e \x01(\x03\x12\x14\n\x0cmax_size_gib\x18\x11 \x01(\x03\x12\x1b\n\x13\x61uto_grown_size_gib\x18\x06 \x01(\x03\x12\x1b\n\x13remaining_space_gib\x18\x07 \x01(\x03\x12h\n\x1bsnapshot_reservation_detail\x18\x08 \x01(\x0b\x32\x43.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail\x12k\n\x1dsnapshot_auto_delete_behavior\x18\t \x01(\x0e\x32\x44.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior\x12\x45\n\x06labels\x18\x0c \x03(\x0b\x32\x35.google.cloud.baremetalsolution.v2.Volume.LabelsEntry\x12\x18\n\x10snapshot_enabled\x18\r \x01(\x08\x12\x10\n\x03pod\x18\x0f \x01(\tB\x03\xe0\x41\x05\x12I\n\x08protocol\x18\x12 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.Volume.ProtocolB\x03\xe0\x41\x03\x12\x18\n\x0b\x62oot_volume\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x10performance_tier\x18\x14 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumePerformanceTierB\x03\xe0\x41\x05\x12\x12\n\x05notes\x18\x15 \x01(\tB\x03\xe0\x41\x04\x12S\n\x10workload_profile\x18\x16 \x01(\x0e\x32\x39.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile\x12\x34\n\x0b\x65xpire_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x19 \x03(\tB1\xe0\x41\x03\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x15\n\x08\x61ttached\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x1a\xa2\x01\n\x19SnapshotReservationDetail\x12\x1a\n\x12reserved_space_gib\x18\x01 \x01(\x03\x12#\n\x1breserved_space_used_percent\x18\x02 \x01(\x05\x12$\n\x1creserved_space_remaining_gib\x18\x03 \x01(\x03\x12\x1e\n\x16reserved_space_percent\x18\x04 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08\x43OOL_OFF\x10\x05\"}\n\x1aSnapshotAutoDeleteBehavior\x12-\n)SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x10\n\x0cOLDEST_FIRST\x10\x02\x12\x10\n\x0cNEWEST_FIRST\x10\x03\"@\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x11\n\rFIBRE_CHANNEL\x10\x01\x12\x07\n\x03NFS\x10\x02\"J\n\x0fWorkloadProfile\x12 \n\x1cWORKLOAD_PROFILE_UNSPECIFIED\x10\x00\x12\x0b\n\x07GENERIC\x10\x01\x12\x08\n\x04HANA\x10\x02:f\xea\x41\x63\n\'baremetalsolution.googleapis.com/Volume\x12\x38projects/{project}/locations/{location}/volumes/{volume}\"Q\n\x10GetVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\"\x86\x01\n\x12ListVolumesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x7f\n\x13ListVolumesResponse\x12:\n\x07volumes\x18\x01 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.Volume\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x86\x01\n\x13UpdateVolumeRequest\x12>\n\x06volume\x18\x01 \x01(\x0b\x32).google.cloud.baremetalsolution.v2.VolumeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"p\n\x13RenameVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x1a\n\rnew_volume_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"S\n\x12\x45victVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\"h\n\x13ResizeVolumeRequest\x12?\n\x06volume\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x10\n\x08size_gib\x18\x02 \x01(\x03\x42\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0bVolumeProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume").msgclass + Volume::SnapshotReservationDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail").msgclass + Volume::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.StorageType").enummodule + Volume::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.State").enummodule + Volume::SnapshotAutoDeleteBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior").enummodule + Volume::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.Protocol").enummodule + Volume::WorkloadProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.WorkloadProfile").enummodule + GetVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeRequest").msgclass + ListVolumesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesRequest").msgclass + ListVolumesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesResponse").msgclass + UpdateVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateVolumeRequest").msgclass + RenameVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameVolumeRequest").msgclass + EvictVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EvictVolumeRequest").msgclass + ResizeVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResizeVolumeRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb new file mode 100644 index 000000000000..6dfa4dbe4766 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/baremetalsolution/v2/volume_snapshot.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n7google/cloud/baremetalsolution/v2/volume_snapshot.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\x03\n\x0eVolumeSnapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x0estorage_volume\x18\x05 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12Q\n\x04type\x18\x07 \x01(\x0e\x32>.google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotTypeB\x03\xe0\x41\x03\"H\n\x0cSnapshotType\x12\x1d\n\x19SNAPSHOT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x44_HOC\x10\x01\x12\r\n\tSCHEDULED\x10\x02:\x84\x01\xea\x41\x80\x01\n/baremetalsolution.googleapis.com/VolumeSnapshot\x12Mprojects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}\"a\n\x18GetVolumeSnapshotRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshot\"\x84\x01\n\x1aListVolumeSnapshotsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1bListVolumeSnapshotsResponse\x12K\n\x10volume_snapshots\x18\x01 \x03(\x0b\x32\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1b\x44\x65leteVolumeSnapshotRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshot\"\xaf\x01\n\x1b\x43reateVolumeSnapshotRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12O\n\x0fvolume_snapshot\x18\x02 \x01(\x0b\x32\x31.google.cloud.baremetalsolution.v2.VolumeSnapshotB\x03\xe0\x41\x02\"p\n\x1cRestoreVolumeSnapshotRequest\x12P\n\x0fvolume_snapshot\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshotB\x82\x02\n%com.google.cloud.baremetalsolution.v2B\x13VolumeSnapshotProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BareMetalSolution + module V2 + VolumeSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeSnapshot").msgclass + VolumeSnapshot::SnapshotType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType").enummodule + GetVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest").msgclass + ListVolumeSnapshotsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest").msgclass + ListVolumeSnapshotsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse").msgclass + DeleteVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest").msgclass + CreateVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest").msgclass + RestoreVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md new file mode 100644 index 000000000000..60e71df2a508 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Bare Metal Solution V2 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb new file mode 100644 index 000000000000..78d8f06ad169 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # Represents the metadata from a long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the action executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user requested the cancellation + # of the operation. Operations that have been successfully cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used with the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message from resetting a server. + class ResetInstanceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb new file mode 100644 index 000000000000..0213f58e1483 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # Performance tier of the Volume. + module VolumePerformanceTier + # Value is not specified. + VOLUME_PERFORMANCE_TIER_UNSPECIFIED = 0 + + # Regular volumes, shared aggregates. + VOLUME_PERFORMANCE_TIER_SHARED = 1 + + # Assigned aggregates. + VOLUME_PERFORMANCE_TIER_ASSIGNED = 2 + + # High throughput aggregates. + VOLUME_PERFORMANCE_TIER_HT = 3 + end + + # The possible values for a workload profile. + module WorkloadProfile + # The workload profile is in an unknown state. + WORKLOAD_PROFILE_UNSPECIFIED = 0 + + # The workload profile is generic. + WORKLOAD_PROFILE_GENERIC = 1 + + # The workload profile is hana. + WORKLOAD_PROFILE_HANA = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb new file mode 100644 index 000000000000..71f94868fea9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb @@ -0,0 +1,354 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A server. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of this `Instance`. + # Resource names are schemeless URIs that follow the conventions in + # https://cloud.google.com/apis/design/resource_names. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [r] id + # @return [::String] + # Output only. An identifier for the `Instance`, generated by the backend. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create a time stamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update a time stamp. + # @!attribute [rw] machine_type + # @return [::String] + # Immutable. The server type. + # [Available server + # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + # @!attribute [r] state + # @return [::Google::Cloud::BareMetalSolution::V2::Instance::State] + # Output only. The state of the server. + # @!attribute [rw] hyperthreading_enabled + # @return [::Boolean] + # True if you enable hyperthreading for the server, otherwise false. + # The default value is false. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] luns + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Lun>] + # Immutable. List of LUNs associated with this server. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Volume>] + # Input only. List of Volumes to attach to this Instance on creation. + # This field won't be populated in Get/List responses. + # @!attribute [r] networks + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Network>] + # Output only. List of networks associated with this server. + # @!attribute [r] interactive_serial_console_enabled + # @return [::Boolean] + # Output only. True if the interactive serial console feature is enabled for + # the instance, false otherwise. The default value is false. + # @!attribute [rw] os_image + # @return [::String] + # The OS image currently installed on the server. + # @!attribute [rw] pod + # @return [::String] + # Immutable. Pod name. + # Pod is an independent part of infrastructure. + # Instance can be connected to the assets (networks, volumes) allocated + # in the same pod only. + # @!attribute [rw] network_template + # @return [::String] + # Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. + # Generally, the template name follows the syntax of + # "bond" or "nic". + # @!attribute [rw] logical_interfaces + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface>] + # List of logical interfaces for the instance. The number of logical + # interfaces will be the same as number of hardware bond/nic on the chosen + # network template. For the non-multivlan configurations (for eg, existing + # servers) that use existing default network template (bondaa-bondaa), both + # the Instance.networks field and the Instance.logical_interfaces fields will + # be filled to ensure backward compatibility. For the others, only + # Instance.logical_interfaces will be filled. + # @!attribute [r] login_info + # @return [::String] + # Output only. Text field about info for logging in. + # @!attribute [rw] workload_profile + # @return [::Google::Cloud::BareMetalSolution::V2::WorkloadProfile] + # The workload profile for the instance. + # @!attribute [r] firmware_version + # @return [::String] + # Output only. The firmware version for the instance. + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible states for this server. + module State + # The server is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The server is being provisioned. + PROVISIONING = 1 + + # The server is running. + RUNNING = 2 + + # The server has been deleted. + DELETED = 3 + + # The server is being updated. + UPDATING = 4 + + # The server is starting. + STARTING = 5 + + # The server is stopping. + STOPPING = 6 + + # The server is shutdown. + SHUTDOWN = 7 + end + end + + # Message for requesting server information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of servers. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListInstancesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListInstancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the list of servers. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Instance>] + # The list of servers. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInstancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to updating a server. + # @!attribute [rw] instance + # @return [::Google::Cloud::BareMetalSolution::V2::Instance] + # Required. The server to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # The currently supported fields are: + # `labels` + # `hyperthreading_enabled` + # `os_image` + class UpdateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting rename of a server. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the instance. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] new_instance_id + # @return [::String] + # Required. The new `id` of the instance. + class RenameInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to reset a server. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class ResetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to start a server. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class StartInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message from starting a server. + class StartInstanceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to stop a server. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class StopInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message from stopping a server. + class StopInstanceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for enabling the interactive serial console on an instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class EnableInteractiveSerialConsoleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response of EnableInteractiveSerialConsole. + class EnableInteractiveSerialConsoleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for disabling the interactive serial console on an instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class DisableInteractiveSerialConsoleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response of DisableInteractiveSerialConsole. + class DisableInteractiveSerialConsoleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for detach specific LUN from an Instance. + # @!attribute [rw] instance + # @return [::String] + # Required. Name of the instance. + # @!attribute [rw] lun + # @return [::String] + # Required. Name of the Lun to detach. + # @!attribute [rw] skip_reboot + # @return [::Boolean] + # If true, performs lun unmapping without instance reboot. + class DetachLunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Network template. + # @!attribute [r] name + # @return [::String] + # Output only. Template's unique name. The full resource name follows the + # pattern: + # `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + # Generally, the \\{server_network_template} follows the syntax of + # "bond" or "nic". + # @!attribute [rw] applicable_instance_types + # @return [::Array<::String>] + # Instance types this template is applicable to. + # @!attribute [rw] logical_interfaces + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::ServerNetworkTemplate::LogicalInterface>] + # Logical interfaces. + class ServerNetworkTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Logical interface. + # @!attribute [rw] name + # @return [::String] + # Interface name. + # This is not a globally unique identifier. + # Name is unique only inside the ServerNetworkTemplate. This is of syntax + # or + # and forms part of the network template name. + # @!attribute [rw] type + # @return [::Google::Cloud::BareMetalSolution::V2::ServerNetworkTemplate::LogicalInterface::InterfaceType] + # Interface type. + # @!attribute [rw] required + # @return [::Boolean] + # If true, interface must have network connected. + class LogicalInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Interface type. + module InterfaceType + # Unspecified value. + INTERFACE_TYPE_UNSPECIFIED = 0 + + # Bond interface type. + BOND = 1 + + # NIC interface type. + NIC = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb new file mode 100644 index 000000000000..f7a9d2d4263b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A storage volume logical unit number (LUN). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the LUN. + # @!attribute [rw] id + # @return [::String] + # An identifier for the LUN, generated by the backend. + # @!attribute [rw] state + # @return [::Google::Cloud::BareMetalSolution::V2::Lun::State] + # The state of this storage volume. + # @!attribute [rw] size_gb + # @return [::Integer] + # The size of this LUN, in gigabytes. + # @!attribute [rw] multiprotocol_type + # @return [::Google::Cloud::BareMetalSolution::V2::Lun::MultiprotocolType] + # The LUN multiprotocol type ensures the characteristics of the LUN are + # optimized for each operating system. + # @!attribute [rw] storage_volume + # @return [::String] + # Display the storage volume for this LUN. + # @!attribute [rw] shareable + # @return [::Boolean] + # Display if this LUN can be shared between multiple physical servers. + # @!attribute [rw] boot_lun + # @return [::Boolean] + # Display if this LUN is a boot LUN. + # @!attribute [rw] storage_type + # @return [::Google::Cloud::BareMetalSolution::V2::Lun::StorageType] + # The storage type for this LUN. + # @!attribute [rw] wwid + # @return [::String] + # The WWID for this LUN. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time after which LUN will be fully deleted. + # It is filled only for LUNs in COOL_OFF state. + # @!attribute [r] instances + # @return [::Array<::String>] + # Output only. Instances this Lun is attached to. + class Lun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states for the LUN. + module State + # The LUN is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The LUN is being created. + CREATING = 1 + + # The LUN is being updated. + UPDATING = 2 + + # The LUN is ready for use. + READY = 3 + + # The LUN has been requested to be deleted. + DELETING = 4 + + # The LUN is in cool off state. It will be deleted after `expire_time`. + COOL_OFF = 5 + end + + # Display the operating systems present for the LUN multiprotocol type. + module MultiprotocolType + # Server has no OS specified. + MULTIPROTOCOL_TYPE_UNSPECIFIED = 0 + + # Server with Linux OS. + LINUX = 1 + end + + # The storage types for a LUN. + module StorageType + # The storage type for this LUN is unknown. + STORAGE_TYPE_UNSPECIFIED = 0 + + # This storage type for this LUN is SSD. + SSD = 1 + + # This storage type for this LUN is HDD. + HDD = 2 + end + end + + # Message for requesting storage lun information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetLunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of storage volume luns. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListLunsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + class ListLunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of storage volume luns. + # @!attribute [rw] luns + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Lun>] + # The list of luns. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for skip lun cooloff and delete it. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the lun. + class EvictLunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb new file mode 100644 index 000000000000..8448a21a3ceb --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb @@ -0,0 +1,379 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A Network. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of this `Network`. + # Resource names are schemeless URIs that follow the conventions in + # https://cloud.google.com/apis/design/resource_names. + # Format: + # `projects/{project}/locations/{location}/networks/{network}` + # @!attribute [rw] id + # @return [::String] + # An identifier for the `Network`, generated by the backend. + # @!attribute [rw] type + # @return [::Google::Cloud::BareMetalSolution::V2::Network::Type] + # The type of this network. + # @!attribute [rw] ip_address + # @return [::String] + # IP address configured. + # @!attribute [rw] mac_address + # @return [::Array<::String>] + # List of physical interfaces. + # @!attribute [rw] state + # @return [::Google::Cloud::BareMetalSolution::V2::Network::State] + # The Network state. + # @!attribute [rw] vlan_id + # @return [::String] + # The vlan id of the Network. + # @!attribute [rw] cidr + # @return [::String] + # The cidr of the Network. + # @!attribute [rw] vrf + # @return [::Google::Cloud::BareMetalSolution::V2::VRF] + # The vrf for the Network. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] services_cidr + # @return [::String] + # IP range for reserved for services (e.g. NFS). + # @!attribute [rw] reservations + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkAddressReservation>] + # List of IP address reservations in this network. + # When updating this field, an error will be generated if a reservation + # conflicts with an IP address already allocated to a physical server. + # @!attribute [r] pod + # @return [::String] + # Output only. Pod name. + # @!attribute [rw] mount_points + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkMountPoint>] + # Input only. List of mount points to attach the network to. + # @!attribute [rw] jumbo_frames_enabled + # @return [::Boolean] + # Whether network uses standard frames or jumbo ones. + # @!attribute [r] gateway_ip + # @return [::String] + # Output only. Gateway ip address. + class Network + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Network type. + module Type + # Unspecified value. + TYPE_UNSPECIFIED = 0 + + # Client network, a network peered to a Google Cloud VPC. + CLIENT = 1 + + # Private network, a network local to the Bare Metal Solution environment. + PRIVATE = 2 + end + + # The possible states for this Network. + module State + # The Network is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The Network is provisioning. + PROVISIONING = 1 + + # The Network has been provisioned. + PROVISIONED = 2 + + # The Network is being deprovisioned. + DEPROVISIONING = 3 + + # The Network is being updated. + UPDATING = 4 + end + end + + # A reservation of one or more addresses in a network. + # @!attribute [rw] start_address + # @return [::String] + # The first address of this reservation block. + # Must be specified as a single IPv4 address, e.g. 10.1.2.2. + # @!attribute [rw] end_address + # @return [::String] + # The last address of this reservation block, inclusive. I.e., for cases when + # reservations are only single addresses, end_address and start_address will + # be the same. + # Must be specified as a single IPv4 address, e.g. 10.1.2.2. + # @!attribute [rw] note + # @return [::String] + # A note about this reservation, intended for human consumption. + class NetworkAddressReservation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A network VRF. + # @!attribute [rw] name + # @return [::String] + # The name of the VRF. + # @!attribute [rw] state + # @return [::Google::Cloud::BareMetalSolution::V2::VRF::State] + # The possible state of VRF. + # @!attribute [rw] qos_policy + # @return [::Google::Cloud::BareMetalSolution::V2::VRF::QosPolicy] + # The QOS policy applied to this VRF. + # The value is only meaningful when all the vlan attachments have the same + # QoS. This field should not be used for new integrations, use vlan + # attachment level qos instead. The field is left for backward-compatibility. + # @!attribute [rw] vlan_attachments + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VRF::VlanAttachment>] + # The list of VLAN attachments for the VRF. + class VRF + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # QOS policy parameters. + # @!attribute [rw] bandwidth_gbps + # @return [::Float] + # The bandwidth permitted by the QOS policy, in gbps. + class QosPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # VLAN attachment details. + # @!attribute [rw] peer_vlan_id + # @return [::Integer] + # The peer vlan ID of the attachment. + # @!attribute [rw] peer_ip + # @return [::String] + # The peer IP of the attachment. + # @!attribute [rw] router_ip + # @return [::String] + # The router IP of the attachment. + # @!attribute [rw] pairing_key + # @return [::String] + # Input only. Pairing key. + # @!attribute [rw] qos_policy + # @return [::Google::Cloud::BareMetalSolution::V2::VRF::QosPolicy] + # The QOS policy applied to this VLAN attachment. + # This value should be preferred to using qos at vrf level. + # @!attribute [rw] id + # @return [::String] + # Immutable. The identifier of the attachment within vrf. + # @!attribute [rw] interconnect_attachment + # @return [::String] + # Optional. The name of the vlan attachment within vrf. This is of the form + # projects/\\{project_number}/regions/\\{region}/interconnectAttachments/\\{interconnect_attachment} + class VlanAttachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible states for this VRF. + module State + # The unspecified state. + STATE_UNSPECIFIED = 0 + + # The vrf is provisioning. + PROVISIONING = 1 + + # The vrf is provisioned. + PROVISIONED = 2 + end + end + + # Each logical interface represents a logical abstraction of the underlying + # physical interface (for eg. bond, nic) of the instance. Each logical + # interface can effectively map to multiple network-IP pairs and still be + # mapped to one underlying physical interface. + # @!attribute [rw] logical_network_interfaces + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface::LogicalNetworkInterface>] + # List of logical network interfaces within a logical interface. + # @!attribute [rw] name + # @return [::String] + # Interface name. This is of syntax or and + # forms part of the network template name. + # @!attribute [rw] interface_index + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # The index of the logical interface mapping to the index of the hardware + # bond or nic on the chosen network template. This field is deprecated. + class LogicalInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Each logical network interface is effectively a network and IP pair. + # @!attribute [rw] network + # @return [::String] + # Name of the network + # @!attribute [rw] ip_address + # @return [::String] + # IP address in the network + # @!attribute [rw] default_gateway + # @return [::Boolean] + # Whether this interface is the default gateway for the instance. Only + # one interface can be the default gateway for the instance. + # @!attribute [rw] network_type + # @return [::Google::Cloud::BareMetalSolution::V2::Network::Type] + # Type of network. + # @!attribute [rw] id + # @return [::String] + # An identifier for the `Network`, generated by the backend. + class LogicalNetworkInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for requesting network information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetNetworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of networks. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListNetworksRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListNetworksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of networks. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Network>] + # The list of networks. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListNetworksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to updating a network. + # @!attribute [rw] network + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # Required. The network to update. + # + # The `name` field is used to identify the instance to update. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # The only currently supported fields are: + # `labels`, `reservations`, `vrf.vlan_attachments` + class UpdateNetworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Network with all used IP addresses. + # @!attribute [rw] network + # @return [::Google::Cloud::BareMetalSolution::V2::Network] + # Network. + # @!attribute [rw] used_ips + # @return [::Array<::String>] + # All used IP addresses in this network. + class NetworkUsage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get networks with IPs. + # @!attribute [rw] location + # @return [::String] + # Required. Parent value (project and location). + class ListNetworkUsageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response with Networks with IPs + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkUsage>] + # Networks with IPs. + class ListNetworkUsageResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Mount point for a network. + # @!attribute [rw] instance + # @return [::String] + # Instance to attach network to. + # @!attribute [rw] logical_interface + # @return [::String] + # Logical interface to detach from. + # @!attribute [rw] default_gateway + # @return [::Boolean] + # Network should be a default gateway. + # @!attribute [rw] ip_address + # @return [::String] + # Ip address of the server. + class NetworkMountPoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting rename of a server. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the network. + # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} + # @!attribute [rw] new_network_id + # @return [::String] + # Required. The new `id` of the network. + class RenameNetworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb new file mode 100644 index 000000000000..a40034963b4f --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb @@ -0,0 +1,243 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # An NFS share. + # @!attribute [rw] name + # @return [::String] + # Immutable. The name of the NFS share. + # @!attribute [r] nfs_share_id + # @return [::String] + # Output only. An identifier for the NFS share, generated by the backend. + # This field will be deprecated in the future, use `id` instead. + # @!attribute [r] id + # @return [::String] + # Output only. An identifier for the NFS share, generated by the backend. + # This is the same value as nfs_share_id and will replace it in the future. + # @!attribute [r] state + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::State] + # Output only. The state of the NFS share. + # @!attribute [r] volume + # @return [::String] + # Output only. The underlying volume of the share. Created automatically + # during provisioning. + # @!attribute [rw] allowed_clients + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NfsShare::AllowedClient>] + # List of allowed access points. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] requested_size_gib + # @return [::Integer] + # The requested size, in GiB. + # @!attribute [rw] storage_type + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::StorageType] + # Immutable. The storage type of the underlying volume. + class NfsShare + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents an 'access point' for the share. + # @!attribute [rw] network + # @return [::String] + # The network the access point sits on. + # @!attribute [r] share_ip + # @return [::String] + # Output only. The IP address of the share on this network. Assigned + # automatically during provisioning based on the network's services_cidr. + # @!attribute [rw] allowed_clients_cidr + # @return [::String] + # The subnet of IP addresses permitted to access the share. + # @!attribute [rw] mount_permissions + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::MountPermissions] + # Mount permissions. + # @!attribute [rw] allow_dev + # @return [::Boolean] + # Allow dev flag. Which controls whether to allow creation of devices. + # @!attribute [rw] allow_suid + # @return [::Boolean] + # Allow the setuid flag. + # @!attribute [rw] no_root_squash + # @return [::Boolean] + # Disable root squashing, which is a feature of NFS. + # Root squash is a special mapping of the remote superuser (root) identity + # when using identity authentication. + # @!attribute [r] nfs_path + # @return [::String] + # Output only. The path to access NFS, in format shareIP:/InstanceID + # InstanceID is the generated ID instead of customer provided name. + # example like "10.0.0.0:/g123456789-nfs001" + class AllowedClient + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible states for this NFS share. + module State + # The share is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The share has been provisioned. + PROVISIONED = 1 + + # The NFS Share is being created. + CREATING = 2 + + # The NFS Share is being updated. + UPDATING = 3 + + # The NFS Share has been requested to be deleted. + DELETING = 4 + end + + # The possible mount permissions. + module MountPermissions + # Permissions were not specified. + MOUNT_PERMISSIONS_UNSPECIFIED = 0 + + # NFS share can be mount with read-only permissions. + READ = 1 + + # NFS share can be mount with read-write permissions. + READ_WRITE = 2 + end + + # The storage type for a volume. + module StorageType + # The storage type for this volume is unknown. + STORAGE_TYPE_UNSPECIFIED = 0 + + # The storage type for this volume is SSD. + SSD = 1 + + # This storage type for this volume is HDD. + HDD = 2 + end + end + + # Message for requesting NFS share information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of NFS shares. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListNfsSharesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListNfsSharesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of NFS shares. + # @!attribute [rw] nfs_shares + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NfsShare>] + # The list of NFS shares. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListNfsSharesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting to updating an NFS share. + # @!attribute [rw] nfs_share + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # Required. The NFS share to update. + # + # The `name` field is used to identify the NFS share to update. + # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # The only currently supported fields are: + # `labels` + # `allowed_clients` + class UpdateNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting rename of a server. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the nfsshare. + # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} + # @!attribute [rw] new_nfsshare_id + # @return [::String] + # Required. The new `id` of the nfsshare. + class RenameNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating an NFS share. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project and location. + # @!attribute [rw] nfs_share + # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] + # Required. The NfsShare to create. + class CreateNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting an NFS share. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the NFS share to delete. + class DeleteNfsShareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb new file mode 100644 index 000000000000..b4785e50e209 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # Operation System image. + # @!attribute [r] name + # @return [::String] + # Output only. OS Image's unique name. + # @!attribute [rw] code + # @return [::String] + # OS Image code. + # @!attribute [rw] description + # @return [::String] + # OS Image description. + # @!attribute [rw] applicable_instance_types + # @return [::Array<::String>] + # Instance types this image is applicable to. + # [Available + # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + # @!attribute [rw] supported_network_templates + # @return [::Array<::String>] + # Network templates that can be used with this OS Image. + class OSImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting all available OS images. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListProvisioningQuotasRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + class ListOSImagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting all available OS images. + # @!attribute [rw] os_images + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::OSImage>] + # The OS images available. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListOSImagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb new file mode 100644 index 000000000000..423eea65f0f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb @@ -0,0 +1,603 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A provisioning configuration. + # @!attribute [r] name + # @return [::String] + # Output only. The system-generated name of the provisioning config. This + # follows the UUID format. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::InstanceConfig>] + # Instances to be created. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkConfig>] + # Networks to be created. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig>] + # Volumes to be created. + # @!attribute [rw] ticket_id + # @return [::String] + # A generated ticket id to track provisioning request. + # @!attribute [rw] handover_service_account + # @return [::String] + # A service account to enable customers to access instance credentials upon + # handover. + # @!attribute [rw] email + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Email provided to send a confirmation with provisioning config to. + # Deprecated in favour of email field in request messages. + # @!attribute [r] state + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig::State] + # Output only. State of ProvisioningConfig. + # @!attribute [rw] location + # @return [::String] + # Optional. Location name of this ProvisioningConfig. + # It is optional only for Intake UI transition period. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update timestamp. + # @!attribute [r] cloud_console_uri + # @return [::String] + # Output only. URI to Cloud Console UI view of this provisioning config. + # @!attribute [rw] vpc_sc_enabled + # @return [::Boolean] + # If true, VPC SC is enabled for the cluster. + # @!attribute [rw] status_message + # @return [::String] + # Optional status messages associated with the FAILED state. + # @!attribute [rw] custom_id + # @return [::String] + # Optional. The user-defined identifier of the provisioning config. + class ProvisioningConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states for this ProvisioningConfig. + module State + # State wasn't specified. + STATE_UNSPECIFIED = 0 + + # ProvisioningConfig is a draft and can be freely modified. + DRAFT = 1 + + # ProvisioningConfig was already submitted and cannot be modified. + SUBMITTED = 2 + + # ProvisioningConfig was in the provisioning state. Initially this state + # comes from the work order table in big query when SNOW is used. Later + # this field can be set by the work order API. + PROVISIONING = 3 + + # ProvisioningConfig was provisioned, meaning the resources exist. + PROVISIONED = 4 + + # ProvisioningConfig was validated. A validation tool will be run to + # set this state. + VALIDATED = 5 + + # ProvisioningConfig was canceled. + CANCELLED = 6 + + # The request is submitted for provisioning, with error return. + FAILED = 7 + end + end + + # Request for SubmitProvisioningConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @!attribute [rw] provisioning_config + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # Required. The ProvisioningConfig to create. + # @!attribute [rw] email + # @return [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + class SubmitProvisioningConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for SubmitProvisioningConfig. + # @!attribute [rw] provisioning_config + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # The submitted provisioning config. + class SubmitProvisioningConfigResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A provisioning quota for a given project. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the provisioning quota. + # @!attribute [rw] asset_type + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota::AssetType] + # The asset type of this provisioning quota. + # @!attribute [rw] gcp_service + # @return [::String] + # The gcp service of the provisioning quota. + # @!attribute [rw] location + # @return [::String] + # The specific location of the provisioining quota. + # @!attribute [rw] available_count + # @return [::Integer] + # The available count of the provisioning quota. + # @!attribute [rw] instance_quota + # @return [::Google::Cloud::BareMetalSolution::V2::InstanceQuota] + # Instance quota. + # @!attribute [rw] server_count + # @return [::Integer] + # Server count. + # + # Note: The following fields are mutually exclusive: `server_count`, `network_bandwidth`, `storage_gib`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] network_bandwidth + # @return [::Integer] + # Network bandwidth, Gbps + # + # Note: The following fields are mutually exclusive: `network_bandwidth`, `server_count`, `storage_gib`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] storage_gib + # @return [::Integer] + # Storage size (GB). + # + # Note: The following fields are mutually exclusive: `storage_gib`, `server_count`, `network_bandwidth`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ProvisioningQuota + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The available asset types for intake. + module AssetType + # The unspecified type. + ASSET_TYPE_UNSPECIFIED = 0 + + # The server asset type. + ASSET_TYPE_SERVER = 1 + + # The storage asset type. + ASSET_TYPE_STORAGE = 2 + + # The network asset type. + ASSET_TYPE_NETWORK = 3 + end + end + + # Message for requesting the list of provisioning quotas. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListProvisioningQuotasRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # Notice that page_size field is not supported and won't be respected in + # the API request for now, will be updated when pagination is supported. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + class ListProvisioningQuotasRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the list of provisioning quotas. + # @!attribute [rw] provisioning_quotas + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] + # The provisioning quotas registered in this project. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListProvisioningQuotasResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration parameters for a new instance. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the instance config. + # @!attribute [rw] id + # @return [::String] + # A transient unique identifier to idenfity an instance within an + # ProvisioningConfig request. + # @!attribute [rw] instance_type + # @return [::String] + # Instance type. + # [Available + # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + # @!attribute [rw] hyperthreading + # @return [::Boolean] + # Whether the instance should be provisioned with Hyperthreading enabled. + # @!attribute [rw] os_image + # @return [::String] + # OS image to initialize the instance. + # [Available + # images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + # @!attribute [rw] client_network + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkAddress] + # Client network address. Filled if InstanceConfig.multivlan_config is false. + # @!attribute [rw] private_network + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkAddress] + # Private network address, if any. Filled if InstanceConfig.multivlan_config + # is false. + # @!attribute [rw] user_note + # @return [::String] + # User note field, it can be used by customers to add additional information + # for the BMS Ops team . + # @!attribute [rw] account_networks_enabled + # @return [::Boolean] + # If true networks can be from different projects of the same vendor account. + # @!attribute [rw] network_config + # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkConfig] + # The type of network configuration on the instance. + # @!attribute [rw] network_template + # @return [::String] + # Server network template name. Filled if InstanceConfig.multivlan_config is + # true. + # @!attribute [rw] logical_interfaces + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface>] + # List of logical interfaces for the instance. The number of logical + # interfaces will be the same as number of hardware bond/nic on the chosen + # network template. Filled if InstanceConfig.multivlan_config is true. + # @!attribute [rw] ssh_key_names + # @return [::Array<::String>] + # List of names of ssh keys used to provision the instance. + class InstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A network. + # @!attribute [rw] network_id + # @return [::String] + # Id of the network to use, within the same ProvisioningConfig request. + # @!attribute [rw] address + # @return [::String] + # IPv4 address to be assigned to the server. + # @!attribute [rw] existing_network_id + # @return [::String] + # Name of the existing network to use. + class NetworkAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The network configuration of the instance. + module NetworkConfig + # The unspecified network configuration. + NETWORKCONFIG_UNSPECIFIED = 0 + + # Instance part of single client network and single private network. + SINGLE_VLAN = 1 + + # Instance part of multiple (or single) client networks and private + # networks. + MULTI_VLAN = 2 + end + end + + # Configuration parameters for a new volume. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the volume config. + # @!attribute [rw] id + # @return [::String] + # A transient unique identifier to identify a volume within an + # ProvisioningConfig request. + # @!attribute [rw] snapshots_enabled + # @return [::Boolean] + # Whether snapshots should be enabled. + # @!attribute [rw] type + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::Type] + # The type of this Volume. + # @!attribute [rw] protocol + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::Protocol] + # Volume protocol. + # @!attribute [rw] size_gb + # @return [::Integer] + # The requested size of this volume, in GB. + # @!attribute [rw] lun_ranges + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig::LunRange>] + # LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. + # @!attribute [rw] machine_ids + # @return [::Array<::String>] + # Machine ids connected to this volume. Set only when protocol is + # PROTOCOL_FC. + # @!attribute [rw] nfs_exports + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig::NfsExport>] + # NFS exports. Set only when protocol is PROTOCOL_NFS. + # @!attribute [rw] user_note + # @return [::String] + # User note field, it can be used by customers to add additional information + # for the BMS Ops team . + # @!attribute [rw] gcp_service + # @return [::String] + # The GCP service of the storage volume. Available gcp_service are in + # https://cloud.google.com/bare-metal/docs/bms-planning. + # @!attribute [rw] performance_tier + # @return [::Google::Cloud::BareMetalSolution::V2::VolumePerformanceTier] + # Performance tier of the Volume. + # Default is SHARED. + class VolumeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A LUN(Logical Unit Number) range. + # @!attribute [rw] quantity + # @return [::Integer] + # Number of LUNs to create. + # @!attribute [rw] size_gb + # @return [::Integer] + # The requested size of each LUN, in GB. + class LunRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A NFS export entry. + # @!attribute [rw] network_id + # @return [::String] + # Network to use to publish the export. + # @!attribute [rw] machine_id + # @return [::String] + # Either a single machine, identified by an ID, or a comma-separated + # list of machine IDs. + # + # Note: The following fields are mutually exclusive: `machine_id`, `cidr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cidr + # @return [::String] + # A CIDR range. + # + # Note: The following fields are mutually exclusive: `cidr`, `machine_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] permissions + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::NfsExport::Permissions] + # Export permissions. + # @!attribute [rw] no_root_squash + # @return [::Boolean] + # Disable root squashing, which is a feature of NFS. + # Root squash is a special mapping of the remote superuser (root) identity + # when using identity authentication. + # @!attribute [rw] allow_suid + # @return [::Boolean] + # Allow the setuid flag. + # @!attribute [rw] allow_dev + # @return [::Boolean] + # Allow dev flag in NfsShare AllowedClientsRequest. + class NfsExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Permissions that can granted for an export. + module Permissions + # Unspecified value. + PERMISSIONS_UNSPECIFIED = 0 + + # Read-only permission. + READ_ONLY = 1 + + # Read-write permission. + READ_WRITE = 2 + end + end + + # The types of Volumes. + module Type + # The unspecified type. + TYPE_UNSPECIFIED = 0 + + # This Volume is on flash. + FLASH = 1 + + # This Volume is on disk. + DISK = 2 + end + + # The protocol used to access the volume. + module Protocol + # Unspecified value. + PROTOCOL_UNSPECIFIED = 0 + + # Fibre channel. + PROTOCOL_FC = 1 + + # Network file system. + PROTOCOL_NFS = 2 + end + end + + # Configuration parameters for a new network. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the network config. + # @!attribute [rw] id + # @return [::String] + # A transient unique identifier to identify a volume within an + # ProvisioningConfig request. + # @!attribute [rw] type + # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::Type] + # The type of this network, either Client or Private. + # @!attribute [rw] bandwidth + # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::Bandwidth] + # Interconnect bandwidth. Set only when type is CLIENT. + # @!attribute [rw] vlan_attachments + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkConfig::IntakeVlanAttachment>] + # List of VLAN attachments. As of now there are always 2 attachments, but it + # is going to change in the future (multi vlan). + # @!attribute [rw] cidr + # @return [::String] + # CIDR range of the network. + # @!attribute [rw] service_cidr + # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::ServiceCidr] + # Service CIDR, if any. + # @!attribute [rw] user_note + # @return [::String] + # User note field, it can be used by customers to add additional information + # for the BMS Ops team . + # @!attribute [rw] gcp_service + # @return [::String] + # The GCP service of the network. Available gcp_service are in + # https://cloud.google.com/bare-metal/docs/bms-planning. + # @!attribute [rw] vlan_same_project + # @return [::Boolean] + # Whether the VLAN attachment pair is located in the same project. + # @!attribute [rw] jumbo_frames_enabled + # @return [::Boolean] + # The JumboFramesEnabled option for customer to set. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A GCP vlan attachment. + # @!attribute [rw] id + # @return [::String] + # Identifier of the VLAN attachment. + # @!attribute [rw] pairing_key + # @return [::String] + # Attachment pairing key. + class IntakeVlanAttachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Network type. + module Type + # Unspecified value. + TYPE_UNSPECIFIED = 0 + + # Client network, that is a network peered to a GCP VPC. + CLIENT = 1 + + # Private network, that is a network local to the BMS POD. + PRIVATE = 2 + end + + # Interconnect bandwidth. + module Bandwidth + # Unspecified value. + BANDWIDTH_UNSPECIFIED = 0 + + # 1 Gbps. + BW_1_GBPS = 1 + + # 2 Gbps. + BW_2_GBPS = 2 + + # 5 Gbps. + BW_5_GBPS = 3 + + # 10 Gbps. + BW_10_GBPS = 4 + end + + # Service network block. + module ServiceCidr + # Unspecified value. + SERVICE_CIDR_UNSPECIFIED = 0 + + # Services are disabled for the given network. + DISABLED = 1 + + # Use the highest /26 block of the network to host services. + HIGH_26 = 2 + + # Use the highest /27 block of the network to host services. + HIGH_27 = 3 + + # Use the highest /28 block of the network to host services. + HIGH_28 = 4 + end + end + + # A resource budget. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the instance quota. + # @!attribute [rw] instance_type + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Instance type. + # Deprecated: use gcp_service. + # @!attribute [rw] gcp_service + # @return [::String] + # The gcp service of the provisioning quota. + # @!attribute [rw] location + # @return [::String] + # Location where the quota applies. + # @!attribute [rw] available_machine_count + # @return [::Integer] + # Number of machines than can be created for the given location and + # instance_type. + class InstanceQuota + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetProvisioningConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the ProvisioningConfig. + class GetProvisioningConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for CreateProvisioningConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent project and location containing the + # ProvisioningConfig. + # @!attribute [rw] provisioning_config + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # Required. The ProvisioningConfig to create. + # @!attribute [rw] email + # @return [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + class CreateProvisioningConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a ProvisioningConfig. + # @!attribute [rw] provisioning_config + # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] + # Required. The ProvisioningConfig to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # @!attribute [rw] email + # @return [::String] + # Optional. Email provided to send a confirmation with provisioning config + # to. + class UpdateProvisioningConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb new file mode 100644 index 000000000000..b01344ba719c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # An SSH key, used for authorizing with the interactive serial console feature. + # @!attribute [r] name + # @return [::String] + # Output only. The name of this SSH key. + # Currently, the only valid value for the location is "global". + # @!attribute [rw] public_key + # @return [::String] + # The public SSH key. This must be in OpenSSH .authorized_keys format. + class SSHKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for listing the public SSH keys in a project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent containing the SSH keys. + # Currently, the only valid value for the location is "global". + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListSSHKeysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response of ListSSHKeys. + # @!attribute [rw] ssh_keys + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::SSHKey>] + # The SSH keys registered in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListSSHKeysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for registering a public SSH key in a project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent containing the SSH keys. + # @!attribute [rw] ssh_key + # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] + # Required. The SSH key to register. + # @!attribute [rw] ssh_key_id + # @return [::String] + # Required. The ID to use for the key, which will become the final component + # of the key's resource name. + # + # This value must match the regex: + # [a-zA-Z0-9@.\-_]\\{1,64} + class CreateSSHKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting an SSH key from a project. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the SSH key to delete. + # Currently, the only valid value for the location is "global". + class DeleteSSHKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb new file mode 100644 index 000000000000..d1e0bc7a2db8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb @@ -0,0 +1,325 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A storage volume. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of this `Volume`. + # Resource names are schemeless URIs that follow the conventions in + # https://cloud.google.com/apis/design/resource_names. + # Format: + # `projects/{project}/locations/{location}/volumes/{volume}` + # @!attribute [rw] id + # @return [::String] + # An identifier for the `Volume`, generated by the backend. + # @!attribute [rw] storage_type + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::StorageType] + # The storage type for this volume. + # @!attribute [rw] state + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::State] + # The state of this storage volume. + # @!attribute [rw] requested_size_gib + # @return [::Integer] + # The requested size of this storage volume, in GiB. + # @!attribute [rw] originally_requested_size_gib + # @return [::Integer] + # Originally requested size, in GiB. + # @!attribute [rw] current_size_gib + # @return [::Integer] + # The current size of this storage volume, in GiB, including space reserved + # for snapshots. This size might be different than the requested size if the + # storage volume has been configured with auto grow or auto shrink. + # @!attribute [rw] emergency_size_gib + # @return [::Integer] + # Additional emergency size that was requested for this Volume, in GiB. + # current_size_gib includes this value. + # @!attribute [rw] max_size_gib + # @return [::Integer] + # Maximum size volume can be expanded to in case of evergency, in GiB. + # @!attribute [rw] auto_grown_size_gib + # @return [::Integer] + # The size, in GiB, that this storage volume has expanded as a result of an + # auto grow policy. In the absence of auto-grow, the value is 0. + # @!attribute [rw] remaining_space_gib + # @return [::Integer] + # The space remaining in the storage volume for new LUNs, in GiB, excluding + # space reserved for snapshots. + # @!attribute [rw] snapshot_reservation_detail + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::SnapshotReservationDetail] + # Details about snapshot space reservation and usage on the storage volume. + # @!attribute [rw] snapshot_auto_delete_behavior + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::SnapshotAutoDeleteBehavior] + # The behavior to use when snapshot reserved space is full. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [rw] snapshot_enabled + # @return [::Boolean] + # Whether snapshots are enabled. + # @!attribute [rw] pod + # @return [::String] + # Immutable. Pod name. + # @!attribute [r] protocol + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::Protocol] + # Output only. Storage protocol for the Volume. + # @!attribute [r] boot_volume + # @return [::Boolean] + # Output only. Whether this volume is a boot volume. A boot volume is one + # which contains a boot LUN. + # @!attribute [rw] performance_tier + # @return [::Google::Cloud::BareMetalSolution::V2::VolumePerformanceTier] + # Immutable. Performance tier of the Volume. + # Default is SHARED. + # @!attribute [rw] notes + # @return [::String] + # Input only. User-specified notes for new Volume. + # Used to provision Volumes that require manual intervention. + # @!attribute [rw] workload_profile + # @return [::Google::Cloud::BareMetalSolution::V2::Volume::WorkloadProfile] + # The workload profile for the volume. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time after which volume will be fully deleted. + # It is filled only for volumes in COOLOFF state. + # @!attribute [r] instances + # @return [::Array<::String>] + # Output only. Instances this Volume is attached to. + # This field is set only in Get requests. + # @!attribute [r] attached + # @return [::Boolean] + # Output only. Is the Volume attached at at least one instance. + # This field is a lightweight counterpart of `instances` field. + # It is filled in List responses as well. + class Volume + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details about snapshot space reservation and usage on the storage volume. + # @!attribute [rw] reserved_space_gib + # @return [::Integer] + # The space on this storage volume reserved for snapshots, shown in GiB. + # @!attribute [rw] reserved_space_used_percent + # @return [::Integer] + # The percent of snapshot space on this storage volume actually being used + # by the snapshot copies. This value might be higher than 100% if the + # snapshot copies have overflowed into the data portion of the storage + # volume. + # @!attribute [rw] reserved_space_remaining_gib + # @return [::Integer] + # The amount, in GiB, of available space in this storage volume's reserved + # snapshot space. + # @!attribute [rw] reserved_space_percent + # @return [::Integer] + # Percent of the total Volume size reserved for snapshot copies. + # Enabling snapshots requires reserving 20% or more of + # the storage volume space for snapshots. Maximum reserved space for + # snapshots is 40%. + # Setting this field will effectively set snapshot_enabled to true. + class SnapshotReservationDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The storage type for a volume. + module StorageType + # The storage type for this volume is unknown. + STORAGE_TYPE_UNSPECIFIED = 0 + + # The storage type for this volume is SSD. + SSD = 1 + + # This storage type for this volume is HDD. + HDD = 2 + end + + # The possible states for a storage volume. + module State + # The storage volume is in an unknown state. + STATE_UNSPECIFIED = 0 + + # The storage volume is being created. + CREATING = 1 + + # The storage volume is ready for use. + READY = 2 + + # The storage volume has been requested to be deleted. + DELETING = 3 + + # The storage volume is being updated. + UPDATING = 4 + + # The storage volume is in cool off state. It will be deleted after + # `expire_time`. + COOL_OFF = 5 + end + + # The kinds of auto delete behavior to use when snapshot reserved space is + # full. + module SnapshotAutoDeleteBehavior + # The unspecified behavior. + SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0 + + # Don't delete any snapshots. This disables new snapshot creation, as + # long as the snapshot reserved space is full. + DISABLED = 1 + + # Delete the oldest snapshots first. + OLDEST_FIRST = 2 + + # Delete the newest snapshots first. + NEWEST_FIRST = 3 + end + + # Storage protocol. + module Protocol + # Value is not specified. + PROTOCOL_UNSPECIFIED = 0 + + # Fibre Channel protocol. + FIBRE_CHANNEL = 1 + + # NFS protocol means Volume is a NFS Share volume. + # Such volumes cannot be manipulated via Volumes API. + NFS = 2 + end + + # The possible values for a workload profile. + module WorkloadProfile + # The workload profile is in an unknown state. + WORKLOAD_PROFILE_UNSPECIFIED = 0 + + # The workload profile is generic. + GENERIC = 1 + + # The workload profile is hana. + HANA = 2 + end + end + + # Message for requesting storage volume information. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of storage volumes. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListVolumesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListVolumesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of storage volumes. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Volume>] + # The list of storage volumes. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListVolumesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a volume. + # @!attribute [rw] volume + # @return [::Google::Cloud::BareMetalSolution::V2::Volume] + # Required. The volume to update. + # + # The `name` field is used to identify the volume to update. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # The only currently supported fields are: + # 'labels' + class UpdateVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message requesting rename of a server. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` field is used to identify the volume. + # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} + # @!attribute [rw] new_volume_id + # @return [::String] + # Required. The new `id` of the volume. + class RenameVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for skip volume cooloff and delete it. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Volume. + class EvictVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for emergency resize Volume. + # @!attribute [rw] volume + # @return [::String] + # Required. Volume to resize. + # @!attribute [rw] size_gib + # @return [::Integer] + # New Volume size, in GiB. + class ResizeVolumeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb new file mode 100644 index 000000000000..0525748dfd87 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb @@ -0,0 +1,134 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BareMetalSolution + module V2 + # A snapshot of a volume. Only boot volumes can have snapshots. + # @!attribute [rw] name + # @return [::String] + # The name of the snapshot. + # @!attribute [r] id + # @return [::String] + # Output only. An identifier for the snapshot, generated by the backend. + # @!attribute [rw] description + # @return [::String] + # The description of the snapshot. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time of the snapshot. + # @!attribute [r] storage_volume + # @return [::String] + # Output only. The name of the volume which this snapshot belongs to. + # @!attribute [r] type + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot::SnapshotType] + # Output only. The type of the snapshot which indicates whether it was + # scheduled or manual/ad-hoc. + class VolumeSnapshot + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the type of a snapshot. + module SnapshotType + # Type is not specified. + SNAPSHOT_TYPE_UNSPECIFIED = 0 + + # Snapshot was taken manually by user. + AD_HOC = 1 + + # Snapshot was taken automatically as a part of a snapshot schedule. + SCHEDULED = 2 + end + end + + # Message for requesting volume snapshot information. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the snapshot. + class GetVolumeSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of volume snapshots. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListVolumesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server might return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results from the server. + class ListVolumeSnapshotsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the list of volume snapshots. + # @!attribute [rw] volume_snapshots + # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] + # The list of snapshots. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results from the server. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListVolumeSnapshotsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting named Volume snapshot. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the snapshot to delete. + class DeleteVolumeSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a volume snapshot. + # @!attribute [rw] parent + # @return [::String] + # Required. The volume to snapshot. + # @!attribute [rw] volume_snapshot + # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] + # Required. The snapshot to create. + class CreateVolumeSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for restoring a volume snapshot. + # @!attribute [rw] volume_snapshot + # @return [::String] + # Required. Name of the snapshot which will be used to restore its parent + # volume. + class RestoreVolumeSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile new file mode 100644 index 000000000000..5d699c275013 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bare_metal_solution-v2", path: "../" +else + gem "google-cloud-bare_metal_solution-v2" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb new file mode 100644 index 000000000000..358c745fc756 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the create_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share. +# +def create_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new + + # Call the create_nfs_share method. + result = client.create_nfs_share request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb new file mode 100644 index 000000000000..a06fe4fb4bde --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the create_provisioning_config call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config. +# +def create_provisioning_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new + + # Call the create_provisioning_config method. + result = client.create_provisioning_config request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb new file mode 100644 index 000000000000..d8bb10ff6bad --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the create_ssh_key call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key. +# +def create_ssh_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new + + # Call the create_ssh_key method. + result = client.create_ssh_key request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb new file mode 100644 index 000000000000..d476c4950cff --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the create_volume_snapshot call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot. +# +def create_volume_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new + + # Call the create_volume_snapshot method. + result = client.create_volume_snapshot request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb new file mode 100644 index 000000000000..d93b24926574 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the delete_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share. +# +def delete_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new + + # Call the delete_nfs_share method. + result = client.delete_nfs_share request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb new file mode 100644 index 000000000000..3439a897492e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the delete_ssh_key call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key. +# +def delete_ssh_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new + + # Call the delete_ssh_key method. + result = client.delete_ssh_key request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb new file mode 100644 index 000000000000..2adfa46b129e --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the delete_volume_snapshot call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot. +# +def delete_volume_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new + + # Call the delete_volume_snapshot method. + result = client.delete_volume_snapshot request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb new file mode 100644 index 000000000000..3883f7f5756b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the detach_lun call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun. +# +def detach_lun + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new + + # Call the detach_lun method. + result = client.detach_lun request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb new file mode 100644 index 000000000000..18430c661223 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the disable_interactive_serial_console call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console. +# +def disable_interactive_serial_console + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new + + # Call the disable_interactive_serial_console method. + result = client.disable_interactive_serial_console request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb new file mode 100644 index 000000000000..169e030b544f --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the enable_interactive_serial_console call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console. +# +def enable_interactive_serial_console + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new + + # Call the enable_interactive_serial_console method. + result = client.enable_interactive_serial_console request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb new file mode 100644 index 000000000000..916a0b294499 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the evict_lun call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun. +# +def evict_lun + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new + + # Call the evict_lun method. + result = client.evict_lun request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb new file mode 100644 index 000000000000..d7d6e882e4a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the evict_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume. +# +def evict_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new + + # Call the evict_volume method. + result = client.evict_volume request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb new file mode 100644 index 000000000000..716e61b4abcd --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb new file mode 100644 index 000000000000..58f24d70f77f --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_lun call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun. +# +def get_lun + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new + + # Call the get_lun method. + result = client.get_lun request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb new file mode 100644 index 000000000000..5df941d15772 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_network call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network. +# +def get_network + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new + + # Call the get_network method. + result = client.get_network request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb new file mode 100644 index 000000000000..d2c6e1709af7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share. +# +def get_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new + + # Call the get_nfs_share method. + result = client.get_nfs_share request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb new file mode 100644 index 000000000000..986b6c62e235 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_provisioning_config call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config. +# +def get_provisioning_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new + + # Call the get_provisioning_config method. + result = client.get_provisioning_config request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb new file mode 100644 index 000000000000..939f442e87ae --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume. +# +def get_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new + + # Call the get_volume method. + result = client.get_volume request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb new file mode 100644 index 000000000000..001c45e34f3b --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the get_volume_snapshot call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot. +# +def get_volume_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new + + # Call the get_volume_snapshot method. + result = client.get_volume_snapshot request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb new file mode 100644 index 000000000000..3e017bcb7a63 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_instances call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances. +# +def list_instances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new + + # Call the list_instances method. + result = client.list_instances request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Instance. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb new file mode 100644 index 000000000000..6a79522dc049 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_luns call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns. +# +def list_luns + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new + + # Call the list_luns method. + result = client.list_luns request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb new file mode 100644 index 000000000000..3c008bae622a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_network_usage call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage. +# +def list_network_usage + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new + + # Call the list_network_usage method. + result = client.list_network_usage request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb new file mode 100644 index 000000000000..b98c7b7f9d00 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_networks call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks. +# +def list_networks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new + + # Call the list_networks method. + result = client.list_networks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb new file mode 100644 index 000000000000..a865e2f86d3f --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_nfs_shares call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares. +# +def list_nfs_shares + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new + + # Call the list_nfs_shares method. + result = client.list_nfs_shares request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb new file mode 100644 index 000000000000..12e6f9f047d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_os_images call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images. +# +def list_os_images + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new + + # Call the list_os_images method. + result = client.list_os_images request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb new file mode 100644 index 000000000000..0dca5eff2d85 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_provisioning_quotas call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas. +# +def list_provisioning_quotas + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new + + # Call the list_provisioning_quotas method. + result = client.list_provisioning_quotas request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb new file mode 100644 index 000000000000..158656b868d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_ssh_keys call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys. +# +def list_ssh_keys + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new + + # Call the list_ssh_keys method. + result = client.list_ssh_keys request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb new file mode 100644 index 000000000000..58b170292d00 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_volume_snapshots call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots. +# +def list_volume_snapshots + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new + + # Call the list_volume_snapshots method. + result = client.list_volume_snapshots request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb new file mode 100644 index 000000000000..a423d77af7e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the list_volumes call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes. +# +def list_volumes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new + + # Call the list_volumes method. + result = client.list_volumes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. + p item + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb new file mode 100644 index 000000000000..94dbdb0a41ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the rename_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance. +# +def rename_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new + + # Call the rename_instance method. + result = client.rename_instance request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb new file mode 100644 index 000000000000..da01cd4cae26 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the rename_network call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network. +# +def rename_network + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new + + # Call the rename_network method. + result = client.rename_network request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb new file mode 100644 index 000000000000..32ec197121d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the rename_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share. +# +def rename_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new + + # Call the rename_nfs_share method. + result = client.rename_nfs_share request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb new file mode 100644 index 000000000000..150aa2cb0fbb --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the rename_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume. +# +def rename_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new + + # Call the rename_volume method. + result = client.rename_volume request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb new file mode 100644 index 000000000000..c1010158d5fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the reset_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance. +# +def reset_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new + + # Call the reset_instance method. + result = client.reset_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb new file mode 100644 index 000000000000..c79249eb863d --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the resize_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume. +# +def resize_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new + + # Call the resize_volume method. + result = client.resize_volume request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb new file mode 100644 index 000000000000..d37a07635475 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the restore_volume_snapshot call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot. +# +def restore_volume_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new + + # Call the restore_volume_snapshot method. + result = client.restore_volume_snapshot request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb new file mode 100644 index 000000000000..7beed0235a9a --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the start_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance. +# +def start_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new + + # Call the start_instance method. + result = client.start_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb new file mode 100644 index 000000000000..6728055e6fe6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the stop_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance. +# +def stop_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new + + # Call the stop_instance method. + result = client.stop_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb new file mode 100644 index 000000000000..f35b9ef72741 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the submit_provisioning_config call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config. +# +def submit_provisioning_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new + + # Call the submit_provisioning_config method. + result = client.submit_provisioning_config request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb new file mode 100644 index 000000000000..f95a8f3457e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_instance call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance. +# +def update_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new + + # Call the update_instance method. + result = client.update_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb new file mode 100644 index 000000000000..b4c3d334f859 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_network call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network. +# +def update_network + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new + + # Call the update_network method. + result = client.update_network request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb new file mode 100644 index 000000000000..6caf796b8964 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_nfs_share call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share. +# +def update_nfs_share + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new + + # Call the update_nfs_share method. + result = client.update_nfs_share request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb new file mode 100644 index 000000000000..3c5676e4d0fe --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_provisioning_config call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config. +# +def update_provisioning_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new + + # Call the update_provisioning_config method. + result = client.update_provisioning_config request + + # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. + p result +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb new file mode 100644 index 000000000000..a6f74e17e36c --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] +require "google/cloud/bare_metal_solution/v2" + +## +# Snippet for the update_volume call in the BareMetalSolution service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume. +# +def update_volume + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new + + # Call the update_volume method. + result = client.update_volume request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json new file mode 100644 index 000000000000..a6e0209d6718 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json @@ -0,0 +1,1775 @@ +{ + "client_library": { + "name": "google-cloud-bare_metal_solution-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.baremetalsolution.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync", + "title": "Snippet for the list_instances call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances.", + "file": "bare_metal_solution/list_instances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instances", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListInstances", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListInstances", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync", + "title": "Snippet for the get_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance.", + "file": "bare_metal_solution/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Instance", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync", + "title": "Snippet for the update_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance.", + "file": "bare_metal_solution/update_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync", + "title": "Snippet for the rename_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance.", + "file": "bare_metal_solution/rename_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Instance", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RenameInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync", + "title": "Snippet for the reset_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance.", + "file": "bare_metal_solution/reset_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "reset_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ResetInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResetInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync", + "title": "Snippet for the start_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance.", + "file": "bare_metal_solution/start_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "StartInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.StartInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync", + "title": "Snippet for the stop_instance call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance.", + "file": "bare_metal_solution/stop_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_instance", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "StopInstance", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.StopInstance", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync", + "title": "Snippet for the enable_interactive_serial_console call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console.", + "file": "bare_metal_solution/enable_interactive_serial_console.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_interactive_serial_console", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "EnableInteractiveSerialConsole", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EnableInteractiveSerialConsole", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync", + "title": "Snippet for the disable_interactive_serial_console call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console.", + "file": "bare_metal_solution/disable_interactive_serial_console.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_interactive_serial_console", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DisableInteractiveSerialConsole", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DisableInteractiveSerialConsole", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync", + "title": "Snippet for the detach_lun call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun.", + "file": "bare_metal_solution/detach_lun.rb", + "language": "RUBY", + "client_method": { + "short_name": "detach_lun", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DetachLunRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DetachLun", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DetachLun", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync", + "title": "Snippet for the list_ssh_keys call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys.", + "file": "bare_metal_solution/list_ssh_keys.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_ssh_keys", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListSSHKeys", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListSSHKeys", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync", + "title": "Snippet for the create_ssh_key call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key.", + "file": "bare_metal_solution/create_ssh_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_ssh_key", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::SSHKey", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "CreateSSHKey", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateSSHKey", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync", + "title": "Snippet for the delete_ssh_key call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key.", + "file": "bare_metal_solution/delete_ssh_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_ssh_key", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DeleteSSHKey", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteSSHKey", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync", + "title": "Snippet for the list_volumes call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes.", + "file": "bare_metal_solution/list_volumes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_volumes", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListVolumes", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumes", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync", + "title": "Snippet for the get_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume.", + "file": "bare_metal_solution/get_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Volume", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync", + "title": "Snippet for the update_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume.", + "file": "bare_metal_solution/update_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync", + "title": "Snippet for the rename_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume.", + "file": "bare_metal_solution/rename_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Volume", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RenameVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync", + "title": "Snippet for the evict_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume.", + "file": "bare_metal_solution/evict_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "evict_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "EvictVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EvictVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync", + "title": "Snippet for the resize_volume call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume.", + "file": "bare_metal_solution/resize_volume.rb", + "language": "RUBY", + "client_method": { + "short_name": "resize_volume", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ResizeVolume", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResizeVolume", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync", + "title": "Snippet for the list_networks call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks.", + "file": "bare_metal_solution/list_networks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_networks", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListNetworks", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworks", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync", + "title": "Snippet for the list_network_usage call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage.", + "file": "bare_metal_solution/list_network_usage.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_network_usage", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListNetworkUsage", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworkUsage", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync", + "title": "Snippet for the get_network call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network.", + "file": "bare_metal_solution/get_network.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_network", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Network", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetNetwork", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNetwork", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync", + "title": "Snippet for the update_network call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network.", + "file": "bare_metal_solution/update_network.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_network", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateNetwork", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNetwork", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync", + "title": "Snippet for the create_volume_snapshot call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot.", + "file": "bare_metal_solution/create_volume_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_volume_snapshot", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "CreateVolumeSnapshot", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateVolumeSnapshot", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync", + "title": "Snippet for the restore_volume_snapshot call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot.", + "file": "bare_metal_solution/restore_volume_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_volume_snapshot", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RestoreVolumeSnapshot", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RestoreVolumeSnapshot", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync", + "title": "Snippet for the delete_volume_snapshot call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot.", + "file": "bare_metal_solution/delete_volume_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_volume_snapshot", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DeleteVolumeSnapshot", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteVolumeSnapshot", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync", + "title": "Snippet for the get_volume_snapshot call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot.", + "file": "bare_metal_solution/get_volume_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_volume_snapshot", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetVolumeSnapshot", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolumeSnapshot", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync", + "title": "Snippet for the list_volume_snapshots call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots.", + "file": "bare_metal_solution/list_volume_snapshots.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_volume_snapshots", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListVolumeSnapshots", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumeSnapshots", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync", + "title": "Snippet for the get_lun call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun.", + "file": "bare_metal_solution/get_lun.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lun", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetLunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Lun", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetLun", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetLun", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync", + "title": "Snippet for the list_luns call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns.", + "file": "bare_metal_solution/list_luns.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_luns", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListLunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListLunsResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListLuns", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListLuns", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync", + "title": "Snippet for the evict_lun call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun.", + "file": "bare_metal_solution/evict_lun.rb", + "language": "RUBY", + "client_method": { + "short_name": "evict_lun", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::EvictLunRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "EvictLun", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EvictLun", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync", + "title": "Snippet for the get_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share.", + "file": "bare_metal_solution/get_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::NfsShare", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync", + "title": "Snippet for the list_nfs_shares call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares.", + "file": "bare_metal_solution/list_nfs_shares.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_nfs_shares", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListNfsShares", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNfsShares", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync", + "title": "Snippet for the update_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share.", + "file": "bare_metal_solution/update_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync", + "title": "Snippet for the create_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share.", + "file": "bare_metal_solution/create_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "CreateNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync", + "title": "Snippet for the rename_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share.", + "file": "bare_metal_solution/rename_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::NfsShare", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RenameNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync", + "title": "Snippet for the delete_nfs_share call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share.", + "file": "bare_metal_solution/delete_nfs_share.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_nfs_share", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "DeleteNfsShare", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteNfsShare", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync", + "title": "Snippet for the list_provisioning_quotas call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas.", + "file": "bare_metal_solution/list_provisioning_quotas.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_provisioning_quotas", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListProvisioningQuotas", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListProvisioningQuotas", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync", + "title": "Snippet for the submit_provisioning_config call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config.", + "file": "bare_metal_solution/submit_provisioning_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "submit_provisioning_config", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "SubmitProvisioningConfig", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.SubmitProvisioningConfig", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync", + "title": "Snippet for the get_provisioning_config call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config.", + "file": "bare_metal_solution/get_provisioning_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_provisioning_config", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "GetProvisioningConfig", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetProvisioningConfig", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync", + "title": "Snippet for the create_provisioning_config call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config.", + "file": "bare_metal_solution/create_provisioning_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_provisioning_config", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "CreateProvisioningConfig", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateProvisioningConfig", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync", + "title": "Snippet for the update_provisioning_config call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config.", + "file": "bare_metal_solution/update_provisioning_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_provisioning_config", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "UpdateProvisioningConfig", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateProvisioningConfig", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync", + "title": "Snippet for the rename_network call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network.", + "file": "bare_metal_solution/rename_network.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_network", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::Network", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "RenameNetwork", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameNetwork", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync", + "title": "Snippet for the list_os_images call in the BareMetalSolution service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images.", + "file": "bare_metal_solution/list_os_images.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_os_images", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse", + "client": { + "short_name": "BareMetalSolution::Client", + "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" + }, + "method": { + "short_name": "ListOSImages", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListOSImages", + "service": { + "short_name": "BareMetalSolution", + "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb new file mode 100644 index 000000000000..56418b25c866 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/baremetalsolution/v2/baremetalsolution_services_pb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution" + +class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb new file mode 100644 index 000000000000..0969c53605e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb @@ -0,0 +1,211 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bare_metal_solution/v2/bare_metal_solution" + +class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_instance_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_config_path project: "value0", location: "value1", instance_config: "value2" + assert_equal "projects/value0/locations/value1/instanceConfigs/value2", path + end + end + + def test_interconnect_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.interconnect_attachment_path project: "value0", region: "value1", interconnect_attachment: "value2" + assert_equal "projects/value0/regions/value1/interconnectAttachments/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_lun_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lun_path project: "value0", location: "value1", volume: "value2", lun: "value3" + assert_equal "projects/value0/locations/value1/volumes/value2/luns/value3", path + end + end + + def test_nfs_share_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.nfs_share_path project: "value0", location: "value1", nfs_share: "value2" + assert_equal "projects/value0/locations/value1/nfsShares/value2", path + end + end + + def test_network_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_path project: "value0", location: "value1", network: "value2" + assert_equal "projects/value0/locations/value1/networks/value2", path + end + end + + def test_network_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_config_path project: "value0", location: "value1", network_config: "value2" + assert_equal "projects/value0/locations/value1/networkConfigs/value2", path + end + end + + def test_provisioning_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.provisioning_config_path project: "value0", location: "value1", provisioning_config: "value2" + assert_equal "projects/value0/locations/value1/provisioningConfigs/value2", path + end + end + + def test_server_network_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.server_network_template_path project: "value0", location: "value1", server_network_template: "value2" + assert_equal "projects/value0/locations/value1/serverNetworkTemplate/value2", path + end + end + + def test_ssh_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ssh_key_path project: "value0", location: "value1", ssh_key: "value2" + assert_equal "projects/value0/locations/value1/sshKeys/value2", path + end + end + + def test_volume_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.volume_path project: "value0", location: "value1", volume: "value2" + assert_equal "projects/value0/locations/value1/volumes/value2", path + end + end + + def test_volume_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.volume_config_path project: "value0", location: "value1", volume_config: "value2" + assert_equal "projects/value0/locations/value1/volumeConfigs/value2", path + end + end + + def test_volume_snapshot_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.volume_snapshot_path project: "value0", location: "value1", volume: "value2", snapshot: "value3" + assert_equal "projects/value0/locations/value1/volumes/value2/snapshots/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb new file mode 100644 index 000000000000..9d9bf4332624 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb @@ -0,0 +1,2518 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" + + +class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_instances + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_instances ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_instances(::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instances_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_count + end + end + end + + def test_update_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + instance = {} + update_mask = {} + + update_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_instance({ instance: instance, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_instance instance: instance, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_instance ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_instance({ instance: instance, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_instance(::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_instance_client_stub.call_count + end + end + end + + def test_rename_instance + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_instance_id = "hello world" + + rename_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rename_instance({ name: name, new_instance_id: new_instance_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rename_instance name: name, new_instance_id: new_instance_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rename_instance ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rename_instance({ name: name, new_instance_id: new_instance_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rename_instance(::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_instance_client_stub.call_count + end + end + end + + def test_reset_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + reset_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_reset_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reset_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.reset_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.reset_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.reset_instance ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.reset_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.reset_instance(::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reset_instance_client_stub.call_count + end + end + end + + def test_start_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_start_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_instance ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_instance(::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_instance_client_stub.call_count + end + end + end + + def test_stop_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + stop_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_stop_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stop_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stop_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.stop_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.stop_instance ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.stop_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.stop_instance(::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, stop_instance_client_stub.call_count + end + end + end + + def test_enable_interactive_serial_console + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_interactive_serial_console_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_enable_interactive_serial_console_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_interactive_serial_console_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.enable_interactive_serial_console({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.enable_interactive_serial_console name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.enable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.enable_interactive_serial_console({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.enable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_interactive_serial_console_client_stub.call_count + end + end + end + + def test_disable_interactive_serial_console + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_interactive_serial_console_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_disable_interactive_serial_console_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_interactive_serial_console_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.disable_interactive_serial_console({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.disable_interactive_serial_console name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.disable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.disable_interactive_serial_console({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.disable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_interactive_serial_console_client_stub.call_count + end + end + end + + def test_detach_lun + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + instance = "hello world" + lun = "hello world" + skip_reboot = true + + detach_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_detach_lun_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, detach_lun_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.detach_lun instance: instance, lun: lun, skip_reboot: skip_reboot do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.detach_lun ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.detach_lun(::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, detach_lun_client_stub.call_count + end + end + end + + def test_list_ssh_keys + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_ssh_keys_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_ssh_keys_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_ssh_keys_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_ssh_keys({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_ssh_keys parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_ssh_keys ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_ssh_keys({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_ssh_keys(::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_ssh_keys_client_stub.call_count + end + end + end + + def test_create_ssh_key + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::SSHKey.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + ssh_key = {} + ssh_key_id = "hello world" + + create_ssh_key_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_ssh_key_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_ssh_key_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_ssh_key parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_ssh_key ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_ssh_key(::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_ssh_key_client_stub.call_count + end + end + end + + def test_delete_ssh_key + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_ssh_key_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_ssh_key_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_ssh_key_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_ssh_key({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_ssh_key name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_ssh_key ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_ssh_key({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_ssh_key(::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_ssh_key_client_stub.call_count + end + end + end + + def test_list_volumes + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_volumes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_volumes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_volumes_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_volumes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_volumes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_volumes ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_volumes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_volumes(::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_volumes_client_stub.call_count + end + end + end + + def test_get_volume + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Volume.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_volume({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_volume name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_volume ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_volume({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_volume(::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_volume_client_stub.call_count + end + end + end + + def test_update_volume + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + volume = {} + update_mask = {} + + update_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_volume({ volume: volume, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_volume volume: volume, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_volume ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_volume({ volume: volume, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_volume(::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_volume_client_stub.call_count + end + end + end + + def test_rename_volume + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Volume.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_volume_id = "hello world" + + rename_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rename_volume({ name: name, new_volume_id: new_volume_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rename_volume name: name, new_volume_id: new_volume_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rename_volume ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rename_volume({ name: name, new_volume_id: new_volume_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rename_volume(::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_volume_client_stub.call_count + end + end + end + + def test_evict_volume + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + evict_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_evict_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, evict_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.evict_volume({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.evict_volume name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.evict_volume ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.evict_volume({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.evict_volume(::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, evict_volume_client_stub.call_count + end + end + end + + def test_resize_volume + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + volume = "hello world" + size_gib = 42 + + resize_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_resize_volume_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resize_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.resize_volume({ volume: volume, size_gib: size_gib }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.resize_volume volume: volume, size_gib: size_gib do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.resize_volume ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.resize_volume({ volume: volume, size_gib: size_gib }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.resize_volume(::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resize_volume_client_stub.call_count + end + end + end + + def test_list_networks + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_networks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_networks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_networks_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_networks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_networks parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_networks ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_networks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_networks(::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_networks_client_stub.call_count + end + end + end + + def test_list_network_usage + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + location = "hello world" + + list_network_usage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_network_usage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_network_usage_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_network_usage({ location: location }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_network_usage location: location do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_network_usage ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_network_usage({ location: location }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_network_usage(::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_network_usage_client_stub.call_count + end + end + end + + def test_get_network + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Network.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_network_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_network_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_network({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_network name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_network ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_network({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_network(::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_network_client_stub.call_count + end + end + end + + def test_update_network + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + network = {} + update_mask = {} + + update_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_network_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_network_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_network({ network: network, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_network network: network, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_network ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_network({ network: network, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_network(::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_network_client_stub.call_count + end + end + end + + def test_create_volume_snapshot + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + volume_snapshot = {} + + create_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_volume_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_volume_snapshot_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_volume_snapshot parent: parent, volume_snapshot: volume_snapshot do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_volume_snapshot_client_stub.call_count + end + end + end + + def test_restore_volume_snapshot + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + volume_snapshot = "hello world" + + restore_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_restore_volume_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_volume_snapshot_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.restore_volume_snapshot({ volume_snapshot: volume_snapshot }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.restore_volume_snapshot volume_snapshot: volume_snapshot do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.restore_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.restore_volume_snapshot({ volume_snapshot: volume_snapshot }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.restore_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_volume_snapshot_client_stub.call_count + end + end + end + + def test_delete_volume_snapshot + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_volume_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_volume_snapshot_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_volume_snapshot({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_volume_snapshot name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_volume_snapshot({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_volume_snapshot_client_stub.call_count + end + end + end + + def test_get_volume_snapshot + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_volume_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_volume_snapshot_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_volume_snapshot({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_volume_snapshot name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_volume_snapshot({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_volume_snapshot_client_stub.call_count + end + end + end + + def test_list_volume_snapshots + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_volume_snapshots_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_volume_snapshots_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_volume_snapshots_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_volume_snapshots parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_volume_snapshots ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_volume_snapshots(::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_volume_snapshots_client_stub.call_count + end + end + end + + def test_get_lun + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Lun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_lun_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lun_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lun({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lun name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lun ::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lun({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lun(::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lun_client_stub.call_count + end + end + end + + def test_list_luns + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_luns_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_luns_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_luns_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_luns({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_luns parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_luns ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_luns({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_luns(::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_luns_client_stub.call_count + end + end + end + + def test_evict_lun + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + evict_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_evict_lun_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, evict_lun_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.evict_lun({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.evict_lun name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.evict_lun ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.evict_lun({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.evict_lun(::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, evict_lun_client_stub.call_count + end + end + end + + def test_get_nfs_share + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_nfs_share({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_nfs_share name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_nfs_share ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_nfs_share({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_nfs_share(::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_nfs_share_client_stub.call_count + end + end + end + + def test_list_nfs_shares + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_nfs_shares_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_nfs_shares_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_nfs_shares_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_nfs_shares({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_nfs_shares parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_nfs_shares ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_nfs_shares({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_nfs_shares(::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_nfs_shares_client_stub.call_count + end + end + end + + def test_update_nfs_share + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + nfs_share = {} + update_mask = {} + + update_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_nfs_share nfs_share: nfs_share, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_nfs_share ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_nfs_share(::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_nfs_share_client_stub.call_count + end + end + end + + def test_create_nfs_share + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + nfs_share = {} + + create_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_nfs_share({ parent: parent, nfs_share: nfs_share }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_nfs_share parent: parent, nfs_share: nfs_share do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_nfs_share ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_nfs_share({ parent: parent, nfs_share: nfs_share }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_nfs_share(::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_nfs_share_client_stub.call_count + end + end + end + + def test_rename_nfs_share + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_nfsshare_id = "hello world" + + rename_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rename_nfs_share name: name, new_nfsshare_id: new_nfsshare_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rename_nfs_share ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rename_nfs_share(::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_nfs_share_client_stub.call_count + end + end + end + + def test_delete_nfs_share + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_nfs_share_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_nfs_share({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_nfs_share name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_nfs_share ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_nfs_share({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_nfs_share(::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_nfs_share_client_stub.call_count + end + end + end + + def test_list_provisioning_quotas + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_provisioning_quotas_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_provisioning_quotas_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_provisioning_quotas_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_provisioning_quotas parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_provisioning_quotas ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_provisioning_quotas(::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_provisioning_quotas_client_stub.call_count + end + end + end + + def test_submit_provisioning_config + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provisioning_config = {} + email = "hello world" + + submit_provisioning_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_submit_provisioning_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, submit_provisioning_config_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.submit_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.submit_provisioning_config ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.submit_provisioning_config(::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, submit_provisioning_config_client_stub.call_count + end + end + end + + def test_get_provisioning_config + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_provisioning_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_provisioning_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_provisioning_config_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_provisioning_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_provisioning_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_provisioning_config ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_provisioning_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_provisioning_config(::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_provisioning_config_client_stub.call_count + end + end + end + + def test_create_provisioning_config + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provisioning_config = {} + email = "hello world" + + create_provisioning_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_provisioning_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_provisioning_config_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_provisioning_config ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_provisioning_config(::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_provisioning_config_client_stub.call_count + end + end + end + + def test_update_provisioning_config + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + provisioning_config = {} + update_mask = {} + email = "hello world" + + update_provisioning_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_provisioning_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_provisioning_config_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_provisioning_config provisioning_config: provisioning_config, update_mask: update_mask, email: email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_provisioning_config ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_provisioning_config(::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_provisioning_config_client_stub.call_count + end + end + end + + def test_rename_network + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::Network.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_network_id = "hello world" + + rename_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_network_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_network_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rename_network({ name: name, new_network_id: new_network_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rename_network name: name, new_network_id: new_network_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rename_network ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rename_network({ name: name, new_network_id: new_network_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rename_network(::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_network_client_stub.call_count + end + end + end + + def test_list_os_images + # Create test objects. + client_result = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_os_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_os_images_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_os_images_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_os_images({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_os_images parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_os_images ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_os_images({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_os_images(::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_os_images_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb new file mode 100644 index 000000000000..0b00041fc098 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb @@ -0,0 +1,2881 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" +require "google/cloud/bare_metal_solution/v2/bare_metal_solution" + +class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_instances + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instances, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instances_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_instances ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_instances(::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_instances_client_stub.call_rpc_count + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Instance.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_instance ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_instance({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_rpc_count + end + end + + def test_update_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + instance = {} + update_mask = {} + + update_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Instance), request["instance"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_instance({ instance: instance, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_instance instance: instance, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_instance ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_instance({ instance: instance, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_instance(::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_instance_client_stub.call_rpc_count + end + end + + def test_rename_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Instance.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_instance_id = "hello world" + + rename_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_instance_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rename_instance({ name: name, new_instance_id: new_instance_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rename_instance name: name, new_instance_id: new_instance_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rename_instance ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rename_instance({ name: name, new_instance_id: new_instance_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rename_instance(::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_instance_client_stub.call_rpc_count + end + end + + def test_reset_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + reset_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reset_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reset_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.reset_instance({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.reset_instance name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.reset_instance ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.reset_instance({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.reset_instance(::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, reset_instance_client_stub.call_rpc_count + end + end + + def test_start_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_instance({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_instance name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_instance ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_instance({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_instance(::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_instance_client_stub.call_rpc_count + end + end + + def test_stop_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + stop_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_instance, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_instance_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stop_instance({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.stop_instance name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.stop_instance ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.stop_instance({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.stop_instance(::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, stop_instance_client_stub.call_rpc_count + end + end + + def test_enable_interactive_serial_console + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_interactive_serial_console_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_interactive_serial_console, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_interactive_serial_console_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.enable_interactive_serial_console({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.enable_interactive_serial_console name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.enable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.enable_interactive_serial_console({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.enable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_interactive_serial_console_client_stub.call_rpc_count + end + end + + def test_disable_interactive_serial_console + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_interactive_serial_console_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_interactive_serial_console, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_interactive_serial_console_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.disable_interactive_serial_console({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.disable_interactive_serial_console name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.disable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.disable_interactive_serial_console({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.disable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_interactive_serial_console_client_stub.call_rpc_count + end + end + + def test_detach_lun + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + instance = "hello world" + lun = "hello world" + skip_reboot = true + + detach_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :detach_lun, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, request + assert_equal "hello world", request["instance"] + assert_equal "hello world", request["lun"] + assert_equal true, request["skip_reboot"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, detach_lun_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.detach_lun instance: instance, lun: lun, skip_reboot: skip_reboot do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.detach_lun ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.detach_lun(::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, detach_lun_client_stub.call_rpc_count + end + end + + def test_list_ssh_keys + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_ssh_keys_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_ssh_keys, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_ssh_keys_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_ssh_keys({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_ssh_keys parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_ssh_keys ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_ssh_keys({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_ssh_keys(::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_ssh_keys_client_stub.call_rpc_count + end + end + + def test_create_ssh_key + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::SSHKey.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + ssh_key = {} + ssh_key_id = "hello world" + + create_ssh_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_ssh_key, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::SSHKey), request["ssh_key"] + assert_equal "hello world", request["ssh_key_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_ssh_key_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_ssh_key parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_ssh_key ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_ssh_key(::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_ssh_key_client_stub.call_rpc_count + end + end + + def test_delete_ssh_key + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_ssh_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_ssh_key, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_ssh_key_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_ssh_key({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_ssh_key name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_ssh_key ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_ssh_key({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_ssh_key(::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_ssh_key_client_stub.call_rpc_count + end + end + + def test_list_volumes + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_volumes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_volumes, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_volumes_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_volumes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_volumes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_volumes ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_volumes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_volumes(::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_volumes_client_stub.call_rpc_count + end + end + + def test_get_volume + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Volume.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_volume({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_volume name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_volume ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_volume({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_volume(::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_volume_client_stub.call_rpc_count + end + end + + def test_update_volume + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + volume = {} + update_mask = {} + + update_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Volume), request["volume"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_volume({ volume: volume, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_volume volume: volume, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_volume ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_volume({ volume: volume, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_volume(::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_volume_client_stub.call_rpc_count + end + end + + def test_rename_volume + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Volume.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_volume_id = "hello world" + + rename_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_volume_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rename_volume({ name: name, new_volume_id: new_volume_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rename_volume name: name, new_volume_id: new_volume_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rename_volume ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rename_volume({ name: name, new_volume_id: new_volume_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rename_volume(::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_volume_client_stub.call_rpc_count + end + end + + def test_evict_volume + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + evict_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :evict_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, evict_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.evict_volume({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.evict_volume name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.evict_volume ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.evict_volume({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.evict_volume(::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, evict_volume_client_stub.call_rpc_count + end + end + + def test_resize_volume + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + volume = "hello world" + size_gib = 42 + + resize_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resize_volume, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, request + assert_equal "hello world", request["volume"] + assert_equal 42, request["size_gib"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resize_volume_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.resize_volume({ volume: volume, size_gib: size_gib }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.resize_volume volume: volume, size_gib: size_gib do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.resize_volume ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.resize_volume({ volume: volume, size_gib: size_gib }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.resize_volume(::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resize_volume_client_stub.call_rpc_count + end + end + + def test_list_networks + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_networks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_networks, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_networks_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_networks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_networks parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_networks ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_networks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_networks(::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_networks_client_stub.call_rpc_count + end + end + + def test_list_network_usage + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + location = "hello world" + + list_network_usage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_network_usage, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, request + assert_equal "hello world", request["location"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_network_usage_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_network_usage({ location: location }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_network_usage location: location do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_network_usage ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_network_usage({ location: location }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_network_usage(::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_network_usage_client_stub.call_rpc_count + end + end + + def test_get_network + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Network.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_network, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_network_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_network({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_network name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_network ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_network({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_network(::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_network_client_stub.call_rpc_count + end + end + + def test_update_network + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + network = {} + update_mask = {} + + update_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_network, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Network), request["network"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_network_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_network({ network: network, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_network network: network, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_network ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_network({ network: network, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_network(::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_network_client_stub.call_rpc_count + end + end + + def test_create_volume_snapshot + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + volume_snapshot = {} + + create_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_volume_snapshot, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot), request["volume_snapshot"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_volume_snapshot_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_volume_snapshot parent: parent, volume_snapshot: volume_snapshot do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_volume_snapshot_client_stub.call_rpc_count + end + end + + def test_restore_volume_snapshot + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + volume_snapshot = "hello world" + + restore_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_volume_snapshot, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, request + assert_equal "hello world", request["volume_snapshot"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_volume_snapshot_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.restore_volume_snapshot({ volume_snapshot: volume_snapshot }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.restore_volume_snapshot volume_snapshot: volume_snapshot do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.restore_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.restore_volume_snapshot({ volume_snapshot: volume_snapshot }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.restore_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restore_volume_snapshot_client_stub.call_rpc_count + end + end + + def test_delete_volume_snapshot + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_volume_snapshot, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_volume_snapshot_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_volume_snapshot({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_volume_snapshot name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_volume_snapshot({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_volume_snapshot_client_stub.call_rpc_count + end + end + + def test_get_volume_snapshot + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_volume_snapshot, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_volume_snapshot_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_volume_snapshot({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_volume_snapshot name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_volume_snapshot({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_volume_snapshot_client_stub.call_rpc_count + end + end + + def test_list_volume_snapshots + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_volume_snapshots_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_volume_snapshots, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_volume_snapshots_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_volume_snapshots parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_volume_snapshots ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_volume_snapshots(::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_volume_snapshots_client_stub.call_rpc_count + end + end + + def test_get_lun + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Lun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lun, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetLunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lun_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lun({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lun name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lun ::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lun({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lun(::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lun_client_stub.call_rpc_count + end + end + + def test_list_luns + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_luns_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_luns, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_luns_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_luns({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_luns parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_luns ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_luns({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_luns(::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_luns_client_stub.call_rpc_count + end + end + + def test_evict_lun + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + evict_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :evict_lun, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, evict_lun_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.evict_lun({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.evict_lun name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.evict_lun ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.evict_lun({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.evict_lun(::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, evict_lun_client_stub.call_rpc_count + end + end + + def test_get_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_nfs_share({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_nfs_share name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_nfs_share ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_nfs_share({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_nfs_share(::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_nfs_share_client_stub.call_rpc_count + end + end + + def test_list_nfs_shares + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_nfs_shares_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_nfs_shares, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_nfs_shares_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_nfs_shares({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_nfs_shares parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_nfs_shares ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_nfs_shares({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_nfs_shares(::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_nfs_shares_client_stub.call_rpc_count + end + end + + def test_update_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + nfs_share = {} + update_mask = {} + + update_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::NfsShare), request["nfs_share"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_nfs_share nfs_share: nfs_share, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_nfs_share ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_nfs_share(::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_nfs_share_client_stub.call_rpc_count + end + end + + def test_create_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + nfs_share = {} + + create_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::NfsShare), request["nfs_share"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_nfs_share({ parent: parent, nfs_share: nfs_share }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_nfs_share parent: parent, nfs_share: nfs_share do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_nfs_share ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_nfs_share({ parent: parent, nfs_share: nfs_share }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_nfs_share(::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_nfs_share_client_stub.call_rpc_count + end + end + + def test_rename_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_nfsshare_id = "hello world" + + rename_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_nfsshare_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rename_nfs_share name: name, new_nfsshare_id: new_nfsshare_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rename_nfs_share ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rename_nfs_share(::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_nfs_share_client_stub.call_rpc_count + end + end + + def test_delete_nfs_share + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_nfs_share, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_nfs_share_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_nfs_share({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_nfs_share name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_nfs_share ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_nfs_share({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_nfs_share(::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_nfs_share_client_stub.call_rpc_count + end + end + + def test_list_provisioning_quotas + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_provisioning_quotas_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_provisioning_quotas, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_provisioning_quotas_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_provisioning_quotas parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_provisioning_quotas ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_provisioning_quotas(::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_provisioning_quotas_client_stub.call_rpc_count + end + end + + def test_submit_provisioning_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provisioning_config = {} + email = "hello world" + + submit_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :submit_provisioning_config, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] + assert_equal "hello world", request["email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, submit_provisioning_config_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.submit_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.submit_provisioning_config ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.submit_provisioning_config(::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, submit_provisioning_config_client_stub.call_rpc_count + end + end + + def test_get_provisioning_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_provisioning_config, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_provisioning_config_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_provisioning_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_provisioning_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_provisioning_config ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_provisioning_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_provisioning_config(::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_provisioning_config_client_stub.call_rpc_count + end + end + + def test_create_provisioning_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + provisioning_config = {} + email = "hello world" + + create_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_provisioning_config, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] + assert_equal "hello world", request["email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_provisioning_config_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_provisioning_config ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_provisioning_config(::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_provisioning_config_client_stub.call_rpc_count + end + end + + def test_update_provisioning_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + provisioning_config = {} + update_mask = {} + email = "hello world" + + update_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_provisioning_config, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_provisioning_config_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_provisioning_config provisioning_config: provisioning_config, update_mask: update_mask, email: email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_provisioning_config ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_provisioning_config(::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_provisioning_config_client_stub.call_rpc_count + end + end + + def test_rename_network + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::Network.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_network_id = "hello world" + + rename_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_network, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_network_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_network_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rename_network({ name: name, new_network_id: new_network_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rename_network name: name, new_network_id: new_network_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rename_network ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rename_network({ name: name, new_network_id: new_network_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rename_network(::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_network_client_stub.call_rpc_count + end + end + + def test_list_os_images + # Create GRPC objects. + grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_os_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_os_images, name + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_os_images_client_stub do + # Create client + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_os_images({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_os_images parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_os_images ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_os_images({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_os_images(::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_os_images_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-batch-v1/.gitignore b/owl-bot-staging/google-cloud-batch-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json new file mode 100644 index 000000000000..e36027edffb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "api_id": "batch.googleapis.com", + "api_shortname": "batch", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest", + "distribution_name": "google-cloud-batch-v1", + "is_cloud": true, + "language": "ruby", + "name": "batch", + "name_pretty": "Batch V1 API", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. Note that google-cloud-batch-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-batch instead. See the readme for more details.", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml b/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml new file mode 100644 index 000000000000..dfe88aff925c --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-batch-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-batch-v1.rb" diff --git a/owl-bot-staging/google-cloud-batch-v1/.toys.rb b/owl-bot-staging/google-cloud-batch-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-batch-v1/.yardopts b/owl-bot-staging/google-cloud-batch-v1/.yardopts new file mode 100644 index 000000000000..5628edd53225 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Batch V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..08e3de31e49e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-batch-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-batch-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/batch/v1" + +client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/batch/v1" + +::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Batch::V1::BatchService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-batch-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/batch/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Batch::V1::BatchService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-batch-v1/Gemfile b/owl-bot-staging/google-cloud-batch-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-batch-v1/LICENSE.md b/owl-bot-staging/google-cloud-batch-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-batch-v1/README.md b/owl-bot-staging/google-cloud-batch-v1/README.md new file mode 100644 index 000000000000..0e1262c992f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/README.md @@ -0,0 +1,151 @@ +# Ruby Client for the Batch V1 API + +An API to manage the running of Batch resources on Google Cloud Platform. + +Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Batch V1 API. Most users should consider using +the main client gem, +[google-cloud-batch](https://rubygems.org/gems/google-cloud-batch). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-batch-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/batch.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/batch/v1" + +client = ::Google::Cloud::Batch::V1::BatchService::Client.new +request = ::Google::Cloud::Batch::V1::CreateJobRequest.new # (request fields as keyword arguments...) +response = client.create_job request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest) +for class and method documentation. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/batch/v1" +require "logger" + +client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-batch`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-batch-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-batch`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-batch-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-batch-v1/Rakefile b/owl-bot-staging/google-cloud-batch-v1/Rakefile new file mode 100644 index 000000000000..639b120c30c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-batch-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/batch/v1/batch_service/credentials" + ::Google::Cloud::Batch::V1::BatchService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-batch-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-batch-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-batch-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-batch-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-batch-v1" + header "google-cloud-batch-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-batch-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-batch-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-batch-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-batch-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json new file mode 100644 index 000000000000..58078d42bdf0 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.batch.v1", + "libraryPackage": "::Google::Cloud::Batch::V1", + "services": { + "BatchService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Batch::V1::BatchService::Client", + "rpcs": { + "CreateJob": { + "methods": [ + "create_job" + ] + }, + "GetJob": { + "methods": [ + "get_job" + ] + }, + "DeleteJob": { + "methods": [ + "delete_job" + ] + }, + "CancelJob": { + "methods": [ + "cancel_job" + ] + }, + "ListJobs": { + "methods": [ + "list_jobs" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec b/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec new file mode 100644 index 000000000000..c97f0fbcf64c --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/batch/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-batch-v1" + gem.version = Google::Cloud::Batch::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. Note that google-cloud-batch-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-batch instead. See the readme for more details." + gem.summary = "An API to manage the running of Batch resources on Google Cloud Platform." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb new file mode 100644 index 000000000000..d1d4a294e405 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/batch/v1" +# require "google/iam/v1" diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb new file mode 100644 index 000000000000..fe260a4306e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/batch/v1/batch_service" +require "google/cloud/batch/v1/version" + +module Google + module Cloud + module Batch + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/batch/v1" + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/batch/v1" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/batch/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb new file mode 100644 index 000000000000..32d4ce08cba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/batch/v1/batch.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/batch/v1/job_pb' +require 'google/cloud/batch/v1/task_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n!google/cloud/batch/v1/batch.proto\x12\x15google.cloud.batch.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/cloud/batch/v1/job.proto\x1a google/cloud/batch/v1/task.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\x01\n\x10\x43reateJobRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x62\x61tch.googleapis.com/Job\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12,\n\x03job\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.JobB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"?\n\rGetJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\"N\n\x10\x44\x65leteJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"c\n\x10\x43\x61ncelJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x13\n\x11\x43\x61ncelJobResponse\"o\n\x0fListJobsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"j\n\x10ListJobsResponse\x12(\n\x04jobs\x18\x01 \x03(\x0b\x32\x1a.google.cloud.batch.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61tch.googleapis.com/TaskGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"m\n\x11ListTasksResponse\x12*\n\x05tasks\x18\x01 \x03(\x0b\x32\x1b.google.cloud.batch.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"A\n\x0eGetTaskRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x62\x61tch.googleapis.com/Task\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xa5\n\n\x0c\x42\x61tchService\x12\x9b\x01\n\tCreateJob\x12\'.google.cloud.batch.v1.CreateJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"I\xda\x41\x11parent,job,job_id\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\x12\x83\x01\n\x06GetJob\x12$.google.cloud.batch.v1.GetJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\x12\xcf\x01\n\tDeleteJob\x12\'.google.cloud.batch.v1.DeleteJobRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41@\n\x15google.protobuf.Empty\x12\'google.cloud.batch.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\x12\xec\x01\n\tCancelJob\x12\'.google.cloud.batch.v1.CancelJobRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41R\n\'google.cloud.batch.v1.CancelJobResponse\x12\'google.cloud.batch.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/jobs/*}:cancel:\x01*\x12\x96\x01\n\x08ListJobs\x12&.google.cloud.batch.v1.ListJobsRequest\x1a\'.google.cloud.batch.v1.ListJobsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\x12\x9b\x01\n\x07GetTask\x12%.google.cloud.batch.v1.GetTaskRequest\x1a\x1b.google.cloud.batch.v1.Task\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}\x12\xae\x01\n\tListTasks\x12\'.google.cloud.batch.v1.ListTasksRequest\x1a(.google.cloud.batch.v1.ListTasksResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks\x1aH\xca\x41\x14\x62\x61tch.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xab\x01\n\x19\x63om.google.cloud.batch.v1B\nBatchProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Batch + module V1 + CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CreateJobRequest").msgclass + GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GetJobRequest").msgclass + DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.DeleteJobRequest").msgclass + CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CancelJobRequest").msgclass + CancelJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CancelJobResponse").msgclass + ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListJobsRequest").msgclass + ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListJobsResponse").msgclass + ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListTasksRequest").msgclass + ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListTasksResponse").msgclass + GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GetTaskRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb new file mode 100644 index 000000000000..d6104f270747 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/batch/v1/version" + +require "google/cloud/batch/v1/batch_service/credentials" +require "google/cloud/batch/v1/batch_service/paths" +require "google/cloud/batch/v1/batch_service/operations" +require "google/cloud/batch/v1/batch_service/client" +require "google/cloud/batch/v1/batch_service/rest" + +module Google + module Cloud + module Batch + module V1 + ## + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/batch/v1/batch_service" + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/batch/v1/batch_service/rest" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module BatchService + end + end + end + end +end + +helper_path = ::File.join __dir__, "batch_service", "helpers.rb" +require "google/cloud/batch/v1/batch_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb new file mode 100644 index 000000000000..2fbab5381bdc --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb @@ -0,0 +1,1190 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/batch/v1/batch_pb" +require "google/cloud/location" + +module Google + module Cloud + module Batch + module V1 + module BatchService + ## + # Client for the BatchService service. + # + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :batch_service_stub + + ## + # Configure the BatchService Client class. + # + # See {::Google::Cloud::Batch::V1::BatchService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BatchService clients + # ::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Batch", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_job.timeout = 60.0 + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_job.timeout = 60.0 + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BatchService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Batch::V1::BatchService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @batch_service_stub.universe_domain + end + + ## + # Create a new BatchService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BatchService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/batch/v1/batch_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @batch_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Batch::V1::BatchService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @batch_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @batch_service_stub.endpoint + config.universe_domain = @batch_service_stub.universe_domain + config.logger = @batch_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Batch::V1::BatchService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @batch_service_stub.logger + end + + # Service calls + + ## + # Create a Job. + # + # @overload create_job(request, options = nil) + # Pass arguments to `create_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::CreateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::CreateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_job(parent: nil, job_id: nil, job: nil, request_id: nil) + # Pass arguments to `create_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name where the Job will be created. + # Pattern: "projects/\\{project}/locations/\\{location}" + # @param job_id [::String] + # ID used to uniquely identify the Job within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and '-' are accepted. + # The '-' character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The job.name field in the request will be ignored and the created resource + # name of the Job will be "\\{parent}/jobs/\\{job_id}". + # @param job [::Google::Cloud::Batch::V1::Job, ::Hash] + # Required. The Job to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::CreateJobRequest.new + # + # # Call the create_job method. + # result = client.create_job request + # + # # The returned object is of type Google::Cloud::Batch::V1::Job. + # p result + # + def create_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CreateJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :create_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a Job specified by its resource name. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Job name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Batch::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :get_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a Job. + # + # @overload delete_job(request, options = nil) + # Pass arguments to `delete_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::DeleteJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::DeleteJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_job(name: nil, reason: nil, request_id: nil) + # Pass arguments to `delete_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Job name. + # @param reason [::String] + # Optional. Reason for this deletion. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::DeleteJobRequest.new + # + # # Call the delete_job method. + # result = client.delete_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::DeleteJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :delete_job, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel a Job. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_job(name: nil, request_id: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Job name. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CancelJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all Jobs for a project within a region. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Batch::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_jobs(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent path. + # @param filter [::String] + # List filter. + # @param order_by [::String] + # Optional. Sort results. Supported are "name", "name desc", "create_time", + # and "create_time desc". + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Batch::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @batch_service_stub, :list_jobs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Return a single Task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Batch::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Task name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Batch::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Batch::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Batch::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List Tasks associated with a job. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Batch::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of a TaskGroup from which Tasks are being requested. + # Pattern: + # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" + # @param filter [::String] + # Task filter, null filter matches all Tasks. + # Filter string should be of the format State=TaskStatus.State e.g. + # State=RUNNING + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Batch::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @batch_service_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BatchService API. + # + # This class represents the configuration for BatchService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Batch::V1::BatchService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "batch.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BatchService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `delete_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + + # @private + def initialize parent_rpcs = nil + create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job + @create_job = ::Gapic::Config::Method.new create_job_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job + @delete_job = ::Gapic::Config::Method.new delete_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb new file mode 100644 index 000000000000..6a4be9120312 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Batch + module V1 + module BatchService + # Credentials for the BatchService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb new file mode 100644 index 000000000000..fca10b6c1bcb --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Batch + module V1 + module BatchService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BatchService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BatchService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "batch.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb new file mode 100644 index 000000000000..b30e342ea480 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + module BatchService + # Path helper methods for the BatchService API. + module Paths + ## + # Create a fully-qualified Job resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param job [String] + # + # @return [::String] + def job_path project:, location:, job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/jobs/#{job}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}` + # + # @param project [String] + # @param location [String] + # @param job [String] + # @param task_group [String] + # @param task [String] + # + # @return [::String] + def task_path project:, location:, job:, task_group:, task: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" + raise ::ArgumentError, "task_group cannot contain /" if task_group.to_s.include? "/" + + "projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}/tasks/#{task}" + end + + ## + # Create a fully-qualified TaskGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}` + # + # @param project [String] + # @param location [String] + # @param job [String] + # @param task_group [String] + # + # @return [::String] + def task_group_path project:, location:, job:, task_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" + + "projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb new file mode 100644 index 000000000000..8c251def07d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/batch/v1/version" +require "google/cloud/batch/v1/bindings_override" + +require "google/cloud/batch/v1/batch_service/credentials" +require "google/cloud/batch/v1/batch_service/paths" +require "google/cloud/batch/v1/batch_service/rest/operations" +require "google/cloud/batch/v1/batch_service/rest/client" + +module Google + module Cloud + module Batch + module V1 + ## + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/batch/v1/batch_service/rest" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module BatchService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/batch/v1/batch_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb new file mode 100644 index 000000000000..b06daf90aa9e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb @@ -0,0 +1,1106 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/batch/v1/batch_pb" +require "google/cloud/batch/v1/batch_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Batch + module V1 + module BatchService + module Rest + ## + # REST client for the BatchService service. + # + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :batch_service_stub + + ## + # Configure the BatchService Client class. + # + # See {::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BatchService clients + # ::Google::Cloud::Batch::V1::BatchService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Batch", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_job.timeout = 60.0 + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_job.timeout = 60.0 + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BatchService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @batch_service_stub.universe_domain + end + + ## + # Create a new BatchService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BatchService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Batch::V1::BatchService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @batch_service_stub = ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @batch_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @batch_service_stub.endpoint + config.universe_domain = @batch_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @batch_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Batch::V1::BatchService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @batch_service_stub.logger + end + + # Service calls + + ## + # Create a Job. + # + # @overload create_job(request, options = nil) + # Pass arguments to `create_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::CreateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::CreateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_job(parent: nil, job_id: nil, job: nil, request_id: nil) + # Pass arguments to `create_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name where the Job will be created. + # Pattern: "projects/\\{project}/locations/\\{location}" + # @param job_id [::String] + # ID used to uniquely identify the Job within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and '-' are accepted. + # The '-' character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The job.name field in the request will be ignored and the created resource + # name of the Job will be "\\{parent}/jobs/\\{job_id}". + # @param job [::Google::Cloud::Batch::V1::Job, ::Hash] + # Required. The Job to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::CreateJobRequest.new + # + # # Call the create_job method. + # result = client.create_job request + # + # # The returned object is of type Google::Cloud::Batch::V1::Job. + # p result + # + def create_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CreateJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.create_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a Job specified by its resource name. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Job name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Batch::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.get_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a Job. + # + # @overload delete_job(request, options = nil) + # Pass arguments to `delete_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::DeleteJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::DeleteJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_job(name: nil, reason: nil, request_id: nil) + # Pass arguments to `delete_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Job name. + # @param reason [::String] + # Optional. Reason for this deletion. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::DeleteJobRequest.new + # + # # Call the delete_job method. + # result = client.delete_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::DeleteJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.delete_job request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel a Job. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Batch::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_job(name: nil, request_id: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Job name. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CancelJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.cancel_job request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all Jobs for a project within a region. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Batch::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_jobs(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent path. + # @param filter [::String] + # List filter. + # @param order_by [::String] + # Optional. Sort results. Supported are "name", "name desc", "create_time", + # and "create_time desc". + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Batch::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.list_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @batch_service_stub, :list_jobs, "jobs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Return a single Task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Batch::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Task name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Batch::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List Tasks associated with a job. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Batch::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Batch::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of a TaskGroup from which Tasks are being requested. + # Pattern: + # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" + # @param filter [::String] + # Task filter, null filter matches all Tasks. + # Filter string should be of the format State=TaskStatus.State e.g. + # State=RUNNING + # @param page_size [::Integer] + # Page size. + # @param page_token [::String] + # Page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/batch/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Batch::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Batch::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_service_stub.list_tasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @batch_service_stub, :list_tasks, "tasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BatchService REST API. + # + # This class represents the configuration for BatchService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Batch::V1::BatchService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "batch.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BatchService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `delete_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + + # @private + def initialize parent_rpcs = nil + create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job + @create_job = ::Gapic::Config::Method.new create_job_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job + @delete_job = ::Gapic::Config::Method.new delete_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb new file mode 100644 index 000000000000..137d56ae329a --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Batch + module V1 + module BatchService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BatchService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BatchService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "batch.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb new file mode 100644 index 000000000000..c5de3cdedd51 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb @@ -0,0 +1,510 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/batch/v1/batch_pb" + +module Google + module Cloud + module Batch + module V1 + module BatchService + module Rest + ## + # REST service stub for the BatchService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # A result object deserialized from the server's reply + def create_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::Job.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Job] + # A result object deserialized from the server's reply + def get_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::Job.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def cancel_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::ListJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::ListJobsResponse] + # A result object deserialized from the server's reply + def list_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Batch::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Batch::V1::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Batch::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/jobs", + body: "job", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_job REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb new file mode 100644 index 000000000000..b5567c2a7b12 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/batch/v1/batch.proto for package 'Google.Cloud.Batch.V1' +# Original file comments: +# Copyright 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/batch/v1/batch_pb' + +module Google + module Cloud + module Batch + module V1 + module BatchService + # Google Batch Service. + # The service manages user submitted batch jobs and allocates Google Compute + # Engine VM instances to run the jobs. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.batch.v1.BatchService' + + # Create a Job. + rpc :CreateJob, ::Google::Cloud::Batch::V1::CreateJobRequest, ::Google::Cloud::Batch::V1::Job + # Get a Job specified by its resource name. + rpc :GetJob, ::Google::Cloud::Batch::V1::GetJobRequest, ::Google::Cloud::Batch::V1::Job + # Delete a Job. + rpc :DeleteJob, ::Google::Cloud::Batch::V1::DeleteJobRequest, ::Google::Longrunning::Operation + # Cancel a Job. + rpc :CancelJob, ::Google::Cloud::Batch::V1::CancelJobRequest, ::Google::Longrunning::Operation + # List all Jobs for a project within a region. + rpc :ListJobs, ::Google::Cloud::Batch::V1::ListJobsRequest, ::Google::Cloud::Batch::V1::ListJobsResponse + # Return a single Task. + rpc :GetTask, ::Google::Cloud::Batch::V1::GetTaskRequest, ::Google::Cloud::Batch::V1::Task + # List Tasks associated with a job. + rpc :ListTasks, ::Google::Cloud::Batch::V1::ListTasksRequest, ::Google::Cloud::Batch::V1::ListTasksResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb new file mode 100644 index 000000000000..16f6486ef2cf --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module Batch + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/batch/v1/rest" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Batch"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb new file mode 100644 index 000000000000..8127bff9136b --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/batch/v1/job.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/batch/v1/task_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\x1fgoogle/cloud/batch/v1/job.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/cloud/batch/v1/task.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x05\n\x03Job\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08priority\x18\x03 \x01(\x03\x12:\n\x0btask_groups\x18\x04 \x03(\x0b\x32 .google.cloud.batch.v1.TaskGroupB\x03\xe0\x41\x02\x12\x42\n\x11\x61llocation_policy\x18\x07 \x01(\x0b\x32\'.google.cloud.batch.v1.AllocationPolicy\x12\x36\n\x06labels\x18\x08 \x03(\x0b\x32&.google.cloud.batch.v1.Job.LabelsEntry\x12\x35\n\x06status\x18\t \x01(\x0b\x32 .google.cloud.batch.v1.JobStatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\x0blogs_policy\x18\r \x01(\x0b\x32!.google.cloud.batch.v1.LogsPolicy\x12=\n\rnotifications\x18\x0e \x03(\x0b\x32&.google.cloud.batch.v1.JobNotification\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:Q\xea\x41N\n\x18\x62\x61tch.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}\"\xcd\x02\n\nLogsPolicy\x12\x42\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LogsPolicy.Destination\x12\x11\n\tlogs_path\x18\x02 \x01(\t\x12W\n\x14\x63loud_logging_option\x18\x03 \x01(\x0b\x32\x34.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionB\x03\xe0\x41\x01\x1a\x46\n\x12\x43loudLoggingOption\x12\x30\n#use_generic_task_monitored_resource\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x0b\x44\x65stination\x12\x1b\n\x17\x44\x45STINATION_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_LOGGING\x10\x01\x12\x08\n\x04PATH\x10\x02\"\xae\x07\n\tJobStatus\x12\x35\n\x05state\x18\x01 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\x12\x45\n\x0btask_groups\x18\x04 \x03(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupsEntry\x12/\n\x0crun_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xd1\x01\n\x0eInstanceStatus\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12U\n\x12provisioning_model\x18\x02 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12\x11\n\ttask_pack\x18\x03 \x01(\x03\x12?\n\tboot_disk\x18\x04 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x1a\xd2\x01\n\x0fTaskGroupStatus\x12L\n\x06\x63ounts\x18\x01 \x03(\x0b\x32<.google.cloud.batch.v1.JobStatus.TaskGroupStatus.CountsEntry\x12\x42\n\tinstances\x18\x02 \x03(\x0b\x32/.google.cloud.batch.v1.JobStatus.InstanceStatus\x1a-\n\x0b\x43ountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x63\n\x0fTaskGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupStatus:\x02\x38\x01\"\xa8\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\r\n\tSCHEDULED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x18\n\x14\x44\x45LETION_IN_PROGRESS\x10\x06\x12\x1c\n\x18\x43\x41NCELLATION_IN_PROGRESS\x10\x07\x12\r\n\tCANCELLED\x10\x08\"\xfc\x02\n\x0fJobNotification\x12\x14\n\x0cpubsub_topic\x18\x01 \x01(\t\x12?\n\x07message\x18\x02 \x01(\x0b\x32..google.cloud.batch.v1.JobNotification.Message\x1a\xc4\x01\n\x07Message\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.batch.v1.JobNotification.Type\x12=\n\rnew_job_state\x18\x02 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12?\n\x0enew_task_state\x18\x03 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"K\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11JOB_STATE_CHANGED\x10\x01\x12\x16\n\x12TASK_STATE_CHANGED\x10\x02\"\xad\x0f\n\x10\x41llocationPolicy\x12H\n\x08location\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.LocationPolicy\x12S\n\tinstances\x18\x08 \x03(\x0b\x32@.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate\x12>\n\x0fservice_account\x18\t \x01(\x0b\x32%.google.cloud.batch.v1.ServiceAccount\x12\x43\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.LabelsEntry\x12\x46\n\x07network\x18\x07 \x01(\x0b\x32\x35.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy\x12J\n\tplacement\x18\n \x01(\x0b\x32\x37.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy\x12\x11\n\x04tags\x18\x0b \x03(\tB\x03\xe0\x41\x01\x1a+\n\x0eLocationPolicy\x12\x19\n\x11\x61llowed_locations\x18\x01 \x03(\t\x1aq\n\x04\x44isk\x12\x0f\n\x05image\x18\x04 \x01(\tH\x00\x12\x12\n\x08snapshot\x18\x05 \x01(\tH\x00\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07size_gb\x18\x02 \x01(\x03\x12\x16\n\x0e\x64isk_interface\x18\x06 \x01(\tB\r\n\x0b\x64\x61ta_source\x1a\x8a\x01\n\x0c\x41ttachedDisk\x12@\n\x08new_disk\x18\x01 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.DiskH\x00\x12\x17\n\rexisting_disk\x18\x02 \x01(\tH\x00\x12\x13\n\x0b\x64\x65vice_name\x18\x03 \x01(\tB\n\n\x08\x61ttached\x1ah\n\x0b\x41\x63\x63\x65lerator\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x1f\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x0e\x64river_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x82\x03\n\x0eInstancePolicy\x12\x14\n\x0cmachine_type\x18\x02 \x01(\t\x12\x18\n\x10min_cpu_platform\x18\x03 \x01(\t\x12U\n\x12provisioning_model\x18\x04 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12I\n\x0c\x61\x63\x63\x65lerators\x18\x05 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.Accelerator\x12?\n\tboot_disk\x18\x08 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x12\x43\n\x05\x64isks\x18\x06 \x03(\x0b\x32\x34.google.cloud.batch.v1.AllocationPolicy.AttachedDisk\x12\x18\n\x0breservation\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xf6\x01\n\x18InstancePolicyOrTemplate\x12H\n\x06policy\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.InstancePolicyH\x00\x12\x1b\n\x11instance_template\x18\x02 \x01(\tH\x00\x12\x1b\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x12\x1e\n\x11install_ops_agent\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x62lock_project_ssh_keys\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x42\x11\n\x0fpolicy_template\x1aW\n\x10NetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\x12\x1e\n\x16no_external_ip_address\x18\x03 \x01(\x08\x1a\x65\n\rNetworkPolicy\x12T\n\x12network_interfaces\x18\x01 \x03(\x0b\x32\x38.google.cloud.batch.v1.AllocationPolicy.NetworkInterface\x1a<\n\x0fPlacementPolicy\x12\x13\n\x0b\x63ollocation\x18\x01 \x01(\t\x12\x14\n\x0cmax_distance\x18\x02 \x01(\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x01\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\x12\x13\n\x0bPREEMPTIBLE\x10\x03\x1a\x02\x08\x01\x12\x15\n\x11RESERVATION_BOUND\x10\x04\x12\x0e\n\nFLEX_START\x10\x05\"\xcb\x04\n\tTaskGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\ttask_spec\x18\x03 \x01(\x0b\x32\x1f.google.cloud.batch.v1.TaskSpecB\x03\xe0\x41\x02\x12\x12\n\ntask_count\x18\x04 \x01(\x03\x12\x13\n\x0bparallelism\x18\x05 \x01(\x03\x12L\n\x11scheduling_policy\x18\x06 \x01(\x0e\x32\x31.google.cloud.batch.v1.TaskGroup.SchedulingPolicy\x12=\n\x11task_environments\x18\t \x03(\x0b\x32\".google.cloud.batch.v1.Environment\x12\x1b\n\x13task_count_per_node\x18\n \x01(\x03\x12\x1a\n\x12require_hosts_file\x18\x0b \x01(\x08\x12\x16\n\x0epermissive_ssh\x18\x0c \x01(\x08\x12\x1c\n\x0frun_as_non_root\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\"\\\n\x10SchedulingPolicy\x12!\n\x1dSCHEDULING_POLICY_UNSPECIFIED\x10\x00\x12\x17\n\x13\x41S_SOON_AS_POSSIBLE\x10\x01\x12\x0c\n\x08IN_ORDER\x10\x02:o\xea\x41l\n\x1e\x62\x61tch.googleapis.com/TaskGroup\x12Jprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"/\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x0e\n\x06scopes\x18\x02 \x03(\tB\xa9\x01\n\x19\x63om.google.cloud.batch.v1B\x08JobProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Batch + module V1 + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Job").msgclass + LogsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy").msgclass + LogsPolicy::CloudLoggingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.CloudLoggingOption").msgclass + LogsPolicy::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.Destination").enummodule + JobStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus").msgclass + JobStatus::InstanceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.InstanceStatus").msgclass + JobStatus::TaskGroupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.TaskGroupStatus").msgclass + JobStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.State").enummodule + JobNotification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification").msgclass + JobNotification::Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Message").msgclass + JobNotification::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Type").enummodule + AllocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy").msgclass + AllocationPolicy::LocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.LocationPolicy").msgclass + AllocationPolicy::Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Disk").msgclass + AllocationPolicy::AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.AttachedDisk").msgclass + AllocationPolicy::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Accelerator").msgclass + AllocationPolicy::InstancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicy").msgclass + AllocationPolicy::InstancePolicyOrTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate").msgclass + AllocationPolicy::NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkInterface").msgclass + AllocationPolicy::NetworkPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkPolicy").msgclass + AllocationPolicy::PlacementPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.PlacementPolicy").msgclass + AllocationPolicy::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.ProvisioningModel").enummodule + TaskGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup").msgclass + TaskGroup::SchedulingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup.SchedulingPolicy").enummodule + ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ServiceAccount").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb new file mode 100644 index 000000000000..4c1a51eb92d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/batch/v1/batch_service/rest" +require "google/cloud/batch/v1/bindings_override" +require "google/cloud/batch/v1/version" + +module Google + module Cloud + module Batch + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/batch/v1/rest" + # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb new file mode 100644 index 000000000000..a3e7ce4ede39 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/batch/v1/task.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/batch/v1/volume_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n google/cloud/batch/v1/task.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/cloud/batch/v1/volume.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"O\n\x0f\x43omputeResource\x12\x11\n\tcpu_milli\x18\x01 \x01(\x03\x12\x12\n\nmemory_mib\x18\x02 \x01(\x03\x12\x15\n\rboot_disk_mib\x18\x04 \x01(\x03\"\xdb\x01\n\x0bStatusEvent\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12.\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x0etask_execution\x18\x04 \x01(\x0b\x32$.google.cloud.batch.v1.TaskExecution\x12;\n\ntask_state\x18\x05 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"\"\n\rTaskExecution\x12\x11\n\texit_code\x18\x01 \x01(\x05\"\xf2\x01\n\nTaskStatus\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\"q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41SSIGNED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\x0e\n\nUNEXECUTED\x10\x06\"\x9e\x06\n\x08Runnable\x12>\n\tcontainer\x18\x01 \x01(\x0b\x32).google.cloud.batch.v1.Runnable.ContainerH\x00\x12\x38\n\x06script\x18\x02 \x01(\x0b\x32&.google.cloud.batch.v1.Runnable.ScriptH\x00\x12:\n\x07\x62\x61rrier\x18\x06 \x01(\x0b\x32\'.google.cloud.batch.v1.Runnable.BarrierH\x00\x12\x19\n\x0c\x64isplay_name\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\x12ignore_exit_status\x18\x03 \x01(\x08\x12\x12\n\nbackground\x18\x04 \x01(\x08\x12\x12\n\nalways_run\x18\x05 \x01(\x08\x12\x37\n\x0b\x65nvironment\x18\x07 \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x06labels\x18\t \x03(\x0b\x32+.google.cloud.batch.v1.Runnable.LabelsEntry\x1a\xcf\x01\n\tContainer\x12\x11\n\timage_uri\x18\x01 \x01(\t\x12\x10\n\x08\x63ommands\x18\x02 \x03(\t\x12\x12\n\nentrypoint\x18\x03 \x01(\t\x12\x0f\n\x07volumes\x18\x07 \x03(\t\x12\x0f\n\x07options\x18\x08 \x01(\t\x12\x1e\n\x16\x62lock_external_network\x18\t \x01(\x08\x12\x10\n\x08username\x18\n \x01(\t\x12\x10\n\x08password\x18\x0b \x01(\t\x12#\n\x16\x65nable_image_streaming\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a\x33\n\x06Script\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x42\t\n\x07\x63ommand\x1a\x17\n\x07\x42\x61rrier\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nexecutable\"\xfd\x03\n\x08TaskSpec\x12\x32\n\trunnables\x18\x08 \x03(\x0b\x32\x1f.google.cloud.batch.v1.Runnable\x12@\n\x10\x63ompute_resource\x18\x03 \x01(\x0b\x32&.google.cloud.batch.v1.ComputeResource\x12\x33\n\x10max_run_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fmax_retry_count\x18\x05 \x01(\x05\x12\x42\n\x12lifecycle_policies\x18\t \x03(\x0b\x32&.google.cloud.batch.v1.LifecyclePolicy\x12K\n\x0c\x65nvironments\x18\x06 \x03(\x0b\x32\x31.google.cloud.batch.v1.TaskSpec.EnvironmentsEntryB\x02\x18\x01\x12.\n\x07volumes\x18\x07 \x03(\x0b\x32\x1d.google.cloud.batch.v1.Volume\x12\x37\n\x0b\x65nvironment\x18\n \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x1a\x33\n\x11\x45nvironmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x02\n\x0fLifecyclePolicy\x12=\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LifecyclePolicy.Action\x12P\n\x10\x61\x63tion_condition\x18\x02 \x01(\x0b\x32\x36.google.cloud.batch.v1.LifecyclePolicy.ActionCondition\x1a%\n\x0f\x41\x63tionCondition\x12\x12\n\nexit_codes\x18\x01 \x03(\x05\"?\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x0e\n\nRETRY_TASK\x10\x01\x12\r\n\tFAIL_TASK\x10\x02\"\xc0\x01\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x06status\x18\x02 \x01(\x0b\x32!.google.cloud.batch.v1.TaskStatus:w\xea\x41t\n\x19\x62\x61tch.googleapis.com/Task\x12Wprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}\"\x8f\x03\n\x0b\x45nvironment\x12\x44\n\tvariables\x18\x01 \x03(\x0b\x32\x31.google.cloud.batch.v1.Environment.VariablesEntry\x12Q\n\x10secret_variables\x18\x02 \x03(\x0b\x32\x37.google.cloud.batch.v1.Environment.SecretVariablesEntry\x12I\n\x13\x65ncrypted_variables\x18\x03 \x01(\x0b\x32,.google.cloud.batch.v1.Environment.KMSEnvMap\x1a\x32\n\tKMSEnvMap\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x13\n\x0b\x63ipher_text\x18\x02 \x01(\t\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x36\n\x14SecretVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\xaa\x01\n\x19\x63om.google.cloud.batch.v1B\tTaskProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Batch + module V1 + ComputeResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ComputeResource").msgclass + StatusEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.StatusEvent").msgclass + TaskExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskExecution").msgclass + TaskStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus").msgclass + TaskStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus.State").enummodule + Runnable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable").msgclass + Runnable::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Container").msgclass + Runnable::Script = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Script").msgclass + Runnable::Barrier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Barrier").msgclass + TaskSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskSpec").msgclass + LifecyclePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy").msgclass + LifecyclePolicy::ActionCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.ActionCondition").msgclass + LifecyclePolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.Action").enummodule + Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Task").msgclass + Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment").msgclass + Environment::KMSEnvMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment.KMSEnvMap").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb new file mode 100644 index 000000000000..01b65f088389 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb new file mode 100644 index 000000000000..c4253a7ced01 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/batch/v1/volume.proto + +require 'google/protobuf' + + +descriptor_data = "\n\"google/cloud/batch/v1/volume.proto\x12\x15google.cloud.batch.v1\"\xaa\x01\n\x06Volume\x12)\n\x03nfs\x18\x01 \x01(\x0b\x32\x1a.google.cloud.batch.v1.NFSH\x00\x12)\n\x03gcs\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.GCSH\x00\x12\x15\n\x0b\x64\x65vice_name\x18\x06 \x01(\tH\x00\x12\x12\n\nmount_path\x18\x04 \x01(\t\x12\x15\n\rmount_options\x18\x05 \x03(\tB\x08\n\x06source\"*\n\x03NFS\x12\x0e\n\x06server\x18\x01 \x01(\t\x12\x13\n\x0bremote_path\x18\x02 \x01(\t\"\x1a\n\x03GCS\x12\x13\n\x0bremote_path\x18\x01 \x01(\tB\xac\x01\n\x19\x63om.google.cloud.batch.v1B\x0bVolumeProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Batch + module V1 + Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Volume").msgclass + NFS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.NFS").msgclass + GCS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GCS").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb new file mode 100644 index 000000000000..0cf0d5bd1303 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v1/iam_policy" +require "google/cloud/batch/v1/version" + +module Google + module Iam + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/iam/v1" + # client = ::Google::Iam::V1::IAMPolicy::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/iam/v1" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module V1 + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/iam/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb new file mode 100644 index 000000000000..9797016a6751 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Iam + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/iam/v1/rest" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Iam"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..e4bdf8b4e266 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/batch/v1/version" + +require "google/iam/v1/iam_policy/credentials" +require "google/iam/v1/iam_policy/client" +require "google/iam/v1/iam_policy/rest" + +module Google + module Iam + module V1 + ## + # API Overview + # + # Manages Identity and Access Management (IAM) policies. + # + # Any implementation of an API that offers access control features + # implements the google.iam.v1.IAMPolicy interface. + # + # ## Data model + # + # Access control is applied when a principal (user or service account), takes + # some action on a resource exposed by a service. Resources, identified by + # URI-like names, are the unit of access control specification. Service + # implementations can choose the granularity of access control and the + # supported permissions for their resources. + # For example one database service may allow access control to be + # specified only at the Table level, whereas another might allow access control + # to also be specified at the Column level. + # + # ## Policy Structure + # + # See google.iam.v1.Policy + # + # This is intentionally not a CRUD style API because access control policies + # are created and deleted implicitly with the resources to which they are + # attached. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/v1/iam_policy" + # client = ::Google::Iam::V1::IAMPolicy::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/v1/iam_policy/rest" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module IAMPolicy + end + end + end +end + +helper_path = ::File.join __dir__, "iam_policy", "helpers.rb" +require "google/iam/v1/iam_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb new file mode 100644 index 000000000000..90f72f78a9c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb @@ -0,0 +1,727 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/iam/v1/iam_policy_pb" +require "google/cloud/location" + +module Google + module Iam + module V1 + module IAMPolicy + ## + # Client for the IAMPolicy service. + # + # API Overview + # + # Manages Identity and Access Management (IAM) policies. + # + # Any implementation of an API that offers access control features + # implements the google.iam.v1.IAMPolicy interface. + # + # ## Data model + # + # Access control is applied when a principal (user or service account), takes + # some action on a resource exposed by a service. Resources, identified by + # URI-like names, are the unit of access control specification. Service + # implementations can choose the granularity of access control and the + # supported permissions for their resources. + # For example one database service may allow access control to be + # specified only at the Table level, whereas another might allow access control + # to also be specified at the Column level. + # + # ## Policy Structure + # + # See google.iam.v1.Policy + # + # This is intentionally not a CRUD style API because access control policies + # are created and deleted implicitly with the resources to which they are + # attached. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :iam_policy_stub + + ## + # Configure the IAMPolicy Client class. + # + # See {::Google::Iam::V1::IAMPolicy::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IAMPolicy clients + # ::Google::Iam::V1::IAMPolicy::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Iam", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IAMPolicy Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Iam::V1::IAMPolicy::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @iam_policy_stub.universe_domain + end + + ## + # Create a new IAMPolicy client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V1::IAMPolicy::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IAMPolicy client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/iam/v1/iam_policy_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @iam_policy_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::V1::IAMPolicy::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @iam_policy_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @iam_policy_stub.endpoint + config.universe_domain = @iam_policy_stub.universe_domain + config.logger = @iam_policy_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @iam_policy_stub.logger + end + + # Service calls + + ## + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_policy_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_policy_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a `NOT_FOUND` error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_policy_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the IAMPolicy API. + # + # This class represents the configuration for IAMPolicy, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Iam::V1::IAMPolicy::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # set_iam_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V1::IAMPolicy::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.set_iam_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.set_iam_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the IAMPolicy API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb new file mode 100644 index 000000000000..ae4df78450b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Iam + module V1 + module IAMPolicy + # Credentials for the IAMPolicy API. + class Credentials < ::Google::Auth::Credentials + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb new file mode 100644 index 000000000000..cd6d6cbdd883 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/batch/v1/version" +require "google/iam/v1/bindings_override" + +require "google/iam/v1/iam_policy/credentials" +require "google/iam/v1/iam_policy/rest/client" + +module Google + module Iam + module V1 + ## + # API Overview + # + # Manages Identity and Access Management (IAM) policies. + # + # Any implementation of an API that offers access control features + # implements the google.iam.v1.IAMPolicy interface. + # + # ## Data model + # + # Access control is applied when a principal (user or service account), takes + # some action on a resource exposed by a service. Resources, identified by + # URI-like names, are the unit of access control specification. Service + # implementations can choose the granularity of access control and the + # supported permissions for their resources. + # For example one database service may allow access control to be + # specified only at the Table level, whereas another might allow access control + # to also be specified at the Column level. + # + # ## Policy Structure + # + # See google.iam.v1.Policy + # + # This is intentionally not a CRUD style API because access control policies + # are created and deleted implicitly with the resources to which they are + # attached. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/v1/iam_policy/rest" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module IAMPolicy + # Client for the REST transport + module Rest + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/v1/iam_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb new file mode 100644 index 000000000000..0537cf607ef9 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb @@ -0,0 +1,671 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/iam/v1/iam_policy_pb" +require "google/iam/v1/iam_policy/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Iam + module V1 + module IAMPolicy + module Rest + ## + # REST client for the IAMPolicy service. + # + # API Overview + # + # Manages Identity and Access Management (IAM) policies. + # + # Any implementation of an API that offers access control features + # implements the google.iam.v1.IAMPolicy interface. + # + # ## Data model + # + # Access control is applied when a principal (user or service account), takes + # some action on a resource exposed by a service. Resources, identified by + # URI-like names, are the unit of access control specification. Service + # implementations can choose the granularity of access control and the + # supported permissions for their resources. + # For example one database service may allow access control to be + # specified only at the Table level, whereas another might allow access control + # to also be specified at the Column level. + # + # ## Policy Structure + # + # See google.iam.v1.Policy + # + # This is intentionally not a CRUD style API because access control policies + # are created and deleted implicitly with the resources to which they are + # attached. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :iam_policy_stub + + ## + # Configure the IAMPolicy Client class. + # + # See {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IAMPolicy clients + # ::Google::Iam::V1::IAMPolicy::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Iam", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IAMPolicy Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @iam_policy_stub.universe_domain + end + + ## + # Create a new IAMPolicy REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IAMPolicy client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @iam_policy_stub = ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @iam_policy_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @iam_policy_stub.endpoint + config.universe_domain = @iam_policy_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @iam_policy_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @iam_policy_stub.logger + end + + # Service calls + + ## + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_policy_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_policy_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a `NOT_FOUND` error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::V1::IAMPolicy::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Batch::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_policy_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the IAMPolicy REST API. + # + # This class represents the configuration for IAMPolicy REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # set_iam_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::V1::IAMPolicy::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.set_iam_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.set_iam_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the IAMPolicy API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb new file mode 100644 index 000000000000..0a767ec9f84a --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v1/iam_policy_pb" + +module Google + module Iam + module V1 + module IAMPolicy + module Rest + ## + # REST service stub for the IAMPolicy service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^.*$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^.*$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^.*$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb new file mode 100644 index 000000000000..548e0e659b74 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/v1/iam_policy/rest" +require "google/iam/v1/bindings_override" +require "google/cloud/batch/v1/version" + +module Google + module Iam + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/iam/v1/rest" + # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new + # + module V1 + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md new file mode 100644 index 000000000000..40b55bf3d716 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Batch V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb new file mode 100644 index 000000000000..2c6e39a147a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb @@ -0,0 +1,246 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + # CreateJob Request. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name where the Job will be created. + # Pattern: "projects/\\{project}/locations/\\{location}" + # @!attribute [rw] job_id + # @return [::String] + # ID used to uniquely identify the Job within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and '-' are accepted. + # The '-' character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The job.name field in the request will be ignored and the created resource + # name of the Job will be "\\{parent}/jobs/\\{job_id}". + # @!attribute [rw] job + # @return [::Google::Cloud::Batch::V1::Job] + # Required. The Job to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetJob Request. + # @!attribute [rw] name + # @return [::String] + # Required. Job name. + class GetJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteJob Request. + # @!attribute [rw] name + # @return [::String] + # Job name. + # @!attribute [rw] reason + # @return [::String] + # Optional. Reason for this deletion. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CancelJob Request. + # @!attribute [rw] name + # @return [::String] + # Required. Job name. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CancelJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to the CancelJob request. + class CancelJobResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListJob Request. + # @!attribute [rw] parent + # @return [::String] + # Parent path. + # @!attribute [rw] filter + # @return [::String] + # List filter. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Sort results. Supported are "name", "name desc", "create_time", + # and "create_time desc". + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token. + class ListJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListJob Response. + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Batch::V1::Job>] + # Jobs. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListTasks Request. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of a TaskGroup from which Tasks are being requested. + # Pattern: + # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" + # @!attribute [rw] filter + # @return [::String] + # Task filter, null filter matches all Tasks. + # Filter string should be of the format State=TaskStatus.State e.g. + # State=RUNNING + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token. + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListTasks Response. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Batch::V1::Task>] + # Tasks. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for a single Task by name. + # @!attribute [rw] name + # @return [::String] + # Required. Task name. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb new file mode 100644 index 000000000000..eec32377762d --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb @@ -0,0 +1,789 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + # The Cloud Batch Job description. + # @!attribute [r] name + # @return [::String] + # Output only. Job name. + # For example: "projects/123456/locations/us-central1/jobs/job01". + # @!attribute [r] uid + # @return [::String] + # Output only. A system generated unique ID for the Job. + # @!attribute [rw] priority + # @return [::Integer] + # Priority of the Job. + # The valid value range is [0, 100). Default value is 0. + # Higher value indicates higher priority. + # A job with higher priority value is more likely to run earlier if all other + # requirements are satisfied. + # @!attribute [rw] task_groups + # @return [::Array<::Google::Cloud::Batch::V1::TaskGroup>] + # Required. TaskGroups in the Job. Only one TaskGroup is supported now. + # @!attribute [rw] allocation_policy + # @return [::Google::Cloud::Batch::V1::AllocationPolicy] + # Compute resource allocation for all TaskGroups in the Job. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Custom labels to apply to the job and any Cloud Logging + # [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) + # that it generates. + # + # Use labels to group and describe the resources they are applied to. Batch + # automatically applies predefined labels and supports multiple `labels` + # fields for each job, which each let you apply custom labels to various + # resources. Label names that start with "goog-" or "google-" are + # reserved for predefined labels. For more information about labels with + # Batch, see + # [Organize resources using + # labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). + # @!attribute [r] status + # @return [::Google::Cloud::Batch::V1::JobStatus] + # Output only. Job status. It is read only for users. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Job was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time the Job was updated. + # @!attribute [rw] logs_policy + # @return [::Google::Cloud::Batch::V1::LogsPolicy] + # Log preservation policy for the Job. + # @!attribute [rw] notifications + # @return [::Array<::Google::Cloud::Batch::V1::JobNotification>] + # Notification configurations. + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # LogsPolicy describes if and how a job's logs are preserved. Logs include + # information that is automatically written by the Batch service agent and any + # information that you configured the job's runnables to write to the `stdout` + # or `stderr` streams. + # @!attribute [rw] destination + # @return [::Google::Cloud::Batch::V1::LogsPolicy::Destination] + # If and where logs should be saved. + # @!attribute [rw] logs_path + # @return [::String] + # When `destination` is set to `PATH`, you must set this field to the path + # where you want logs to be saved. This path can point to a local directory + # on the VM or (if congifured) a directory under the mount path of any + # Cloud Storage bucket, network file system (NFS), or writable persistent + # disk that is mounted to the job. For example, if the job has a bucket with + # `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the + # root directory of the `remotePath` of that bucket by setting this field to + # `/mnt/disks/my-bucket/`. + # @!attribute [rw] cloud_logging_option + # @return [::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption] + # Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally + # set this field to configure additional settings for Cloud Logging. + class LogsPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `CloudLoggingOption` contains additional settings for Cloud Logging logs + # generated by Batch job. + # @!attribute [rw] use_generic_task_monitored_resource + # @return [::Boolean] + # Optional. Set this field to `true` to change the [monitored resource + # type](https://cloud.google.com/monitoring/api/resources) for + # Cloud Logging logs generated by this Batch job from + # the + # [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + # type to the formerly used + # [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + # type. + class CloudLoggingOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The destination (if any) for logs. + module Destination + # (Default) Logs are not preserved. + DESTINATION_UNSPECIFIED = 0 + + # Logs are streamed to Cloud Logging. Optionally, you can configure + # additional settings in the `cloudLoggingOption` field. + CLOUD_LOGGING = 1 + + # Logs are saved to the file path specified in the `logsPath` field. + PATH = 2 + end + end + + # Job status. + # @!attribute [rw] state + # @return [::Google::Cloud::Batch::V1::JobStatus::State] + # Job state + # @!attribute [rw] status_events + # @return [::Array<::Google::Cloud::Batch::V1::StatusEvent>] + # Job status events + # @!attribute [rw] task_groups + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Batch::V1::JobStatus::TaskGroupStatus}] + # Aggregated task status for each TaskGroup in the Job. + # The map key is TaskGroup ID. + # @!attribute [rw] run_duration + # @return [::Google::Protobuf::Duration] + # The duration of time that the Job spent in status RUNNING. + class JobStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VM instance status. + # @!attribute [rw] machine_type + # @return [::String] + # The Compute Engine machine type. + # @!attribute [rw] provisioning_model + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel] + # The VM instance provisioning model. + # @!attribute [rw] task_pack + # @return [::Integer] + # The max number of tasks can be assigned to this instance type. + # @!attribute [rw] boot_disk + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] + # The VM boot disk. + class InstanceStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregated task status for a TaskGroup. + # @!attribute [rw] counts + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # Count of task in each state in the TaskGroup. + # The map key is task state name. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::Batch::V1::JobStatus::InstanceStatus>] + # Status of instances allocated for the TaskGroup. + class TaskGroupStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class CountsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Batch::V1::JobStatus::TaskGroupStatus] + class TaskGroupsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Valid Job states. + module State + # Job state unspecified. + STATE_UNSPECIFIED = 0 + + # Job is admitted (validated and persisted) and waiting for resources. + QUEUED = 1 + + # Job is scheduled to run as soon as resource allocation is ready. + # The resource allocation may happen at a later time but with a high + # chance to succeed. + SCHEDULED = 2 + + # Resource allocation has been successful. At least one Task in the Job is + # RUNNING. + RUNNING = 3 + + # All Tasks in the Job have finished successfully. + SUCCEEDED = 4 + + # At least one Task in the Job has failed. + FAILED = 5 + + # The Job will be deleted, but has not been deleted yet. Typically this is + # because resources used by the Job are still being cleaned up. + DELETION_IN_PROGRESS = 6 + + # The Job cancellation is in progress, this is because the resources used + # by the Job are still being cleaned up. + CANCELLATION_IN_PROGRESS = 7 + + # The Job has been cancelled, the task executions were stopped and the + # resources were cleaned up. + CANCELLED = 8 + end + end + + # Notification configurations. + # @!attribute [rw] pubsub_topic + # @return [::String] + # The Pub/Sub topic where notifications for the job, like state + # changes, will be published. If undefined, no Pub/Sub notifications + # are sent for this job. + # + # Specify the topic using the following format: + # `projects/{project}/topics/{topic}`. + # Notably, if you want to specify a Pub/Sub topic that is in a + # different project than the job, your administrator must grant your + # project's Batch service agent permission to publish to that topic. + # + # For more information about configuring Pub/Sub notifications for + # a job, see + # https://cloud.google.com/batch/docs/enable-notifications. + # @!attribute [rw] message + # @return [::Google::Cloud::Batch::V1::JobNotification::Message] + # The attribute requirements of messages to be sent to this Pub/Sub topic. + # Without this field, no message will be sent. + class JobNotification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message details. + # Describe the conditions under which messages will be sent. + # If no attribute is defined, no message will be sent by default. + # One message should specify either the job or the task level attributes, + # but not both. For example, + # job level: JOB_STATE_CHANGED and/or a specified new_job_state; + # task level: TASK_STATE_CHANGED and/or a specified new_task_state. + # @!attribute [rw] type + # @return [::Google::Cloud::Batch::V1::JobNotification::Type] + # The message type. + # @!attribute [rw] new_job_state + # @return [::Google::Cloud::Batch::V1::JobStatus::State] + # The new job state. + # @!attribute [rw] new_task_state + # @return [::Google::Cloud::Batch::V1::TaskStatus::State] + # The new task state. + class Message + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message type. + module Type + # Unspecified. + TYPE_UNSPECIFIED = 0 + + # Notify users that the job state has changed. + JOB_STATE_CHANGED = 1 + + # Notify users that the task state has changed. + TASK_STATE_CHANGED = 2 + end + end + + # A Job's resource allocation policy describes when, where, and how compute + # resources should be allocated for the Job. + # @!attribute [rw] location + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::LocationPolicy] + # Location where compute resources should be allocated for the Job. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicyOrTemplate>] + # Describe instances that can be created by this AllocationPolicy. + # Only instances[0] is supported now. + # @!attribute [rw] service_account + # @return [::Google::Cloud::Batch::V1::ServiceAccount] + # Defines the service account for Batch-created VMs. If omitted, the [default + # Compute Engine service + # account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + # is used. Must match the service account specified in any used instance + # template configured in the Batch job. + # + # Includes the following fields: + # * email: The service account's email address. If not set, the default + # Compute Engine service account is used. + # * scopes: Additional OAuth scopes to grant the service account, beyond the + # default cloud-platform scope. (list of strings) + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Custom labels to apply to the job and all the Compute Engine resources + # that both are created by this allocation policy and support labels. + # + # Use labels to group and describe the resources they are applied to. Batch + # automatically applies predefined labels and supports multiple `labels` + # fields for each job, which each let you apply custom labels to various + # resources. Label names that start with "goog-" or "google-" are + # reserved for predefined labels. For more information about labels with + # Batch, see + # [Organize resources using + # labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). + # @!attribute [rw] network + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::NetworkPolicy] + # The network policy. + # + # If you define an instance template in the `InstancePolicyOrTemplate` field, + # Batch will use the network settings in the instance template instead of + # this field. + # @!attribute [rw] placement + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::PlacementPolicy] + # The placement policy. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Optional. Tags applied to the VM instances. + # + # The tags identify valid sources or targets for network firewalls. + # Each tag must be 1-63 characters long, and comply with + # [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + class AllocationPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] allowed_locations + # @return [::Array<::String>] + # A list of allowed location names represented by internal URLs. + # + # Each location can be a region or a zone. + # Only one region or multiple zones in one region is supported now. + # For example, + # ["regions/us-central1"] allow VMs in any zones in region us-central1. + # ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + # in zones us-central1-a and us-central1-c. + # + # Mixing locations from different regions would cause errors. + # For example, + # ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + # "zones/us-west1-a"] contains locations from two distinct regions: + # us-central1 and us-west1. This combination will trigger an error. + class LocationPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A new persistent disk or a local ssd. + # A VM can only have one local SSD setting but multiple local SSD partitions. + # See https://cloud.google.com/compute/docs/disks#pdspecs and + # https://cloud.google.com/compute/docs/disks#localssds. + # @!attribute [rw] image + # @return [::String] + # URL for a VM image to use as the data source for this disk. + # For example, the following are all valid URLs: + # + # * Specify the image by its family name: + # projects/\\{project}/global/images/family/\\{image_family} + # * Specify the image version: + # projects/\\{project}/global/images/\\{image_version} + # + # You can also use Batch customized image in short names. + # The following image values are supported for a boot disk: + # + # * `batch-debian`: use Batch Debian images. + # * `batch-cos`: use Batch Container-Optimized images. + # * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + # + # Note: The following fields are mutually exclusive: `image`, `snapshot`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] snapshot + # @return [::String] + # Name of a snapshot used as the data source. + # Snapshot is not supported as boot disk now. + # + # Note: The following fields are mutually exclusive: `snapshot`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type + # @return [::String] + # Disk type as shown in `gcloud compute disk-types list`. + # For example, local SSD uses type "local-ssd". + # Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + # or "pd-standard". If not specified, "pd-standard" will be used as the + # default type for non-boot disks, "pd-balanced" will be used as the + # default type for boot disks. + # @!attribute [rw] size_gb + # @return [::Integer] + # Disk size in GB. + # + # **Non-Boot Disk**: + # If the `type` specifies a persistent disk, this field + # is ignored if `data_source` is set as `image` or `snapshot`. + # If the `type` specifies a local SSD, this field should be a multiple of + # 375 GB, otherwise, the final size will be the next greater multiple of + # 375 GB. + # + # **Boot Disk**: + # Batch will calculate the boot disk size based on source + # image and task requirements if you do not speicify the size. + # If both this field and the `boot_disk_mib` field in task spec's + # `compute_resource` are defined, Batch will only honor this field. + # Also, this field should be no smaller than the source disk's + # size when the `data_source` is set as `snapshot` or `image`. + # For example, if you set an image as the `data_source` field and the + # image's default disk size 30 GB, you can only use this field to make the + # disk larger or equal to 30 GB. + # @!attribute [rw] disk_interface + # @return [::String] + # Local SSDs are available through both "SCSI" and "NVMe" interfaces. + # If not indicated, "NVMe" will be the default one for local ssds. + # This field is ignored for persistent disks as the interface is chosen + # automatically. See + # https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + class Disk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A new or an existing persistent disk (PD) or a local ssd attached to a VM + # instance. + # @!attribute [rw] new_disk + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] + # Note: The following fields are mutually exclusive: `new_disk`, `existing_disk`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] existing_disk + # @return [::String] + # Name of an existing PD. + # + # Note: The following fields are mutually exclusive: `existing_disk`, `new_disk`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] device_name + # @return [::String] + # Device name that the guest operating system will see. + # It is used by Runnable.volumes field to mount disks. So please specify + # the device_name if you want Batch to help mount the disk, and it should + # match the device_name field in volumes. + class AttachedDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Accelerator describes Compute Engine accelerators to be attached to the VM. + # @!attribute [rw] type + # @return [::String] + # The accelerator type. For example, "nvidia-tesla-t4". + # See `gcloud compute accelerator-types list`. + # @!attribute [rw] count + # @return [::Integer] + # The number of accelerators of this type. + # @!attribute [rw] install_gpu_drivers + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Deprecated: please use instances[0].install_gpu_drivers instead. + # @!attribute [rw] driver_version + # @return [::String] + # Optional. The NVIDIA GPU driver version that should be installed for this + # type. + # + # You can define the specific driver version such as "470.103.01", + # following the driver version requirements in + # https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + # Batch will install the specific accelerator driver if qualified. + class Accelerator + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InstancePolicy describes an instance type and resources attached to each VM + # created by this InstancePolicy. + # @!attribute [rw] machine_type + # @return [::String] + # The Compute Engine machine type. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # The minimum CPU platform. + # See + # https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + # @!attribute [rw] provisioning_model + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel] + # The provisioning model. + # @!attribute [rw] accelerators + # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>] + # The accelerators attached to each VM instance. + # @!attribute [rw] boot_disk + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] + # Boot disk to be created and attached to each VM by this InstancePolicy. + # Boot disk will be deleted when the VM is deleted. + # Batch API now only supports booting from image. + # @!attribute [rw] disks + # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::AttachedDisk>] + # Non-boot disks to be attached for each VM created by this InstancePolicy. + # New disks will be deleted when the VM is deleted. + # A non-boot disk is a disk that can be of a device with a + # file system or a raw storage drive that is not ready for data + # storage and accessing. + # @!attribute [rw] reservation + # @return [::String] + # Optional. If not specified (default), VMs will consume any applicable + # reservation. If "NO_RESERVATION" is specified, VMs will not consume any + # reservation. Otherwise, if specified, VMs will consume only the specified + # reservation. + class InstancePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InstancePolicyOrTemplate lets you define the type of resources to use for + # this job either with an InstancePolicy or an instance template. + # If undefined, Batch picks the type of VM to use and doesn't include + # optional VM resources such as GPUs and extra disks. + # @!attribute [rw] policy + # @return [::Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicy] + # InstancePolicy. + # + # Note: The following fields are mutually exclusive: `policy`, `instance_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] instance_template + # @return [::String] + # Name of an instance template used to create VMs. + # Named the field as 'instance_template' instead of 'template' to avoid + # C++ keyword conflict. + # + # Batch only supports global instance templates from the same project as + # the job. + # You can specify the global instance template as a full or partial URL. + # + # Note: The following fields are mutually exclusive: `instance_template`, `policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] install_gpu_drivers + # @return [::Boolean] + # Set this field true if you want Batch to help fetch drivers from a third + # party location and install them for GPUs specified in + # `policy.accelerators` or `instance_template` on your behalf. Default is + # false. + # + # For Container-Optimized Image cases, Batch will install the + # accelerator driver following milestones of + # https://cloud.google.com/container-optimized-os/docs/release-notes. For + # non Container-Optimized Image cases, following + # https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + # @!attribute [rw] install_ops_agent + # @return [::Boolean] + # Optional. Set this field true if you want Batch to install Ops Agent on + # your behalf. Default is false. + # @!attribute [rw] block_project_ssh_keys + # @return [::Boolean] + # Optional. Set this field to `true` if you want Batch to block + # project-level SSH keys from accessing this job's VMs. Alternatively, you + # can configure the job to specify a VM instance template that blocks + # project-level SSH keys. In either case, Batch blocks project-level SSH + # keys while creating the VMs for this job. + # + # Batch allows project-level SSH keys for a job's VMs only if all + # the following are true: + # + # + This field is undefined or set to `false`. + # + The job's VM instance template (if any) doesn't block project-level + # SSH keys. + # + # Notably, you can override this behavior by manually updating a VM to + # block or allow project-level SSH keys. For more information about + # blocking project-level SSH keys, see the Compute Engine documentation: + # https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + class InstancePolicyOrTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A network interface. + # @!attribute [rw] network + # @return [::String] + # The URL of an existing network resource. + # You can specify the network as a full or partial URL. + # + # For example, the following are all valid URLs: + # + # * https://www.googleapis.com/compute/v1/projects/\\{project}/global/networks/\\{network} + # * projects/\\{project}/global/networks/\\{network} + # * global/networks/\\{network} + # @!attribute [rw] subnetwork + # @return [::String] + # The URL of an existing subnetwork resource in the network. + # You can specify the subnetwork as a full or partial URL. + # + # For example, the following are all valid URLs: + # + # * https://www.googleapis.com/compute/v1/projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} + # * projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} + # * regions/\\{region}/subnetworks/\\{subnetwork} + # @!attribute [rw] no_external_ip_address + # @return [::Boolean] + # Default is false (with an external IP address). Required if + # no external public IP address is attached to the VM. If no external + # public IP address, additional configuration is required to allow the VM + # to access Google Services. See + # https://cloud.google.com/vpc/docs/configure-private-google-access and + # https://cloud.google.com/nat/docs/gce-example#create-nat for more + # information. + class NetworkInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NetworkPolicy describes VM instance network configurations. + # @!attribute [rw] network_interfaces + # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::NetworkInterface>] + # Network configurations. + class NetworkPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PlacementPolicy describes a group placement policy for the VMs controlled + # by this AllocationPolicy. + # @!attribute [rw] collocation + # @return [::String] + # UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + # want VMs to be located close to each other for low network latency + # between the VMs. No placement policy will be generated when collocation + # is UNSPECIFIED. + # @!attribute [rw] max_distance + # @return [::Integer] + # When specified, causes the job to fail if more than max_distance logical + # switches are required between VMs. Batch uses the most compact possible + # placement of VMs even when max_distance is not specified. An explicit + # max_distance makes that level of compactness a strict requirement. + # Not yet implemented + class PlacementPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Compute Engine VM instance provisioning model. + module ProvisioningModel + # Unspecified. + PROVISIONING_MODEL_UNSPECIFIED = 0 + + # Standard VM. + STANDARD = 1 + + # SPOT VM. + SPOT = 2 + + # Preemptible VM (PVM). + # + # Above SPOT VM is the preferable model for preemptible VM instances: the + # old preemptible VM model (indicated by this field) is the older model, + # and has been migrated to use the SPOT model as the underlying technology. + # This old model will still be supported. + PREEMPTIBLE = 3 + + # Bound to the lifecycle of the reservation in which it is provisioned. + RESERVATION_BOUND = 4 + + # Instance is provisioned with DWS Flex Start and has limited max run + # duration. + FLEX_START = 5 + end + end + + # A TaskGroup defines one or more Tasks that all share the same TaskSpec. + # @!attribute [r] name + # @return [::String] + # Output only. TaskGroup name. + # The system generates this field based on parent Job name. + # For example: + # "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + # @!attribute [rw] task_spec + # @return [::Google::Cloud::Batch::V1::TaskSpec] + # Required. Tasks in the group share the same task spec. + # @!attribute [rw] task_count + # @return [::Integer] + # Number of Tasks in the TaskGroup. + # Default is 1. + # @!attribute [rw] parallelism + # @return [::Integer] + # Max number of tasks that can run in parallel. + # Default to min(task_count, parallel tasks per job limit). + # See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + # Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + # @!attribute [rw] scheduling_policy + # @return [::Google::Cloud::Batch::V1::TaskGroup::SchedulingPolicy] + # Scheduling policy for Tasks in the TaskGroup. + # The default value is AS_SOON_AS_POSSIBLE. + # @!attribute [rw] task_environments + # @return [::Array<::Google::Cloud::Batch::V1::Environment>] + # An array of environment variable mappings, which are passed to Tasks with + # matching indices. If task_environments is used then task_count should + # not be specified in the request (and will be ignored). Task count will be + # the length of task_environments. + # + # Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + # addition to any environment variables set in task_environments, specifying + # the number of Tasks in the Task's parent TaskGroup, and the specific Task's + # index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + # @!attribute [rw] task_count_per_node + # @return [::Integer] + # Max number of tasks that can be run on a VM at the same time. + # If not specified, the system will decide a value based on available + # compute resources on a VM and task requirements. + # @!attribute [rw] require_hosts_file + # @return [::Boolean] + # When true, Batch will populate a file with a list of all VMs assigned to + # the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + # of that file. Defaults to false. The host file supports up to 1000 VMs. + # @!attribute [rw] permissive_ssh + # @return [::Boolean] + # When true, Batch will configure SSH to allow passwordless login between + # VMs running the Batch tasks in the same TaskGroup. + # @!attribute [rw] run_as_non_root + # @return [::Boolean] + # Optional. If not set or set to false, Batch uses the root user to execute + # runnables. If set to true, Batch runs the runnables using a non-root user. + # Currently, the non-root user Batch used is generated by OS Login. For more + # information, see [About OS + # Login](https://cloud.google.com/compute/docs/oslogin). + class TaskGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How Tasks in the TaskGroup should be scheduled relative to each other. + module SchedulingPolicy + # Unspecified. + SCHEDULING_POLICY_UNSPECIFIED = 0 + + # Run Tasks as soon as resources are available. + # + # Tasks might be executed in parallel depending on parallelism and + # task_count values. + AS_SOON_AS_POSSIBLE = 1 + + # Run Tasks sequentially with increased task index. + IN_ORDER = 2 + end + end + + # Carries information about a Google Cloud service account. + # @!attribute [rw] email + # @return [::String] + # Email address of the service account. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # List of scopes to be enabled for this service account. + class ServiceAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb new file mode 100644 index 000000000000..4f4c80930d3c --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb @@ -0,0 +1,547 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + # Compute resource requirements. + # + # ComputeResource defines the amount of resources required for each task. + # Make sure your tasks have enough resources to successfully run. + # If you also define the types of resources for a job to use with the + # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + # field, make sure both fields are compatible with each other. + # @!attribute [rw] cpu_milli + # @return [::Integer] + # The milliCPU count. + # + # `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + # For example, `1000` corresponds to 1 vCPU per task. If undefined, the + # default value is `2000`. + # + # If you also define the VM's machine type using the `machineType` in + # [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + # field or inside the `instanceTemplate` in the + # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + # field, make sure the CPU resources for both fields are compatible with each + # other and with how many tasks you want to allow to run on the same VM at + # the same time. + # + # For example, if you specify the `n2-standard-2` machine type, which has 2 + # vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + # you are recommended to run two tasks on the same VM if you set `cpuMilli` + # to `1000` or less. + # @!attribute [rw] memory_mib + # @return [::Integer] + # Memory in MiB. + # + # `memoryMib` defines the amount of memory per task in MiB units. + # If undefined, the default value is `2000`. + # If you also define the VM's machine type using the `machineType` in + # [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + # field or inside the `instanceTemplate` in the + # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + # field, make sure the memory resources for both fields are compatible with + # each other and with how many tasks you want to allow to run on the same VM + # at the same time. + # + # For example, if you specify the `n2-standard-2` machine type, which has 8 + # GiB each, you are recommended to set `memoryMib` to no more than `8192`, + # or you are recommended to run two tasks on the same VM if you set + # `memoryMib` to `4096` or less. + # @!attribute [rw] boot_disk_mib + # @return [::Integer] + # Extra boot disk size in MiB for each task. + class ComputeResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status event. + # @!attribute [rw] type + # @return [::String] + # Type of the event. + # @!attribute [rw] description + # @return [::String] + # Description of the event. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # The time this event occurred. + # @!attribute [rw] task_execution + # @return [::Google::Cloud::Batch::V1::TaskExecution] + # Task Execution. + # This field is only defined for task-level status events where the task + # fails. + # @!attribute [rw] task_state + # @return [::Google::Cloud::Batch::V1::TaskStatus::State] + # Task State. + # This field is only defined for task-level status events. + class StatusEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This Task Execution field includes detail information for + # task execution procedures, based on StatusEvent types. + # @!attribute [rw] exit_code + # @return [::Integer] + # The exit code of a finished task. + # + # If the task succeeded, the exit code will be 0. If the task failed but not + # due to the following reasons, the exit code will be 50000. + # + # Otherwise, it can be from different sources: + # * Batch known failures: + # https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + # * Batch runnable execution failures; you can rely on Batch logs to further + # diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + # there are multiple runnables failures, Batch only exposes the first error. + class TaskExecution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of a task. + # @!attribute [rw] state + # @return [::Google::Cloud::Batch::V1::TaskStatus::State] + # Task state. + # @!attribute [rw] status_events + # @return [::Array<::Google::Cloud::Batch::V1::StatusEvent>] + # Detailed info about why the state is reached. + class TaskStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Task states. + module State + # Unknown state. + STATE_UNSPECIFIED = 0 + + # The Task is created and waiting for resources. + PENDING = 1 + + # The Task is assigned to at least one VM. + ASSIGNED = 2 + + # The Task is running. + RUNNING = 3 + + # The Task has failed. + FAILED = 4 + + # The Task has succeeded. + SUCCEEDED = 5 + + # The Task has not been executed when the Job finishes. + UNEXECUTED = 6 + end + end + + # Runnable describes instructions for executing a specific script or container + # as part of a Task. + # @!attribute [rw] container + # @return [::Google::Cloud::Batch::V1::Runnable::Container] + # Container runnable. + # + # Note: The following fields are mutually exclusive: `container`, `script`, `barrier`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] script + # @return [::Google::Cloud::Batch::V1::Runnable::Script] + # Script runnable. + # + # Note: The following fields are mutually exclusive: `script`, `container`, `barrier`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] barrier + # @return [::Google::Cloud::Batch::V1::Runnable::Barrier] + # Barrier runnable. + # + # Note: The following fields are mutually exclusive: `barrier`, `container`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] display_name + # @return [::String] + # Optional. DisplayName is an optional field that can be provided by the + # caller. If provided, it will be used in logs and other outputs to identify + # the script, making it easier for users to understand the logs. If not + # provided the index of the runnable will be used for outputs. + # @!attribute [rw] ignore_exit_status + # @return [::Boolean] + # Normally, a runnable that returns a non-zero exit status fails and causes + # the task to fail. However, you can set this field to `true` to allow the + # task to continue executing its other runnables even if this runnable + # fails. + # @!attribute [rw] background + # @return [::Boolean] + # Normally, a runnable that doesn't exit causes its task to fail. However, + # you can set this field to `true` to configure a background runnable. + # Background runnables are allowed continue running in the background while + # the task executes subsequent runnables. For example, background runnables + # are useful for providing services to other runnables or providing + # debugging-support tools like SSH servers. + # + # Specifically, background runnables are killed automatically (if they have + # not already exited) a short time after all foreground runnables have + # completed. Even though this is likely to result in a non-zero exit status + # for the background runnable, these automatic kills are not treated as task + # failures. + # @!attribute [rw] always_run + # @return [::Boolean] + # By default, after a Runnable fails, no further Runnable are executed. This + # flag indicates that this Runnable must be run even if the Task has already + # failed. This is useful for Runnables that copy output files off of the VM + # or for debugging. + # + # The always_run flag does not override the Task's overall max_run_duration. + # If the max_run_duration has expired then no further Runnables will execute, + # not even always_run Runnables. + # @!attribute [rw] environment + # @return [::Google::Cloud::Batch::V1::Environment] + # Environment variables for this Runnable (overrides variables set for the + # whole Task or TaskGroup). + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Timeout for this Runnable. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels for this Runnable. + class Runnable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Container runnable. + # @!attribute [rw] image_uri + # @return [::String] + # Required. The URI to pull the container image from. + # @!attribute [rw] commands + # @return [::Array<::String>] + # Required for some container images. Overrides the `CMD` specified in the + # container. If there is an `ENTRYPOINT` (either in the container image or + # with the `entrypoint` field below) then these commands are appended as + # arguments to the `ENTRYPOINT`. + # @!attribute [rw] entrypoint + # @return [::String] + # Required for some container images. Overrides the `ENTRYPOINT` specified + # in the container. + # @!attribute [rw] volumes + # @return [::Array<::String>] + # Volumes to mount (bind mount) from the host machine files or directories + # into the container, formatted to match `--volume` option for the + # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. + # + # If the `TaskSpec.Volumes` field is specified but this field is not, Batch + # will mount each volume from the host machine to the container with the + # same mount path by default. In this case, the default mount option for + # containers will be read-only (`ro`) for existing persistent disks and + # read-write (`rw`) for other volume types, regardless of the original + # mount options specified in `TaskSpec.Volumes`. If you need different + # mount settings, you can explicitly configure them in this field. + # @!attribute [rw] options + # @return [::String] + # Required for some container images. Arbitrary additional options to + # include in the `docker run` command when running this container—for + # example, `--network host`. For the `--volume` option, use the `volumes` + # field for the container. + # @!attribute [rw] block_external_network + # @return [::Boolean] + # If set to true, external network access to and from container will be + # blocked, containers that are with block_external_network as true can + # still communicate with each other, network cannot be specified in the + # `container.options` field. + # @!attribute [rw] username + # @return [::String] + # Required if the container image is from a private Docker registry. The + # username to login to the Docker registry that contains the image. + # + # You can either specify the username directly by using plain text or + # specify an encrypted username by using a Secret Manager secret: + # `projects/*/secrets/*/versions/*`. However, using a secret is + # recommended for enhanced security. + # + # Caution: If you specify the username using plain text, you risk the + # username being exposed to any users who can view the job or its logs. + # To avoid this risk, specify a secret that contains the username instead. + # + # Learn more about [Secret + # Manager](https://cloud.google.com/secret-manager/docs/) and [using + # Secret Manager with + # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + # @!attribute [rw] password + # @return [::String] + # Required if the container image is from a private Docker registry. The + # password to login to the Docker registry that contains the image. + # + # For security, it is strongly recommended to specify an + # encrypted password by using a Secret Manager secret: + # `projects/*/secrets/*/versions/*`. + # + # Warning: If you specify the password using plain text, you risk the + # password being exposed to any users who can view the job or its logs. + # To avoid this risk, specify a secret that contains the password instead. + # + # Learn more about [Secret + # Manager](https://cloud.google.com/secret-manager/docs/) and [using + # Secret Manager with + # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + # @!attribute [rw] enable_image_streaming + # @return [::Boolean] + # Optional. If set to true, this container runnable uses Image streaming. + # + # Use Image streaming to allow the runnable to initialize without + # waiting for the entire container image to download, which can + # significantly reduce startup time for large container images. + # + # When `enableImageStreaming` is set to true, the container + # runtime is [containerd](https://containerd.io/) instead of Docker. + # Additionally, this container runnable only supports the following + # `container` subfields: `imageUri`, + # `commands[]`, `entrypoint`, and + # `volumes[]`; any other `container` subfields are ignored. + # + # For more information about the requirements and limitations for using + # Image streaming with Batch, see the [`image-streaming` + # sample on + # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + class Container + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Script runnable. + # @!attribute [rw] path + # @return [::String] + # The path to a script file that is accessible from the host VM(s). + # + # Unless the script file supports the default `#!/bin/sh` shell + # interpreter, you must specify an interpreter by including a + # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the + # first line of the file. For example, to execute the script using bash, + # include `#!/bin/bash` as the first line of the file. Alternatively, + # to execute the script using Python3, include `#!/usr/bin/env python3` + # as the first line of the file. + # + # Note: The following fields are mutually exclusive: `path`, `text`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text + # @return [::String] + # The text for a script. + # + # Unless the script text supports the default `#!/bin/sh` shell + # interpreter, you must specify an interpreter by including a + # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the + # beginning of the text. For example, to execute the script using bash, + # include `#!/bin/bash\n` at the beginning of the text. Alternatively, + # to execute the script using Python3, include `#!/usr/bin/env python3\n` + # at the beginning of the text. + # + # Note: The following fields are mutually exclusive: `text`, `path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Script + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A barrier runnable automatically blocks the execution of subsequent + # runnables until all the tasks in the task group reach the barrier. + # @!attribute [rw] name + # @return [::String] + # Barriers are identified by their index in runnable list. + # Names are not required, but if present should be an identifier. + class Barrier + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Spec of a task + # @!attribute [rw] runnables + # @return [::Array<::Google::Cloud::Batch::V1::Runnable>] + # Required. The sequence of one or more runnables (executable scripts, + # executable containers, and/or barriers) for each task in this task group to + # run. Each task runs this list of runnables in order. For a task to succeed, + # all of its script and container runnables each must meet at least one of + # the following conditions: + # + # + The runnable exited with a zero status. + # + The runnable didn't finish, but you enabled its `background` subfield. + # + The runnable exited with a non-zero status, but you enabled its + # `ignore_exit_status` subfield. + # @!attribute [rw] compute_resource + # @return [::Google::Cloud::Batch::V1::ComputeResource] + # ComputeResource requirements. + # @!attribute [rw] max_run_duration + # @return [::Google::Protobuf::Duration] + # Maximum duration the task should run before being automatically retried + # (if enabled) or automatically failed. Format the value of this field + # as a time limit in seconds followed by `s`—for example, `3600s` + # for 1 hour. The field accepts any value between 0 and the maximum listed + # for the `Duration` field type at + # https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + # the actual maximum run time for a job will be limited to the maximum run + # time for a job listed at + # https://cloud.google.com/batch/quotas#max-job-duration. + # @!attribute [rw] max_retry_count + # @return [::Integer] + # Maximum number of retries on failures. + # The default, 0, which means never retry. + # The valid value range is [0, 10]. + # @!attribute [rw] lifecycle_policies + # @return [::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>] + # Lifecycle management schema when any task in a task group is failed. + # Currently we only support one lifecycle policy. + # When the lifecycle policy condition is met, + # the action in the policy will execute. + # If task execution result does not meet with the defined lifecycle + # policy, we consider it as the default policy. + # Default policy means if the exit code is 0, exit task. + # If task ends with non-zero exit code, retry the task with max_retry_count. + # @!attribute [rw] environments + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Map{::String => ::String}] + # Deprecated: please use environment(non-plural) instead. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::Batch::V1::Volume>] + # Volumes to mount before running Tasks using this TaskSpec. + # @!attribute [rw] environment + # @return [::Google::Cloud::Batch::V1::Environment] + # Environment variables to set before running the Task. + class TaskSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class EnvironmentsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # LifecyclePolicy describes how to deal with task failures + # based on different conditions. + # @!attribute [rw] action + # @return [::Google::Cloud::Batch::V1::LifecyclePolicy::Action] + # Action to execute when ActionCondition is true. + # When RETRY_TASK is specified, we will retry failed tasks + # if we notice any exit code match and fail tasks if no match is found. + # Likewise, when FAIL_TASK is specified, we will fail tasks + # if we notice any exit code match and retry tasks if no match is found. + # @!attribute [rw] action_condition + # @return [::Google::Cloud::Batch::V1::LifecyclePolicy::ActionCondition] + # Conditions that decide why a task failure is dealt with a specific action. + class LifecyclePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Conditions for actions to deal with task failures. + # @!attribute [rw] exit_codes + # @return [::Array<::Integer>] + # Exit codes of a task execution. + # If there are more than 1 exit codes, + # when task executes with any of the exit code in the list, + # the condition is met and the action will be executed. + class ActionCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action on task failures based on different conditions. + module Action + # Action unspecified. + ACTION_UNSPECIFIED = 0 + + # Action that tasks in the group will be scheduled to re-execute. + RETRY_TASK = 1 + + # Action that tasks in the group will be stopped immediately. + FAIL_TASK = 2 + end + end + + # A Cloud Batch task. + # @!attribute [rw] name + # @return [::String] + # Task name. + # The name is generated from the parent TaskGroup name and 'id' field. + # For example: + # "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + # @!attribute [rw] status + # @return [::Google::Cloud::Batch::V1::TaskStatus] + # Task Status. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An Environment describes a collection of environment variables to set when + # executing Tasks. + # @!attribute [rw] variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # A map of environment variable names to values. + # @!attribute [rw] secret_variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # A map of environment variable names to Secret Manager secret names. + # The VM will access the named secrets to set the value of each environment + # variable. + # @!attribute [rw] encrypted_variables + # @return [::Google::Cloud::Batch::V1::Environment::KMSEnvMap] + # An encrypted JSON dictionary where the key/value pairs correspond to + # environment variable names and their values. + class Environment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key_name + # @return [::String] + # The name of the KMS key that will be used to decrypt the cipher text. + # @!attribute [rw] cipher_text + # @return [::String] + # The value of the cipherText response from the `encrypt` method. + class KMSEnvMap + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class VariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SecretVariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb new file mode 100644 index 000000000000..5c9f7a233fea --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Batch + module V1 + # Volume describes a volume and parameters for it to be mounted to a VM. + # @!attribute [rw] nfs + # @return [::Google::Cloud::Batch::V1::NFS] + # A Network File System (NFS) volume. For example, a + # Filestore file share. + # + # Note: The following fields are mutually exclusive: `nfs`, `gcs`, `device_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs + # @return [::Google::Cloud::Batch::V1::GCS] + # A Google Cloud Storage (GCS) volume. + # + # Note: The following fields are mutually exclusive: `gcs`, `nfs`, `device_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] device_name + # @return [::String] + # Device name of an attached disk volume, which should align with a + # device_name specified by + # job.allocation_policy.instances[0].policy.disks[i].device_name or + # defined by the given instance template in + # job.allocation_policy.instances[0].instance_template. + # + # Note: The following fields are mutually exclusive: `device_name`, `nfs`, `gcs`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mount_path + # @return [::String] + # The mount path for the volume, e.g. /mnt/disks/share. + # @!attribute [rw] mount_options + # @return [::Array<::String>] + # Mount options vary based on the type of storage volume: + # + # * For a Cloud Storage bucket, all the mount options provided + # by + # the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + # are supported. + # * For an existing persistent disk, all mount options provided by the + # [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + # except writing are supported. This is due to restrictions of + # [multi-writer + # mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + # * For any other disk or a Network File System (NFS), all the + # mount options provided by the `mount` command are supported. + class Volume + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an NFS volume. + # @!attribute [rw] server + # @return [::String] + # The IP address of the NFS. + # @!attribute [rw] remote_path + # @return [::String] + # Remote source path exported from the NFS, e.g., "/share". + class NFS + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Google Cloud Storage volume. + # @!attribute [rw] remote_path + # @return [::String] + # Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + # bucket_name, bucket_name/subdirectory/ + class GCS + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile new file mode 100644 index 000000000000..da55e968f9ea --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-batch-v1", path: "../" +else + gem "google-cloud-batch-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb new file mode 100644 index 000000000000..4025c81c42d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_CancelJob_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the cancel_job call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#cancel_job. +# +def cancel_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::CancelJobRequest.new + + # Call the cancel_job method. + result = client.cancel_job request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END batch_v1_generated_BatchService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb new file mode 100644 index 000000000000..2c18c23c163e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_CreateJob_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the create_job call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#create_job. +# +def create_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::CreateJobRequest.new + + # Call the create_job method. + result = client.create_job request + + # The returned object is of type Google::Cloud::Batch::V1::Job. + p result +end +# [END batch_v1_generated_BatchService_CreateJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb new file mode 100644 index 000000000000..a4dac580732e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_DeleteJob_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the delete_job call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#delete_job. +# +def delete_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::DeleteJobRequest.new + + # Call the delete_job method. + result = client.delete_job request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END batch_v1_generated_BatchService_DeleteJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb new file mode 100644 index 000000000000..51b591988ead --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_GetJob_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the get_job call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#get_job. +# +def get_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::GetJobRequest.new + + # Call the get_job method. + result = client.get_job request + + # The returned object is of type Google::Cloud::Batch::V1::Job. + p result +end +# [END batch_v1_generated_BatchService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb new file mode 100644 index 000000000000..fb681197281e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_GetTask_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the get_task call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Cloud::Batch::V1::Task. + p result +end +# [END batch_v1_generated_BatchService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb new file mode 100644 index 000000000000..27e5f50995a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_ListJobs_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the list_jobs call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#list_jobs. +# +def list_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::ListJobsRequest.new + + # Call the list_jobs method. + result = client.list_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Batch::V1::Job. + p item + end +end +# [END batch_v1_generated_BatchService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb new file mode 100644 index 000000000000..a94c440293e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_BatchService_ListTasks_sync] +require "google/cloud/batch/v1" + +## +# Snippet for the list_tasks call in the BatchService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Batch::V1::BatchService::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Batch::V1::BatchService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Batch::V1::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Batch::V1::Task. + p item + end +end +# [END batch_v1_generated_BatchService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb new file mode 100644 index 000000000000..1ad5b84a516b --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_IAMPolicy_GetIamPolicy_sync] +require "google/iam/v1" + +## +# Snippet for the get_iam_policy call in the IAMPolicy service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V1::IAMPolicy::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V1::IAMPolicy::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END batch_v1_generated_IAMPolicy_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb new file mode 100644 index 000000000000..7fb1c919b8da --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_IAMPolicy_SetIamPolicy_sync] +require "google/iam/v1" + +## +# Snippet for the set_iam_policy call in the IAMPolicy service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V1::IAMPolicy::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V1::IAMPolicy::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END batch_v1_generated_IAMPolicy_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb new file mode 100644 index 000000000000..722df828728f --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START batch_v1_generated_IAMPolicy_TestIamPermissions_sync] +require "google/iam/v1" + +## +# Snippet for the test_iam_permissions call in the IAMPolicy service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Iam::V1::IAMPolicy::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::V1::IAMPolicy::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END batch_v1_generated_IAMPolicy_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json new file mode 100644 index 000000000000..53f2a1c4992e --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-cloud-batch-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.batch.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "batch_v1_generated_BatchService_CreateJob_sync", + "title": "Snippet for the create_job call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#create_job.", + "file": "batch_service/create_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_job", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#create_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::CreateJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::Job", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "CreateJob", + "full_name": "google.cloud.batch.v1.BatchService.CreateJob", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_GetJob_sync", + "title": "Snippet for the get_job call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#get_job.", + "file": "batch_service/get_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#get_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::GetJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::Job", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "GetJob", + "full_name": "google.cloud.batch.v1.BatchService.GetJob", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_DeleteJob_sync", + "title": "Snippet for the delete_job call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#delete_job.", + "file": "batch_service/delete_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_job", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#delete_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::DeleteJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "DeleteJob", + "full_name": "google.cloud.batch.v1.BatchService.DeleteJob", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_CancelJob_sync", + "title": "Snippet for the cancel_job call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#cancel_job.", + "file": "batch_service/cancel_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_job", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#cancel_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::CancelJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "CancelJob", + "full_name": "google.cloud.batch.v1.BatchService.CancelJob", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_ListJobs_sync", + "title": "Snippet for the list_jobs call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#list_jobs.", + "file": "batch_service/list_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_jobs", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#list_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::ListJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::ListJobsResponse", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "ListJobs", + "full_name": "google.cloud.batch.v1.BatchService.ListJobs", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_GetTask_sync", + "title": "Snippet for the get_task call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#get_task.", + "file": "batch_service/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::Task", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "google.cloud.batch.v1.BatchService.GetTask", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_BatchService_ListTasks_sync", + "title": "Snippet for the list_tasks call in the BatchService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#list_tasks.", + "file": "batch_service/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Batch::V1::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Batch::V1::ListTasksResponse", + "client": { + "short_name": "BatchService::Client", + "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "google.cloud.batch.v1.BatchService.ListTasks", + "service": { + "short_name": "BatchService", + "full_name": "google.cloud.batch.v1.BatchService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json new file mode 100644 index 000000000000..8e7486b5b5d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-cloud-batch-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.iam.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "batch_v1_generated_IAMPolicy_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the IAMPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#set_iam_policy.", + "file": "iam_policy/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Iam::V1::IAMPolicy::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "IAMPolicy::Client", + "full_name": "::Google::Iam::V1::IAMPolicy::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.iam.v1.IAMPolicy.SetIamPolicy", + "service": { + "short_name": "IAMPolicy", + "full_name": "google.iam.v1.IAMPolicy" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_IAMPolicy_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the IAMPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#get_iam_policy.", + "file": "iam_policy/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Iam::V1::IAMPolicy::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "IAMPolicy::Client", + "full_name": "::Google::Iam::V1::IAMPolicy::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.iam.v1.IAMPolicy.GetIamPolicy", + "service": { + "short_name": "IAMPolicy", + "full_name": "google.iam.v1.IAMPolicy" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "batch_v1_generated_IAMPolicy_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the IAMPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#test_iam_permissions.", + "file": "iam_policy/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Iam::V1::IAMPolicy::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "IAMPolicy::Client", + "full_name": "::Google::Iam::V1::IAMPolicy::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.iam.v1.IAMPolicy.TestIamPermissions", + "service": { + "short_name": "IAMPolicy", + "full_name": "google.iam.v1.IAMPolicy" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb new file mode 100644 index 000000000000..6f39394ae0cc --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/batch/v1/batch_pb" +require "google/cloud/batch/v1/batch_services_pb" +require "google/cloud/batch/v1/batch_service" + +class ::Google::Cloud::Batch::V1::BatchService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb new file mode 100644 index 000000000000..094400644c40 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/batch/v1/batch_service" + +class ::Google::Cloud::Batch::V1::BatchService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_path project: "value0", location: "value1", job: "value2" + assert_equal "projects/value0/locations/value1/jobs/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path project: "value0", location: "value1", job: "value2", task_group: "value3", task: "value4" + assert_equal "projects/value0/locations/value1/jobs/value2/taskGroups/value3/tasks/value4", path + end + end + + def test_task_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_group_path project: "value0", location: "value1", job: "value2", task_group: "value3" + assert_equal "projects/value0/locations/value1/jobs/value2/taskGroups/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb new file mode 100644 index 000000000000..db9f33f72d7a --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb @@ -0,0 +1,490 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/batch/v1/batch_pb" +require "google/cloud/batch/v1/batch_service/rest" + + +class ::Google::Cloud::Batch::V1::BatchService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_job + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job_id = "hello world" + job = {} + request_id = "hello world" + + create_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_create_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_job_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_job parent: parent, job_id: job_id, job: job, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_job ::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_job(::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_job_client_stub.call_count + end + end + end + + def test_get_job + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_job ::Google::Cloud::Batch::V1::GetJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Batch::V1::GetJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_count + end + end + end + + def test_delete_job + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = "hello world" + request_id = "hello world" + + delete_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_delete_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_job_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_job({ name: name, reason: reason, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_job name: name, reason: reason, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_job ::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_job({ name: name, reason: reason, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_job(::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_job_client_stub.call_count + end + end + end + + def test_cancel_job + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_cancel_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_job({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_job name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_job ::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_job({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_job(::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_job_client_stub.call_count + end + end + end + + def test_list_jobs + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::ListJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_jobs parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task ::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Cloud::Batch::V1::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tasks({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tasks parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Batch::V1::ListTasksRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_tasks({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_tasks(::Google::Cloud::Batch::V1::ListTasksRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb new file mode 100644 index 000000000000..1b01d49a2bff --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb @@ -0,0 +1,570 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/batch/v1/batch_pb" +require "google/cloud/batch/v1/batch_service" + +class ::Google::Cloud::Batch::V1::BatchService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job_id = "hello world" + job = {} + request_id = "hello world" + + create_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_job, name + assert_kind_of ::Google::Cloud::Batch::V1::CreateJobRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["job_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Batch::V1::Job), request["job"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_job_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_job parent: parent, job_id: job_id, job: job, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_job ::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_job(::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_job_client_stub.call_rpc_count + end + end + + def test_get_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job, name + assert_kind_of ::Google::Cloud::Batch::V1::GetJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_job ::Google::Cloud::Batch::V1::GetJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Batch::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_rpc_count + end + end + + def test_delete_job + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = "hello world" + request_id = "hello world" + + delete_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_job, name + assert_kind_of ::Google::Cloud::Batch::V1::DeleteJobRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["reason"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_job_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_job({ name: name, reason: reason, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_job name: name, reason: reason, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_job ::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_job({ name: name, reason: reason, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_job(::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_job_client_stub.call_rpc_count + end + end + + def test_cancel_job + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_job, name + assert_kind_of ::Google::Cloud::Batch::V1::CancelJobRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_job_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_job({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_job name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_job ::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_job({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_job(::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_job_client_stub.call_rpc_count + end + end + + def test_list_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::ListJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_jobs, name + assert_kind_of ::Google::Cloud::Batch::V1::ListJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_jobs parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Cloud::Batch::V1::GetTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task ::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Batch::V1::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Cloud::Batch::V1::ListTasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tasks({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_tasks parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Batch::V1::ListTasksRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_tasks({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_tasks(::Google::Cloud::Batch::V1::ListTasksRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb new file mode 100644 index 000000000000..5872de89cd6b --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/iam/v1/iam_policy_pb" +require "google/iam/v1/iam_policy/rest" + + +class ::Google::Iam::V1::IAMPolicy::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb new file mode 100644 index 000000000000..fbfb3e8939bd --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb @@ -0,0 +1,286 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/iam/v1/iam_policy_pb" +require "google/iam/v1/iam_policy" + +class ::Google::Iam::V1::IAMPolicy::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Iam::V1::IAMPolicy::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::V1::IAMPolicy::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/helper.rb b/owl-bot-staging/google-cloud-batch-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-batch-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json new file mode 100644 index 000000000000..b59fbd964684 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "beyondcorp.googleapis.com", + "api_shortname": "beyondcorp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connections-v1/latest", + "distribution_name": "google-cloud-beyond_corp-app_connections-v1", + "is_cloud": true, + "language": "ruby", + "name": "beyondcorp", + "name_pretty": "BeyondCorp AppConnections V1 API", + "product_documentation": "https://cloud.google.com/beyondcorp/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connections-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml new file mode 100644 index 000000000000..9a0f1608e53e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-beyond_corp-app_connections-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-beyond_corp-app_connections-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts new file mode 100644 index 000000000000..d57ef993f75d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BeyondCorp AppConnections V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..5fb552e9ca72 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-beyond_corp-app_connections-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-beyond_corp-app_connections-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/beyond_corp/app_connections/v1" + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/beyond_corp/app_connections/v1" + +::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-beyond_corp-app_connections-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/beyond_corp/app_connections/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md new file mode 100644 index 000000000000..b1b7a83cc8cf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the BeyondCorp AppConnections V1 API + +Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BeyondCorp AppConnections V1 API. Most users should consider using +the main client gem, +[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-beyond_corp-app_connections-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/beyondcorp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/beyond_corp/app_connections/v1" + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new +request = ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new # (request fields as keyword arguments...) +response = client.list_app_connections request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connections-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/beyondcorp/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/beyond_corp/app_connections/v1" +require "logger" + +client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-beyond_corp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-beyond_corp-app_connections-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-beyond_corp`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-beyond_corp-app_connections-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile new file mode 100644 index 000000000000..31baa9b2971f --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-beyond_corp-app_connections-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials" + ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-beyond_corp-app_connections-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-beyond_corp-app_connections-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-beyond_corp-app_connections-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-beyond_corp-app_connections-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-beyond_corp-app_connections-v1" + header "google-cloud-beyond_corp-app_connections-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-beyond_corp-app_connections-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-beyond_corp-app_connections-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-beyond_corp-app_connections-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-beyond_corp-app_connections-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json new file mode 100644 index 000000000000..525a196a960a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.beyondcorp.appconnections.v1", + "libraryPackage": "::Google::Cloud::BeyondCorp::AppConnections::V1", + "services": { + "AppConnectionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client", + "rpcs": { + "ListAppConnections": { + "methods": [ + "list_app_connections" + ] + }, + "GetAppConnection": { + "methods": [ + "get_app_connection" + ] + }, + "CreateAppConnection": { + "methods": [ + "create_app_connection" + ] + }, + "UpdateAppConnection": { + "methods": [ + "update_app_connection" + ] + }, + "DeleteAppConnection": { + "methods": [ + "delete_app_connection" + ] + }, + "ResolveAppConnections": { + "methods": [ + "resolve_app_connections" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec new file mode 100644 index 000000000000..6549a96984bb --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/beyond_corp/app_connections/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-beyond_corp-app_connections-v1" + gem.version = Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connections-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." + gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb new file mode 100644 index 000000000000..1ac7623cc398 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/beyond_corp/app_connections/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb new file mode 100644 index 000000000000..bcc50c2b3a0a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" +require "google/cloud/beyond_corp/app_connections/v1/version" + +module Google + module Cloud + module BeyondCorp + module AppConnections + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_connections/v1" + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/beyond_corp/app_connections/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb new file mode 100644 index 000000000000..41f69b3c5f7e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/beyond_corp/app_connections/v1/version" + +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/client" + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + ## + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectionsService exposes the following resources: + # + # * AppConnections, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. + # + # The AppConnectionsService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnections. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + module AppConnectionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_connections_service", "helpers.rb" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb new file mode 100644 index 000000000000..1a531100e0a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb @@ -0,0 +1,1141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + ## + # Client for the AppConnectionsService service. + # + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectionsService exposes the following resources: + # + # * AppConnections, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. + # + # The AppConnectionsService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnections. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_connections_service_stub + + ## + # Configure the AppConnectionsService Client class. + # + # See {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppConnectionsService clients + # ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BeyondCorp", "AppConnections", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AppConnectionsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @app_connections_service_stub.universe_domain + end + + ## + # Create a new AppConnectionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppConnectionsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @app_connections_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @app_connections_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_connections_service_stub.endpoint + config.universe_domain = @app_connections_service_stub.universe_domain + config.logger = @app_connections_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_connections_service_stub.endpoint + config.universe_domain = @app_connections_service_stub.universe_domain + config.logger = @app_connections_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @app_connections_service_stub.logger + end + + # Service calls + + ## + # Lists AppConnections in a given project and location. + # + # @overload list_app_connections(request, options = nil) + # Pass arguments to `list_app_connections` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_app_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_app_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AppConnection location using the form: + # `projects/{project_id}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ListAppConnectionsRequest, if any. + # @param filter [::String] + # Optional. A filter specifying constraints of a list operation. + # @param order_by [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new + # + # # Call the list_app_connections method. + # result = client.list_app_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. + # p item + # end + # + def list_app_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_app_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_app_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_app_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :list_app_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :list_app_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AppConnection. + # + # @overload get_app_connection(request, options = nil) + # Pass arguments to `get_app_connection` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_app_connection(name: nil) + # Pass arguments to `get_app_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppConnection name using the form: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new + # + # # Call the get_app_connection method. + # result = client.get_app_connection request + # + # # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. + # p result + # + def get_app_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_app_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_app_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_app_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :get_app_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new AppConnection in a given project and location. + # + # @overload create_app_connection(request, options = nil) + # Pass arguments to `create_app_connection` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_app_connection(parent: nil, app_connection_id: nil, app_connection: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_app_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource project name of the AppConnection location using the + # form: `projects/{project_id}/locations/{location_id}` + # @param app_connection_id [::String] + # Optional. User-settable AppConnection resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash] + # Required. A BeyondCorp AppConnection resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new + # + # # Call the create_app_connection method. + # result = client.create_app_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_app_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_app_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_app_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_app_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :create_app_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AppConnection. + # + # @overload update_app_connection(request, options = nil) + # Pass arguments to `update_app_connection` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_app_connection(update_mask: nil, app_connection: nil, request_id: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_app_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from [BeyondCorp.AppConnection]: + # * `labels` + # * `display_name` + # * `application_endpoint` + # * `connectors` + # @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash] + # Required. AppConnection message with updated fields. Only supported fields + # specified in update_mask are updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # @param allow_missing [::Boolean] + # Optional. If set as true, will create the resource if it is not found. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new + # + # # Call the update_app_connection method. + # result = client.update_app_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_app_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_app_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.app_connection&.name + header_params["app_connection.name"] = request.app_connection.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_app_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_app_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :update_app_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AppConnection. + # + # @overload delete_app_connection(request, options = nil) + # Pass arguments to `delete_app_connection` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_app_connection(name: nil, request_id: nil, validate_only: nil) + # Pass arguments to `delete_app_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp Connector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new + # + # # Call the delete_app_connection method. + # result = client.delete_app_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_app_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_app_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_app_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_app_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :delete_app_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resolves AppConnections details for a given AppConnector. + # An internal method called by a connector to find AppConnections to connect + # to. + # + # @overload resolve_app_connections(request, options = nil) + # Pass arguments to `resolve_app_connections` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resolve_app_connections(parent: nil, app_connector_id: nil, page_size: nil, page_token: nil) + # Pass arguments to `resolve_app_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AppConnection location using the form: + # `projects/{project_id}/locations/{location_id}` + # @param app_connector_id [::String] + # Required. BeyondCorp Connector name of the connector associated with those + # AppConnections using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ResolveAppConnectionsResponse, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connections/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new + # + # # Call the resolve_app_connections method. + # result = client.resolve_app_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. + # p item + # end + # + def resolve_app_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resolve_app_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resolve_app_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resolve_app_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connections_service_stub.call_rpc :resolve_app_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :resolve_app_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AppConnectionsService API. + # + # This class represents the configuration for AppConnectionsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_app_connections to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_connections.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_connections.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AppConnectionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_app_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_app_connections + ## + # RPC-specific configuration for `get_app_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app_connection + ## + # RPC-specific configuration for `create_app_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app_connection + ## + # RPC-specific configuration for `update_app_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_app_connection + ## + # RPC-specific configuration for `delete_app_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app_connection + ## + # RPC-specific configuration for `resolve_app_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_app_connections + + # @private + def initialize parent_rpcs = nil + list_app_connections_config = parent_rpcs.list_app_connections if parent_rpcs.respond_to? :list_app_connections + @list_app_connections = ::Gapic::Config::Method.new list_app_connections_config + get_app_connection_config = parent_rpcs.get_app_connection if parent_rpcs.respond_to? :get_app_connection + @get_app_connection = ::Gapic::Config::Method.new get_app_connection_config + create_app_connection_config = parent_rpcs.create_app_connection if parent_rpcs.respond_to? :create_app_connection + @create_app_connection = ::Gapic::Config::Method.new create_app_connection_config + update_app_connection_config = parent_rpcs.update_app_connection if parent_rpcs.respond_to? :update_app_connection + @update_app_connection = ::Gapic::Config::Method.new update_app_connection_config + delete_app_connection_config = parent_rpcs.delete_app_connection if parent_rpcs.respond_to? :delete_app_connection + @delete_app_connection = ::Gapic::Config::Method.new delete_app_connection_config + resolve_app_connections_config = parent_rpcs.resolve_app_connections if parent_rpcs.respond_to? :resolve_app_connections + @resolve_app_connections = ::Gapic::Config::Method.new resolve_app_connections_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb new file mode 100644 index 000000000000..d8c727b63578 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + # Credentials for the AppConnectionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb new file mode 100644 index 000000000000..a02179deb9f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb @@ -0,0 +1,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 BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppConnectionsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AppConnectionsService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb new file mode 100644 index 000000000000..52ef4c16714c --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + # Path helper methods for the AppConnectionsService API. + module Paths + ## + # Create a fully-qualified AppConnection resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appConnections/{app_connection}` + # + # @param project [String] + # @param location [String] + # @param app_connection [String] + # + # @return [::String] + def app_connection_path project:, location:, app_connection: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appConnections/#{app_connection}" + end + + ## + # Create a fully-qualified AppConnector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appConnectors/{app_connector}` + # + # @param project [String] + # @param location [String] + # @param app_connector [String] + # + # @return [::String] + def app_connector_path project:, location:, app_connector: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appConnectors/#{app_connector}" + end + + ## + # Create a fully-qualified AppGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appGateways/{app_gateway}` + # + # @param project [String] + # @param location [String] + # @param app_gateway [String] + # + # @return [::String] + def app_gateway_path project:, location:, app_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appGateways/#{app_gateway}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb new file mode 100644 index 000000000000..182a98d114a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb new file mode 100644 index 000000000000..1446e9c3fde5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nGgoogle/cloud/beyondcorp/appconnections/v1/app_connections_service.proto\x12)google.cloud.beyondcorp.appconnections.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x01\n\x19ListAppConnectionsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1aListAppConnectionsResponse\x12Q\n\x0f\x61pp_connections\x18\x01 \x03(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x17GetAppConnectionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/AppConnection\"\x89\x02\n\x1a\x43reateAppConnectionRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12\x1e\n\x11\x61pp_connection_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x61pp_connection\x18\x03 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnectionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xfa\x01\n\x1aUpdateAppConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12U\n\x0e\x61pp_connection\x18\x02 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnectionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x90\x01\n\x1a\x44\x65leteAppConnectionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/AppConnection\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xda\x01\n\x1cResolveAppConnectionsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12H\n\x10\x61pp_connector_id\x18\x02 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xcf\x02\n\x1dResolveAppConnectionsResponse\x12}\n\x16\x61pp_connection_details\x18\x01 \x03(\x0b\x32].google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\x1a\x80\x01\n\x14\x41ppConnectionDetails\x12P\n\x0e\x61pp_connection\x18\x01 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\x12\x16\n\x0erecent_mig_vms\x18\x02 \x03(\t\"\x99\n\n\rAppConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x04 \x03(\x0b\x32\x44.google.cloud.beyondcorp.appconnections.v1.AppConnection.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12P\n\x04type\x18\x07 \x01(\x0e\x32=.google.cloud.beyondcorp.appconnections.v1.AppConnection.TypeB\x03\xe0\x41\x02\x12o\n\x14\x61pplication_endpoint\x18\x08 \x01(\x0b\x32L.google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpointB\x03\xe0\x41\x02\x12\x17\n\nconnectors\x18\t \x03(\tB\x03\xe0\x41\x01\x12R\n\x05state\x18\n \x01(\x0e\x32>.google.cloud.beyondcorp.appconnections.v1.AppConnection.StateB\x03\xe0\x41\x03\x12V\n\x07gateway\x18\x0b \x01(\x0b\x32@.google.cloud.beyondcorp.appconnections.v1.AppConnection.GatewayB\x03\xe0\x41\x01\x1a;\n\x13\x41pplicationEndpoint\x12\x11\n\x04host\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x87\x02\n\x07Gateway\x12X\n\x04type\x18\x02 \x01(\x0e\x32\x45.google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.TypeB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cingress_port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x41\n\x0b\x61pp_gateway\x18\x05 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_REGIONAL_MIG\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTCP_PROXY\x10\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05:u\xea\x41r\n\'beyondcorp.googleapis.com/AppConnection\x12Gprojects/{project}/locations/{location}/appConnections/{app_connection}\"\x8d\x02\n\x1e\x41ppConnectionOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xea\x0c\n\x15\x41ppConnectionsService\x12\xe6\x01\n\x12ListAppConnections\x12\x44.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest\x1a\x45.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/appConnections\x12\xd3\x01\n\x10GetAppConnection\x12\x42.google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest\x1a\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/appConnections/*}\x12\xa4\x02\n\x13\x43reateAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41/\n\rAppConnection\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\'parent,app_connection,app_connection_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/appConnections:\x0e\x61pp_connection\x12\xa6\x02\n\x13UpdateAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41/\n\rAppConnection\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\x1a\x61pp_connection,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{app_connection.name=projects/*/locations/*/appConnections/*}:\x0e\x61pp_connection\x12\xf8\x01\n\x13\x44\x65leteAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x37\n\x15google.protobuf.Empty\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/appConnections/*}\x12\xf7\x01\n\x15ResolveAppConnections\x12G.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest\x1aH.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/appConnections:resolve\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8a\x04\n-com.google.cloud.beyondcorp.appconnections.v1B\x1a\x41ppConnectionsServiceProtoP\x01ZUcloud.google.com/go/beyondcorp/appconnections/apiv1/appconnectionspb;appconnectionspb\xaa\x02)Google.Cloud.BeyondCorp.AppConnections.V1\xca\x02)Google\\Cloud\\BeyondCorp\\AppConnections\\V1\xea\x02-Google::Cloud::BeyondCorp::AppConnections::V1\xea\x41o\n&beyondcorp.googleapis.com/AppConnector\x12\x45projects/{project}/locations/{location}/appConnectors/{app_connector}\xea\x41i\n$beyondcorp.googleapis.com/AppGateway\x12\x41projects/{project}/locations/{location}/appGateways/{app_gateway}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + ListAppConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest").msgclass + ListAppConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse").msgclass + GetAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest").msgclass + CreateAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest").msgclass + UpdateAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest").msgclass + DeleteAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest").msgclass + ResolveAppConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest").msgclass + ResolveAppConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse").msgclass + ResolveAppConnectionsResponse::AppConnectionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails").msgclass + AppConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection").msgclass + AppConnection::ApplicationEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint").msgclass + AppConnection::Gateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway").msgclass + AppConnection::Gateway::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type").enummodule + AppConnection::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Type").enummodule + AppConnection::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.State").enummodule + AppConnectionOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnectionOperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb new file mode 100644 index 000000000000..e5383bb39ab7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb @@ -0,0 +1,72 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto for package 'Google.Cloud.BeyondCorp.AppConnections.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb' + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + module AppConnectionsService + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectionsService exposes the following resources: + # + # * AppConnections, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. + # + # The AppConnectionsService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnections. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService' + + # Lists AppConnections in a given project and location. + rpc :ListAppConnections, ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse + # Gets details of a single AppConnection. + rpc :GetAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection + # Creates a new AppConnection in a given project and location. + rpc :CreateAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single AppConnection. + rpc :UpdateAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Google::Longrunning::Operation + # Deletes a single AppConnection. + rpc :DeleteAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Google::Longrunning::Operation + # Resolves AppConnections details for a given AppConnector. + # An internal method called by a connector to find AppConnections to connect + # to. + rpc :ResolveAppConnections, ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md new file mode 100644 index 000000000000..0a721b5b0912 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BeyondCorp AppConnections V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb new file mode 100644 index 000000000000..9d00efe6f19d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb @@ -0,0 +1,411 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnections + module V1 + # Request message for BeyondCorp.ListAppConnections. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AppConnection location using the form: + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ListAppConnectionsRequest, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter specifying constraints of a list operation. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + class ListAppConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BeyondCorp.ListAppConnections. + # @!attribute [rw] app_connections + # @return [::Array<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] + # A list of BeyondCorp AppConnections in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ListAppConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.GetAppConnection. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppConnection name using the form: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + class GetAppConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.CreateAppConnection. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource project name of the AppConnection location using the + # form: `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] app_connection_id + # @return [::String] + # Optional. User-settable AppConnection resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @!attribute [rw] app_connection + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # Required. A BeyondCorp AppConnection resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class CreateAppConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.UpdateAppConnection. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from [BeyondCorp.AppConnection]: + # * `labels` + # * `display_name` + # * `application_endpoint` + # * `connectors` + # @!attribute [rw] app_connection + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # Required. AppConnection message with updated fields. Only supported fields + # specified in update_mask are updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set as true, will create the resource if it is not found. + class UpdateAppConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.DeleteAppConnection. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp Connector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class DeleteAppConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.ResolveAppConnections. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AppConnection location using the form: + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] app_connector_id + # @return [::String] + # Required. BeyondCorp Connector name of the connector associated with those + # AppConnections using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ResolveAppConnectionsResponse, if any. + class ResolveAppConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BeyondCorp.ResolveAppConnections. + # @!attribute [rw] app_connection_details + # @return [::Array<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] + # A list of BeyondCorp AppConnections with details in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ResolveAppConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details of the AppConnection. + # @!attribute [rw] app_connection + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] + # A BeyondCorp AppConnection in the project. + # @!attribute [rw] recent_mig_vms + # @return [::Array<::String>] + # If type=GCP_REGIONAL_MIG, contains most recent VM instances, like + # `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. + class AppConnectionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A BeyondCorp AppConnection resource represents a BeyondCorp protected + # AppConnection to a remote application. It creates all the necessary GCP + # components needed for creating a BeyondCorp protected AppConnection. Multiple + # connectors can be authorised for a single AppConnection. + # @!attribute [rw] name + # @return [::String] + # Required. Unique resource name of the AppConnection. + # The name is ignored when creating a AppConnection. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was last modified. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # @!attribute [rw] display_name + # @return [::String] + # Optional. An arbitrary user-provided name for the AppConnection. Cannot + # exceed 64 characters. + # @!attribute [r] uid + # @return [::String] + # Output only. A unique identifier for the instance generated by the + # system. + # @!attribute [rw] type + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Type] + # Required. The type of network connectivity used by the AppConnection. + # @!attribute [rw] application_endpoint + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::ApplicationEndpoint] + # Required. Address of the remote application endpoint for the BeyondCorp + # AppConnection. + # @!attribute [rw] connectors + # @return [::Array<::String>] + # Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are + # authorised to be associated with this AppConnection. + # @!attribute [r] state + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::State] + # Output only. The current state of the AppConnection. + # @!attribute [rw] gateway + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Gateway] + # Optional. Gateway used by the AppConnection. + class AppConnection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ApplicationEndpoint represents a remote application endpoint. + # @!attribute [rw] host + # @return [::String] + # Required. Hostname or IP address of the remote application endpoint. + # @!attribute [rw] port + # @return [::Integer] + # Required. Port of the remote application endpoint. + class ApplicationEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Gateway represents a user facing component that serves as an entrance to + # enable connectivity. + # @!attribute [rw] type + # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Gateway::Type] + # Required. The type of hosting used by the gateway. + # @!attribute [r] uri + # @return [::String] + # Output only. Server-defined URI for this resource. + # @!attribute [r] ingress_port + # @return [::Integer] + # Output only. Ingress port reserved on the gateways for this + # AppConnection, if not specified or zero, the default port is 19443. + # @!attribute [rw] app_gateway + # @return [::String] + # Required. AppGateway name in following format: + # `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` + class Gateway + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum listing possible gateway hosting options. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # Gateway hosted in a GCP regional managed instance group. + GCP_REGIONAL_MIG = 1 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum containing list of all possible network connectivity options + # supported by BeyondCorp AppConnection. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # TCP Proxy based BeyondCorp AppConnection. API will default to this if + # unset. + TCP_PROXY = 1 + end + + # Represents the different states of a AppConnection. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # AppConnection is being created. + CREATING = 1 + + # AppConnection has been created. + CREATED = 2 + + # AppConnection's configuration is being updated. + UPDATING = 3 + + # AppConnection is being deleted. + DELETING = 4 + + # AppConnection is down and may be restored in the future. + # This happens when CCFE sends ProjectState = OFF. + DOWN = 5 + end + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class AppConnectionOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile new file mode 100644 index 000000000000..50af8c28bf87 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-beyond_corp-app_connections-v1", path: "../" +else + gem "google-cloud-beyond_corp-app_connections-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb new file mode 100644 index 000000000000..b4dde20ea729 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the create_app_connection call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection. +# +def create_app_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new + + # Call the create_app_connection method. + result = client.create_app_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb new file mode 100644 index 000000000000..00ee3ec93ef7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the delete_app_connection call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection. +# +def delete_app_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new + + # Call the delete_app_connection method. + result = client.delete_app_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb new file mode 100644 index 000000000000..c7a6da25f24b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the get_app_connection call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection. +# +def get_app_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new + + # Call the get_app_connection method. + result = client.get_app_connection request + + # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. + p result +end +# [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb new file mode 100644 index 000000000000..89cc6f1a0e02 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the list_app_connections call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections. +# +def list_app_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new + + # Call the list_app_connections method. + result = client.list_app_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. + p item + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb new file mode 100644 index 000000000000..a68f644a3648 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the resolve_app_connections call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections. +# +def resolve_app_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new + + # Call the resolve_app_connections method. + result = client.resolve_app_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. + p item + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb new file mode 100644 index 000000000000..66b87a042ff8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] +require "google/cloud/beyond_corp/app_connections/v1" + +## +# Snippet for the update_app_connection call in the AppConnectionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection. +# +def update_app_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new + + # Call the update_app_connection method. + result = client.update_app_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json new file mode 100644 index 000000000000..37d1445fa1d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-cloud-beyond_corp-app_connections-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.beyondcorp.appconnections.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync", + "title": "Snippet for the list_app_connections call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections.", + "file": "app_connections_service/list_app_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_app_connections", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "ListAppConnections", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListAppConnections", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync", + "title": "Snippet for the get_app_connection call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection.", + "file": "app_connections_service/get_app_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_app_connection", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "GetAppConnection", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetAppConnection", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync", + "title": "Snippet for the create_app_connection call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection.", + "file": "app_connections_service/create_app_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_app_connection", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "CreateAppConnection", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.CreateAppConnection", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync", + "title": "Snippet for the update_app_connection call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection.", + "file": "app_connections_service/update_app_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_app_connection", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "UpdateAppConnection", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.UpdateAppConnection", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync", + "title": "Snippet for the delete_app_connection call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection.", + "file": "app_connections_service/delete_app_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_app_connection", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "DeleteAppConnection", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.DeleteAppConnection", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync", + "title": "Snippet for the resolve_app_connections call in the AppConnectionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections.", + "file": "app_connections_service/resolve_app_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "resolve_app_connections", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse", + "client": { + "short_name": "AppConnectionsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" + }, + "method": { + "short_name": "ResolveAppConnections", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ResolveAppConnections", + "service": { + "short_name": "AppConnectionsService", + "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb new file mode 100644 index 000000000000..191caba0be59 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb" +require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" + +class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb new file mode 100644 index 000000000000..8dbd4e5cb9e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" + +class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_app_connection_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_connection_path project: "value0", location: "value1", app_connection: "value2" + assert_equal "projects/value0/locations/value1/appConnections/value2", path + end + end + + def test_app_connector_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_connector_path project: "value0", location: "value1", app_connector: "value2" + assert_equal "projects/value0/locations/value1/appConnectors/value2", path + end + end + + def test_app_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_gateway_path project: "value0", location: "value1", app_gateway: "value2" + assert_equal "projects/value0/locations/value1/appGateways/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb new file mode 100644 index 000000000000..607a97f4608c --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb @@ -0,0 +1,525 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb" +require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" + +class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_app_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_app_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_app_connections, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_app_connections_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_app_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_app_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_app_connections ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_app_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_app_connections(::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_app_connections_client_stub.call_rpc_count + end + end + + def test_get_app_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_app_connection, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_app_connection_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_app_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_app_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_app_connection({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_app_connection_client_stub.call_rpc_count + end + end + + def test_create_app_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_connection_id = "hello world" + app_connection = {} + request_id = "hello world" + validate_only = true + + create_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_app_connection, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_connection_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection), request["app_connection"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_app_connection_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_app_connection({ parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_app_connection parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new(parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_app_connection({ parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new(parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_app_connection_client_stub.call_rpc_count + end + end + + def test_update_app_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + app_connection = {} + request_id = "hello world" + validate_only = true + allow_missing = true + + update_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_app_connection, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection), request["app_connection"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_app_connection_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_app_connection({ update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_app_connection update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new(update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_app_connection({ update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new(update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_app_connection_client_stub.call_rpc_count + end + end + + def test_delete_app_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + + delete_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_app_connection, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_app_connection_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_app_connection({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_app_connection name: name, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_app_connection({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_app_connection_client_stub.call_rpc_count + end + end + + def test_resolve_app_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_connector_id = "hello world" + page_size = 42 + page_token = "hello world" + + resolve_app_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resolve_app_connections, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_connector_id"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resolve_app_connections_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.resolve_app_connections({ parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.resolve_app_connections parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.resolve_app_connections ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new(parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.resolve_app_connections({ parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.resolve_app_connections(::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new(parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resolve_app_connections_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json new file mode 100644 index 000000000000..8737a08b2ed0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "beyondcorp.googleapis.com", + "api_shortname": "beyondcorp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connectors-v1/latest", + "distribution_name": "google-cloud-beyond_corp-app_connectors-v1", + "is_cloud": true, + "language": "ruby", + "name": "beyondcorp", + "name_pretty": "BeyondCorp AppConnectors V1 API", + "product_documentation": "https://cloud.google.com/beyondcorp/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connectors-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml new file mode 100644 index 000000000000..7c746abab61f --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-beyond_corp-app_connectors-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-beyond_corp-app_connectors-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts new file mode 100644 index 000000000000..1b1ee4a36299 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BeyondCorp AppConnectors V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..4252892c67b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-beyond_corp-app_connectors-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-beyond_corp-app_connectors-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/beyond_corp/app_connectors/v1" + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/beyond_corp/app_connectors/v1" + +::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-beyond_corp-app_connectors-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/beyond_corp/app_connectors/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md new file mode 100644 index 000000000000..7deecfc9b6f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the BeyondCorp AppConnectors V1 API + +Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BeyondCorp AppConnectors V1 API. Most users should consider using +the main client gem, +[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-beyond_corp-app_connectors-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/beyondcorp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/beyond_corp/app_connectors/v1" + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new +request = ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new # (request fields as keyword arguments...) +response = client.list_app_connectors request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connectors-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/beyondcorp/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/beyond_corp/app_connectors/v1" +require "logger" + +client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-beyond_corp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-beyond_corp-app_connectors-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-beyond_corp`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-beyond_corp-app_connectors-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile new file mode 100644 index 000000000000..73cfd1f9a5c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-beyond_corp-app_connectors-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials" + ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-beyond_corp-app_connectors-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-beyond_corp-app_connectors-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-beyond_corp-app_connectors-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-beyond_corp-app_connectors-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-beyond_corp-app_connectors-v1" + header "google-cloud-beyond_corp-app_connectors-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-beyond_corp-app_connectors-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-beyond_corp-app_connectors-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-beyond_corp-app_connectors-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-beyond_corp-app_connectors-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json new file mode 100644 index 000000000000..d617a8d7418e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.beyondcorp.appconnectors.v1", + "libraryPackage": "::Google::Cloud::BeyondCorp::AppConnectors::V1", + "services": { + "AppConnectorsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client", + "rpcs": { + "ListAppConnectors": { + "methods": [ + "list_app_connectors" + ] + }, + "GetAppConnector": { + "methods": [ + "get_app_connector" + ] + }, + "CreateAppConnector": { + "methods": [ + "create_app_connector" + ] + }, + "UpdateAppConnector": { + "methods": [ + "update_app_connector" + ] + }, + "DeleteAppConnector": { + "methods": [ + "delete_app_connector" + ] + }, + "ReportStatus": { + "methods": [ + "report_status" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec new file mode 100644 index 000000000000..a77565acc7a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/beyond_corp/app_connectors/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-beyond_corp-app_connectors-v1" + gem.version = Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connectors-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." + gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb new file mode 100644 index 000000000000..d557f7c0d50f --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/beyond_corp/app_connectors/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb new file mode 100644 index 000000000000..96a31864e164 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" +require "google/cloud/beyond_corp/app_connectors/v1/version" + +module Google + module Cloud + module BeyondCorp + module AppConnectors + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_connectors/v1" + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/beyond_corp/app_connectors/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb new file mode 100644 index 000000000000..e9d2c90330e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/beyond_corp/app_connectors/v1/version" + +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client" + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + ## + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectorsService exposes the following resource: + # + # * AppConnectors, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. + # + # The AppConnectorsService provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnectors. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + module AppConnectorsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_connectors_service", "helpers.rb" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb new file mode 100644 index 000000000000..42124b431f6f --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb @@ -0,0 +1,1144 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + ## + # Client for the AppConnectorsService service. + # + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectorsService exposes the following resource: + # + # * AppConnectors, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. + # + # The AppConnectorsService provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnectors. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_connectors_service_stub + + ## + # Configure the AppConnectorsService Client class. + # + # See {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppConnectorsService clients + # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BeyondCorp", "AppConnectors", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AppConnectorsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @app_connectors_service_stub.universe_domain + end + + ## + # Create a new AppConnectorsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppConnectorsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @app_connectors_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @app_connectors_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_connectors_service_stub.endpoint + config.universe_domain = @app_connectors_service_stub.universe_domain + config.logger = @app_connectors_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_connectors_service_stub.endpoint + config.universe_domain = @app_connectors_service_stub.universe_domain + config.logger = @app_connectors_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @app_connectors_service_stub.logger + end + + # Service calls + + ## + # Lists AppConnectors in a given project and location. + # + # @overload list_app_connectors(request, options = nil) + # Pass arguments to `list_app_connectors` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_app_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_app_connectors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AppConnector location using the form: + # `projects/{project_id}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ListAppConnectorsRequest, if any. + # @param filter [::String] + # Optional. A filter specifying constraints of a list operation. + # @param order_by [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new + # + # # Call the list_app_connectors method. + # result = client.list_app_connectors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. + # p item + # end + # + def list_app_connectors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_app_connectors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_app_connectors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_app_connectors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :list_app_connectors, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_connectors_service_stub, :list_app_connectors, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AppConnector. + # + # @overload get_app_connector(request, options = nil) + # Pass arguments to `get_app_connector` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_app_connector(name: nil) + # Pass arguments to `get_app_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppConnector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new + # + # # Call the get_app_connector method. + # result = client.get_app_connector request + # + # # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. + # p result + # + def get_app_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_app_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_app_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_app_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :get_app_connector, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new AppConnector in a given project and location. + # + # @overload create_app_connector(request, options = nil) + # Pass arguments to `create_app_connector` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_app_connector(parent: nil, app_connector_id: nil, app_connector: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_app_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource project name of the AppConnector location using the + # form: `projects/{project_id}/locations/{location_id}` + # @param app_connector_id [::String] + # Optional. User-settable AppConnector resource ID. + # + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash] + # Required. A BeyondCorp AppConnector resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new + # + # # Call the create_app_connector method. + # result = client.create_app_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_app_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_app_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_app_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_app_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :create_app_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AppConnector. + # + # @overload update_app_connector(request, options = nil) + # Pass arguments to `update_app_connector` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_app_connector(update_mask: nil, app_connector: nil, request_id: nil, validate_only: nil) + # Pass arguments to `update_app_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from [BeyondCorp.AppConnector]: + # * `labels` + # * `display_name` + # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash] + # Required. AppConnector message with updated fields. Only supported fields + # specified in update_mask are updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new + # + # # Call the update_app_connector method. + # result = client.update_app_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_app_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_app_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.app_connector&.name + header_params["app_connector.name"] = request.app_connector.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_app_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_app_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :update_app_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AppConnector. + # + # @overload delete_app_connector(request, options = nil) + # Pass arguments to `delete_app_connector` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_app_connector(name: nil, request_id: nil, validate_only: nil) + # Pass arguments to `delete_app_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppConnector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new + # + # # Call the delete_app_connector method. + # result = client.delete_app_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_app_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_app_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_app_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_app_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :delete_app_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Report status for a given connector. + # + # @overload report_status(request, options = nil) + # Pass arguments to `report_status` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload report_status(app_connector: nil, resource_info: nil, request_id: nil, validate_only: nil) + # Pass arguments to `report_status` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app_connector [::String] + # Required. BeyondCorp Connector name using the form: + # `projects/{project_id}/locations/{location_id}/connectors/{connector}` + # @param resource_info [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo, ::Hash] + # Required. Resource info of the connector. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_connectors/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new + # + # # Call the report_status method. + # result = client.report_status request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def report_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.report_status.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.app_connector + header_params["app_connector"] = request.app_connector + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.report_status.timeout, + metadata: metadata, + retry_policy: @config.rpcs.report_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_connectors_service_stub.call_rpc :report_status, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AppConnectorsService API. + # + # This class represents the configuration for AppConnectorsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_app_connectors to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_connectors.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_connectors.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AppConnectorsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_app_connectors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_app_connectors + ## + # RPC-specific configuration for `get_app_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app_connector + ## + # RPC-specific configuration for `create_app_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app_connector + ## + # RPC-specific configuration for `update_app_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :update_app_connector + ## + # RPC-specific configuration for `delete_app_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app_connector + ## + # RPC-specific configuration for `report_status` + # @return [::Gapic::Config::Method] + # + attr_reader :report_status + + # @private + def initialize parent_rpcs = nil + list_app_connectors_config = parent_rpcs.list_app_connectors if parent_rpcs.respond_to? :list_app_connectors + @list_app_connectors = ::Gapic::Config::Method.new list_app_connectors_config + get_app_connector_config = parent_rpcs.get_app_connector if parent_rpcs.respond_to? :get_app_connector + @get_app_connector = ::Gapic::Config::Method.new get_app_connector_config + create_app_connector_config = parent_rpcs.create_app_connector if parent_rpcs.respond_to? :create_app_connector + @create_app_connector = ::Gapic::Config::Method.new create_app_connector_config + update_app_connector_config = parent_rpcs.update_app_connector if parent_rpcs.respond_to? :update_app_connector + @update_app_connector = ::Gapic::Config::Method.new update_app_connector_config + delete_app_connector_config = parent_rpcs.delete_app_connector if parent_rpcs.respond_to? :delete_app_connector + @delete_app_connector = ::Gapic::Config::Method.new delete_app_connector_config + report_status_config = parent_rpcs.report_status if parent_rpcs.respond_to? :report_status + @report_status = ::Gapic::Config::Method.new report_status_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb new file mode 100644 index 000000000000..8e856ab92cab --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + # Credentials for the AppConnectorsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb new file mode 100644 index 000000000000..7f9ae60570e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb @@ -0,0 +1,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 BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppConnectorsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AppConnectorsService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb new file mode 100644 index 000000000000..dd5a91475be8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + # Path helper methods for the AppConnectorsService API. + module Paths + ## + # Create a fully-qualified AppConnector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appConnectors/{app_connector}` + # + # @param project [String] + # @param location [String] + # @param app_connector [String] + # + # @return [::String] + def app_connector_path project:, location:, app_connector: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appConnectors/#{app_connector}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb new file mode 100644 index 000000000000..4a35a95f37ea --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb new file mode 100644 index 000000000000..3d9532fa3b37 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/any_pb' + + +descriptor_data = "\nLgoogle/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto\x12(google.cloud.beyondcorp.appconnectors.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\"\x91\x02\n\x1a\x41ppConnectorInstanceConfig\x12\x1c\n\x0fsequence_number\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12-\n\x0finstance_config\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12Y\n\x13notification_config\x18\x03 \x01(\x0b\x32<.google.cloud.beyondcorp.appconnectors.v1.NotificationConfig\x12K\n\x0cimage_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.beyondcorp.appconnectors.v1.ImageConfig\"\xd7\x01\n\x12NotificationConfig\x12y\n\x13pubsub_notification\x18\x01 \x01(\x0b\x32Z.google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfigH\x00\x1a<\n\x1d\x43loudPubSubNotificationConfig\x12\x1b\n\x13pubsub_subscription\x18\x01 \x01(\tB\x08\n\x06\x63onfig\"9\n\x0bImageConfig\x12\x14\n\x0ctarget_image\x18\x01 \x01(\t\x12\x14\n\x0cstable_image\x18\x02 \x01(\tB\xaa\x02\n,com.google.cloud.beyondcorp.appconnectors.v1B\x1f\x41ppConnectorInstanceConfigProtoP\x01ZRcloud.google.com/go/beyondcorp/appconnectors/apiv1/appconnectorspb;appconnectorspb\xaa\x02(Google.Cloud.BeyondCorp.AppConnectors.V1\xca\x02(Google\\Cloud\\BeyondCorp\\AppConnectors\\V1\xea\x02,Google::Cloud::BeyondCorp::AppConnectors::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + AppConnectorInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnectorInstanceConfig").msgclass + NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.NotificationConfig").msgclass + NotificationConfig::CloudPubSubNotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig").msgclass + ImageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ImageConfig").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb new file mode 100644 index 000000000000..a1ba56613e21 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb' +require 'google/cloud/beyondcorp/appconnectors/v1/resource_info_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nEgoogle/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto\x12(google.cloud.beyondcorp.appconnectors.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aLgoogle/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto\x1a\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&beyondcorp.googleapis.com/AppConnector\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n\x19ListAppConnectorsResponse\x12N\n\x0e\x61pp_connectors\x18\x01 \x03(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"V\n\x16GetAppConnectorRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\"\x83\x02\n\x19\x43reateAppConnectorRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&beyondcorp.googleapis.com/AppConnector\x12\x1d\n\x10\x61pp_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12R\n\rapp_connector\x18\x03 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnectorB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xda\x01\n\x19UpdateAppConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12R\n\rapp_connector\x18\x02 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnectorB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8e\x01\n\x19\x44\x65leteAppConnectorRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x01\n\x13ReportStatusRequest\x12\x45\n\rapp_connector\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12R\n\rresource_info\x18\x02 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.ResourceInfoB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x07\n\x0c\x41ppConnector\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12W\n\x06labels\x18\x04 \x03(\x0b\x32\x42.google.cloud.beyondcorp.appconnectors.v1.AppConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12P\n\x05state\x18\x07 \x01(\x0e\x32<.google.cloud.beyondcorp.appconnectors.v1.AppConnector.StateB\x03\xe0\x41\x03\x12\x61\n\x0eprincipal_info\x18\x08 \x01(\x0b\x32\x44.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfoB\x03\xe0\x41\x02\x12R\n\rresource_info\x18\x0b \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.ResourceInfoB\x03\xe0\x41\x01\x1a\xa8\x01\n\rPrincipalInfo\x12n\n\x0fservice_account\x18\x01 \x01(\x0b\x32S.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccountH\x00\x1a\x1f\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\x06\n\x04type\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05:r\xea\x41o\n&beyondcorp.googleapis.com/AppConnector\x12\x45projects/{project}/locations/{location}/appConnectors/{app_connector}\"\x8c\x02\n\x1d\x41ppConnectorOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xde\x0c\n\x14\x41ppConnectorsService\x12\xe0\x01\n\x11ListAppConnectors\x12\x42.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest\x1a\x43.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/appConnectors\x12\xcd\x01\n\x0fGetAppConnector\x12@.google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest\x1a\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnector\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/appConnectors/*}\x12\x9b\x02\n\x12\x43reateAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41%parent,app_connector,app_connector_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/appConnectors:\rapp_connector\x12\x9d\x02\n\x12UpdateAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x19\x61pp_connector,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{app_connector.name=projects/*/locations/*/appConnectors/*}:\rapp_connector\x12\xf3\x01\n\x12\x44\x65leteAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x36\n\x15google.protobuf.Empty\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/appConnectors/*}\x12\x8f\x02\n\x0cReportStatus\x12=.google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x1b\x61pp_connector,resource_info\x82\xd3\xe4\x93\x02L\"G/v1/{app_connector=projects/*/locations/*/appConnectors/*}:reportStatus:\x01*\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa4\x02\n,com.google.cloud.beyondcorp.appconnectors.v1B\x19\x41ppConnectorsServiceProtoP\x01ZRcloud.google.com/go/beyondcorp/appconnectors/apiv1/appconnectorspb;appconnectorspb\xaa\x02(Google.Cloud.BeyondCorp.AppConnectors.V1\xca\x02(Google\\Cloud\\BeyondCorp\\AppConnectors\\V1\xea\x02,Google::Cloud::BeyondCorp::AppConnectors::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + ListAppConnectorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest").msgclass + ListAppConnectorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse").msgclass + GetAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest").msgclass + CreateAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest").msgclass + UpdateAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest").msgclass + DeleteAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest").msgclass + ReportStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest").msgclass + AppConnector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector").msgclass + AppConnector::PrincipalInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo").msgclass + AppConnector::PrincipalInfo::ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount").msgclass + AppConnector::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.State").enummodule + AppConnectorOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnectorOperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb new file mode 100644 index 000000000000..dfa57a816cd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb @@ -0,0 +1,70 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto for package 'Google.Cloud.BeyondCorp.AppConnectors.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb' + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + module AppConnectorsService + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppConnectorsService exposes the following resource: + # + # * AppConnectors, named as follows: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. + # + # The AppConnectorsService provides methods to manage + # (create/read/update/delete) BeyondCorp AppConnectors. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService' + + # Lists AppConnectors in a given project and location. + rpc :ListAppConnectors, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse + # Gets details of a single AppConnector. + rpc :GetAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector + # Creates a new AppConnector in a given project and location. + rpc :CreateAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single AppConnector. + rpc :UpdateAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Google::Longrunning::Operation + # Deletes a single AppConnector. + rpc :DeleteAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Google::Longrunning::Operation + # Report status for a given connector. + rpc :ReportStatus, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb new file mode 100644 index 000000000000..d3fe1da19670 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appconnectors/v1/resource_info.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb new file mode 100644 index 000000000000..01f0871d5362 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + # AppConnectorInstanceConfig defines the instance config of a AppConnector. + # @!attribute [rw] sequence_number + # @return [::Integer] + # Required. A monotonically increasing number generated and maintained + # by the API provider. Every time a config changes in the backend, the + # sequenceNumber should be bumped up to reflect the change. + # @!attribute [rw] instance_config + # @return [::Google::Protobuf::Any] + # The SLM instance agent configuration. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::NotificationConfig] + # NotificationConfig defines the notification mechanism that the remote + # instance should subscribe to in order to receive notification. + # @!attribute [rw] image_config + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ImageConfig] + # ImageConfig defines the GCR images to run for the remote agent's control + # plane. + class AppConnectorInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NotificationConfig defines the mechanisms to notify instance agent. + # @!attribute [rw] pubsub_notification + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::NotificationConfig::CloudPubSubNotificationConfig] + # Cloud Pub/Sub Configuration to receive notifications. + class NotificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration for Pub/Sub messaging for the AppConnector. + # @!attribute [rw] pubsub_subscription + # @return [::String] + # The Pub/Sub subscription the AppConnector uses to receive notifications. + class CloudPubSubNotificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # ImageConfig defines the control plane images to run. + # @!attribute [rw] target_image + # @return [::String] + # The initial image the remote agent will attempt to run for the control + # plane. + # @!attribute [rw] stable_image + # @return [::String] + # The stable image that the remote agent will fallback to if the target image + # fails. + class ImageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb new file mode 100644 index 000000000000..ec8d597ea2e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb @@ -0,0 +1,341 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + # Request message for BeyondCorp.ListAppConnectors. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AppConnector location using the form: + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ListAppConnectorsRequest, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter specifying constraints of a list operation. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + class ListAppConnectorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BeyondCorp.ListAppConnectors. + # @!attribute [rw] app_connectors + # @return [::Array<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] + # A list of BeyondCorp AppConnectors in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ListAppConnectorsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.GetAppConnector. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppConnector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + class GetAppConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.CreateAppConnector. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource project name of the AppConnector location using the + # form: `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] app_connector_id + # @return [::String] + # Optional. User-settable AppConnector resource ID. + # + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @!attribute [rw] app_connector + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] + # Required. A BeyondCorp AppConnector resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class CreateAppConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.UpdateAppConnector. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from [BeyondCorp.AppConnector]: + # * `labels` + # * `display_name` + # @!attribute [rw] app_connector + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] + # Required. AppConnector message with updated fields. Only supported fields + # specified in update_mask are updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class UpdateAppConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.DeleteAppConnector. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppConnector name using the form: + # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class DeleteAppConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request report the connector status. + # @!attribute [rw] app_connector + # @return [::String] + # Required. BeyondCorp Connector name using the form: + # `projects/{project_id}/locations/{location_id}/connectors/{connector}` + # @!attribute [rw] resource_info + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo] + # Required. Resource info of the connector. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class ReportStatusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A BeyondCorp connector resource that represents an application facing + # component deployed proximal to and with direct access to the application + # instances. It is used to establish connectivity between the remote enterprise + # environment and GCP. It initiates connections to the applications and can + # proxy the data from users over the connection. + # @!attribute [rw] name + # @return [::String] + # Required. Unique resource name of the AppConnector. + # The name is ignored when creating a AppConnector. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was last modified. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # @!attribute [rw] display_name + # @return [::String] + # Optional. An arbitrary user-provided name for the AppConnector. Cannot + # exceed 64 characters. + # @!attribute [r] uid + # @return [::String] + # Output only. A unique identifier for the instance generated by the + # system. + # @!attribute [r] state + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::State] + # Output only. The current state of the AppConnector. + # @!attribute [rw] principal_info + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::PrincipalInfo] + # Required. Principal information about the Identity of the AppConnector. + # @!attribute [rw] resource_info + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo] + # Optional. Resource info of the connector. + class AppConnector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # PrincipalInfo represents an Identity oneof. + # @!attribute [rw] service_account + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::PrincipalInfo::ServiceAccount] + # A GCP service account. + class PrincipalInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ServiceAccount represents a GCP service account. + # @!attribute [rw] email + # @return [::String] + # Email address of the service account. + class ServiceAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the different states of a AppConnector. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # AppConnector is being created. + CREATING = 1 + + # AppConnector has been created. + CREATED = 2 + + # AppConnector's configuration is being updated. + UPDATING = 3 + + # AppConnector is being deleted. + DELETING = 4 + + # AppConnector is down and may be restored in the future. + # This happens when CCFE sends ProjectState = OFF. + DOWN = 5 + end + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class AppConnectorOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb new file mode 100644 index 000000000000..044fddd4161e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppConnectors + module V1 + # ResourceInfo represents the information/status of an app connector resource. + # Such as: + # - remote_agent + # - container + # - runtime + # - appgateway + # - appconnector + # - appconnection + # - tunnel + # - logagent + # @!attribute [rw] id + # @return [::String] + # Required. Unique Id for the resource. + # @!attribute [rw] status + # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::HealthStatus] + # Overall health status. Overall status is derived based on the status of + # each sub level resources. + # @!attribute [rw] resource + # @return [::Google::Protobuf::Any] + # Specific details for the resource. This is for internal use only. + # @!attribute [rw] time + # @return [::Google::Protobuf::Timestamp] + # The timestamp to collect the info. It is suggested to be set by + # the topmost level resource only. + # @!attribute [rw] sub + # @return [::Array<::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo>] + # List of Info for the sub level resources. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # HealthStatus represents the health status. + module HealthStatus + # Health status is unknown: not initialized or failed to retrieve. + HEALTH_STATUS_UNSPECIFIED = 0 + + # The resource is healthy. + HEALTHY = 1 + + # The resource is unhealthy. + UNHEALTHY = 2 + + # The resource is unresponsive. + UNRESPONSIVE = 3 + + # Some sub-resources are UNHEALTHY. + DEGRADED = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile new file mode 100644 index 000000000000..43e9ab898138 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-beyond_corp-app_connectors-v1", path: "../" +else + gem "google-cloud-beyond_corp-app_connectors-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb new file mode 100644 index 000000000000..70f0d140058b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the create_app_connector call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector. +# +def create_app_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new + + # Call the create_app_connector method. + result = client.create_app_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb new file mode 100644 index 000000000000..b3a1d87b3402 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the delete_app_connector call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector. +# +def delete_app_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new + + # Call the delete_app_connector method. + result = client.delete_app_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb new file mode 100644 index 000000000000..1edebaac1f69 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the get_app_connector call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector. +# +def get_app_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new + + # Call the get_app_connector method. + result = client.get_app_connector request + + # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. + p result +end +# [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb new file mode 100644 index 000000000000..259b2f32126e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the list_app_connectors call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors. +# +def list_app_connectors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new + + # Call the list_app_connectors method. + result = client.list_app_connectors request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. + p item + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb new file mode 100644 index 000000000000..fb94bff32e92 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the report_status call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status. +# +def report_status + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new + + # Call the report_status method. + result = client.report_status request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb new file mode 100644 index 000000000000..cccaafa23d82 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] +require "google/cloud/beyond_corp/app_connectors/v1" + +## +# Snippet for the update_app_connector call in the AppConnectorsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector. +# +def update_app_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new + + # Call the update_app_connector method. + result = client.update_app_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json new file mode 100644 index 000000000000..0eee27e39078 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-cloud-beyond_corp-app_connectors-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.beyondcorp.appconnectors.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync", + "title": "Snippet for the list_app_connectors call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors.", + "file": "app_connectors_service/list_app_connectors.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_app_connectors", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "ListAppConnectors", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListAppConnectors", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync", + "title": "Snippet for the get_app_connector call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector.", + "file": "app_connectors_service/get_app_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_app_connector", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "GetAppConnector", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetAppConnector", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync", + "title": "Snippet for the create_app_connector call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector.", + "file": "app_connectors_service/create_app_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_app_connector", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "CreateAppConnector", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.CreateAppConnector", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync", + "title": "Snippet for the update_app_connector call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector.", + "file": "app_connectors_service/update_app_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_app_connector", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "UpdateAppConnector", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.UpdateAppConnector", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync", + "title": "Snippet for the delete_app_connector call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector.", + "file": "app_connectors_service/delete_app_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_app_connector", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "DeleteAppConnector", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.DeleteAppConnector", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync", + "title": "Snippet for the report_status call in the AppConnectorsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status.", + "file": "app_connectors_service/report_status.rb", + "language": "RUBY", + "client_method": { + "short_name": "report_status", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppConnectorsService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" + }, + "method": { + "short_name": "ReportStatus", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ReportStatus", + "service": { + "short_name": "AppConnectorsService", + "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb new file mode 100644 index 000000000000..bfefd99a4089 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" +require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" + +class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb new file mode 100644 index 000000000000..ccd8bc1d885a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" + +class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_app_connector_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_connector_path project: "value0", location: "value1", app_connector: "value2" + assert_equal "projects/value0/locations/value1/appConnectors/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb new file mode 100644 index 000000000000..e825886c2b2b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb @@ -0,0 +1,523 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" +require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" + +class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_app_connectors + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_app_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_app_connectors, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_app_connectors_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_app_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_app_connectors parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_app_connectors ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_app_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_app_connectors(::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_app_connectors_client_stub.call_rpc_count + end + end + + def test_get_app_connector + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_app_connector, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_app_connector_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_app_connector({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_app_connector name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_app_connector({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_app_connector_client_stub.call_rpc_count + end + end + + def test_create_app_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_connector_id = "hello world" + app_connector = {} + request_id = "hello world" + validate_only = true + + create_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_app_connector, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_connector_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector), request["app_connector"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_app_connector_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_app_connector({ parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_app_connector parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new(parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_app_connector({ parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new(parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_app_connector_client_stub.call_rpc_count + end + end + + def test_update_app_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + app_connector = {} + request_id = "hello world" + validate_only = true + + update_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_app_connector, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector), request["app_connector"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_app_connector_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_app_connector({ update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_app_connector update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new(update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_app_connector({ update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new(update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_app_connector_client_stub.call_rpc_count + end + end + + def test_delete_app_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + + delete_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_app_connector, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_app_connector_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_app_connector({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_app_connector name: name, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_app_connector({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_app_connector_client_stub.call_rpc_count + end + end + + def test_report_status + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + app_connector = "hello world" + resource_info = {} + request_id = "hello world" + validate_only = true + + report_status_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :report_status, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, request + assert_equal "hello world", request["app_connector"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo), request["resource_info"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, report_status_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.report_status({ app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.report_status app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.report_status ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new(app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.report_status({ app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.report_status(::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new(app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, report_status_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json new file mode 100644 index 000000000000..a3c9b3754a0a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "beyondcorp.googleapis.com", + "api_shortname": "beyondcorp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_gateways-v1/latest", + "distribution_name": "google-cloud-beyond_corp-app_gateways-v1", + "is_cloud": true, + "language": "ruby", + "name": "beyondcorp", + "name_pretty": "BeyondCorp AppGateways V1 API", + "product_documentation": "https://cloud.google.com/beyondcorp/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml new file mode 100644 index 000000000000..3c939b74dcc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-beyond_corp-app_gateways-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-beyond_corp-app_gateways-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts new file mode 100644 index 000000000000..63cdf671ee4a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BeyondCorp AppGateways V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..7b47d23a035b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-beyond_corp-app_gateways-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-beyond_corp-app_gateways-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/beyond_corp/app_gateways/v1" + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/beyond_corp/app_gateways/v1" + +::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-beyond_corp-app_gateways-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/beyond_corp/app_gateways/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md new file mode 100644 index 000000000000..a70455f453d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the BeyondCorp AppGateways V1 API + +Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BeyondCorp AppGateways V1 API. Most users should consider using +the main client gem, +[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-beyond_corp-app_gateways-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/beyondcorp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/beyond_corp/app_gateways/v1" + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new +request = ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new # (request fields as keyword arguments...) +response = client.list_app_gateways request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_gateways-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/beyondcorp/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/beyond_corp/app_gateways/v1" +require "logger" + +client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-beyond_corp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-beyond_corp-app_gateways-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-beyond_corp`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-beyond_corp-app_gateways-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile new file mode 100644 index 000000000000..d8cc75327511 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-beyond_corp-app_gateways-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials" + ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-beyond_corp-app_gateways-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-beyond_corp-app_gateways-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-beyond_corp-app_gateways-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-beyond_corp-app_gateways-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-beyond_corp-app_gateways-v1" + header "google-cloud-beyond_corp-app_gateways-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-beyond_corp-app_gateways-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-beyond_corp-app_gateways-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-beyond_corp-app_gateways-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-beyond_corp-app_gateways-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json new file mode 100644 index 000000000000..4d35336a7930 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json @@ -0,0 +1,38 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.beyondcorp.appgateways.v1", + "libraryPackage": "::Google::Cloud::BeyondCorp::AppGateways::V1", + "services": { + "AppGatewaysService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client", + "rpcs": { + "ListAppGateways": { + "methods": [ + "list_app_gateways" + ] + }, + "GetAppGateway": { + "methods": [ + "get_app_gateway" + ] + }, + "CreateAppGateway": { + "methods": [ + "create_app_gateway" + ] + }, + "DeleteAppGateway": { + "methods": [ + "delete_app_gateway" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec new file mode 100644 index 000000000000..8eaf433f65cb --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/beyond_corp/app_gateways/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-beyond_corp-app_gateways-v1" + gem.version = Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." + gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb new file mode 100644 index 000000000000..ea08e44ab15a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/beyond_corp/app_gateways/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb new file mode 100644 index 000000000000..735979b372cd --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" +require "google/cloud/beyond_corp/app_gateways/v1/version" + +module Google + module Cloud + module BeyondCorp + module AppGateways + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_gateways/v1" + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/beyond_corp/app_gateways/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb new file mode 100644 index 000000000000..2c44fc4c710b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/beyond_corp/app_gateways/v1/version" + +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client" + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + ## + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppGatewaysService exposes the following resources: + # + # * AppGateways, named as follows: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. + # + # The AppGatewaysService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppGateways. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + module AppGatewaysService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "app_gateways_service", "helpers.rb" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb new file mode 100644 index 000000000000..8de5fb9e3c4e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb @@ -0,0 +1,897 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + ## + # Client for the AppGatewaysService service. + # + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppGatewaysService exposes the following resources: + # + # * AppGateways, named as follows: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. + # + # The AppGatewaysService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppGateways. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :app_gateways_service_stub + + ## + # Configure the AppGatewaysService Client class. + # + # See {::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AppGatewaysService clients + # ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BeyondCorp", "AppGateways", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AppGatewaysService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @app_gateways_service_stub.universe_domain + end + + ## + # Create a new AppGatewaysService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AppGatewaysService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @app_gateways_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @app_gateways_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_gateways_service_stub.endpoint + config.universe_domain = @app_gateways_service_stub.universe_domain + config.logger = @app_gateways_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @app_gateways_service_stub.endpoint + config.universe_domain = @app_gateways_service_stub.universe_domain + config.logger = @app_gateways_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @app_gateways_service_stub.logger + end + + # Service calls + + ## + # Lists AppGateways in a given project and location. + # + # @overload list_app_gateways(request, options = nil) + # Pass arguments to `list_app_gateways` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_app_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_app_gateways` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AppGateway location using the form: + # `projects/{project_id}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ListAppGatewaysRequest, if any. + # @param filter [::String] + # Optional. A filter specifying constraints of a list operation. + # @param order_by [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new + # + # # Call the list_app_gateways method. + # result = client.list_app_gateways request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. + # p item + # end + # + def list_app_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_app_gateways.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_app_gateways.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_app_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_gateways_service_stub.call_rpc :list_app_gateways, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @app_gateways_service_stub, :list_app_gateways, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AppGateway. + # + # @overload get_app_gateway(request, options = nil) + # Pass arguments to `get_app_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_app_gateway(name: nil) + # Pass arguments to `get_app_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppGateway name using the form: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new + # + # # Call the get_app_gateway method. + # result = client.get_app_gateway request + # + # # The returned object is of type Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. + # p result + # + def get_app_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_app_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_app_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_app_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_gateways_service_stub.call_rpc :get_app_gateway, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new AppGateway in a given project and location. + # + # @overload create_app_gateway(request, options = nil) + # Pass arguments to `create_app_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_app_gateway(parent: nil, app_gateway_id: nil, app_gateway: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_app_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource project name of the AppGateway location using the + # form: `projects/{project_id}/locations/{location_id}` + # @param app_gateway_id [::String] + # Optional. User-settable AppGateway resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @param app_gateway [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway, ::Hash] + # Required. A BeyondCorp AppGateway resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new + # + # # Call the create_app_gateway method. + # result = client.create_app_gateway request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_app_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_app_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_app_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_app_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_gateways_service_stub.call_rpc :create_app_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AppGateway. + # + # @overload delete_app_gateway(request, options = nil) + # Pass arguments to `delete_app_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_app_gateway(name: nil, request_id: nil, validate_only: nil) + # Pass arguments to `delete_app_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. BeyondCorp AppGateway name using the form: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/app_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new + # + # # Call the delete_app_gateway method. + # result = client.delete_app_gateway request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_app_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_app_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_app_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_app_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @app_gateways_service_stub.call_rpc :delete_app_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AppGatewaysService API. + # + # This class represents the configuration for AppGatewaysService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_app_gateways to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_gateways.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_app_gateways.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AppGatewaysService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_app_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_app_gateways + ## + # RPC-specific configuration for `get_app_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app_gateway + ## + # RPC-specific configuration for `create_app_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app_gateway + ## + # RPC-specific configuration for `delete_app_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app_gateway + + # @private + def initialize parent_rpcs = nil + list_app_gateways_config = parent_rpcs.list_app_gateways if parent_rpcs.respond_to? :list_app_gateways + @list_app_gateways = ::Gapic::Config::Method.new list_app_gateways_config + get_app_gateway_config = parent_rpcs.get_app_gateway if parent_rpcs.respond_to? :get_app_gateway + @get_app_gateway = ::Gapic::Config::Method.new get_app_gateway_config + create_app_gateway_config = parent_rpcs.create_app_gateway if parent_rpcs.respond_to? :create_app_gateway + @create_app_gateway = ::Gapic::Config::Method.new create_app_gateway_config + delete_app_gateway_config = parent_rpcs.delete_app_gateway if parent_rpcs.respond_to? :delete_app_gateway + @delete_app_gateway = ::Gapic::Config::Method.new delete_app_gateway_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb new file mode 100644 index 000000000000..26871bd26e4d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + # Credentials for the AppGatewaysService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb new file mode 100644 index 000000000000..02f38f1a31dd --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb @@ -0,0 +1,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 BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AppGatewaysService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AppGatewaysService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb new file mode 100644 index 000000000000..820a03051f4e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + # Path helper methods for the AppGatewaysService API. + module Paths + ## + # Create a fully-qualified AppGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/appGateways/{app_gateway}` + # + # @param project [String] + # @param location [String] + # @param app_gateway [String] + # + # @return [::String] + def app_gateway_path project:, location:, app_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/appGateways/#{app_gateway}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb new file mode 100644 index 000000000000..58c711433662 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb new file mode 100644 index 000000000000..8ffa165f3267 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nAgoogle/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto\x12&google.cloud.beyondcorp.appgateways.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x16ListAppGatewaysRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$beyondcorp.googleapis.com/AppGateway\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x91\x01\n\x17ListAppGatewaysResponse\x12H\n\x0c\x61pp_gateways\x18\x01 \x03(\x0b\x32\x32.google.cloud.beyondcorp.appgateways.v1.AppGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"R\n\x14GetAppGatewayRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\"\xf7\x01\n\x17\x43reateAppGatewayRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$beyondcorp.googleapis.com/AppGateway\x12\x1b\n\x0e\x61pp_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12L\n\x0b\x61pp_gateway\x18\x03 \x01(\x0b\x32\x32.google.cloud.beyondcorp.appgateways.v1.AppGatewayB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x01\n\x17\x44\x65leteAppGatewayRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x08\n\nAppGateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x06labels\x18\x04 \x03(\x0b\x32>.google.cloud.beyondcorp.appgateways.v1.AppGateway.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12J\n\x04type\x18\x07 \x01(\x0e\x32\x37.google.cloud.beyondcorp.appgateways.v1.AppGateway.TypeB\x03\xe0\x41\x02\x12L\n\x05state\x18\x08 \x01(\x0e\x32\x38.google.cloud.beyondcorp.appgateways.v1.AppGateway.StateB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12j\n\x15\x61llocated_connections\x18\n \x03(\x0b\x32\x46.google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnectionB\x03\xe0\x41\x03\x12S\n\thost_type\x18\x0b \x01(\x0e\x32;.google.cloud.beyondcorp.appgateways.v1.AppGateway.HostTypeB\x03\xe0\x41\x02\x1a\x46\n\x13\x41llocatedConnection\x12\x14\n\x07psc_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cingress_port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTCP_PROXY\x10\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05\";\n\x08HostType\x12\x19\n\x15HOST_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_REGIONAL_MIG\x10\x01:l\xea\x41i\n$beyondcorp.googleapis.com/AppGateway\x12\x41projects/{project}/locations/{location}/appGateways/{app_gateway}\"\x8a\x02\n\x1b\x41ppGatewayOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xf6\x07\n\x12\x41ppGatewaysService\x12\xd4\x01\n\x0fListAppGateways\x12>.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest\x1a?.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/appGateways\x12\xc1\x01\n\rGetAppGateway\x12<.google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest\x1a\x32.google.cloud.beyondcorp.appgateways.v1.AppGateway\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/appGateways/*}\x12\x89\x02\n\x10\x43reateAppGateway\x12?.google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41)\n\nAppGateway\x12\x1b\x41ppGatewayOperationMetadata\xda\x41!parent,app_gateway,app_gateway_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/appGateways:\x0b\x61pp_gateway\x12\xe9\x01\n\x10\x44\x65leteAppGateway\x12?.google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x34\n\x15google.protobuf.Empty\x12\x1b\x41ppGatewayOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/appGateways/*}\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x94\x02\n*com.google.cloud.beyondcorp.appgateways.v1B\x17\x41ppGatewaysServiceProtoP\x01ZLcloud.google.com/go/beyondcorp/appgateways/apiv1/appgatewayspb;appgatewayspb\xaa\x02&Google.Cloud.BeyondCorp.AppGateways.V1\xca\x02&Google\\Cloud\\BeyondCorp\\AppGateways\\V1\xea\x02*Google::Cloud::BeyondCorp::AppGateways::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + ListAppGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest").msgclass + ListAppGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse").msgclass + GetAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest").msgclass + CreateAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest").msgclass + DeleteAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest").msgclass + AppGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway").msgclass + AppGateway::AllocatedConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection").msgclass + AppGateway::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.Type").enummodule + AppGateway::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.State").enummodule + AppGateway::HostType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType").enummodule + AppGatewayOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGatewayOperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb new file mode 100644 index 000000000000..d3df1c0984d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto for package 'Google.Cloud.BeyondCorp.AppGateways.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb' + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + module AppGatewaysService + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The AppGatewaysService exposes the following resources: + # + # * AppGateways, named as follows: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. + # + # The AppGatewaysService service provides methods to manage + # (create/read/update/delete) BeyondCorp AppGateways. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService' + + # Lists AppGateways in a given project and location. + rpc :ListAppGateways, ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse + # Gets details of a single AppGateway. + rpc :GetAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway + # Creates a new AppGateway in a given project and location. + rpc :CreateAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, ::Google::Longrunning::Operation + # Deletes a single AppGateway. + rpc :DeleteAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md new file mode 100644 index 000000000000..ff3f6683cb37 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BeyondCorp AppGateways V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb new file mode 100644 index 000000000000..94e62975802d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb @@ -0,0 +1,291 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module AppGateways + module V1 + # Request message for BeyondCorp.ListAppGateways. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AppGateway location using the form: + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # If not specified, a default value of 50 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to + # determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ListAppGatewaysRequest, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter specifying constraints of a list operation. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results. See + # [Sorting + # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + # for more information. + class ListAppGatewaysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BeyondCorp.ListAppGateways. + # @!attribute [rw] app_gateways + # @return [::Array<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] + # A list of BeyondCorp AppGateways in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ListAppGatewaysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.GetAppGateway. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppGateway name using the form: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + class GetAppGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.CreateAppGateway. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource project name of the AppGateway location using the + # form: `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] app_gateway_id + # @return [::String] + # Optional. User-settable AppGateway resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @!attribute [rw] app_gateway + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] + # Required. A BeyondCorp AppGateway resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class CreateAppGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BeyondCorp.DeleteAppGateway. + # @!attribute [rw] name + # @return [::String] + # Required. BeyondCorp AppGateway name using the form: + # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class DeleteAppGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway + # to a remote application. It creates all the necessary GCP components needed + # for creating a BeyondCorp protected AppGateway. Multiple connectors can be + # authorised for a single AppGateway. + # @!attribute [rw] name + # @return [::String] + # Required. Unique resource name of the AppGateway. + # The name is ignored when creating an AppGateway. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the resource was last modified. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # @!attribute [rw] display_name + # @return [::String] + # Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed + # 64 characters. + # @!attribute [r] uid + # @return [::String] + # Output only. A unique identifier for the instance generated by the + # system. + # @!attribute [rw] type + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::Type] + # Required. The type of network connectivity used by the AppGateway. + # @!attribute [r] state + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::State] + # Output only. The current state of the AppGateway. + # @!attribute [r] uri + # @return [::String] + # Output only. Server-defined URI for this resource. + # @!attribute [r] allocated_connections + # @return [::Array<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::AllocatedConnection>] + # Output only. A list of connections allocated for the Gateway + # @!attribute [rw] host_type + # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::HostType] + # Required. The type of hosting used by the AppGateway. + class AppGateway + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Allocated connection of the AppGateway. + # @!attribute [rw] psc_uri + # @return [::String] + # Required. The PSC uri of an allocated connection + # @!attribute [rw] ingress_port + # @return [::Integer] + # Required. The ingress port of an allocated connection + class AllocatedConnection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum containing list of all possible network connectivity options + # supported by BeyondCorp AppGateway. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # TCP Proxy based BeyondCorp Connection. API will default to this if unset. + TCP_PROXY = 1 + end + + # Represents the different states of an AppGateway. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # AppGateway is being created. + CREATING = 1 + + # AppGateway has been created. + CREATED = 2 + + # AppGateway's configuration is being updated. + UPDATING = 3 + + # AppGateway is being deleted. + DELETING = 4 + + # AppGateway is down and may be restored in the future. + # This happens when CCFE sends ProjectState = OFF. + DOWN = 5 + end + + # Enum containing list of all possible host types supported by BeyondCorp + # Connection. + module HostType + # Default value. This value is unused. + HOST_TYPE_UNSPECIFIED = 0 + + # AppGateway hosted in a GCP regional managed instance group. + GCP_REGIONAL_MIG = 1 + end + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class AppGatewayOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile new file mode 100644 index 000000000000..885230800eb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-beyond_corp-app_gateways-v1", path: "../" +else + gem "google-cloud-beyond_corp-app_gateways-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb new file mode 100644 index 000000000000..d219a1bc69bf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] +require "google/cloud/beyond_corp/app_gateways/v1" + +## +# Snippet for the create_app_gateway call in the AppGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway. +# +def create_app_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new + + # Call the create_app_gateway method. + result = client.create_app_gateway request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb new file mode 100644 index 000000000000..f68a23b0f94b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] +require "google/cloud/beyond_corp/app_gateways/v1" + +## +# Snippet for the delete_app_gateway call in the AppGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway. +# +def delete_app_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new + + # Call the delete_app_gateway method. + result = client.delete_app_gateway request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb new file mode 100644 index 000000000000..a733a0e2c1ab --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] +require "google/cloud/beyond_corp/app_gateways/v1" + +## +# Snippet for the get_app_gateway call in the AppGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway. +# +def get_app_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new + + # Call the get_app_gateway method. + result = client.get_app_gateway request + + # The returned object is of type Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. + p result +end +# [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb new file mode 100644 index 000000000000..5f5e6577f4a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] +require "google/cloud/beyond_corp/app_gateways/v1" + +## +# Snippet for the list_app_gateways call in the AppGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways. +# +def list_app_gateways + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new + + # Call the list_app_gateways method. + result = client.list_app_gateways request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. + p item + end +end +# [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json new file mode 100644 index 000000000000..8a34973ba430 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-beyond_corp-app_gateways-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.beyondcorp.appgateways.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync", + "title": "Snippet for the list_app_gateways call in the AppGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways.", + "file": "app_gateways_service/list_app_gateways.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_app_gateways", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse", + "client": { + "short_name": "AppGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" + }, + "method": { + "short_name": "ListAppGateways", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListAppGateways", + "service": { + "short_name": "AppGatewaysService", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync", + "title": "Snippet for the get_app_gateway call in the AppGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway.", + "file": "app_gateways_service/get_app_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_app_gateway", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway", + "client": { + "short_name": "AppGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" + }, + "method": { + "short_name": "GetAppGateway", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetAppGateway", + "service": { + "short_name": "AppGatewaysService", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync", + "title": "Snippet for the create_app_gateway call in the AppGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway.", + "file": "app_gateways_service/create_app_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_app_gateway", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" + }, + "method": { + "short_name": "CreateAppGateway", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.CreateAppGateway", + "service": { + "short_name": "AppGatewaysService", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync", + "title": "Snippet for the delete_app_gateway call in the AppGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway.", + "file": "app_gateways_service/delete_app_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_app_gateway", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AppGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" + }, + "method": { + "short_name": "DeleteAppGateway", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.DeleteAppGateway", + "service": { + "short_name": "AppGatewaysService", + "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb new file mode 100644 index 000000000000..26cc18b8ebde --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb" +require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" + +class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb new file mode 100644 index 000000000000..e122fab5a1b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" + +class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_app_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_gateway_path project: "value0", location: "value1", app_gateway: "value2" + assert_equal "projects/value0/locations/value1/appGateways/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb new file mode 100644 index 000000000000..42b4b66be455 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb @@ -0,0 +1,385 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb" +require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" + +class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_app_gateways + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_app_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_app_gateways, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_app_gateways_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_app_gateways({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_app_gateways parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_app_gateways ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_app_gateways({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_app_gateways(::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_app_gateways_client_stub.call_rpc_count + end + end + + def test_get_app_gateway + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_app_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_app_gateway_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_app_gateway({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_app_gateway name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_app_gateway({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_app_gateway_client_stub.call_rpc_count + end + end + + def test_create_app_gateway + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_gateway_id = "hello world" + app_gateway = {} + request_id = "hello world" + validate_only = true + + create_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_app_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_gateway_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway), request["app_gateway"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_app_gateway_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_app_gateway({ parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_app_gateway parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new(parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_app_gateway({ parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new(parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_app_gateway_client_stub.call_rpc_count + end + end + + def test_delete_app_gateway + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + + delete_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_app_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_app_gateway_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_app_gateway({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_app_gateway name: name, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_app_gateway({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_app_gateway_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json new file mode 100644 index 000000000000..c457c36b7285 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "beyondcorp.googleapis.com", + "api_shortname": "beyondcorp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest", + "distribution_name": "google-cloud-beyond_corp-client_gateways-v1", + "is_cloud": true, + "language": "ruby", + "name": "beyondcorp", + "name_pretty": "BeyondCorp ClientGateways V1 API", + "product_documentation": "https://cloud.google.com/beyondcorp/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-client_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml new file mode 100644 index 000000000000..2d6e3497728d --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-beyond_corp-client_gateways-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-beyond_corp-client_gateways-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts new file mode 100644 index 000000000000..631aaf95922e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BeyondCorp ClientGateways V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..531d6dc3f6d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-beyond_corp-client_gateways-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-beyond_corp-client_gateways-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/beyond_corp/client_gateways/v1" + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/beyond_corp/client_gateways/v1" + +::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-beyond_corp-client_gateways-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/beyond_corp/client_gateways/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md new file mode 100644 index 000000000000..0e6ab93a2873 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the BeyondCorp ClientGateways V1 API + +Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BeyondCorp ClientGateways V1 API. Most users should consider using +the main client gem, +[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-beyond_corp-client_gateways-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/beyondcorp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/beyond_corp/client_gateways/v1" + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new +request = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new # (request fields as keyword arguments...) +response = client.list_client_gateways request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/beyondcorp/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/beyond_corp/client_gateways/v1" +require "logger" + +client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-beyond_corp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-beyond_corp-client_gateways-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-beyond_corp`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-beyond_corp-client_gateways-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile new file mode 100644 index 000000000000..7797016444d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-beyond_corp-client_gateways-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials" + ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-beyond_corp-client_gateways-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-beyond_corp-client_gateways-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-beyond_corp-client_gateways-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-beyond_corp-client_gateways-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-beyond_corp-client_gateways-v1" + header "google-cloud-beyond_corp-client_gateways-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-beyond_corp-client_gateways-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-beyond_corp-client_gateways-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-beyond_corp-client_gateways-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-beyond_corp-client_gateways-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json new file mode 100644 index 000000000000..adefe2e55503 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json @@ -0,0 +1,38 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.beyondcorp.clientgateways.v1", + "libraryPackage": "::Google::Cloud::BeyondCorp::ClientGateways::V1", + "services": { + "ClientGatewaysService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client", + "rpcs": { + "ListClientGateways": { + "methods": [ + "list_client_gateways" + ] + }, + "GetClientGateway": { + "methods": [ + "get_client_gateway" + ] + }, + "CreateClientGateway": { + "methods": [ + "create_client_gateway" + ] + }, + "DeleteClientGateway": { + "methods": [ + "delete_client_gateway" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec new file mode 100644 index 000000000000..4ec8d0459b9a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/beyond_corp/client_gateways/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-beyond_corp-client_gateways-v1" + gem.version = Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-client_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." + gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb new file mode 100644 index 000000000000..8df80233c89e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/beyond_corp/client_gateways/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb new file mode 100644 index 000000000000..c271d92c8367 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" +require "google/cloud/beyond_corp/client_gateways/v1/version" + +module Google + module Cloud + module BeyondCorp + module ClientGateways + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/client_gateways/v1" + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/beyond_corp/client_gateways/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb new file mode 100644 index 000000000000..56ca51678808 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/beyond_corp/client_gateways/v1/version" + +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client" + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + ## + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The ClientGatewaysService exposes the following resources: + # + # * Client Gateways, named as follows: + # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + module ClientGatewaysService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "client_gateways_service", "helpers.rb" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb new file mode 100644 index 000000000000..2c1774544cc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb @@ -0,0 +1,882 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + ## + # Client for the ClientGatewaysService service. + # + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The ClientGatewaysService exposes the following resources: + # + # * Client Gateways, named as follows: + # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :client_gateways_service_stub + + ## + # Configure the ClientGatewaysService Client class. + # + # See {::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ClientGatewaysService clients + # ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BeyondCorp", "ClientGateways", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ClientGatewaysService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_gateways_service_stub.universe_domain + end + + ## + # Create a new ClientGatewaysService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ClientGatewaysService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @client_gateways_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @client_gateways_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @client_gateways_service_stub.endpoint + config.universe_domain = @client_gateways_service_stub.universe_domain + config.logger = @client_gateways_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @client_gateways_service_stub.endpoint + config.universe_domain = @client_gateways_service_stub.universe_domain + config.logger = @client_gateways_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @client_gateways_service_stub.logger + end + + # Service calls + + ## + # Lists ClientGateways in a given project and location. + # + # @overload list_client_gateways(request, options = nil) + # Pass arguments to `list_client_gateways` via a request object, either of type + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_client_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_client_gateways` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListClientGatewaysRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/client_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new + # + # # Call the list_client_gateways method. + # result = client.list_client_gateways request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. + # p item + # end + # + def list_client_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_client_gateways.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_client_gateways.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_client_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @client_gateways_service_stub.call_rpc :list_client_gateways, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @client_gateways_service_stub, :list_client_gateways, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ClientGateway. + # + # @overload get_client_gateway(request, options = nil) + # Pass arguments to `get_client_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_client_gateway(name: nil) + # Pass arguments to `get_client_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/client_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new + # + # # Call the get_client_gateway method. + # result = client.get_client_gateway request + # + # # The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. + # p result + # + def get_client_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_client_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_client_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_client_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @client_gateways_service_stub.call_rpc :get_client_gateway, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new ClientGateway in a given project and location. + # + # @overload create_client_gateway(request, options = nil) + # Pass arguments to `create_client_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_client_gateway(parent: nil, client_gateway_id: nil, client_gateway: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_client_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param client_gateway_id [::String] + # Optional. User-settable client gateway resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @param client_gateway [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/client_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new + # + # # Call the create_client_gateway method. + # result = client.create_client_gateway request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_client_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_client_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_client_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_client_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @client_gateways_service_stub.call_rpc :create_client_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ClientGateway. + # + # @overload delete_client_gateway(request, options = nil) + # Pass arguments to `delete_client_gateway` via a request object, either of type + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_client_gateway(name: nil, request_id: nil, validate_only: nil) + # Pass arguments to `delete_client_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/beyond_corp/client_gateways/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new + # + # # Call the delete_client_gateway method. + # result = client.delete_client_gateway request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_client_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_client_gateway.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_client_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_client_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @client_gateways_service_stub.call_rpc :delete_client_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ClientGatewaysService API. + # + # This class represents the configuration for ClientGatewaysService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_client_gateways to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_client_gateways.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_client_gateways.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ClientGatewaysService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_client_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_client_gateways + ## + # RPC-specific configuration for `get_client_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_client_gateway + ## + # RPC-specific configuration for `create_client_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_client_gateway + ## + # RPC-specific configuration for `delete_client_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_client_gateway + + # @private + def initialize parent_rpcs = nil + list_client_gateways_config = parent_rpcs.list_client_gateways if parent_rpcs.respond_to? :list_client_gateways + @list_client_gateways = ::Gapic::Config::Method.new list_client_gateways_config + get_client_gateway_config = parent_rpcs.get_client_gateway if parent_rpcs.respond_to? :get_client_gateway + @get_client_gateway = ::Gapic::Config::Method.new get_client_gateway_config + create_client_gateway_config = parent_rpcs.create_client_gateway if parent_rpcs.respond_to? :create_client_gateway + @create_client_gateway = ::Gapic::Config::Method.new create_client_gateway_config + delete_client_gateway_config = parent_rpcs.delete_client_gateway if parent_rpcs.respond_to? :delete_client_gateway + @delete_client_gateway = ::Gapic::Config::Method.new delete_client_gateway_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb new file mode 100644 index 000000000000..3fce6bd8e91e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + # Credentials for the ClientGatewaysService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb new file mode 100644 index 000000000000..b5114ab2b67a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb @@ -0,0 +1,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 BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ClientGatewaysService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ClientGatewaysService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb new file mode 100644 index 000000000000..e1051c10e318 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + # Path helper methods for the ClientGatewaysService API. + module Paths + ## + # Create a fully-qualified ClientGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/clientGateways/{client_gateway}` + # + # @param project [String] + # @param location [String] + # @param client_gateway [String] + # + # @return [::String] + def client_gateway_path project:, location:, client_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/clientGateways/#{client_gateway}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb new file mode 100644 index 000000000000..8e4f4f6207b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb new file mode 100644 index 000000000000..48725cc2cbcd --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nGgoogle/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto\x12)google.cloud.beyondcorp.clientgateways.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfd\x03\n\rClientGateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.beyondcorp.clientgateways.v1.ClientGateway.StateB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18\x63lient_connector_service\x18\x06 \x01(\tB\x03\xe0\x41\x03\"j\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05\x12\t\n\x05\x45RROR\x10\x06:u\xea\x41r\n\'beyondcorp.googleapis.com/ClientGateway\x12Gprojects/{project}/locations/{location}/clientGateways/{client_gateway}\"\xb9\x01\n\x19ListClientGatewaysRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/ClientGateway\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1aListClientGatewaysResponse\x12Q\n\x0f\x63lient_gateways\x18\x01 \x03(\x0b\x32\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x17GetClientGatewayRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/ClientGateway\"\x89\x02\n\x1a\x43reateClientGatewayRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/ClientGateway\x12\x1e\n\x11\x63lient_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x63lient_gateway\x18\x03 \x01(\x0b\x32\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGatewayB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x90\x01\n\x1a\x44\x65leteClientGatewayRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/ClientGateway\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x8d\x02\n\x1e\x43lientGatewayOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xc7\x08\n\x15\x43lientGatewaysService\x12\xe6\x01\n\x12ListClientGateways\x12\x44.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest\x1a\x45.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/clientGateways\x12\xd3\x01\n\x10GetClientGateway\x12\x42.google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest\x1a\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGateway\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/clientGateways/*}\x12\xa4\x02\n\x13\x43reateClientGateway\x12\x45.google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41/\n\rClientGateway\x12\x1e\x43lientGatewayOperationMetadata\xda\x41\'parent,client_gateway,client_gateway_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/clientGateways:\x0e\x63lient_gateway\x12\xf8\x01\n\x13\x44\x65leteClientGateway\x12\x45.google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x37\n\x15google.protobuf.Empty\x12\x1e\x43lientGatewayOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/clientGateways/*}\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xac\x02\n-com.google.cloud.beyondcorp.clientgateways.v1B\x1a\x43lientGatewaysServiceProtoP\x01ZUcloud.google.com/go/beyondcorp/clientgateways/apiv1/clientgatewayspb;clientgatewayspb\xaa\x02)Google.Cloud.BeyondCorp.ClientGateways.V1\xca\x02)Google\\Cloud\\BeyondCorp\\ClientGateways\\V1\xea\x02-Google::Cloud::BeyondCorp::ClientGateways::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + ClientGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGateway").msgclass + ClientGateway::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State").enummodule + ListClientGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest").msgclass + ListClientGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse").msgclass + GetClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest").msgclass + CreateClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest").msgclass + DeleteClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest").msgclass + ClientGatewayOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGatewayOperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb new file mode 100644 index 000000000000..95cc1f1b36c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto for package 'Google.Cloud.BeyondCorp.ClientGateways.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb' + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + module ClientGatewaysService + # API Overview: + # + # The `beyondcorp.googleapis.com` service implements the Google Cloud + # BeyondCorp API. + # + # Data Model: + # + # The ClientGatewaysService exposes the following resources: + # + # * Client Gateways, named as follows: + # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService' + + # Lists ClientGateways in a given project and location. + rpc :ListClientGateways, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse + # Gets details of a single ClientGateway. + rpc :GetClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway + # Creates a new ClientGateway in a given project and location. + rpc :CreateClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, ::Google::Longrunning::Operation + # Deletes a single ClientGateway. + rpc :DeleteClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md new file mode 100644 index 000000000000..2aa673a2c9ee --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BeyondCorp ClientGateways V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb new file mode 100644 index 000000000000..a78c841fea07 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb @@ -0,0 +1,221 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BeyondCorp + module ClientGateways + module V1 + # Message describing ClientGateway object. + # @!attribute [rw] name + # @return [::String] + # Required. name of resource. The name is ignored during creation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create time stamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update time stamp. + # @!attribute [r] state + # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway::State] + # Output only. The operational state of the gateway. + # @!attribute [r] id + # @return [::String] + # Output only. A unique identifier for the instance generated by the system. + # @!attribute [r] client_connector_service + # @return [::String] + # Output only. The client connector service name that the client gateway is + # associated to. Client Connector Services, named as follows: + # `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. + class ClientGateway + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the different states of a gateway. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # Gateway is being created. + CREATING = 1 + + # Gateway is being updated. + UPDATING = 2 + + # Gateway is being deleted. + DELETING = 3 + + # Gateway is running. + RUNNING = 4 + + # Gateway is down and may be restored in the future. + # This happens when CCFE sends ProjectState = OFF. + DOWN = 5 + + # ClientGateway encountered an error and is in indeterministic state. + ERROR = 6 + end + end + + # Message for requesting list of ClientGateways. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListClientGatewaysRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListClientGatewaysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing ClientGateways. + # @!attribute [rw] client_gateways + # @return [::Array<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] + # The list of ClientGateway. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListClientGatewaysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a ClientGateway. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetClientGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a ClientGateway. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] client_gateway_id + # @return [::String] + # Optional. User-settable client gateway resource ID. + # * Must start with a letter. + # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + # * Must end with a number or a letter. + # @!attribute [rw] client_gateway + # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class CreateClientGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a ClientGateway + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validates request by executing a dry-run which would not + # alter the resource in any way. + class DeleteClientGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class ClientGatewayOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile new file mode 100644 index 000000000000..d1f6da5a786b --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-beyond_corp-client_gateways-v1", path: "../" +else + gem "google-cloud-beyond_corp-client_gateways-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb new file mode 100644 index 000000000000..2ab90c3ca3f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] +require "google/cloud/beyond_corp/client_gateways/v1" + +## +# Snippet for the create_client_gateway call in the ClientGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway. +# +def create_client_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new + + # Call the create_client_gateway method. + result = client.create_client_gateway request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb new file mode 100644 index 000000000000..b7bb4a3cbfbe --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] +require "google/cloud/beyond_corp/client_gateways/v1" + +## +# Snippet for the delete_client_gateway call in the ClientGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway. +# +def delete_client_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new + + # Call the delete_client_gateway method. + result = client.delete_client_gateway request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb new file mode 100644 index 000000000000..c4c652903450 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] +require "google/cloud/beyond_corp/client_gateways/v1" + +## +# Snippet for the get_client_gateway call in the ClientGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway. +# +def get_client_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new + + # Call the get_client_gateway method. + result = client.get_client_gateway request + + # The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. + p result +end +# [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb new file mode 100644 index 000000000000..129dd2041739 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] +require "google/cloud/beyond_corp/client_gateways/v1" + +## +# Snippet for the list_client_gateways call in the ClientGatewaysService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways. +# +def list_client_gateways + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new + + # Call the list_client_gateways method. + result = client.list_client_gateways request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. + p item + end +end +# [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json new file mode 100644 index 000000000000..e3f0d79256e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-beyond_corp-client_gateways-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.beyondcorp.clientgateways.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync", + "title": "Snippet for the list_client_gateways call in the ClientGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways.", + "file": "client_gateways_service/list_client_gateways.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_client_gateways", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse", + "client": { + "short_name": "ClientGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" + }, + "method": { + "short_name": "ListClientGateways", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListClientGateways", + "service": { + "short_name": "ClientGatewaysService", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync", + "title": "Snippet for the get_client_gateway call in the ClientGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway.", + "file": "client_gateways_service/get_client_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_client_gateway", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway", + "client": { + "short_name": "ClientGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" + }, + "method": { + "short_name": "GetClientGateway", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetClientGateway", + "service": { + "short_name": "ClientGatewaysService", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync", + "title": "Snippet for the create_client_gateway call in the ClientGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway.", + "file": "client_gateways_service/create_client_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_client_gateway", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ClientGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" + }, + "method": { + "short_name": "CreateClientGateway", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.CreateClientGateway", + "service": { + "short_name": "ClientGatewaysService", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync", + "title": "Snippet for the delete_client_gateway call in the ClientGatewaysService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway.", + "file": "client_gateways_service/delete_client_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_client_gateway", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ClientGatewaysService::Client", + "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" + }, + "method": { + "short_name": "DeleteClientGateway", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.DeleteClientGateway", + "service": { + "short_name": "ClientGatewaysService", + "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb new file mode 100644 index 000000000000..4f40d70c67da --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb" +require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" + +class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb new file mode 100644 index 000000000000..07d42d2a5895 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" + +class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_client_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.client_gateway_path project: "value0", location: "value1", client_gateway: "value2" + assert_equal "projects/value0/locations/value1/clientGateways/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb new file mode 100644 index 000000000000..2e8a40b3f973 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb @@ -0,0 +1,385 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb" +require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" + +class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_client_gateways + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_client_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_client_gateways, name + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_client_gateways_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_client_gateways({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_client_gateways parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_client_gateways ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_client_gateways({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_client_gateways(::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_client_gateways_client_stub.call_rpc_count + end + end + + def test_get_client_gateway + # Create GRPC objects. + grpc_response = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_client_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_client_gateway_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_client_gateway({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_client_gateway name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_client_gateway({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_client_gateway_client_stub.call_rpc_count + end + end + + def test_create_client_gateway + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + client_gateway_id = "hello world" + client_gateway = {} + request_id = "hello world" + validate_only = true + + create_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_client_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["client_gateway_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway), request["client_gateway"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_client_gateway_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_client_gateway({ parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_client_gateway parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new(parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_client_gateway({ parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new(parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_client_gateway_client_stub.call_rpc_count + end + end + + def test_delete_client_gateway + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + + delete_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_client_gateway, name + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_client_gateway_client_stub do + # Create client + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_client_gateway({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_client_gateway name: name, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_client_gateway({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_client_gateway_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json new file mode 100644 index 000000000000..3411b1f1a8d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "analyticshub.googleapis.com", + "api_shortname": "analyticshub", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest", + "distribution_name": "google-cloud-bigquery-analytics_hub-v1", + "is_cloud": true, + "language": "ruby", + "name": "analyticshub", + "name_pretty": "Analytics Hub V1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. Note that google-cloud-bigquery-analytics_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-analytics_hub instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml new file mode 100644 index 000000000000..2f4c3e44583c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-analytics_hub-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-analytics_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts new file mode 100644 index 000000000000..ebe913609764 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Analytics Hub V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1f50655d512b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-analytics_hub-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-analytics_hub-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" + +::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-bigquery-analytics_hub-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md new file mode 100644 index 000000000000..e32c262fcdcb --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Analytics Hub V1 API + +Exchange data and analytics assets securely and efficiently. + +Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Analytics Hub V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-analytics_hub](https://rubygems.org/gems/google-cloud-bigquery-analytics_hub). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-analytics_hub-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/analyticshub.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new +request = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new # (request fields as keyword arguments...) +response = client.list_data_exchanges request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/bigquery/analytics_hub/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-bigquery-analytics_hub`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-analytics_hub-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-analytics_hub`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-bigquery-analytics_hub-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile new file mode 100644 index 000000000000..8e449aebabe6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-analytics_hub-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-analytics_hub-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-analytics_hub-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-analytics_hub-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-analytics_hub-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-analytics_hub-v1" + header "google-cloud-bigquery-analytics_hub-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-analytics_hub-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-analytics_hub-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-analytics_hub-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-analytics_hub-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json new file mode 100644 index 000000000000..e7a68c8e3121 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.analyticshub.v1", + "libraryPackage": "::Google::Cloud::Bigquery::AnalyticsHub::V1", + "services": { + "AnalyticsHubService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client", + "rpcs": { + "ListDataExchanges": { + "methods": [ + "list_data_exchanges" + ] + }, + "ListOrgDataExchanges": { + "methods": [ + "list_org_data_exchanges" + ] + }, + "GetDataExchange": { + "methods": [ + "get_data_exchange" + ] + }, + "CreateDataExchange": { + "methods": [ + "create_data_exchange" + ] + }, + "UpdateDataExchange": { + "methods": [ + "update_data_exchange" + ] + }, + "DeleteDataExchange": { + "methods": [ + "delete_data_exchange" + ] + }, + "ListListings": { + "methods": [ + "list_listings" + ] + }, + "GetListing": { + "methods": [ + "get_listing" + ] + }, + "CreateListing": { + "methods": [ + "create_listing" + ] + }, + "UpdateListing": { + "methods": [ + "update_listing" + ] + }, + "DeleteListing": { + "methods": [ + "delete_listing" + ] + }, + "SubscribeListing": { + "methods": [ + "subscribe_listing" + ] + }, + "SubscribeDataExchange": { + "methods": [ + "subscribe_data_exchange" + ] + }, + "RefreshSubscription": { + "methods": [ + "refresh_subscription" + ] + }, + "GetSubscription": { + "methods": [ + "get_subscription" + ] + }, + "ListSubscriptions": { + "methods": [ + "list_subscriptions" + ] + }, + "ListSharedResourceSubscriptions": { + "methods": [ + "list_shared_resource_subscriptions" + ] + }, + "RevokeSubscription": { + "methods": [ + "revoke_subscription" + ] + }, + "DeleteSubscription": { + "methods": [ + "delete_subscription" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "CreateQueryTemplate": { + "methods": [ + "create_query_template" + ] + }, + "GetQueryTemplate": { + "methods": [ + "get_query_template" + ] + }, + "ListQueryTemplates": { + "methods": [ + "list_query_templates" + ] + }, + "UpdateQueryTemplate": { + "methods": [ + "update_query_template" + ] + }, + "DeleteQueryTemplate": { + "methods": [ + "delete_query_template" + ] + }, + "SubmitQueryTemplate": { + "methods": [ + "submit_query_template" + ] + }, + "ApproveQueryTemplate": { + "methods": [ + "approve_query_template" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec new file mode 100644 index 000000000000..9ce1ebb13972 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/analytics_hub/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-analytics_hub-v1" + gem.version = Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. Note that google-cloud-bigquery-analytics_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-analytics_hub instead. See the readme for more details." + gem.summary = "Exchange data and analytics assets securely and efficiently." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb new file mode 100644 index 000000000000..deca319c25cf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/analytics_hub/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb new file mode 100644 index 000000000000..b6966426b9a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" +require "google/cloud/bigquery/analytics_hub/v1/version" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/analytics_hub/v1" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/analytics_hub/v1" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/analytics_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb new file mode 100644 index 000000000000..7454ae504b54 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/analytics_hub/v1/version" + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + ## + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + module AnalyticsHubService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "analytics_hub_service", "helpers.rb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb new file mode 100644 index 000000000000..9b979421434b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb @@ -0,0 +1,3310 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + ## + # Client for the AnalyticsHubService service. + # + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :analytics_hub_service_stub + + ## + # Configure the AnalyticsHubService Client class. + # + # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AnalyticsHubService clients + # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AnalyticsHubService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @analytics_hub_service_stub.universe_domain + end + + ## + # Create a new AnalyticsHubService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AnalyticsHubService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @analytics_hub_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @analytics_hub_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @analytics_hub_service_stub.logger + end + + # Service calls + + ## + # Lists all data exchanges in a given project and location. + # + # @overload list_data_exchanges(request, options = nil) + # Pass arguments to `list_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the data exchanges. + # e.g. `projects/myproject/locations/us`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new + # + # # Call the list_data_exchanges method. + # result = client.list_data_exchanges request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p item + # end + # + def list_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_exchanges.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_data_exchanges, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all data exchanges from projects in a given organization and + # location. + # + # @overload list_org_data_exchanges(request, options = nil) + # Pass arguments to `list_org_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization [::String] + # Required. The organization resource path of the projects containing + # DataExchanges. e.g. `organizations/myorg/locations/us`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new + # + # # Call the list_org_data_exchanges method. + # result = client.list_org_data_exchanges request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p item + # end + # + def list_org_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.organization + header_params["organization"] = request.organization + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_org_data_exchanges, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a data exchange. + # + # @overload get_data_exchange(request, options = nil) + # Pass arguments to `get_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_exchange(name: nil) + # Pass arguments to `get_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the data exchange. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new + # + # # Call the get_data_exchange method. + # result = client.get_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def get_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new data exchange. + # + # @overload create_data_exchange(request, options = nil) + # Pass arguments to `create_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) + # Pass arguments to `create_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the data exchange. + # e.g. `projects/myproject/locations/us`. + # @param data_exchange_id [::String] + # Required. The ID of the data exchange. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] + # Required. The data exchange to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new + # + # # Call the create_data_exchange method. + # result = client.create_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def create_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :create_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing data exchange. + # + # @overload update_data_exchange(request, options = nil) + # Pass arguments to `update_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_exchange(update_mask: nil, data_exchange: nil) + # Pass arguments to `update_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the data exchange + # resource. The fields specified in the + # `updateMask` are relative to the resource and are not a full request. + # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] + # Required. The data exchange to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new + # + # # Call the update_data_exchange method. + # result = client.update_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def update_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_exchange&.name + header_params["data_exchange.name"] = request.data_exchange.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :update_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing data exchange. + # + # @overload delete_data_exchange(request, options = nil) + # Pass arguments to `delete_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_exchange(name: nil) + # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full name of the data exchange resource that you want to + # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new + # + # # Call the delete_data_exchange method. + # result = client.delete_data_exchange request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all listings in a given project and location. + # + # @overload list_listings(request, options = nil) + # Pass arguments to `list_listings` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_listings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_listings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new + # + # # Call the list_listings method. + # result = client.list_listings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p item + # end + # + def list_listings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_listings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_listings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_listings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_listings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a listing. + # + # @overload get_listing(request, options = nil) + # Pass arguments to `get_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_listing(name: nil) + # Pass arguments to `get_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new + # + # # Call the get_listing method. + # result = client.get_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def get_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new listing. + # + # @overload create_listing(request, options = nil) + # Pass arguments to `create_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_listing(parent: nil, listing_id: nil, listing: nil) + # Pass arguments to `create_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param listing_id [::String] + # Required. The ID of the listing to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] + # Required. The listing to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new + # + # # Call the create_listing method. + # result = client.create_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def create_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :create_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing listing. + # + # @overload update_listing(request, options = nil) + # Pass arguments to `update_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_listing(update_mask: nil, listing: nil) + # Pass arguments to `update_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the listing + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] + # Required. The listing to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new + # + # # Call the update_listing method. + # result = client.update_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def update_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.listing&.name + header_params["listing.name"] = request.listing.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :update_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a listing. + # + # @overload delete_listing(request, options = nil) + # Pass arguments to `delete_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_listing(name: nil, delete_commercial: nil) + # Pass arguments to `delete_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the listing to delete. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @param delete_commercial [::Boolean] + # Optional. If the listing is commercial then this field must be set to true, + # otherwise a failure is thrown. This acts as a safety guard to avoid + # deleting commercial listings accidentally. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new + # + # # Call the delete_listing method. + # result = client.delete_listing request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Subscribes to a listing. + # + # Currently, with Analytics Hub, you can create listings that + # reference only BigQuery datasets. + # Upon subscription to a listing for a BigQuery dataset, Analytics Hub + # creates a linked dataset in the subscriber's project. + # + # @overload subscribe_listing(request, options = nil) + # Pass arguments to `subscribe_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload subscribe_listing(destination_dataset: nil, destination_pubsub_subscription: nil, name: nil) + # Pass arguments to `subscribe_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] + # Input only. BigQuery destination dataset to create for the subscriber. + # + # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] + # Input only. Destination Pub/Sub subscription to create for the + # subscriber. + # + # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param name [::String] + # Required. Resource name of the listing that you want to subscribe to. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new + # + # # Call the subscribe_listing method. + # result = client.subscribe_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. + # p result + # + def subscribe_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.subscribe_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.subscribe_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :subscribe_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Subscription to a Data Clean Room. This is a + # long-running operation as it will create one or more linked datasets. + # Throws a Bad Request error if the Data Exchange does not contain any + # listings. + # + # @overload subscribe_data_exchange(request, options = nil) + # Pass arguments to `subscribe_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload subscribe_data_exchange(name: nil, destination: nil, destination_dataset: nil, subscription: nil, subscriber_contact: nil) + # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Data Exchange. + # e.g. `projects/publisherproject/locations/us/dataExchanges/123` + # @param destination [::String] + # Required. The parent resource path of the Subscription. + # e.g. `projects/subscriberproject/locations/us` + # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] + # Optional. BigQuery destination dataset to create for the subscriber. + # @param subscription [::String] + # Required. Name of the subscription to create. + # e.g. `subscription1` + # @param subscriber_contact [::String] + # Email of the subscriber. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new + # + # # Call the subscribe_data_exchange method. + # result = client.subscribe_data_exchange request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def subscribe_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :subscribe_data_exchange, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Refreshes a Subscription to a Data Exchange. A Data Exchange can become + # stale when a publisher adds or removes data. This is a long-running + # operation as it may create many linked datasets. + # + # @overload refresh_subscription(request, options = nil) + # Pass arguments to `refresh_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload refresh_subscription(name: nil) + # Pass arguments to `refresh_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Subscription to refresh. + # e.g. `projects/subscriberproject/locations/us/subscriptions/123` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new + # + # # Call the refresh_subscription method. + # result = client.refresh_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def refresh_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.refresh_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.refresh_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :refresh_subscription, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a Subscription. + # + # @overload get_subscription(request, options = nil) + # Pass arguments to `get_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_subscription(name: nil) + # Pass arguments to `get_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription. + # e.g. projects/123/locations/us/subscriptions/456 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new + # + # # Call the get_subscription method. + # result = client.get_subscription request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p result + # + def get_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_subscription, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all subscriptions in a given project and location. + # + # @overload list_subscriptions(request, options = nil) + # Pass arguments to `list_subscriptions` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the subscription. + # e.g. projects/myproject/locations/us + # @param filter [::String] + # An expression for filtering the results of the request. Eligible + # fields for filtering are: + # + # + `listing` + # + `data_exchange` + # + # Alternatively, a literal wrapped in double quotes may be provided. + # This will be checked for an exact match against both fields above. + # + # In all cases, the full Data Exchange or Listing resource name must + # be provided. Some example of using filters: + # + # + data_exchange="projects/myproject/locations/us/dataExchanges/123" + # + listing="projects/123/locations/us/dataExchanges/456/listings/789" + # + "projects/myproject/locations/us/dataExchanges/123" + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. + # @param page_token [::String] + # Page token, returned by a previous call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new + # + # # Call the list_subscriptions method. + # result = client.list_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p item + # end + # + def list_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all subscriptions on a given Data Exchange or Listing. + # + # @overload list_shared_resource_subscriptions(request, options = nil) + # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # Required. Resource name of the requested target. This resource may be + # either a Listing or a DataExchange. e.g. + # projects/123/locations/us/dataExchanges/456 OR e.g. + # projects/123/locations/us/dataExchanges/456/listings/789 + # @param include_deleted_subscriptions [::Boolean] + # If selected, includes deleted subscriptions in the response + # (up to 63 days after deletion). + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. + # @param page_token [::String] + # Page token, returned by a previous call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new + # + # # Call the list_shared_resource_subscriptions method. + # result = client.list_shared_resource_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p item + # end + # + def list_shared_resource_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_shared_resource_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_shared_resource_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revokes a given subscription. + # + # @overload revoke_subscription(request, options = nil) + # Pass arguments to `revoke_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload revoke_subscription(name: nil, revoke_commercial: nil) + # Pass arguments to `revoke_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription to revoke. + # e.g. projects/123/locations/us/subscriptions/456 + # @param revoke_commercial [::Boolean] + # Optional. If the subscription is commercial then this field must be set to + # true, otherwise a failure is thrown. This acts as a safety guard to avoid + # revoking commercial subscriptions accidentally. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new + # + # # Call the revoke_subscription method. + # result = client.revoke_subscription request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. + # p result + # + def revoke_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.revoke_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.revoke_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.revoke_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :revoke_subscription, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a subscription. + # + # @overload delete_subscription(request, options = nil) + # Pass arguments to `delete_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_subscription(name: nil) + # Pass arguments to `delete_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription to delete. + # e.g. projects/123/locations/us/subscriptions/456 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new + # + # # Call the delete_subscription method. + # result = client.delete_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_subscription, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new QueryTemplate + # + # @overload create_query_template(request, options = nil) + # Pass arguments to `create_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_query_template(parent: nil, query_template_id: nil, query_template: nil) + # Pass arguments to `create_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. + # @param query_template_id [::String] + # Required. The ID of the QueryTemplate to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] + # Required. The QueryTemplate to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new + # + # # Call the create_query_template method. + # result = client.create_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def create_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :create_query_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a QueryTemplate + # + # @overload get_query_template(request, options = nil) + # Pass arguments to `get_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_query_template(name: nil) + # Pass arguments to `get_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new + # + # # Call the get_query_template method. + # result = client.get_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def get_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_query_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all QueryTemplates in a given project and location. + # + # @overload list_query_templates(request, options = nil) + # Pass arguments to `list_query_templates` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_query_templates(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_query_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the QueryTemplates. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response + # page. Leverage the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Optional. Page token, returned by a previous call, to request the next page + # of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new + # + # # Call the list_query_templates method. + # result = client.list_query_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p item + # end + # + def list_query_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_query_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_query_templates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_query_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_query_templates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_query_templates, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing QueryTemplate + # + # @overload update_query_template(request, options = nil) + # Pass arguments to `update_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_query_template(update_mask: nil, query_template: nil) + # Pass arguments to `update_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask specifies the fields to update in the query template + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] + # Required. The QueryTemplate to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new + # + # # Call the update_query_template method. + # result = client.update_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def update_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.query_template&.name + header_params["query_template.name"] = request.query_template.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :update_query_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a query template. + # + # @overload delete_query_template(request, options = nil) + # Pass arguments to `delete_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_query_template(name: nil) + # Pass arguments to `delete_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new + # + # # Call the delete_query_template method. + # result = client.delete_query_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_query_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Submits a query template for approval. + # + # @overload submit_query_template(request, options = nil) + # Pass arguments to `submit_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload submit_query_template(name: nil) + # Pass arguments to `submit_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new + # + # # Call the submit_query_template method. + # result = client.submit_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def submit_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.submit_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.submit_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.submit_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :submit_query_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Approves a query template. + # + # @overload approve_query_template(request, options = nil) + # Pass arguments to `approve_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload approve_query_template(name: nil) + # Pass arguments to `approve_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new + # + # # Call the approve_query_template method. + # result = client.approve_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def approve_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.approve_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.approve_query_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.approve_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :approve_query_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AnalyticsHubService API. + # + # This class represents the configuration for AnalyticsHubService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_data_exchanges to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "analyticshub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AnalyticsHubService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_exchanges + ## + # RPC-specific configuration for `list_org_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_data_exchanges + ## + # RPC-specific configuration for `get_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_exchange + ## + # RPC-specific configuration for `create_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_exchange + ## + # RPC-specific configuration for `update_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_exchange + ## + # RPC-specific configuration for `delete_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_exchange + ## + # RPC-specific configuration for `list_listings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_listings + ## + # RPC-specific configuration for `get_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :get_listing + ## + # RPC-specific configuration for `create_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :create_listing + ## + # RPC-specific configuration for `update_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :update_listing + ## + # RPC-specific configuration for `delete_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_listing + ## + # RPC-specific configuration for `subscribe_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_listing + ## + # RPC-specific configuration for `subscribe_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_data_exchange + ## + # RPC-specific configuration for `refresh_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :refresh_subscription + ## + # RPC-specific configuration for `get_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_subscription + ## + # RPC-specific configuration for `list_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subscriptions + ## + # RPC-specific configuration for `list_shared_resource_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_shared_resource_subscriptions + ## + # RPC-specific configuration for `revoke_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :revoke_subscription + ## + # RPC-specific configuration for `delete_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_subscription + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_query_template + ## + # RPC-specific configuration for `get_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_query_template + ## + # RPC-specific configuration for `list_query_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_query_templates + ## + # RPC-specific configuration for `update_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_query_template + ## + # RPC-specific configuration for `delete_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_query_template + ## + # RPC-specific configuration for `submit_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_query_template + ## + # RPC-specific configuration for `approve_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_query_template + + # @private + def initialize parent_rpcs = nil + list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges + @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config + list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges + @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config + get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange + @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config + create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange + @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config + update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange + @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config + delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange + @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config + list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings + @list_listings = ::Gapic::Config::Method.new list_listings_config + get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing + @get_listing = ::Gapic::Config::Method.new get_listing_config + create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing + @create_listing = ::Gapic::Config::Method.new create_listing_config + update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing + @update_listing = ::Gapic::Config::Method.new update_listing_config + delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing + @delete_listing = ::Gapic::Config::Method.new delete_listing_config + subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing + @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config + subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange + @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config + refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription + @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config + get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription + @get_subscription = ::Gapic::Config::Method.new get_subscription_config + list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions + @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config + list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions + @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config + revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription + @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config + delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription + @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_query_template_config = parent_rpcs.create_query_template if parent_rpcs.respond_to? :create_query_template + @create_query_template = ::Gapic::Config::Method.new create_query_template_config + get_query_template_config = parent_rpcs.get_query_template if parent_rpcs.respond_to? :get_query_template + @get_query_template = ::Gapic::Config::Method.new get_query_template_config + list_query_templates_config = parent_rpcs.list_query_templates if parent_rpcs.respond_to? :list_query_templates + @list_query_templates = ::Gapic::Config::Method.new list_query_templates_config + update_query_template_config = parent_rpcs.update_query_template if parent_rpcs.respond_to? :update_query_template + @update_query_template = ::Gapic::Config::Method.new update_query_template_config + delete_query_template_config = parent_rpcs.delete_query_template if parent_rpcs.respond_to? :delete_query_template + @delete_query_template = ::Gapic::Config::Method.new delete_query_template_config + submit_query_template_config = parent_rpcs.submit_query_template if parent_rpcs.respond_to? :submit_query_template + @submit_query_template = ::Gapic::Config::Method.new submit_query_template_config + approve_query_template_config = parent_rpcs.approve_query_template if parent_rpcs.respond_to? :approve_query_template + @approve_query_template = ::Gapic::Config::Method.new approve_query_template_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb new file mode 100644 index 000000000000..e332f7d1ae56 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + # Credentials for the AnalyticsHubService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb new file mode 100644 index 000000000000..5e79f1c59061 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb @@ -0,0 +1,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 Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AnalyticsHubService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AnalyticsHubService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "analyticshub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb new file mode 100644 index 000000000000..b65b9b2e215e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb @@ -0,0 +1,218 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + # Path helper methods for the AnalyticsHubService API. + module Paths + ## + # Create a fully-qualified DataExchange resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}` + # + # @param project [String] + # @param location [String] + # @param data_exchange [String] + # + # @return [::String] + def data_exchange_path project:, location:, data_exchange: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}` + # + # @param project [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified Listing resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}` + # + # @param project [String] + # @param location [String] + # @param data_exchange [String] + # @param listing [String] + # + # @return [::String] + def listing_path project:, location:, data_exchange:, listing: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/listings/#{listing}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified ManagedService resource string. + # + # The resource will be in the following format: + # + # `services/{service}` + # + # @param service [String] + # + # @return [::String] + def managed_service_path service: + "services/#{service}" + end + + ## + # Create a fully-qualified QueryTemplate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}` + # + # @param project [String] + # @param location [String] + # @param data_exchange [String] + # @param query_template [String] + # + # @return [::String] + def query_template_path project:, location:, data_exchange:, query_template: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/queryTemplates/#{query_template}" + end + + ## + # Create a fully-qualified Routine resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/routines/{routine}` + # + # @param project [String] + # @param dataset [String] + # @param routine [String] + # + # @return [::String] + def routine_path project:, dataset:, routine: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/routines/#{routine}" + end + + ## + # Create a fully-qualified Subscription resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/subscriptions/{subscription}` + # + # @param project [String] + # @param location [String] + # @param subscription [String] + # + # @return [::String] + def subscription_path project:, location:, subscription: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/subscriptions/#{subscription}" + end + + ## + # Create a fully-qualified Table resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/tables/{table}` + # + # @param project [String] + # @param dataset [String] + # @param table [String] + # + # @return [::String] + def table_path project:, dataset:, table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/tables/#{table}" + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb new file mode 100644 index 000000000000..e28b43473888 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/analytics_hub/v1/version" + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + ## + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + module AnalyticsHubService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb new file mode 100644 index 000000000000..7c0f849151d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb @@ -0,0 +1,3064 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + module Rest + ## + # REST client for the AnalyticsHubService service. + # + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :analytics_hub_service_stub + + ## + # Configure the AnalyticsHubService Client class. + # + # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AnalyticsHubService clients + # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AnalyticsHubService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @analytics_hub_service_stub.universe_domain + end + + ## + # Create a new AnalyticsHubService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AnalyticsHubService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @analytics_hub_service_stub = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @analytics_hub_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @analytics_hub_service_stub.logger + end + + # Service calls + + ## + # Lists all data exchanges in a given project and location. + # + # @overload list_data_exchanges(request, options = nil) + # Pass arguments to `list_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the data exchanges. + # e.g. `projects/myproject/locations/us`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new + # + # # Call the list_data_exchanges method. + # result = client.list_data_exchanges request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p item + # end + # + def list_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_exchanges.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_data_exchanges request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, "data_exchanges", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all data exchanges from projects in a given organization and + # location. + # + # @overload list_org_data_exchanges(request, options = nil) + # Pass arguments to `list_org_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization [::String] + # Required. The organization resource path of the projects containing + # DataExchanges. e.g. `organizations/myorg/locations/us`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new + # + # # Call the list_org_data_exchanges method. + # result = client.list_org_data_exchanges request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p item + # end + # + def list_org_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_org_data_exchanges request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, "data_exchanges", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a data exchange. + # + # @overload get_data_exchange(request, options = nil) + # Pass arguments to `get_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_exchange(name: nil) + # Pass arguments to `get_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the data exchange. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new + # + # # Call the get_data_exchange method. + # result = client.get_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def get_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_data_exchange request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new data exchange. + # + # @overload create_data_exchange(request, options = nil) + # Pass arguments to `create_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) + # Pass arguments to `create_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the data exchange. + # e.g. `projects/myproject/locations/us`. + # @param data_exchange_id [::String] + # Required. The ID of the data exchange. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] + # Required. The data exchange to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new + # + # # Call the create_data_exchange method. + # result = client.create_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def create_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.create_data_exchange request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing data exchange. + # + # @overload update_data_exchange(request, options = nil) + # Pass arguments to `update_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_exchange(update_mask: nil, data_exchange: nil) + # Pass arguments to `update_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the data exchange + # resource. The fields specified in the + # `updateMask` are relative to the resource and are not a full request. + # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] + # Required. The data exchange to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new + # + # # Call the update_data_exchange method. + # result = client.update_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + # p result + # + def update_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.update_data_exchange request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing data exchange. + # + # @overload delete_data_exchange(request, options = nil) + # Pass arguments to `delete_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_exchange(name: nil) + # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full name of the data exchange resource that you want to + # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new + # + # # Call the delete_data_exchange method. + # result = client.delete_data_exchange request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.delete_data_exchange request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all listings in a given project and location. + # + # @overload list_listings(request, options = nil) + # Pass arguments to `list_listings` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_listings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_listings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new + # + # # Call the list_listings method. + # result = client.list_listings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p item + # end + # + def list_listings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_listings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_listings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_listings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_listings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, "listings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a listing. + # + # @overload get_listing(request, options = nil) + # Pass arguments to `get_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_listing(name: nil) + # Pass arguments to `get_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new + # + # # Call the get_listing method. + # result = client.get_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def get_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_listing request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new listing. + # + # @overload create_listing(request, options = nil) + # Pass arguments to `create_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_listing(parent: nil, listing_id: nil, listing: nil) + # Pass arguments to `create_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param listing_id [::String] + # Required. The ID of the listing to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] + # Required. The listing to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new + # + # # Call the create_listing method. + # result = client.create_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def create_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.create_listing request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing listing. + # + # @overload update_listing(request, options = nil) + # Pass arguments to `update_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_listing(update_mask: nil, listing: nil) + # Pass arguments to `update_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the listing + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] + # Required. The listing to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new + # + # # Call the update_listing method. + # result = client.update_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + # p result + # + def update_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.update_listing request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a listing. + # + # @overload delete_listing(request, options = nil) + # Pass arguments to `delete_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_listing(name: nil, delete_commercial: nil) + # Pass arguments to `delete_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the listing to delete. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @param delete_commercial [::Boolean] + # Optional. If the listing is commercial then this field must be set to true, + # otherwise a failure is thrown. This acts as a safety guard to avoid + # deleting commercial listings accidentally. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new + # + # # Call the delete_listing method. + # result = client.delete_listing request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.delete_listing request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Subscribes to a listing. + # + # Currently, with Analytics Hub, you can create listings that + # reference only BigQuery datasets. + # Upon subscription to a listing for a BigQuery dataset, Analytics Hub + # creates a linked dataset in the subscriber's project. + # + # @overload subscribe_listing(request, options = nil) + # Pass arguments to `subscribe_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload subscribe_listing(destination_dataset: nil, destination_pubsub_subscription: nil, name: nil) + # Pass arguments to `subscribe_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] + # Input only. BigQuery destination dataset to create for the subscriber. + # + # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] + # Input only. Destination Pub/Sub subscription to create for the + # subscriber. + # + # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param name [::String] + # Required. Resource name of the listing that you want to subscribe to. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new + # + # # Call the subscribe_listing method. + # result = client.subscribe_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. + # p result + # + def subscribe_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.subscribe_listing.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.subscribe_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.subscribe_listing request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Subscription to a Data Clean Room. This is a + # long-running operation as it will create one or more linked datasets. + # Throws a Bad Request error if the Data Exchange does not contain any + # listings. + # + # @overload subscribe_data_exchange(request, options = nil) + # Pass arguments to `subscribe_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload subscribe_data_exchange(name: nil, destination: nil, destination_dataset: nil, subscription: nil, subscriber_contact: nil) + # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Data Exchange. + # e.g. `projects/publisherproject/locations/us/dataExchanges/123` + # @param destination [::String] + # Required. The parent resource path of the Subscription. + # e.g. `projects/subscriberproject/locations/us` + # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] + # Optional. BigQuery destination dataset to create for the subscriber. + # @param subscription [::String] + # Required. Name of the subscription to create. + # e.g. `subscription1` + # @param subscriber_contact [::String] + # Email of the subscriber. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new + # + # # Call the subscribe_data_exchange method. + # result = client.subscribe_data_exchange request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def subscribe_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.subscribe_data_exchange request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Refreshes a Subscription to a Data Exchange. A Data Exchange can become + # stale when a publisher adds or removes data. This is a long-running + # operation as it may create many linked datasets. + # + # @overload refresh_subscription(request, options = nil) + # Pass arguments to `refresh_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload refresh_subscription(name: nil) + # Pass arguments to `refresh_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Subscription to refresh. + # e.g. `projects/subscriberproject/locations/us/subscriptions/123` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new + # + # # Call the refresh_subscription method. + # result = client.refresh_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def refresh_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.refresh_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.refresh_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.refresh_subscription request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a Subscription. + # + # @overload get_subscription(request, options = nil) + # Pass arguments to `get_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_subscription(name: nil) + # Pass arguments to `get_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription. + # e.g. projects/123/locations/us/subscriptions/456 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new + # + # # Call the get_subscription method. + # result = client.get_subscription request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p result + # + def get_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_subscription request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all subscriptions in a given project and location. + # + # @overload list_subscriptions(request, options = nil) + # Pass arguments to `list_subscriptions` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the subscription. + # e.g. projects/myproject/locations/us + # @param filter [::String] + # An expression for filtering the results of the request. Eligible + # fields for filtering are: + # + # + `listing` + # + `data_exchange` + # + # Alternatively, a literal wrapped in double quotes may be provided. + # This will be checked for an exact match against both fields above. + # + # In all cases, the full Data Exchange or Listing resource name must + # be provided. Some example of using filters: + # + # + data_exchange="projects/myproject/locations/us/dataExchanges/123" + # + listing="projects/123/locations/us/dataExchanges/456/listings/789" + # + "projects/myproject/locations/us/dataExchanges/123" + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. + # @param page_token [::String] + # Page token, returned by a previous call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new + # + # # Call the list_subscriptions method. + # result = client.list_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p item + # end + # + def list_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, "subscriptions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all subscriptions on a given Data Exchange or Listing. + # + # @overload list_shared_resource_subscriptions(request, options = nil) + # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # Required. Resource name of the requested target. This resource may be + # either a Listing or a DataExchange. e.g. + # projects/123/locations/us/dataExchanges/456 OR e.g. + # projects/123/locations/us/dataExchanges/456/listings/789 + # @param include_deleted_subscriptions [::Boolean] + # If selected, includes deleted subscriptions in the response + # (up to 63 days after deletion). + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. + # @param page_token [::String] + # Page token, returned by a previous call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new + # + # # Call the list_shared_resource_subscriptions method. + # result = client.list_shared_resource_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + # p item + # end + # + def list_shared_resource_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_shared_resource_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_shared_resource_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, "shared_resource_subscriptions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revokes a given subscription. + # + # @overload revoke_subscription(request, options = nil) + # Pass arguments to `revoke_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload revoke_subscription(name: nil, revoke_commercial: nil) + # Pass arguments to `revoke_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription to revoke. + # e.g. projects/123/locations/us/subscriptions/456 + # @param revoke_commercial [::Boolean] + # Optional. If the subscription is commercial then this field must be set to + # true, otherwise a failure is thrown. This acts as a safety guard to avoid + # revoking commercial subscriptions accidentally. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new + # + # # Call the revoke_subscription method. + # result = client.revoke_subscription request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. + # p result + # + def revoke_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.revoke_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.revoke_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.revoke_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.revoke_subscription request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a subscription. + # + # @overload delete_subscription(request, options = nil) + # Pass arguments to `delete_subscription` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_subscription(name: nil) + # Pass arguments to `delete_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the subscription to delete. + # e.g. projects/123/locations/us/subscriptions/456 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new + # + # # Call the delete_subscription method. + # result = client.delete_subscription request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.delete_subscription request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new QueryTemplate + # + # @overload create_query_template(request, options = nil) + # Pass arguments to `create_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_query_template(parent: nil, query_template_id: nil, query_template: nil) + # Pass arguments to `create_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. + # @param query_template_id [::String] + # Required. The ID of the QueryTemplate to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] + # Required. The QueryTemplate to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new + # + # # Call the create_query_template method. + # result = client.create_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def create_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.create_query_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a QueryTemplate + # + # @overload get_query_template(request, options = nil) + # Pass arguments to `get_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_query_template(name: nil) + # Pass arguments to `get_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new + # + # # Call the get_query_template method. + # result = client.get_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def get_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.get_query_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all QueryTemplates in a given project and location. + # + # @overload list_query_templates(request, options = nil) + # Pass arguments to `list_query_templates` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_query_templates(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_query_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource path of the QueryTemplates. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response + # page. Leverage the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Optional. Page token, returned by a previous call, to request the next page + # of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new + # + # # Call the list_query_templates method. + # result = client.list_query_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p item + # end + # + def list_query_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_query_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_query_templates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_query_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.list_query_templates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_query_templates, "query_templates", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing QueryTemplate + # + # @overload update_query_template(request, options = nil) + # Pass arguments to `update_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_query_template(update_mask: nil, query_template: nil) + # Pass arguments to `update_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask specifies the fields to update in the query template + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] + # Required. The QueryTemplate to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new + # + # # Call the update_query_template method. + # result = client.update_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def update_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.update_query_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a query template. + # + # @overload delete_query_template(request, options = nil) + # Pass arguments to `delete_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_query_template(name: nil) + # Pass arguments to `delete_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new + # + # # Call the delete_query_template method. + # result = client.delete_query_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.delete_query_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Submits a query template for approval. + # + # @overload submit_query_template(request, options = nil) + # Pass arguments to `submit_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload submit_query_template(name: nil) + # Pass arguments to `submit_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new + # + # # Call the submit_query_template method. + # result = client.submit_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def submit_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.submit_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.submit_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.submit_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.submit_query_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Approves a query template. + # + # @overload approve_query_template(request, options = nil) + # Pass arguments to `approve_query_template` via a request object, either of type + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload approve_query_template(name: nil) + # Pass arguments to `approve_query_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/analytics_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new + # + # # Call the approve_query_template method. + # result = client.approve_query_template request + # + # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + # p result + # + def approve_query_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.approve_query_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.approve_query_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.approve_query_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.approve_query_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the AnalyticsHubService REST API. + # + # This class represents the configuration for AnalyticsHubService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_data_exchanges to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "analyticshub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AnalyticsHubService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_exchanges + ## + # RPC-specific configuration for `list_org_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_data_exchanges + ## + # RPC-specific configuration for `get_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_exchange + ## + # RPC-specific configuration for `create_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_exchange + ## + # RPC-specific configuration for `update_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_exchange + ## + # RPC-specific configuration for `delete_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_exchange + ## + # RPC-specific configuration for `list_listings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_listings + ## + # RPC-specific configuration for `get_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :get_listing + ## + # RPC-specific configuration for `create_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :create_listing + ## + # RPC-specific configuration for `update_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :update_listing + ## + # RPC-specific configuration for `delete_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_listing + ## + # RPC-specific configuration for `subscribe_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_listing + ## + # RPC-specific configuration for `subscribe_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_data_exchange + ## + # RPC-specific configuration for `refresh_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :refresh_subscription + ## + # RPC-specific configuration for `get_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_subscription + ## + # RPC-specific configuration for `list_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subscriptions + ## + # RPC-specific configuration for `list_shared_resource_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_shared_resource_subscriptions + ## + # RPC-specific configuration for `revoke_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :revoke_subscription + ## + # RPC-specific configuration for `delete_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_subscription + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_query_template + ## + # RPC-specific configuration for `get_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_query_template + ## + # RPC-specific configuration for `list_query_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_query_templates + ## + # RPC-specific configuration for `update_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_query_template + ## + # RPC-specific configuration for `delete_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_query_template + ## + # RPC-specific configuration for `submit_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_query_template + ## + # RPC-specific configuration for `approve_query_template` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_query_template + + # @private + def initialize parent_rpcs = nil + list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges + @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config + list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges + @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config + get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange + @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config + create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange + @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config + update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange + @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config + delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange + @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config + list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings + @list_listings = ::Gapic::Config::Method.new list_listings_config + get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing + @get_listing = ::Gapic::Config::Method.new get_listing_config + create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing + @create_listing = ::Gapic::Config::Method.new create_listing_config + update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing + @update_listing = ::Gapic::Config::Method.new update_listing_config + delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing + @delete_listing = ::Gapic::Config::Method.new delete_listing_config + subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing + @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config + subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange + @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config + refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription + @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config + get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription + @get_subscription = ::Gapic::Config::Method.new get_subscription_config + list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions + @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config + list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions + @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config + revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription + @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config + delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription + @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_query_template_config = parent_rpcs.create_query_template if parent_rpcs.respond_to? :create_query_template + @create_query_template = ::Gapic::Config::Method.new create_query_template_config + get_query_template_config = parent_rpcs.get_query_template if parent_rpcs.respond_to? :get_query_template + @get_query_template = ::Gapic::Config::Method.new get_query_template_config + list_query_templates_config = parent_rpcs.list_query_templates if parent_rpcs.respond_to? :list_query_templates + @list_query_templates = ::Gapic::Config::Method.new list_query_templates_config + update_query_template_config = parent_rpcs.update_query_template if parent_rpcs.respond_to? :update_query_template + @update_query_template = ::Gapic::Config::Method.new update_query_template_config + delete_query_template_config = parent_rpcs.delete_query_template if parent_rpcs.respond_to? :delete_query_template + @delete_query_template = ::Gapic::Config::Method.new delete_query_template_config + submit_query_template_config = parent_rpcs.submit_query_template if parent_rpcs.respond_to? :submit_query_template + @submit_query_template = ::Gapic::Config::Method.new submit_query_template_config + approve_query_template_config = parent_rpcs.approve_query_template if parent_rpcs.respond_to? :approve_query_template + @approve_query_template = ::Gapic::Config::Method.new approve_query_template_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb new file mode 100644 index 000000000000..201737d246e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb @@ -0,0 +1,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 Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AnalyticsHubService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the AnalyticsHubService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "analyticshub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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(?:/.*)?$}, 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(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb new file mode 100644 index 000000000000..eb7052b18758 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb @@ -0,0 +1,1914 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + module Rest + ## + # REST service stub for the AnalyticsHubService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: false, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_data_exchanges REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse] + # A result object deserialized from the server's reply + def list_data_exchanges request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_exchanges_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_exchanges", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_org_data_exchanges REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse] + # A result object deserialized from the server's reply + def list_org_data_exchanges request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_org_data_exchanges_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_org_data_exchanges", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # A result object deserialized from the server's reply + def get_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # A result object deserialized from the server's reply + def create_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # A result object deserialized from the server's reply + def update_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_listings REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse] + # A result object deserialized from the server's reply + def list_listings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_listings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_listings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # A result object deserialized from the server's reply + def get_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # A result object deserialized from the server's reply + def create_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # A result object deserialized from the server's reply + def update_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the subscribe_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] + # A result object deserialized from the server's reply + def subscribe_listing request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_listing_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "subscribe_listing", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the subscribe_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def subscribe_data_exchange request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_data_exchange_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "subscribe_data_exchange", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the refresh_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def refresh_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_refresh_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "refresh_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # A result object deserialized from the server's reply + def get_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_subscriptions REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_subscriptions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_subscriptions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_shared_resource_subscriptions REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_shared_resource_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_shared_resource_subscriptions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_shared_resource_subscriptions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the revoke_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] + # A result object deserialized from the server's reply + def revoke_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_revoke_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "revoke_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_subscription", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def create_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_query_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def get_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_query_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_query_templates REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse] + # A result object deserialized from the server's reply + def list_query_templates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_query_templates_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_query_templates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def update_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_query_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_query_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the submit_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def submit_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_submit_query_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "submit_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the approve_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # A result object deserialized from the server's reply + def approve_query_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_approve_query_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "approve_query_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_exchanges REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_exchanges_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataExchanges", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_org_data_exchanges REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_org_data_exchanges_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{organization}/dataExchanges", + matches: [ + ["organization", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataExchanges", + body: "data_exchange", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_exchange.name}", + body: "data_exchange", + matches: [ + ["data_exchange.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_listings REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_listings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/listings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/listings", + body: "listing", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{listing.name}", + body: "listing", + matches: [ + ["listing.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the subscribe_listing REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_subscribe_listing_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:subscribe", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the subscribe_data_exchange REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_subscribe_data_exchange_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:subscribe", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the refresh_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_refresh_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:refresh", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_subscriptions REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/subscriptions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_shared_resource_subscriptions REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_shared_resource_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:listSubscriptions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:listSubscriptions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the revoke_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_revoke_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:revoke", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_subscription REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/queryTemplates", + body: "query_template", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_query_templates REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_query_templates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/queryTemplates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{query_template.name}", + body: "query_template", + matches: [ + ["query_template.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the submit_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_submit_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:submit", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the approve_query_template REST call + # + # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_approve_query_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:approve", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb new file mode 100644 index 000000000000..956e85f4e541 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" +require "google/cloud/bigquery/analytics_hub/v1/version" + +module Google + module Cloud + module Bigquery + module AnalyticsHub + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/analytics_hub/v1/rest" + # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb new file mode 100644 index 000000000000..e4441834988c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb new file mode 100644 index 000000000000..15eaaf36c9dd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/analyticshub/v1/pubsub_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n8google/cloud/bigquery/analyticshub/v1/analyticshub.proto\x12%google.cloud.bigquery.analyticshub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/bigquery/analyticshub/v1/pubsub.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xe9\x04\n\x0c\x44\x61taExchange\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlisting_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\x12h\n\x1asharing_environment_config\x18\x08 \x01(\x0b\x32?.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfigB\x03\xe0\x41\x01\x12V\n\x0e\x64iscovery_type\x18\t \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.DiscoveryTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x35\n#log_linked_dataset_query_user_email\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01:t\xea\x41q\n(analyticshub.googleapis.com/DataExchange\x12\x45projects/{project}/locations/{location}/dataExchanges/{data_exchange}B\x11\n\x0f_discovery_typeB&\n$_log_linked_dataset_query_user_email\"\xb7\x05\n\rQueryTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08proposer\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12N\n\x05state\x18\x06 \x01(\x0e\x32:.google.cloud.bigquery.analyticshub.v1.QueryTemplate.StateB\x03\xe0\x41\x03\x12\x44\n\x07routine\x18\x07 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.RoutineB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44RAFTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x0c\n\x08\x41PPROVED\x10\x04:\xb5\x01\xea\x41\xb1\x01\n)analyticshub.googleapis.com/QueryTemplate\x12\x65projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}*\x0equeryTemplates2\rqueryTemplate\"\xc6\x01\n\x07Routine\x12U\n\x0croutine_type\x18\x01 \x01(\x0e\x32:.google.cloud.bigquery.analyticshub.v1.Routine.RoutineTypeB\x03\xe0\x41\x02\x12\x1c\n\x0f\x64\x65\x66inition_body\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x0bRoutineType\x12\x1c\n\x18ROUTINE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15TABLE_VALUED_FUNCTION\x10\x01\"\xd1\x01\n\x1a\x43reateQueryTemplateRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x1e\n\x11query_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x0equery_template\x18\x03 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplateB\x03\xe0\x41\x02\"Z\n\x17GetQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"\x8e\x01\n\x19ListQueryTemplatesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x1aListQueryTemplatesResponse\x12M\n\x0fquery_templates\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa5\x01\n\x1aUpdateQueryTemplateRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12Q\n\x0equery_template\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplateB\x03\xe0\x41\x02\"]\n\x1a\x44\x65leteQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"]\n\x1aSubmitQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"^\n\x1b\x41pproveQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"\x94\x04\n\x18SharingEnvironmentConfig\x12x\n\x17\x64\x65\x66\x61ult_exchange_config\x18\x01 \x01(\x0b\x32U.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfigH\x00\x12p\n\x13\x64\x63r_exchange_config\x18\x02 \x01(\x0b\x32Q.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfigH\x00\x1a\x17\n\x15\x44\x65\x66\x61ultExchangeConfig\x1a\xe3\x01\n\x11\x44\x63rExchangeConfig\x12>\n,single_selected_resource_sharing_restriction\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x35\n#single_linked_dataset_per_cleanroom\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42/\n-_single_selected_resource_sharing_restrictionB&\n$_single_linked_dataset_per_cleanroomB\r\n\x0b\x65nvironment\"?\n\x0c\x44\x61taProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"<\n\tPublisher\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"O\n\x1b\x44\x65stinationDatasetReference\x12\x17\n\ndataset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xac\x03\n\x12\x44\x65stinationDataset\x12\x62\n\x11\x64\x61taset_reference\x18\x01 \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceB\x03\xe0\x41\x02\x12\x38\n\rfriendly_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12\x36\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12Z\n\x06labels\x18\x04 \x03(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.DestinationDataset.LabelsEntryB\x03\xe0\x41\x01\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11replica_locations\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x1d\x44\x65stinationPubSubSubscription\x12[\n\x13pubsub_subscription\x18\x01 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.PubSubSubscriptionB\x03\xe0\x41\x02\"\x87!\n\x07Listing\x12`\n\x10\x62igquery_dataset\x18\x06 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceH\x00\x12X\n\x0cpubsub_topic\x18\x10 \x01(\x0b\x32@.google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSourceH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.Listing.StateB\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12O\n\rdata_provider\x18\t \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataProviderB\x03\xe0\x41\x01\x12P\n\ncategories\x18\n \x03(\x0e\x32\x37.google.cloud.bigquery.analyticshub.v1.Listing.CategoryB\x03\xe0\x41\x01\x12H\n\tpublisher\x18\x0b \x01(\x0b\x32\x30.google.cloud.bigquery.analyticshub.v1.PublisherB\x03\xe0\x41\x01\x12\x1b\n\x0erequest_access\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12l\n\x18restricted_export_config\x18\r \x01(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfigB\x03\xe0\x41\x01\x12\x62\n\x17stored_procedure_config\x18\x14 \x01(\x0b\x32<.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfigB\x03\xe0\x41\x01\x12V\n\x0e\x64iscovery_type\x18\x0e \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.DiscoveryTypeB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12U\n\rresource_type\x18\x0f \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.SharedResourceTypeB\x03\xe0\x41\x03\x12`\n\x0f\x63ommercial_info\x18\x11 \x01(\x0b\x32=.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfoB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x35\n#log_linked_dataset_query_user_email\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x61llow_only_metadata_sharing\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x1a\x84\n\n\x15\x42igQueryDatasetSource\x12\x38\n\x07\x64\x61taset\x18\x01 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\x12v\n\x12selected_resources\x18\x02 \x03(\x0b\x32U.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResourceB\x03\xe0\x41\x01\x12\x82\x01\n\x18restricted_export_policy\x18\x03 \x01(\x0b\x32[.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicyB\x03\xe0\x41\x01\x12\x1e\n\x11replica_locations\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12m\n\x12\x65\x66\x66\x65\x63tive_replicas\x18\x06 \x03(\x0b\x32L.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.ReplicaB\x03\xe0\x41\x03\x1a\x92\x01\n\x10SelectedResource\x12\x36\n\x05table\x18\x01 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/TableH\x00\x12:\n\x07routine\x18\x02 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x62igquery.googleapis.com/RoutineH\x00\x42\n\n\x08resource\x1a\xd1\x01\n\x16RestrictedExportPolicy\x12\x30\n\x07\x65nabled\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12\x45\n\x1crestrict_direct_table_access\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12>\n\x15restrict_query_result\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x1a\xbb\x03\n\x07Replica\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12u\n\rreplica_state\x18\x02 \x01(\x0e\x32Y.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.ReplicaStateB\x03\xe0\x41\x03\x12z\n\rprimary_state\x18\x03 \x01(\x0e\x32Y.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.PrimaryStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\"P\n\x0cReplicaState\x12\x1d\n\x19REPLICA_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cREADY_TO_USE\x10\x01\x12\x0f\n\x0bUNAVAILABLE\x10\x02\"B\n\x0cPrimaryState\x12\x1d\n\x19PRIMARY_STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fPRIMARY_REPLICA\x10\x01\x42\x10\n\x0e_primary_state\x1ak\n\x11PubSubTopicSource\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\"\n\x15\x64\x61ta_affinity_regions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a}\n\x16RestrictedExportConfig\x12\x14\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1crestrict_direct_table_access\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\"\n\x15restrict_query_result\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x94\x04\n\x0e\x43ommercialInfo\x12}\n\x11\x63loud_marketplace\x18\x01 \x01(\x0b\x32X.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfoB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xec\x02\n\x1aGoogleCloudMarketplaceInfo\x12M\n\x07service\x18\x01 \x01(\tB7\xe0\x41\x03\xfa\x41\x31\n/servicemanagement.googleapis.com/ManagedServiceH\x00\x88\x01\x01\x12\x8c\x01\n\x10\x63ommercial_state\x18\x03 \x01(\x0e\x32h.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo.CommercialStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\"O\n\x0f\x43ommercialState\x12 \n\x1c\x43OMMERCIAL_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nONBOARDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x42\n\n\x08_serviceB\x13\n\x11_commercial_stateB\x14\n\x12_cloud_marketplace\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\"\xd9\x04\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43\x41TEGORY_OTHERS\x10\x01\x12&\n\"CATEGORY_ADVERTISING_AND_MARKETING\x10\x02\x12\x15\n\x11\x43\x41TEGORY_COMMERCE\x10\x03\x12$\n CATEGORY_CLIMATE_AND_ENVIRONMENT\x10\x04\x12\x19\n\x15\x43\x41TEGORY_DEMOGRAPHICS\x10\x05\x12\x16\n\x12\x43\x41TEGORY_ECONOMICS\x10\x06\x12\x16\n\x12\x43\x41TEGORY_EDUCATION\x10\x07\x12\x13\n\x0f\x43\x41TEGORY_ENERGY\x10\x08\x12\x16\n\x12\x43\x41TEGORY_FINANCIAL\x10\t\x12\x13\n\x0f\x43\x41TEGORY_GAMING\x10\n\x12\x17\n\x13\x43\x41TEGORY_GEOSPATIAL\x10\x0b\x12(\n$CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE\x10\x0c\x12\x12\n\x0e\x43\x41TEGORY_MEDIA\x10\r\x12\x1a\n\x16\x43\x41TEGORY_PUBLIC_SECTOR\x10\x0e\x12\x13\n\x0f\x43\x41TEGORY_RETAIL\x10\x0f\x12\x13\n\x0f\x43\x41TEGORY_SPORTS\x10\x10\x12!\n\x1d\x43\x41TEGORY_SCIENCE_AND_RESEARCH\x10\x11\x12)\n%CATEGORY_TRANSPORTATION_AND_LOGISTICS\x10\x12\x12\x1f\n\x1b\x43\x41TEGORY_TRAVEL_AND_TOURISM\x10\x13\x12 \n\x1c\x43\x41TEGORY_GOOGLE_EARTH_ENGINE\x10\x14:\x82\x01\xea\x41\x7f\n#analyticshub.googleapis.com/Listing\x12Xprojects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}B\x08\n\x06sourceB\x11\n\x0f_discovery_typeB\x12\n\x10_commercial_infoB&\n$_log_linked_dataset_query_user_emailB\x1e\n\x1c_allow_only_metadata_sharing\"\xfd\x01\n\x15StoredProcedureConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12}\n\x1e\x61llowed_stored_procedure_types\x18\x02 \x03(\x0e\x32P.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureTypeB\x03\xe0\x41\x03\"O\n\x13StoredProcedureType\x12%\n!STORED_PROCEDURE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSQL_PROCEDURE\x10\x01\"\x98\r\n\x0cSubscription\x12\x16\n\x07listing\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1c\n\rdata_exchange\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcreation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_modify_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19organization_display_name\x18\n \x01(\tB\x03\xe0\x41\x03\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.Subscription.StateB\x03\xe0\x41\x03\x12j\n\x12linked_dataset_map\x18\x08 \x03(\x0b\x32I.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedDatasetMapEntryB\x03\xe0\x41\x03\x12\x1f\n\x12subscriber_contact\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x61\n\x10linked_resources\x18\x0b \x03(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResourceB\x03\xe0\x41\x03\x12U\n\rresource_type\x18\x0c \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.SharedResourceTypeB\x03\xe0\x41\x03\x12`\n\x0f\x63ommercial_info\x18\r \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfoB\x03\xe0\x41\x03\x12\x35\n#log_linked_dataset_query_user_email\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12[\n\x13\x64\x65stination_dataset\x18\x0f \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x01\x1a}\n\x0eLinkedResource\x12\x1d\n\x0elinked_dataset\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12)\n\x1alinked_pubsub_subscription\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x14\n\x07listing\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x0b\n\treference\x1a\xf8\x01\n\x0e\x43ommercialInfo\x12}\n\x11\x63loud_marketplace\x18\x01 \x01(\x0b\x32].google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo.GoogleCloudMarketplaceInfoB\x03\xe0\x41\x03\x1ag\n\x1aGoogleCloudMarketplaceInfo\x12I\n\x05order\x18\x01 \x01(\tB:\xfa\x41\x37\n5cloudcommerceconsumerprocurement.googleapis.com/Order\x1a{\n\x15LinkedDatasetMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource:\x02\x38\x01\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATE_ACTIVE\x10\x01\x12\x0f\n\x0bSTATE_STALE\x10\x02\x12\x12\n\x0eSTATE_INACTIVE\x10\x03:s\xea\x41p\n(analyticshub.googleapis.com/Subscription\x12\x44projects/{project}/locations/{location}/subscriptions/{subscription}B\x0f\n\rresource_nameB&\n$_log_linked_dataset_query_user_email\"\x83\x01\n\x18ListDataExchangesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x19ListDataExchangesResponse\x12K\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x1bListOrgDataExchangesRequest\x12\x19\n\x0corganization\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListOrgDataExchangesResponse\x12K\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x16GetDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"\xcd\x01\n\x19\x43reateDataExchangeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/DataExchange\x12\x1d\n\x10\x64\x61ta_exchange_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\rdata_exchange\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchangeB\x03\xe0\x41\x02\"\xa2\x01\n\x19UpdateDataExchangeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12O\n\rdata_exchange\x18\x02 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchangeB\x03\xe0\x41\x02\"[\n\x19\x44\x65leteDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"~\n\x13ListListingsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"q\n\x14ListListingsResponse\x12@\n\x08listings\x18\x01 \x03(\x0b\x32..google.cloud.bigquery.analyticshub.v1.Listing\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x11GetListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\"\xb7\x01\n\x14\x43reateListingRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x17\n\nlisting_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x07listing\x18\x03 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.ListingB\x03\xe0\x41\x02\"\x92\x01\n\x14UpdateListingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\x07listing\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.ListingB\x03\xe0\x41\x02\"q\n\x14\x44\x65leteListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\x12\x1e\n\x11\x64\x65lete_commercial\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x02\n\x17SubscribeListingRequest\x12]\n\x13\x64\x65stination_dataset\x18\x03 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x04H\x00\x12t\n\x1f\x64\x65stination_pubsub_subscription\x18\x05 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.DestinationPubSubSubscriptionB\x03\xe0\x41\x04H\x00\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/ListingB\r\n\x0b\x64\x65stination\"e\n\x18SubscribeListingResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"\xb2\x02\n\x1cSubscribeDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12>\n\x0b\x64\x65stination\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12[\n\x13\x64\x65stination_dataset\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x01\x12\x19\n\x0csubscription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x12subscriber_contact\x18\x03 \x01(\t\"j\n\x1dSubscribeDataExchangeResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"\\\n\x1aRefreshSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"h\n\x1bRefreshSubscriptionResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"X\n\x16GetSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"\x93\x01\n\x18ListSubscriptionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/Subscription\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x80\x01\n\x19ListSubscriptionsResponse\x12J\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n&ListSharedResourceSubscriptionsRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12%\n\x1dinclude_deleted_subscriptions\x18\x02 \x01(\x08\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x9e\x01\n\'ListSharedResourceSubscriptionsResponse\x12Z\n\x1dshared_resource_subscriptions\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x19RevokeSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\x12\x1e\n\x11revoke_commercial\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x1c\n\x1aRevokeSubscriptionResponse\"[\n\x19\x44\x65leteSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03*f\n\rDiscoveryType\x12\x1e\n\x1a\x44ISCOVERY_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x44ISCOVERY_TYPE_PRIVATE\x10\x01\x12\x19\n\x15\x44ISCOVERY_TYPE_PUBLIC\x10\x02*b\n\x12SharedResourceType\x12$\n SHARED_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x01\x12\x10\n\x0cPUBSUB_TOPIC\x10\x02\x32\x80\x38\n\x13\x41nalyticsHubService\x12\xda\x01\n\x11ListDataExchanges\x12?.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest\x1a@.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/dataExchanges\x12\xf4\x01\n\x14ListOrgDataExchanges\x12\x42.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest\x1a\x43.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse\"S\xda\x41\x0corganization\x82\xd3\xe4\x93\x02>\x12\x12\x12*.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest\x1a?.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\"F/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe:\x01*\x12\x80\x02\n\x15SubscribeDataExchange\x12\x43.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x32\n\x1dSubscribeDataExchangeResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/locations/*/dataExchanges/*}:subscribe:\x01*\x12\xf7\x01\n\x13RefreshSubscription\x12\x41.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x30\n\x1bRefreshSubscriptionResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v1/{name=projects/*/locations/*/subscriptions/*}:refresh:\x01*\x12\xc7\x01\n\x0fGetSubscription\x12=.google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest\x1a\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/subscriptions/*}\x12\xda\x01\n\x11ListSubscriptions\x12?.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest\x1a@.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/subscriptions\x12\xf4\x02\n\x1fListSharedResourceSubscriptions\x12M.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest\x1aN.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse\"\xb1\x01\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x9f\x01\x12G/v1/{resource=projects/*/locations/*/dataExchanges/*}:listSubscriptionsZT\x12R/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:listSubscriptions\x12\xe5\x01\n\x12RevokeSubscription\x12@.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest\x1a\x41.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1/{name=projects/*/locations/*/subscriptions/*}:revoke:\x01*\x12\xe4\x01\n\x12\x44\x65leteSubscription\x12@.google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/subscriptions/*}\x12\xb7\x02\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xeb\x01\x82\xd3\xe4\x93\x02\xe4\x01\"B/v1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy:\x01*ZR\"M/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy:\x01*ZG\"B/v1/{resource=projects/*/locations/*/subscriptions/*}:getIamPolicy:\x01*\x12\xb7\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xeb\x01\x82\xd3\xe4\x93\x02\xe4\x01\"B/v1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy:\x01*ZR\"M/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy:\x01*ZG\"B/v1/{resource=projects/*/locations/*/subscriptions/*}:setIamPolicy:\x01*\x12\x9a\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xae\x01\x82\xd3\xe4\x93\x02\xa7\x01\"H/v1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions:\x01*ZX\"S/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions:\x01*\x12\x95\x02\n\x13\x43reateQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.CreateQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\x84\x01\xda\x41\'parent,query_template,query_template_id\x82\xd3\xe4\x93\x02T\"B/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates:\x0equery_template\x12\xdb\x01\n\x10GetQueryTemplate\x12>.google.cloud.bigquery.analyticshub.v1.GetQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}\x12\xee\x01\n\x12ListQueryTemplates\x12@.google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesRequest\x1a\x41.google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates\x12\x97\x02\n\x13UpdateQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.UpdateQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\x86\x01\xda\x41\x1aquery_template,update_mask\x82\xd3\xe4\x93\x02\x63\x32Q/v1/{query_template.name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:\x0equery_template\x12\xc3\x01\n\x13\x44\x65leteQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.DeleteQueryTemplateRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}\x12\xeb\x01\n\x13SubmitQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.SubmitQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\"I/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:submit:\x01*\x12\xee\x01\n\x14\x41pproveQueryTemplate\x12\x42.google.cloud.bigquery.analyticshub.v1.ApproveQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:approve:\x01*\x1ax\xca\x41\x1b\x61nalyticshub.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xf4\x05\n)com.google.cloud.bigquery.analyticshub.v1B\x11\x41nalyticsHubProtoP\x01ZMcloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb;analyticshubpb\xaa\x02%Google.Cloud.BigQuery.AnalyticsHub.V1\xca\x02%Google\\Cloud\\BigQuery\\AnalyticsHub\\V1\xea\x02)Google::Cloud::Bigquery::AnalyticsHub::V1\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41[\n\x1f\x62igquery.googleapis.com/Routine\x12\x38projects/{project}/datasets/{dataset}/routines/{routine}\xea\x41\x45\n/servicemanagement.googleapis.com/ManagedService\x12\x12services/{service}\xea\x41Z\n5cloudcommerceconsumerprocurement.googleapis.com/Order\x12!projects/{project}/orders/{order}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + DataExchange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DataExchange").msgclass + QueryTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.QueryTemplate").msgclass + QueryTemplate::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.QueryTemplate.State").enummodule + Routine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Routine").msgclass + Routine::RoutineType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Routine.RoutineType").enummodule + CreateQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateQueryTemplateRequest").msgclass + GetQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetQueryTemplateRequest").msgclass + ListQueryTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesRequest").msgclass + ListQueryTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesResponse").msgclass + UpdateQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateQueryTemplateRequest").msgclass + DeleteQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteQueryTemplateRequest").msgclass + SubmitQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubmitQueryTemplateRequest").msgclass + ApproveQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ApproveQueryTemplateRequest").msgclass + SharingEnvironmentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig").msgclass + SharingEnvironmentConfig::DefaultExchangeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig").msgclass + SharingEnvironmentConfig::DcrExchangeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig").msgclass + DataProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DataProvider").msgclass + Publisher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Publisher").msgclass + DestinationDatasetReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference").msgclass + DestinationDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationDataset").msgclass + DestinationPubSubSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationPubSubSubscription").msgclass + Listing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing").msgclass + Listing::BigQueryDatasetSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource").msgclass + Listing::BigQueryDatasetSource::SelectedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource").msgclass + Listing::BigQueryDatasetSource::RestrictedExportPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy").msgclass + Listing::BigQueryDatasetSource::Replica = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica").msgclass + Listing::BigQueryDatasetSource::Replica::ReplicaState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.ReplicaState").enummodule + Listing::BigQueryDatasetSource::Replica::PrimaryState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.PrimaryState").enummodule + Listing::PubSubTopicSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSource").msgclass + Listing::RestrictedExportConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig").msgclass + Listing::CommercialInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo").msgclass + Listing::CommercialInfo::GoogleCloudMarketplaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo").msgclass + Listing::CommercialInfo::GoogleCloudMarketplaceInfo::CommercialState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo.CommercialState").enummodule + Listing::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.State").enummodule + Listing::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.Category").enummodule + StoredProcedureConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig").msgclass + StoredProcedureConfig::StoredProcedureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType").enummodule + Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription").msgclass + Subscription::LinkedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource").msgclass + Subscription::CommercialInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo").msgclass + Subscription::CommercialInfo::GoogleCloudMarketplaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo.GoogleCloudMarketplaceInfo").msgclass + Subscription::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.State").enummodule + ListDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest").msgclass + ListDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse").msgclass + ListOrgDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest").msgclass + ListOrgDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse").msgclass + GetDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest").msgclass + CreateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest").msgclass + UpdateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest").msgclass + DeleteDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest").msgclass + ListListingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListListingsRequest").msgclass + ListListingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListListingsResponse").msgclass + GetListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetListingRequest").msgclass + CreateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateListingRequest").msgclass + UpdateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateListingRequest").msgclass + DeleteListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteListingRequest").msgclass + SubscribeListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest").msgclass + SubscribeListingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse").msgclass + SubscribeDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest").msgclass + SubscribeDataExchangeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeResponse").msgclass + RefreshSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest").msgclass + RefreshSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionResponse").msgclass + GetSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest").msgclass + ListSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest").msgclass + ListSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse").msgclass + ListSharedResourceSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest").msgclass + ListSharedResourceSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse").msgclass + RevokeSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest").msgclass + RevokeSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse").msgclass + DeleteSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.OperationMetadata").msgclass + DiscoveryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DiscoveryType").enummodule + SharedResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharedResourceType").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb new file mode 100644 index 000000000000..4b03fbc5f859 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb @@ -0,0 +1,119 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto for package 'Google.Cloud.Bigquery.AnalyticsHub.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/bigquery/analyticshub/v1/analyticshub_pb' + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + module AnalyticsHubService + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService' + + # Lists all data exchanges in a given project and location. + rpc :ListDataExchanges, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse + # Lists all data exchanges from projects in a given organization and + # location. + rpc :ListOrgDataExchanges, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse + # Gets the details of a data exchange. + rpc :GetDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange + # Creates a new data exchange. + rpc :CreateDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange + # Updates an existing data exchange. + rpc :UpdateDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange + # Deletes an existing data exchange. + rpc :DeleteDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Google::Protobuf::Empty + # Lists all listings in a given project and location. + rpc :ListListings, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse + # Gets the details of a listing. + rpc :GetListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing + # Creates a new listing. + rpc :CreateListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing + # Updates an existing listing. + rpc :UpdateListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing + # Deletes a listing. + rpc :DeleteListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Google::Protobuf::Empty + # Subscribes to a listing. + # + # Currently, with Analytics Hub, you can create listings that + # reference only BigQuery datasets. + # Upon subscription to a listing for a BigQuery dataset, Analytics Hub + # creates a linked dataset in the subscriber's project. + rpc :SubscribeListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse + # Creates a Subscription to a Data Clean Room. This is a + # long-running operation as it will create one or more linked datasets. + # Throws a Bad Request error if the Data Exchange does not contain any + # listings. + rpc :SubscribeDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Google::Longrunning::Operation + # Refreshes a Subscription to a Data Exchange. A Data Exchange can become + # stale when a publisher adds or removes data. This is a long-running + # operation as it may create many linked datasets. + rpc :RefreshSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Google::Longrunning::Operation + # Gets the details of a Subscription. + rpc :GetSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription + # Lists all subscriptions in a given project and location. + rpc :ListSubscriptions, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse + # Lists all subscriptions on a given Data Exchange or Listing. + rpc :ListSharedResourceSubscriptions, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse + # Revokes a given subscription. + rpc :RevokeSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse + # Deletes a subscription. + rpc :DeleteSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Google::Longrunning::Operation + # Gets the IAM policy. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the IAM policy. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the permissions that a caller has. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Creates a new QueryTemplate + rpc :CreateQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + # Gets a QueryTemplate + rpc :GetQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + # Lists all QueryTemplates in a given project and location. + rpc :ListQueryTemplates, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse + # Updates an existing QueryTemplate + rpc :UpdateQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + # Deletes a query template. + rpc :DeleteQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Google::Protobuf::Empty + # Submits a query template for approval. + rpc :SubmitQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + # Approves a query template. + rpc :ApproveQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb new file mode 100644 index 000000000000..f72ac6bfc9fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/analyticshub/v1/pubsub.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n2google/cloud/bigquery/analyticshub/v1/pubsub.proto\x12%google.cloud.bigquery.analyticshub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa1\t\n\x12PubSubSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x31.google.cloud.bigquery.analyticshub.v1.PushConfigB\x03\xe0\x41\x01\x12S\n\x0f\x62igquery_config\x18\x12 \x01(\x0b\x32\x35.google.cloud.bigquery.analyticshub.v1.BigQueryConfigB\x03\xe0\x41\x01\x12\\\n\x14\x63loud_storage_config\x18\x16 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.CloudStorageConfigB\x03\xe0\x41\x01\x12!\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x15retain_acked_messages\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12Z\n\x06labels\x18\t \x03(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.PubSubSubscription.LabelsEntryB\x03\xe0\x41\x01\x12$\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12W\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.ExpirationPolicyB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12X\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.DeadLetterPolicyB\x03\xe0\x41\x01\x12M\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x32.google.cloud.bigquery.analyticshub.v1.RetryPolicyB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65tached\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_exactly_once_delivery\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12X\n\x12message_transforms\x18\x19 \x03(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.MessageTransformB\x03\xe0\x41\x01\x12\\\n\x04tags\x18\x1a \x03(\x0b\x32\x43.google.cloud.bigquery.analyticshub.v1.PubSubSubscription.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x7f\n\x0bRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"V\n\x10\x44\x65\x61\x64LetterPolicy\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15max_delivery_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"?\n\x10\x45xpirationPolicy\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xee\x04\n\nPushConfig\x12V\n\noidc_token\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.analyticshub.v1.PushConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12^\n\x0epubsub_wrapper\x18\x04 \x01(\x0b\x32?.google.cloud.bigquery.analyticshub.v1.PushConfig.PubsubWrapperB\x03\xe0\x41\x01H\x01\x12V\n\nno_wrapper\x18\x05 \x01(\x0b\x32;.google.cloud.bigquery.analyticshub.v1.PushConfig.NoWrapperB\x03\xe0\x41\x01H\x01\x12\x1a\n\rpush_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12Z\n\nattributes\x18\x02 \x03(\x0b\x32\x41.google.cloud.bigquery.analyticshub.v1.PushConfig.AttributesEntryB\x03\xe0\x41\x01\x1a\x46\n\tOidcToken\x12\"\n\x15service_account_email\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x0f\n\rPubsubWrapper\x1a(\n\tNoWrapper\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_methodB\t\n\x07wrapper\"\xc5\x01\n\x0e\x42igQueryConfig\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0ewrite_metadata\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x64rop_unknown_fields\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_table_schema\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xc6\x04\n\x12\x43loudStorageConfig\x12`\n\x0btext_config\x18\x04 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.TextConfigB\x03\xe0\x41\x01H\x00\x12`\n\x0b\x61vro_config\x18\x05 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.AvroConfigB\x03\xe0\x41\x01H\x00\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x66ilename_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66ilename_suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66ilename_datetime_format\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0cmax_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tmax_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1a\x0c\n\nTextConfig\x1aH\n\nAvroConfig\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0f\n\routput_format\"\xa3\x01\n\x10MessageTransform\x12S\n\x0ejavascript_udf\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.JavaScriptUDFB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0b\n\ttransform\">\n\rJavaScriptUDF\x12\x1a\n\rfunction_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x85\x02\n)com.google.cloud.bigquery.analyticshub.v1B\x0bPubsubProtoP\x01ZMcloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb;analyticshubpb\xaa\x02%Google.Cloud.BigQuery.AnalyticsHub.V1\xca\x02%Google\\Cloud\\BigQuery\\AnalyticsHub\\V1\xea\x02)Google::Cloud::Bigquery::AnalyticsHub::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + PubSubSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PubSubSubscription").msgclass + RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RetryPolicy").msgclass + DeadLetterPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeadLetterPolicy").msgclass + ExpirationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ExpirationPolicy").msgclass + PushConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig").msgclass + PushConfig::OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.OidcToken").msgclass + PushConfig::PubsubWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.PubsubWrapper").msgclass + PushConfig::NoWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.NoWrapper").msgclass + BigQueryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.BigQueryConfig").msgclass + CloudStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig").msgclass + CloudStorageConfig::TextConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.TextConfig").msgclass + CloudStorageConfig::AvroConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.AvroConfig").msgclass + MessageTransform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.MessageTransform").msgclass + JavaScriptUDF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.JavaScriptUDF").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md new file mode 100644 index 000000000000..99ecfbc53cb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Analytics Hub V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb new file mode 100644 index 000000000000..981ea58df2f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb @@ -0,0 +1,1364 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + # A data exchange is a container that lets you share data. Along with the + # descriptive information about the data exchange, it contains listings that + # reference shared datasets. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the data exchange. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of the data exchange. The display + # name must contain only Unicode letters, numbers (0-9), underscores (_), + # dashes (-), spaces ( ), ampersands (&) and must not start or end with + # spaces. Default value is an empty string. Max length: 63 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the data exchange. The description must not + # contain Unicode non-characters as well as C0 and C1 control codes except + # tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). + # Default value is an empty string. + # Max length: 2000 bytes. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the primary point of contact of the data + # exchange. Max Length: 1000 bytes. + # @!attribute [rw] documentation + # @return [::String] + # Optional. Documentation describing the data exchange. + # @!attribute [r] listing_count + # @return [::Integer] + # Output only. Number of listings contained in the data exchange. + # @!attribute [rw] icon + # @return [::String] + # Optional. Base64 encoded image representing the data exchange. Max + # Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API + # only performs validation on size of the encoded data. Note: For byte + # fields, the content of the fields are base64-encoded (which increases the + # size of the data by 33-36%) when using JSON on the wire. + # @!attribute [rw] sharing_environment_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig] + # Optional. Configurable data sharing environment option for a data exchange. + # @!attribute [rw] discovery_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DiscoveryType] + # Optional. Type of discovery on the discovery page for all the listings + # under this exchange. Updating this field also updates (overwrites) the + # discovery_type field for all the listings under this exchange. + # @!attribute [rw] log_linked_dataset_query_user_email + # @return [::Boolean] + # Optional. By default, false. + # If true, the DataExchange has an email sharing mandate enabled. + class DataExchange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A query template is a container for sharing table-valued functions defined by + # contributors in a data clean room. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the QueryTemplate. + # e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456` + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of the QueryTemplate. The display + # name must contain only Unicode letters, numbers (0-9), underscores (_), + # dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. + # Default value is an empty string. Max length: 63 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Short description of the QueryTemplate. The description must not + # contain Unicode non-characters and C0 and C1 control codes except tabs + # (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default + # value is an empty string. Max length: 2000 bytes. + # @!attribute [rw] proposer + # @return [::String] + # Optional. Will be deprecated. + # Email or URL of the primary point of contact of the QueryTemplate. + # Max Length: 1000 bytes. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the primary point of contact of the + # QueryTemplate. Max Length: 1000 bytes. + # @!attribute [rw] documentation + # @return [::String] + # Optional. Documentation describing the QueryTemplate. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate::State] + # Output only. The QueryTemplate lifecycle state. + # @!attribute [rw] routine + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Routine] + # Optional. The routine associated with the QueryTemplate. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the QueryTemplate was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the QueryTemplate was last modified. + class QueryTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The QueryTemplate lifecycle state. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The QueryTemplate is in draft state. + DRAFTED = 1 + + # The QueryTemplate is in pending state. + PENDING = 2 + + # The QueryTemplate is in deleted state. + DELETED = 3 + + # The QueryTemplate is in approved state. + APPROVED = 4 + end + end + + # Represents a bigquery routine. + # @!attribute [rw] routine_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Routine::RoutineType] + # Required. The type of routine. + # @!attribute [rw] definition_body + # @return [::String] + # Optional. The definition body of the routine. + class Routine + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the type of a given routine. + module RoutineType + # Default value. + ROUTINE_TYPE_UNSPECIFIED = 0 + + # Non-built-in persistent TVF. + TABLE_VALUED_FUNCTION = 1 + end + end + + # Message for creating a QueryTemplate. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. + # @!attribute [rw] query_template_id + # @return [::String] + # Required. The ID of the QueryTemplate to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @!attribute [rw] query_template + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # Required. The QueryTemplate to create. + class CreateQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a QueryTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. The parent resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + class GetQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of QueryTemplates. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the QueryTemplates. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return in a single response + # page. Leverage the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token, returned by a previous call, to request the next page + # of results. + class ListQueryTemplatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the list of QueryTemplates. + # @!attribute [rw] query_templates + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] + # The list of QueryTemplates. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListQueryTemplatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a QueryTemplate. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask specifies the fields to update in the query template + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @!attribute [rw] query_template + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] + # Required. The QueryTemplate to update. + class UpdateQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a QueryTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + class DeleteQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for submitting a QueryTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + class SubmitQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for approving a QueryTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. The resource path of the QueryTemplate. + # e.g. + # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. + class ApproveQueryTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sharing environment is a behavior model for sharing data within a + # data exchange. This option is configurable for a data exchange. + # @!attribute [rw] default_exchange_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig::DefaultExchangeConfig] + # Default Analytics Hub data exchange, used for secured data sharing. + # + # Note: The following fields are mutually exclusive: `default_exchange_config`, `dcr_exchange_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] dcr_exchange_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig::DcrExchangeConfig] + # Data Clean Room (DCR), used for privacy-safe and secured data sharing. + # + # Note: The following fields are mutually exclusive: `dcr_exchange_config`, `default_exchange_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SharingEnvironmentConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default Analytics Hub data exchange, used for secured data sharing. + class DefaultExchangeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data Clean Room (DCR), used for privacy-safe and secured data sharing. + # @!attribute [r] single_selected_resource_sharing_restriction + # @return [::Boolean] + # Output only. If True, this DCR restricts the contributors to sharing + # only a single resource in a Listing. And no two resources should have the + # same IDs. So if a contributor adds a view with a conflicting name, the + # CreateListing API will reject the request. if False, the data contributor + # can publish an entire dataset (as before). This is not configurable, and + # by default, all new DCRs will have the restriction set to True. + # @!attribute [r] single_linked_dataset_per_cleanroom + # @return [::Boolean] + # Output only. If True, when subscribing to this DCR, it will create only + # one linked dataset containing all resources shared within the + # cleanroom. If False, when subscribing to this DCR, it will + # create 1 linked dataset per listing. This is not configurable, and by + # default, all new DCRs will have the restriction set to True. + class DcrExchangeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains details of the data provider. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the data provider. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the data provider. + # Max Length: 1000 bytes. + class DataProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains details of the listing publisher. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the listing publisher. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the listing publisher. + # Max Length: 1000 bytes. + class Publisher + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] dataset_id + # @return [::String] + # Required. A unique ID for this dataset, without the project name. The ID + # must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + # The maximum length is 1,024 characters. + # @!attribute [rw] project_id + # @return [::String] + # Required. The ID of the project containing this dataset. + class DestinationDatasetReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the destination bigquery dataset. + # @!attribute [rw] dataset_reference + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDatasetReference] + # Required. A reference that identifies the destination dataset. + # @!attribute [rw] friendly_name + # @return [::Google::Protobuf::StringValue] + # Optional. A descriptive name for the dataset. + # @!attribute [rw] description + # @return [::Google::Protobuf::StringValue] + # Optional. A user-friendly description of the dataset. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels associated with this dataset. You can use these + # to organize and group your datasets. + # You can set this property when inserting or updating a dataset. + # See https://cloud.google.com/resource-manager/docs/creating-managing-labels + # for more information. + # @!attribute [rw] location + # @return [::String] + # Required. The geographic location where the dataset should reside. See + # https://cloud.google.com/bigquery/docs/locations for supported + # locations. + # @!attribute [rw] replica_locations + # @return [::Array<::String>] + # Optional. The geographic locations where the dataset should be replicated. + # See [BigQuery locations](https://cloud.google.com/bigquery/docs/locations) + # for supported locations. + class DestinationDataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Defines the destination Pub/Sub subscription. + # @!attribute [rw] pubsub_subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PubSubSubscription] + # Required. Destination Pub/Sub subscription resource. + class DestinationPubSubSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A listing is what gets published into a data exchange that a subscriber can + # subscribe to. It contains a reference to the data source along with + # descriptive information that will help subscribers find and subscribe the + # data. + # @!attribute [rw] bigquery_dataset + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource] + # Shared dataset i.e. BigQuery dataset source. + # + # Note: The following fields are mutually exclusive: `bigquery_dataset`, `pubsub_topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pubsub_topic + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::PubSubTopicSource] + # Pub/Sub topic source. + # + # Note: The following fields are mutually exclusive: `pubsub_topic`, `bigquery_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456` + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of the listing. The display name must + # contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + # spaces ( ), ampersands (&) and can't start or end with spaces. Default + # value is an empty string. Max length: 63 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Short description of the listing. The description must not + # contain Unicode non-characters and C0 and C1 control codes except tabs + # (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default + # value is an empty string. Max length: 2000 bytes. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the primary point of contact of the listing. + # Max Length: 1000 bytes. + # @!attribute [rw] documentation + # @return [::String] + # Optional. Documentation describing the listing. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::State] + # Output only. Current state of the listing. + # @!attribute [rw] icon + # @return [::String] + # Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + # Expected image dimensions are 512x512 pixels, however the API only + # performs validation on size of the encoded data. + # Note: For byte fields, the contents of the field are base64-encoded (which + # increases the size of the data by 33-36%) when using JSON on the wire. + # @!attribute [rw] data_provider + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataProvider] + # Optional. Details of the data provider who owns the source data. + # @!attribute [rw] categories + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::Category>] + # Optional. Categories of the listing. Up to five categories are allowed. + # @!attribute [rw] publisher + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Publisher] + # Optional. Details of the publisher who owns the listing and who can share + # the source data. + # @!attribute [rw] request_access + # @return [::String] + # Optional. Email or URL of the request access of the listing. + # Subscribers can use this reference to request access. + # Max Length: 1000 bytes. + # @!attribute [rw] restricted_export_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::RestrictedExportConfig] + # Optional. If set, restricted export configuration will be propagated and + # enforced on the linked dataset. + # @!attribute [rw] stored_procedure_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::StoredProcedureConfig] + # Optional. If set, stored procedure configuration will be propagated and + # enforced on the linked dataset. + # @!attribute [rw] discovery_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DiscoveryType] + # Optional. Type of discovery of the listing on the discovery page. + # @!attribute [r] resource_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType] + # Output only. Listing shared asset type. + # @!attribute [r] commercial_info + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo] + # Output only. Commercial info contains the information about the commercial + # data products associated with the listing. + # @!attribute [rw] log_linked_dataset_query_user_email + # @return [::Boolean] + # Optional. By default, false. + # If true, the Listing has an email sharing mandate enabled. + # @!attribute [rw] allow_only_metadata_sharing + # @return [::Boolean] + # Optional. If true, the listing is only available to get the resource + # metadata. Listing is non subscribable. + class Listing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A reference to a shared dataset. It is an existing BigQuery dataset with a + # collection of objects such as tables and views that you want to share + # with subscribers. + # When subscriber's subscribe to a listing, Analytics Hub creates a linked + # dataset in + # the subscriber's project. A Linked dataset is an opaque, read-only BigQuery + # dataset that serves as a _symbolic link_ to a shared dataset. + # @!attribute [rw] dataset + # @return [::String] + # Optional. Resource name of the dataset source for this listing. + # e.g. `projects/myproject/datasets/123` + # @!attribute [rw] selected_resources + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::SelectedResource>] + # Optional. Resource in this dataset that is selectively shared. + # This field is required for data clean room exchanges. + # @!attribute [rw] restricted_export_policy + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::RestrictedExportPolicy] + # Optional. If set, restricted export policy will be propagated and + # enforced on the linked dataset. + # @!attribute [rw] replica_locations + # @return [::Array<::String>] + # Optional. A list of regions where the publisher has created shared + # dataset replicas. + # @!attribute [r] effective_replicas + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica>] + # Output only. Server-owned effective state of replicas. + # Contains both primary and secondary replicas. + # Each replica includes a system-computed (output-only) state and primary + # designation. + class BigQueryDatasetSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Resource in this dataset that is selectively shared. + # @!attribute [rw] table + # @return [::String] + # Optional. Format: + # For table: + # `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + # Example:"projects/test_project/datasets/test_dataset/tables/test_table" + # + # Note: The following fields are mutually exclusive: `table`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] routine + # @return [::String] + # Optional. Format: + # For routine: + # `projects/{projectId}/datasets/{datasetId}/routines/{routineId}` + # Example:"projects/test_project/datasets/test_dataset/routines/test_routine" + # + # Note: The following fields are mutually exclusive: `routine`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SelectedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Restricted export policy used to configure restricted export on linked + # dataset. + # @!attribute [rw] enabled + # @return [::Google::Protobuf::BoolValue] + # Optional. If true, enable restricted export. + # @!attribute [rw] restrict_direct_table_access + # @return [::Google::Protobuf::BoolValue] + # Optional. If true, restrict direct table access (read + # api/tabledata.list) on linked table. + # @!attribute [rw] restrict_query_result + # @return [::Google::Protobuf::BoolValue] + # Optional. If true, restrict export of query result derived from + # restricted linked dataset table. + class RestrictedExportPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the state of a replica of a shared dataset. + # It includes the geographic location of the replica and + # system-computed, output-only fields indicating its replication state and + # whether it is the primary replica. + # @!attribute [r] location + # @return [::String] + # Output only. The geographic location where the replica resides. See + # [BigQuery locations](https://cloud.google.com/bigquery/docs/locations) + # for supported locations. Eg. "us-central1". + # @!attribute [r] replica_state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica::ReplicaState] + # Output only. Assigned by Analytics Hub based on real BigQuery + # replication state. + # @!attribute [r] primary_state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica::PrimaryState] + # Output only. Indicates that this replica is the primary replica. + class Replica + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Replica state of the shared dataset. + module ReplicaState + # Default value. This value is unused. + REPLICA_STATE_UNSPECIFIED = 0 + + # The replica is backfilled and ready to use. + READY_TO_USE = 1 + + # The replica is unavailable, does not exist, or has not been + # backfilled yet. + UNAVAILABLE = 2 + end + + # Primary state of the replica. Set only for the primary replica. + module PrimaryState + # Default value. This value is unused. + PRIMARY_STATE_UNSPECIFIED = 0 + + # The replica is the primary replica. + PRIMARY_REPLICA = 1 + end + end + end + + # Pub/Sub topic source. + # @!attribute [rw] topic + # @return [::String] + # Required. Resource name of the Pub/Sub topic source for this listing. + # e.g. projects/myproject/topics/topicId + # @!attribute [rw] data_affinity_regions + # @return [::Array<::String>] + # Optional. Region hint on where the data might be published. Data affinity + # regions are modifiable. See https://cloud.google.com/about/locations for + # full listing of possible Cloud regions. + class PubSubTopicSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Restricted export config, used to configure restricted export on linked + # dataset. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. If true, enable restricted export. + # @!attribute [r] restrict_direct_table_access + # @return [::Boolean] + # Output only. If true, restrict direct table access(read + # api/tabledata.list) on linked table. + # @!attribute [rw] restrict_query_result + # @return [::Boolean] + # Optional. If true, restrict export of query result derived from + # restricted linked dataset table. + class RestrictedExportConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Commercial info contains the information about the commercial data products + # associated with the listing. + # @!attribute [r] cloud_marketplace + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo::GoogleCloudMarketplaceInfo] + # Output only. Details of the Marketplace Data Product associated with the + # Listing. + class CommercialInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the details of the Marketplace Data Product associated with the + # Listing. + # @!attribute [r] service + # @return [::String] + # Output only. Resource name of the commercial service associated with + # the Marketplace Data Product. e.g. example.com + # @!attribute [r] commercial_state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo::GoogleCloudMarketplaceInfo::CommercialState] + # Output only. Commercial state of the Marketplace Data Product. + class GoogleCloudMarketplaceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates whether this commercial access is currently active. + module CommercialState + # Commercialization is incomplete and cannot be used. + COMMERCIAL_STATE_UNSPECIFIED = 0 + + # Commercialization has been initialized. + ONBOARDING = 1 + + # Commercialization is complete and available for use. + ACTIVE = 2 + end + end + end + + # State of the listing. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # Subscribable state. Users with dataexchange.listings.subscribe permission + # can subscribe to this listing. + ACTIVE = 1 + end + + # Listing categories. + module Category + CATEGORY_UNSPECIFIED = 0 + + CATEGORY_OTHERS = 1 + + CATEGORY_ADVERTISING_AND_MARKETING = 2 + + CATEGORY_COMMERCE = 3 + + CATEGORY_CLIMATE_AND_ENVIRONMENT = 4 + + CATEGORY_DEMOGRAPHICS = 5 + + CATEGORY_ECONOMICS = 6 + + CATEGORY_EDUCATION = 7 + + CATEGORY_ENERGY = 8 + + CATEGORY_FINANCIAL = 9 + + CATEGORY_GAMING = 10 + + CATEGORY_GEOSPATIAL = 11 + + CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12 + + CATEGORY_MEDIA = 13 + + CATEGORY_PUBLIC_SECTOR = 14 + + CATEGORY_RETAIL = 15 + + CATEGORY_SPORTS = 16 + + CATEGORY_SCIENCE_AND_RESEARCH = 17 + + CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18 + + CATEGORY_TRAVEL_AND_TOURISM = 19 + + CATEGORY_GOOGLE_EARTH_ENGINE = 20 + end + end + + # Stored procedure configuration, used to configure stored procedure sharing + # on linked dataset. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. If true, enable sharing of stored procedure. + # @!attribute [r] allowed_stored_procedure_types + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::StoredProcedureConfig::StoredProcedureType>] + # Output only. Types of stored procedure supported to share. + class StoredProcedureConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum to specify the type of stored procedure to share. + module StoredProcedureType + # Default value. This value is unused. + STORED_PROCEDURE_TYPE_UNSPECIFIED = 0 + + # SQL stored procedure. + SQL_PROCEDURE = 1 + end + end + + # A subscription represents a subscribers' access to a particular set of + # published data. It contains references to associated listings, + # data exchanges, and linked datasets. + # @!attribute [r] listing + # @return [::String] + # Output only. Resource name of the source Listing. + # e.g. projects/123/locations/us/dataExchanges/456/listings/789 + # + # Note: The following fields are mutually exclusive: `listing`, `data_exchange`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_exchange + # @return [::String] + # Output only. Resource name of the source Data Exchange. + # e.g. projects/123/locations/us/dataExchanges/456 + # + # Note: The following fields are mutually exclusive: `data_exchange`, `listing`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the subscription. + # e.g. `projects/myproject/locations/us/subscriptions/123`. + # @!attribute [r] creation_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the subscription was created. + # @!attribute [r] last_modify_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the subscription was last modified. + # @!attribute [r] organization_id + # @return [::String] + # Output only. Organization of the project this subscription belongs to. + # @!attribute [r] organization_display_name + # @return [::String] + # Output only. Display name of the project of this subscription. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::State] + # Output only. Current state of the subscription. + # @!attribute [r] linked_dataset_map + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource}] + # Output only. Map of listing resource names to associated linked resource, + # e.g. projects/123/locations/us/dataExchanges/456/listings/789 + # -> + # projects/123/datasets/my_dataset + # + # For listing-level subscriptions, this is a map of size 1. + # Only contains values if state == STATE_ACTIVE. + # @!attribute [r] subscriber_contact + # @return [::String] + # Output only. Email of the subscriber. + # @!attribute [r] linked_resources + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource>] + # Output only. Linked resources created in the subscription. Only contains + # values if state = STATE_ACTIVE. + # @!attribute [r] resource_type + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType] + # Output only. Listing shared asset type. + # @!attribute [r] commercial_info + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo] + # Output only. This is set if this is a commercial subscription i.e. if this + # subscription was created from subscribing to a commercial listing. + # @!attribute [r] log_linked_dataset_query_user_email + # @return [::Boolean] + # Output only. By default, false. + # If true, the Subscriber agreed to the email sharing mandate + # that is enabled for DataExchange/Listing. + # @!attribute [rw] destination_dataset + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] + # Optional. BigQuery destination dataset to create for the subscriber. + class Subscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reference to a linked resource tracked by this Subscription. + # @!attribute [r] linked_dataset + # @return [::String] + # Output only. Name of the linked dataset, e.g. + # projects/subscriberproject/datasets/linked_dataset + # + # Note: The following fields are mutually exclusive: `linked_dataset`, `linked_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] linked_pubsub_subscription + # @return [::String] + # Output only. Name of the Pub/Sub subscription, e.g. + # projects/subscriberproject/subscriptions/subscriptions/sub_id + # + # Note: The following fields are mutually exclusive: `linked_pubsub_subscription`, `linked_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] listing + # @return [::String] + # Output only. Listing for which linked resource is created. + class LinkedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Commercial info metadata for this subscription. + # @!attribute [r] cloud_marketplace + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo::GoogleCloudMarketplaceInfo] + # Output only. This is set when the subscription is commercialised via + # Cloud Marketplace. + class CommercialInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Cloud Marketplace commercial metadata for this subscription. + # @!attribute [rw] order + # @return [::String] + # Resource name of the Marketplace Order. + class GoogleCloudMarketplaceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource] + class LinkedDatasetMapEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the subscription. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # This subscription is active and the data is accessible. + STATE_ACTIVE = 1 + + # The data referenced by this subscription is out of date and should be + # refreshed. This can happen when a data provider adds or removes datasets. + STATE_STALE = 2 + + # This subscription has been cancelled or revoked and the data is no longer + # accessible. + STATE_INACTIVE = 3 + end + end + + # Message for requesting the list of data exchanges. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the data exchanges. + # e.g. `projects/myproject/locations/us`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListDataExchangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the list of data exchanges. + # @!attribute [rw] data_exchanges + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # The list of data exchanges. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListDataExchangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of data exchanges from projects in an + # organization and location. + # @!attribute [rw] organization + # @return [::String] + # Required. The organization resource path of the projects containing + # DataExchanges. e.g. `organizations/myorg/locations/us`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListOrgDataExchangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing data exchanges in an organization and + # location. + # @!attribute [rw] data_exchanges + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] + # The list of data exchanges. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListOrgDataExchangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a data exchange. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data exchange. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + class GetDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a data exchange. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the data exchange. + # e.g. `projects/myproject/locations/us`. + # @!attribute [rw] data_exchange_id + # @return [::String] + # Required. The ID of the data exchange. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @!attribute [rw] data_exchange + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # Required. The data exchange to create. + class CreateDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a data exchange. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask specifies the fields to update in the data exchange + # resource. The fields specified in the + # `updateMask` are relative to the resource and are not a full request. + # @!attribute [rw] data_exchange + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] + # Required. The data exchange to update. + class UpdateDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a data exchange. + # @!attribute [rw] name + # @return [::String] + # Required. The full name of the data exchange resource that you want to + # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. + class DeleteDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of listings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListListingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the list of Listings. + # @!attribute [rw] listings + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] + # The list of Listing. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListListingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a listing. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + class GetListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a listing. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/us/dataExchanges/123`. + # @!attribute [rw] listing_id + # @return [::String] + # Required. The ID of the listing to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Max length: 100 bytes. + # @!attribute [rw] listing + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # Required. The listing to create. + class CreateListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a Listing. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask specifies the fields to update in the listing + # resource. The fields specified in the `updateMask` are relative to the + # resource and are not a full request. + # @!attribute [rw] listing + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] + # Required. The listing to update. + class UpdateListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a listing. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the listing to delete. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + # @!attribute [rw] delete_commercial + # @return [::Boolean] + # Optional. If the listing is commercial then this field must be set to true, + # otherwise a failure is thrown. This acts as a safety guard to avoid + # deleting commercial listings accidentally. + class DeleteListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for subscribing to a listing. + # @!attribute [rw] destination_dataset + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] + # Input only. BigQuery destination dataset to create for the subscriber. + # + # Note: The following fields are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] destination_pubsub_subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription] + # Input only. Destination Pub/Sub subscription to create for the + # subscriber. + # + # Note: The following fields are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the listing that you want to subscribe to. + # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. + class SubscribeListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you subscribe to a listing. + # @!attribute [rw] subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # Subscription object created from this subscribe action. + class SubscribeListingResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for subscribing to a Data Exchange. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the Data Exchange. + # e.g. `projects/publisherproject/locations/us/dataExchanges/123` + # @!attribute [rw] destination + # @return [::String] + # Required. The parent resource path of the Subscription. + # e.g. `projects/subscriberproject/locations/us` + # @!attribute [rw] destination_dataset + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] + # Optional. BigQuery destination dataset to create for the subscriber. + # @!attribute [rw] subscription + # @return [::String] + # Required. Name of the subscription to create. + # e.g. `subscription1` + # @!attribute [rw] subscriber_contact + # @return [::String] + # Email of the subscriber. + class SubscribeDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you subscribe to a Data Exchange. + # @!attribute [rw] subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # Subscription object created from this subscribe action. + class SubscribeDataExchangeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for refreshing a subscription. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the Subscription to refresh. + # e.g. `projects/subscriberproject/locations/us/subscriptions/123` + class RefreshSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you refresh a subscription. + # @!attribute [rw] subscription + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] + # The refreshed subscription resource. + class RefreshSubscriptionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a subscription. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription. + # e.g. projects/123/locations/us/subscriptions/456 + class GetSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for listing subscriptions. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the subscription. + # e.g. projects/myproject/locations/us + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. Eligible + # fields for filtering are: + # + # + `listing` + # + `data_exchange` + # + # Alternatively, a literal wrapped in double quotes may be provided. + # This will be checked for an exact match against both fields above. + # + # In all cases, the full Data Exchange or Listing resource name must + # be provided. Some example of using filters: + # + # + data_exchange="projects/myproject/locations/us/dataExchanges/123" + # + listing="projects/123/locations/us/dataExchanges/456/listings/789" + # + "projects/myproject/locations/us/dataExchanges/123" + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call. + class ListSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the listing of subscriptions. + # @!attribute [rw] subscriptions + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # The list of subscriptions. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + class ListSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for listing subscriptions of a shared resource. + # @!attribute [rw] resource + # @return [::String] + # Required. Resource name of the requested target. This resource may be + # either a Listing or a DataExchange. e.g. + # projects/123/locations/us/dataExchanges/456 OR e.g. + # projects/123/locations/us/dataExchanges/456/listings/789 + # @!attribute [rw] include_deleted_subscriptions + # @return [::Boolean] + # If selected, includes deleted subscriptions in the response + # (up to 63 days after deletion). + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call. + class ListSharedResourceSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the listing of shared resource subscriptions. + # @!attribute [rw] shared_resource_subscriptions + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] + # The list of subscriptions. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + class ListSharedResourceSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for revoking a subscription. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription to revoke. + # e.g. projects/123/locations/us/subscriptions/456 + # @!attribute [rw] revoke_commercial + # @return [::Boolean] + # Optional. If the subscription is commercial then this field must be set to + # true, otherwise a failure is thrown. This acts as a safety guard to avoid + # revoking commercial subscriptions accidentally. + class RevokeSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you revoke a subscription. + # Empty for now. + class RevokeSubscriptionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a subscription. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the subscription to delete. + # e.g. projects/123/locations/us/subscriptions/456 + class DeleteSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of a long-running operation in Analytics Hub. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the type of discovery on the discovery page. Note that + # this does not control the visibility of the exchange/listing which is + # defined by IAM permission. + module DiscoveryType + # Unspecified. Defaults to DISCOVERY_TYPE_PRIVATE. + DISCOVERY_TYPE_UNSPECIFIED = 0 + + # The Data exchange/listing can be discovered in the 'Private' results + # list. + DISCOVERY_TYPE_PRIVATE = 1 + + # The Data exchange/listing can be discovered in the 'Public' results + # list. + DISCOVERY_TYPE_PUBLIC = 2 + end + + # The underlying shared asset type shared in a listing by a publisher. + module SharedResourceType + # Not specified. + SHARED_RESOURCE_TYPE_UNSPECIFIED = 0 + + # BigQuery Dataset Asset. + BIGQUERY_DATASET = 1 + + # Pub/Sub Topic Asset. + PUBSUB_TOPIC = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb new file mode 100644 index 000000000000..e75b3b67c28e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb @@ -0,0 +1,559 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module AnalyticsHub + module V1 + # Defines the destination Pub/Sub subscription. + # If none of `push_config`, `bigquery_config`, `cloud_storage_config`, + # `pubsub_export_config`, or `pubsublite_export_config` + # is set, then the subscriber will pull and ack messages using API methods. At + # most one of these fields may be set. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the subscription. + # Format is `projects/{project}/subscriptions/{sub}`. + # @!attribute [rw] push_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig] + # Optional. If push delivery is used with this subscription, this field is + # used to configure it. + # @!attribute [rw] bigquery_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::BigQueryConfig] + # Optional. If delivery to BigQuery is used with this subscription, this + # field is used to configure it. + # @!attribute [rw] cloud_storage_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig] + # Optional. If delivery to Google Cloud Storage is used with this + # subscription, this field is used to configure it. + # @!attribute [rw] ack_deadline_seconds + # @return [::Integer] + # Optional. The approximate amount of time (on a best-effort basis) Pub/Sub + # waits for the subscriber to acknowledge receipt before resending the + # message. In the interval after the message is delivered and before it is + # acknowledged, it is considered to be _outstanding_. During that time + # period, the message will not be redelivered (on a best-effort basis). + # + # For pull subscriptions, this value is used as the initial value for the ack + # deadline. To override this value for a given message, call + # `ModifyAckDeadline` with the corresponding `ack_id` if using + # non-streaming pull or send the `ack_id` in a + # `StreamingModifyAckDeadlineRequest` if using streaming pull. + # The minimum custom deadline you can specify is 10 seconds. + # The maximum custom deadline you can specify is 600 seconds (10 minutes). + # If this parameter is 0, a default value of 10 seconds is used. + # + # For push delivery, this value is also used to set the request timeout for + # the call to the push endpoint. + # + # If the subscriber never acknowledges the message, the Pub/Sub + # system will eventually redeliver the message. + # @!attribute [rw] retain_acked_messages + # @return [::Boolean] + # Optional. Indicates whether to retain acknowledged messages. If true, then + # messages are not expunged from the subscription's backlog, even if they are + # acknowledged, until they fall out of the `message_retention_duration` + # window. This must be true if you would like to [`Seek` to a timestamp] + # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in + # the past to replay previously-acknowledged messages. + # @!attribute [rw] message_retention_duration + # @return [::Google::Protobuf::Duration] + # Optional. How long to retain unacknowledged messages in the subscription's + # backlog, from the moment a message is published. If `retain_acked_messages` + # is true, then this also configures the retention of acknowledged messages, + # and thus configures how far back in time a `Seek` can be done. Defaults to + # 7 days. Cannot be more than 31 days or less than 10 minutes. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. See [Creating and managing + # labels](https://cloud.google.com/pubsub/docs/labels). + # @!attribute [rw] enable_message_ordering + # @return [::Boolean] + # Optional. If true, messages published with the same `ordering_key` in + # `PubsubMessage` will be delivered to the subscribers in the order in which + # they are received by the Pub/Sub system. Otherwise, they may be delivered + # in any order. + # @!attribute [rw] expiration_policy + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ExpirationPolicy] + # Optional. A policy that specifies the conditions for this subscription's + # expiration. A subscription is considered active as long as any connected + # subscriber is successfully consuming messages from the subscription or is + # issuing operations on the subscription. If `expiration_policy` is not set, + # a *default policy* with `ttl` of 31 days will be used. The minimum allowed + # value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set, + # but `expiration_policy.ttl` is not set, the subscription never expires. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression written in the Pub/Sub [filter + # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, + # then only `PubsubMessage`s whose `attributes` field matches the filter are + # delivered on this subscription. If empty, then no messages are filtered + # out. + # @!attribute [rw] dead_letter_policy + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeadLetterPolicy] + # Optional. A policy that specifies the conditions for dead lettering + # messages in this subscription. If dead_letter_policy is not set, dead + # lettering is disabled. + # + # The Pub/Sub service account associated with this subscriptions's + # parent project (i.e., + # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have + # permission to Acknowledge() messages on this subscription. + # @!attribute [rw] retry_policy + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RetryPolicy] + # Optional. A policy that specifies how Pub/Sub retries message delivery for + # this subscription. + # + # If not set, the default retry policy is applied. This generally implies + # that messages will be retried as soon as possible for healthy subscribers. + # RetryPolicy will be triggered on NACKs or acknowledgement deadline + # exceeded events for a given message. + # @!attribute [rw] detached + # @return [::Boolean] + # Optional. Indicates whether the subscription is detached from its topic. + # Detached subscriptions don't receive messages from their topic and don't + # retain any backlog. `Pull` and `StreamingPull` requests will return + # FAILED_PRECONDITION. If the subscription is a push subscription, pushes to + # the endpoint will not be made. + # @!attribute [rw] enable_exactly_once_delivery + # @return [::Boolean] + # Optional. If true, Pub/Sub provides the following guarantees for the + # delivery of a message with a given value of `message_id` on this + # subscription: + # + # * The message sent to a subscriber is guaranteed not to be resent + # before the message's acknowledgement deadline expires. + # * An acknowledged message will not be resent to a subscriber. + # + # Note that subscribers may still receive multiple copies of a message + # when `enable_exactly_once_delivery` is true if the message was published + # multiple times by a publisher client. These copies are considered distinct + # by Pub/Sub and have distinct `message_id` values. + # @!attribute [rw] message_transforms + # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::MessageTransform>] + # Optional. Transforms to be applied to messages before they are delivered to + # subscribers. Transforms are applied in the order specified. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag keys/values directly bound to this + # resource. For example: + # "123/environment": "production", + # "123/costCenter": "marketing" + class PubSubSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A policy that specifies how Pub/Sub retries message delivery. + # + # Retry delay will be exponential based on provided minimum and maximum + # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. + # + # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded + # events for a given message. + # + # Retry Policy is implemented on a best effort basis. At times, the delay + # between consecutive deliveries may not match the configuration. That is, + # delay can be more or less than configured backoff. + # @!attribute [rw] minimum_backoff + # @return [::Google::Protobuf::Duration] + # Optional. The minimum delay between consecutive deliveries of a given + # message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. + # @!attribute [rw] maximum_backoff + # @return [::Google::Protobuf::Duration] + # Optional. The maximum delay between consecutive deliveries of a given + # message. Value should be between 0 and 600 seconds. Defaults to 600 + # seconds. + class RetryPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Dead lettering is done on a best effort basis. The same message might be + # dead lettered multiple times. + # + # If validation on any of the fields fails at subscription creation/updation, + # the create/update subscription request will fail. + # @!attribute [rw] dead_letter_topic + # @return [::String] + # Optional. The name of the topic to which dead letter messages should be + # published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub + # service account associated with the enclosing subscription's parent project + # (i.e., service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must + # have permission to Publish() to this topic. + # + # The operation will fail if the topic does not exist. + # Users should ensure that there is a subscription attached to this topic + # since messages published to a topic with no subscriptions are lost. + # @!attribute [rw] max_delivery_attempts + # @return [::Integer] + # Optional. The maximum number of delivery attempts for any message. The + # value must be between 5 and 100. + # + # The number of delivery attempts is defined as 1 + (the sum of number of + # NACKs and number of times the acknowledgement deadline has been exceeded + # for the message). + # + # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that + # client libraries may automatically extend ack_deadlines. + # + # This field will be honored on a best effort basis. + # + # If this parameter is 0, a default value of 5 is used. + class DeadLetterPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A policy that specifies the conditions for resource expiration (i.e., + # automatic resource deletion). + # @!attribute [rw] ttl + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the "time-to-live" duration for an associated resource. + # The resource expires if it is not active for a period of `ttl`. The + # definition of "activity" depends on the type of the associated resource. + # The minimum and maximum allowed values for `ttl` depend on the type of the + # associated resource, as well. If `ttl` is not set, the associated resource + # never expires. + class ExpirationPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a push delivery endpoint. + # @!attribute [rw] oidc_token + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::OidcToken] + # Optional. If specified, Pub/Sub will generate and attach an OIDC JWT + # token as an `Authorization` header in the HTTP request for every pushed + # message. + # @!attribute [rw] pubsub_wrapper + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::PubsubWrapper] + # Optional. When set, the payload to the push endpoint is in the form of + # the JSON representation of a PubsubMessage + # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). + # + # Note: The following fields are mutually exclusive: `pubsub_wrapper`, `no_wrapper`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] no_wrapper + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::NoWrapper] + # Optional. When set, the payload to the push endpoint is not wrapped. + # + # Note: The following fields are mutually exclusive: `no_wrapper`, `pubsub_wrapper`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] push_endpoint + # @return [::String] + # Optional. A URL locating the endpoint to which messages should be pushed. + # For example, a Webhook endpoint might use `https://example.com/push`. + # @!attribute [rw] attributes + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Endpoint configuration attributes that can be used to control + # different aspects of the message delivery. + # + # The only currently supported attribute is `x-goog-version`, which you can + # use to change the format of the pushed message. This attribute + # indicates the version of the data expected by the endpoint. This + # controls the shape of the pushed message (i.e., its fields and metadata). + # + # If not present during the `CreateSubscription` call, it will default to + # the version of the Pub/Sub API used to make such call. If not present in a + # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` + # calls will always return a valid version, even if the subscription was + # created without this attribute. + # + # The only supported values for the `x-goog-version` attribute are: + # + # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. + # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. + # + # For example: + # `attributes { "x-goog-version": "v1" }` + class PushConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains information needed for generating an + # [OpenID Connect + # token](https://developers.google.com/identity/protocols/OpenIDConnect). + # @!attribute [rw] service_account_email + # @return [::String] + # Optional. [Service account + # email](https://cloud.google.com/iam/docs/service-accounts) + # used for generating the OIDC token. For more information + # on setting up authentication, see + # [Push subscriptions](https://cloud.google.com/pubsub/docs/push). + # @!attribute [rw] audience + # @return [::String] + # Optional. Audience to be used when generating OIDC token. The audience + # claim identifies the recipients that the JWT is intended for. The + # audience value is a single case-sensitive string. Having multiple values + # (array) for the audience field is not supported. More info about the OIDC + # JWT token audience here: + # https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, + # the Push endpoint URL will be used. + class OidcToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payload to the push endpoint is in the form of the JSON representation + # of a PubsubMessage + # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). + class PubsubWrapper + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sets the `data` field as the HTTP body for delivery. + # @!attribute [rw] write_metadata + # @return [::Boolean] + # Optional. When true, writes the Pub/Sub message metadata to + # `x-goog-pubsub-:` headers of the HTTP request. Writes the + # Pub/Sub message attributes to `:` headers of the HTTP request. + class NoWrapper + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AttributesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a BigQuery subscription. + # @!attribute [rw] table + # @return [::String] + # Optional. The name of the table to which to write data, of the form + # \\{projectId}.\\{datasetId}.\\{tableId} + # @!attribute [rw] use_topic_schema + # @return [::Boolean] + # Optional. When true, use the topic's schema as the columns to write to in + # BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be + # enabled at the same time. + # @!attribute [rw] write_metadata + # @return [::Boolean] + # Optional. When true, write the subscription name, message_id, publish_time, + # attributes, and ordering_key to additional columns in the table. The + # subscription name, message_id, and publish_time fields are put in their own + # columns while all other message properties (other than data) are written to + # a JSON object in the attributes column. + # @!attribute [rw] drop_unknown_fields + # @return [::Boolean] + # Optional. When true and use_topic_schema is true, any fields that are a + # part of the topic schema that are not part of the BigQuery table schema are + # dropped when writing to BigQuery. Otherwise, the schemas must be kept in + # sync and any messages with extra fields are not written and remain in the + # subscription's backlog. + # @!attribute [rw] use_table_schema + # @return [::Boolean] + # Optional. When true, use the BigQuery table's schema as the columns to + # write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be + # enabled at the same time. + # @!attribute [rw] service_account_email + # @return [::String] + # Optional. The service account to use to write to BigQuery. The subscription + # creator or updater that specifies this field must have + # `iam.serviceAccounts.actAs` permission on the service account. If not + # specified, the Pub/Sub [service + # agent](https://cloud.google.com/iam/docs/service-agents), + # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + class BigQueryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a Cloud Storage subscription. + # @!attribute [rw] text_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig::TextConfig] + # Optional. If set, message data will be written to Cloud Storage in text + # format. + # + # Note: The following fields are mutually exclusive: `text_config`, `avro_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] avro_config + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig::AvroConfig] + # Optional. If set, message data will be written to Cloud Storage in Avro + # format. + # + # Note: The following fields are mutually exclusive: `avro_config`, `text_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bucket + # @return [::String] + # Required. User-provided name for the Cloud Storage bucket. + # The bucket must be created by the user. The bucket name must be without + # any prefix like "gs://". See the [bucket naming + # requirements] (https://cloud.google.com/storage/docs/buckets#naming). + # @!attribute [rw] filename_prefix + # @return [::String] + # Optional. User-provided prefix for Cloud Storage filename. See the [object + # naming requirements](https://cloud.google.com/storage/docs/objects#naming). + # @!attribute [rw] filename_suffix + # @return [::String] + # Optional. User-provided suffix for Cloud Storage filename. See the [object + # naming requirements](https://cloud.google.com/storage/docs/objects#naming). + # Must not end in "/". + # @!attribute [rw] filename_datetime_format + # @return [::String] + # Optional. User-provided format string specifying how to represent datetimes + # in Cloud Storage filenames. See the [datetime format + # guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). + # @!attribute [rw] max_duration + # @return [::Google::Protobuf::Duration] + # Optional. File batching settings. + # If no max_duration setting is specified, a max_duration of 5 minutes will + # be set by default. max_duration is required regardless of whether other + # file batching settings are specified. + # + # The maximum duration that can elapse before a new Cloud Storage file is + # created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed + # the subscription's acknowledgement deadline. + # @!attribute [rw] max_bytes + # @return [::Integer] + # Optional. The maximum bytes that can be written to a Cloud Storage file + # before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may + # be exceeded in cases where messages are larger than the limit. + # @!attribute [rw] max_messages + # @return [::Integer] + # Optional. The maximum number of messages that can be written to a Cloud + # Storage file before a new file is created. Min 1000 messages. + # @!attribute [rw] service_account_email + # @return [::String] + # Optional. The service account to use to write to Cloud Storage. The + # subscription creator or updater that specifies this field must have + # `iam.serviceAccounts.actAs` permission on the service account. If not + # specified, the Pub/Sub + # [service agent](https://cloud.google.com/iam/docs/service-agents), + # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + class CloudStorageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for writing message data in text format. + # Message payloads will be written to files as raw text, separated by a + # newline. + class TextConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for writing message data in Avro format. + # Message payloads and metadata will be written to files as an Avro binary. + # @!attribute [rw] write_metadata + # @return [::Boolean] + # Optional. When true, write the subscription name, message_id, + # publish_time, attributes, and ordering_key as additional fields in the + # output. The subscription name, message_id, and publish_time fields are + # put in their own fields while all other message properties other than + # data (for example, an ordering_key, if present) are added as entries in + # the attributes map. + # @!attribute [rw] use_topic_schema + # @return [::Boolean] + # Optional. When true, the output Cloud Storage file will be serialized + # using the topic schema, if it exists. + class AvroConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # All supported message transforms types. + # @!attribute [rw] javascript_udf + # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::JavaScriptUDF] + # Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's + # are specified on a resource, each must have a unique `function_name`. + # @!attribute [rw] enabled + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Optional. This field is deprecated, use the `disabled` field to disable + # transforms. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. If true, the transform is disabled and will not be applied to + # messages. Defaults to `false`. + class MessageTransform + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User-defined JavaScript function that can transform or filter a Pub/Sub + # message. + # @!attribute [rw] function_name + # @return [::String] + # Required. Name of the JavasScript function that should applied to Pub/Sub + # messages. + # @!attribute [rw] code + # @return [::String] + # Required. JavaScript code that contains a function `function_name` with the + # below signature: + # + # ``` + # /** + # * Transforms a Pub/Sub message. + # + # * @return \\{(Object)>|null)} - To + # * filter a message, return `null`. To transform a message return a map + # * with the following keys: + # * - (required) 'data' : \\{string} + # * - (optional) 'attributes' : \\{Object} + # * Returning empty `attributes` will remove all attributes from the + # * message. + # * + # * @param \\{(Object)>} Pub/Sub + # * message. Keys: + # * - (required) 'data' : \\{string} + # * - (required) 'attributes' : \\{Object} + # * + # * @param \\{Object} metadata - Pub/Sub message metadata. + # * Keys: + # * - (required) 'message_id' : \\{string} + # * - (optional) 'publish_time': \\{string} YYYY-MM-DDTHH:MM:SSZ format + # * - (optional) 'ordering_key': \\{string} + # */ + # + # function (message, metadata) { + # } + # ``` + class JavaScriptUDF + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile new file mode 100644 index 000000000000..cf511377acd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-analytics_hub-v1", path: "../" +else + gem "google-cloud-bigquery-analytics_hub-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb new file mode 100644 index 000000000000..0a39e6316666 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the approve_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template. +# +def approve_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new + + # Call the approve_query_template method. + result = client.approve_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb new file mode 100644 index 000000000000..2a8628d7604c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the create_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange. +# +def create_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new + + # Call the create_data_exchange method. + result = client.create_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb new file mode 100644 index 000000000000..d1a606f4b1cd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the create_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing. +# +def create_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new + + # Call the create_listing method. + result = client.create_listing request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb new file mode 100644 index 000000000000..9c25b4f508b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the create_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template. +# +def create_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new + + # Call the create_query_template method. + result = client.create_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb new file mode 100644 index 000000000000..5952012c10af --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the delete_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange. +# +def delete_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new + + # Call the delete_data_exchange method. + result = client.delete_data_exchange request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb new file mode 100644 index 000000000000..f649ca2e5739 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the delete_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing. +# +def delete_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new + + # Call the delete_listing method. + result = client.delete_listing request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb new file mode 100644 index 000000000000..ade5d81b6792 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the delete_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template. +# +def delete_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new + + # Call the delete_query_template method. + result = client.delete_query_template request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb new file mode 100644 index 000000000000..be4fcc5a0ef2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the delete_subscription call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription. +# +def delete_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new + + # Call the delete_subscription method. + result = client.delete_subscription request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb new file mode 100644 index 000000000000..7c5f0f889dca --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange. +# +def get_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new + + # Call the get_data_exchange method. + result = client.get_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb new file mode 100644 index 000000000000..41e6e64e7742 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_iam_policy call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb new file mode 100644 index 000000000000..6bf1cd0ebe75 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing. +# +def get_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new + + # Call the get_listing method. + result = client.get_listing request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb new file mode 100644 index 000000000000..94f813894a65 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template. +# +def get_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new + + # Call the get_query_template method. + result = client.get_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb new file mode 100644 index 000000000000..1f80e69970ce --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the get_subscription call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription. +# +def get_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new + + # Call the get_subscription method. + result = client.get_subscription request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb new file mode 100644 index 000000000000..1fcb44b39af1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_data_exchanges call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges. +# +def list_data_exchanges + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new + + # Call the list_data_exchanges method. + result = client.list_data_exchanges request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb new file mode 100644 index 000000000000..0a7a606ae5f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_listings call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings. +# +def list_listings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new + + # Call the list_listings method. + result = client.list_listings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb new file mode 100644 index 000000000000..b6f2cb9a9187 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_org_data_exchanges call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges. +# +def list_org_data_exchanges + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new + + # Call the list_org_data_exchanges method. + result = client.list_org_data_exchanges request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb new file mode 100644 index 000000000000..485a075ad969 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_query_templates call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates. +# +def list_query_templates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new + + # Call the list_query_templates method. + result = client.list_query_templates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb new file mode 100644 index 000000000000..eb88901d590b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_shared_resource_subscriptions call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions. +# +def list_shared_resource_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new + + # Call the list_shared_resource_subscriptions method. + result = client.list_shared_resource_subscriptions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb new file mode 100644 index 000000000000..83a559cfd40e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the list_subscriptions call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions. +# +def list_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new + + # Call the list_subscriptions method. + result = client.list_subscriptions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. + p item + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb new file mode 100644 index 000000000000..6f0d8291ad7a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the refresh_subscription call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription. +# +def refresh_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new + + # Call the refresh_subscription method. + result = client.refresh_subscription request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb new file mode 100644 index 000000000000..79f5d7d7fd2e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the revoke_subscription call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription. +# +def revoke_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new + + # Call the revoke_subscription method. + result = client.revoke_subscription request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb new file mode 100644 index 000000000000..e90e15b23996 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the set_iam_policy call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb new file mode 100644 index 000000000000..0853f509ac77 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the submit_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template. +# +def submit_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new + + # Call the submit_query_template method. + result = client.submit_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb new file mode 100644 index 000000000000..4b8d255e1cb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the subscribe_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange. +# +def subscribe_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new + + # Call the subscribe_data_exchange method. + result = client.subscribe_data_exchange request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb new file mode 100644 index 000000000000..9d570b4f1d94 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the subscribe_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing. +# +def subscribe_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new + + # Call the subscribe_listing method. + result = client.subscribe_listing request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb new file mode 100644 index 000000000000..8d57f424d123 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the test_iam_permissions call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb new file mode 100644 index 000000000000..8736361663e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the update_data_exchange call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange. +# +def update_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new + + # Call the update_data_exchange method. + result = client.update_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb new file mode 100644 index 000000000000..8c5f1849b359 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the update_listing call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing. +# +def update_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new + + # Call the update_listing method. + result = client.update_listing request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb new file mode 100644 index 000000000000..880478732dd5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync] +require "google/cloud/bigquery/analytics_hub/v1" + +## +# Snippet for the update_query_template call in the AnalyticsHubService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template. +# +def update_query_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new + + # Call the update_query_template method. + result = client.update_query_template request + + # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. + p result +end +# [END analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json new file mode 100644 index 000000000000..d27ae7dab1ab --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json @@ -0,0 +1,1175 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-analytics_hub-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.analyticshub.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync", + "title": "Snippet for the list_data_exchanges call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges.", + "file": "analytics_hub_service/list_data_exchanges.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_exchanges", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListDataExchanges", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListDataExchanges", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync", + "title": "Snippet for the list_org_data_exchanges call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges.", + "file": "analytics_hub_service/list_org_data_exchanges.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_org_data_exchanges", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListOrgDataExchanges", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListOrgDataExchanges", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync", + "title": "Snippet for the get_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange.", + "file": "analytics_hub_service/get_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync", + "title": "Snippet for the create_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange.", + "file": "analytics_hub_service/create_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "CreateDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync", + "title": "Snippet for the update_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange.", + "file": "analytics_hub_service/update_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "UpdateDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync", + "title": "Snippet for the delete_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange.", + "file": "analytics_hub_service/delete_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListListings_sync", + "title": "Snippet for the list_listings call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings.", + "file": "analytics_hub_service/list_listings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_listings", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListListings", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListListings", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetListing_sync", + "title": "Snippet for the get_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing.", + "file": "analytics_hub_service/get_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync", + "title": "Snippet for the create_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing.", + "file": "analytics_hub_service/create_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "CreateListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync", + "title": "Snippet for the update_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing.", + "file": "analytics_hub_service/update_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "UpdateListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync", + "title": "Snippet for the delete_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing.", + "file": "analytics_hub_service/delete_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync", + "title": "Snippet for the subscribe_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing.", + "file": "analytics_hub_service/subscribe_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "subscribe_listing", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SubscribeListing", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubscribeListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync", + "title": "Snippet for the subscribe_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange.", + "file": "analytics_hub_service/subscribe_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "subscribe_data_exchange", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SubscribeDataExchange", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubscribeDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync", + "title": "Snippet for the refresh_subscription call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription.", + "file": "analytics_hub_service/refresh_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "refresh_subscription", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "RefreshSubscription", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.RefreshSubscription", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync", + "title": "Snippet for the get_subscription call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription.", + "file": "analytics_hub_service/get_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_subscription", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetSubscription", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetSubscription", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync", + "title": "Snippet for the list_subscriptions call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions.", + "file": "analytics_hub_service/list_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_subscriptions", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListSubscriptions", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListSubscriptions", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync", + "title": "Snippet for the list_shared_resource_subscriptions call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions.", + "file": "analytics_hub_service/list_shared_resource_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_shared_resource_subscriptions", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListSharedResourceSubscriptions", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListSharedResourceSubscriptions", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync", + "title": "Snippet for the revoke_subscription call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription.", + "file": "analytics_hub_service/revoke_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "revoke_subscription", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "RevokeSubscription", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.RevokeSubscription", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync", + "title": "Snippet for the delete_subscription call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription.", + "file": "analytics_hub_service/delete_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_subscription", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteSubscription", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteSubscription", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy.", + "file": "analytics_hub_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetIamPolicy", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy.", + "file": "analytics_hub_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SetIamPolicy", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions.", + "file": "analytics_hub_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.TestIamPermissions", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync", + "title": "Snippet for the create_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template.", + "file": "analytics_hub_service/create_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "CreateQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync", + "title": "Snippet for the get_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template.", + "file": "analytics_hub_service/get_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync", + "title": "Snippet for the list_query_templates call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates.", + "file": "analytics_hub_service/list_query_templates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_query_templates", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListQueryTemplates", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListQueryTemplates", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync", + "title": "Snippet for the update_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template.", + "file": "analytics_hub_service/update_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "UpdateQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync", + "title": "Snippet for the delete_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template.", + "file": "analytics_hub_service/delete_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync", + "title": "Snippet for the submit_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template.", + "file": "analytics_hub_service/submit_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "submit_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SubmitQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubmitQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync", + "title": "Snippet for the approve_query_template call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template.", + "file": "analytics_hub_service/approve_query_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "approve_query_template", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ApproveQueryTemplate", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ApproveQueryTemplate", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb new file mode 100644 index 000000000000..e4b6fc106ae7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" +require "google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" + +class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb new file mode 100644 index 000000000000..bda4e477568d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb @@ -0,0 +1,163 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" + +class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_data_exchange_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_exchange_path project: "value0", location: "value1", data_exchange: "value2" + assert_equal "projects/value0/locations/value1/dataExchanges/value2", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", dataset: "value1" + assert_equal "projects/value0/datasets/value1", path + end + end + + def test_listing_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.listing_path project: "value0", location: "value1", data_exchange: "value2", listing: "value3" + assert_equal "projects/value0/locations/value1/dataExchanges/value2/listings/value3", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_managed_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.managed_service_path service: "value0" + assert_equal "services/value0", path + end + end + + def test_query_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.query_template_path project: "value0", location: "value1", data_exchange: "value2", query_template: "value3" + assert_equal "projects/value0/locations/value1/dataExchanges/value2/queryTemplates/value3", path + end + end + + def test_routine_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.routine_path project: "value0", dataset: "value1", routine: "value2" + assert_equal "projects/value0/datasets/value1/routines/value2", path + end + end + + def test_subscription_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.subscription_path project: "value0", location: "value1", subscription: "value2" + assert_equal "projects/value0/locations/value1/subscriptions/value2", path + end + end + + def test_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_path project: "value0", dataset: "value1", table: "value2" + assert_equal "projects/value0/datasets/value1/tables/value2", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb new file mode 100644 index 000000000000..6738df9c8383 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb @@ -0,0 +1,1699 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" + + +class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_data_exchanges + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_data_exchanges_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_data_exchanges_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_exchanges_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_exchanges parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_exchanges_client_stub.call_count + end + end + end + + def test_list_org_data_exchanges + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + organization = "hello world" + page_size = 42 + page_token = "hello world" + + list_org_data_exchanges_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_org_data_exchanges_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_org_data_exchanges_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_org_data_exchanges organization: organization, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_org_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_org_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_org_data_exchanges_client_stub.call_count + end + end + end + + def test_get_data_exchange + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_exchange({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_exchange name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_exchange({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_exchange_client_stub.call_count + end + end + end + + def test_create_data_exchange + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_exchange_id = "hello world" + data_exchange = {} + + create_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_exchange_client_stub.call_count + end + end + end + + def test_update_data_exchange + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_exchange = {} + + update_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_exchange_client_stub.call_count + end + end + end + + def test_delete_data_exchange + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_exchange({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_exchange name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_exchange({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_exchange_client_stub.call_count + end + end + end + + def test_list_listings + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_listings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_listings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_listings_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_listings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_listings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_listings ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_listings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_listings(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_listings_client_stub.call_count + end + end + end + + def test_get_listing + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_listing({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_listing name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_listing({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_listing_client_stub.call_count + end + end + end + + def test_create_listing + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + listing_id = "hello world" + listing = {} + + create_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_listing parent: parent, listing_id: listing_id, listing: listing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_listing_client_stub.call_count + end + end + end + + def test_update_listing + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + listing = {} + + update_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_listing({ update_mask: update_mask, listing: listing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_listing update_mask: update_mask, listing: listing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_listing({ update_mask: update_mask, listing: listing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_listing_client_stub.call_count + end + end + end + + def test_delete_listing + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delete_commercial = true + + delete_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_listing({ name: name, delete_commercial: delete_commercial }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_listing name: name, delete_commercial: delete_commercial do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_listing({ name: name, delete_commercial: delete_commercial }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_listing_client_stub.call_count + end + end + end + + def test_subscribe_listing + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + destination_dataset = {} + name = "hello world" + + subscribe_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_subscribe_listing_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, subscribe_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.subscribe_listing destination_dataset: destination_dataset, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.subscribe_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.subscribe_listing({ destination_dataset: destination_dataset, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.subscribe_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, subscribe_listing_client_stub.call_count + end + end + end + + def test_subscribe_data_exchange + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination = "hello world" + destination_dataset = {} + subscription = "hello world" + subscriber_contact = "hello world" + + subscribe_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_subscribe_data_exchange_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, subscribe_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.subscribe_data_exchange name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.subscribe_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.subscribe_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, subscribe_data_exchange_client_stub.call_count + end + end + end + + def test_refresh_subscription + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + refresh_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_refresh_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, refresh_subscription_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.refresh_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.refresh_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.refresh_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.refresh_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.refresh_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, refresh_subscription_client_stub.call_count + end + end + end + + def test_get_subscription + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_subscription_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_subscription_client_stub.call_count + end + end + end + + def test_list_subscriptions + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_subscriptions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_subscriptions({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_subscriptions parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_subscriptions({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_subscriptions_client_stub.call_count + end + end + end + + def test_list_shared_resource_subscriptions + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + include_deleted_subscriptions = true + page_size = 42 + page_token = "hello world" + + list_shared_resource_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_shared_resource_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_shared_resource_subscriptions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_shared_resource_subscriptions resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_shared_resource_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_shared_resource_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_shared_resource_subscriptions_client_stub.call_count + end + end + end + + def test_revoke_subscription + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revoke_commercial = true + + revoke_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_revoke_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, revoke_subscription_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.revoke_subscription name: name, revoke_commercial: revoke_commercial do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.revoke_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.revoke_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, revoke_subscription_client_stub.call_count + end + end + end + + def test_delete_subscription + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_subscription_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_subscription_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_create_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query_template_id = "hello world" + query_template = {} + + create_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_query_template parent: parent, query_template_id: query_template_id, query_template: query_template do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_query_template_client_stub.call_count + end + end + end + + def test_get_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_query_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_query_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_query_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_query_template_client_stub.call_count + end + end + end + + def test_list_query_templates + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_query_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_query_templates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_query_templates_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_query_templates({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_query_templates parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_query_templates ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_query_templates({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_query_templates(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_query_templates_client_stub.call_count + end + end + end + + def test_update_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + query_template = {} + + update_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_query_template({ update_mask: update_mask, query_template: query_template }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_query_template update_mask: update_mask, query_template: query_template do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_query_template({ update_mask: update_mask, query_template: query_template }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_query_template_client_stub.call_count + end + end + end + + def test_delete_query_template + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_query_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_query_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_query_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_query_template_client_stub.call_count + end + end + end + + def test_submit_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + submit_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_submit_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, submit_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.submit_query_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.submit_query_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.submit_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.submit_query_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.submit_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, submit_query_template_client_stub.call_count + end + end + end + + def test_approve_query_template + # Create test objects. + client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + approve_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_approve_query_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, approve_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.approve_query_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.approve_query_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.approve_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.approve_query_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.approve_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, approve_query_template_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb new file mode 100644 index 000000000000..d7a2f31e978f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb @@ -0,0 +1,1914 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" +require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" + +class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_data_exchanges + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_exchanges, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_exchanges_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_exchanges parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_exchanges_client_stub.call_rpc_count + end + end + + def test_list_org_data_exchanges + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + organization = "hello world" + page_size = 42 + page_token = "hello world" + + list_org_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_org_data_exchanges, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, request + assert_equal "hello world", request["organization"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_org_data_exchanges_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_org_data_exchanges organization: organization, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_org_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_org_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_org_data_exchanges_client_stub.call_rpc_count + end + end + + def test_get_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_exchange({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_exchange name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_exchange({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_exchange_client_stub.call_rpc_count + end + end + + def test_create_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_exchange_id = "hello world" + data_exchange = {} + + create_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_exchange_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange), request["data_exchange"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_exchange_client_stub.call_rpc_count + end + end + + def test_update_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_exchange = {} + + update_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange), request["data_exchange"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_exchange_client_stub.call_rpc_count + end + end + + def test_delete_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_exchange({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_exchange name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_exchange({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_exchange_client_stub.call_rpc_count + end + end + + def test_list_listings + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_listings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_listings, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_listings_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_listings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_listings parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_listings ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_listings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_listings(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_listings_client_stub.call_rpc_count + end + end + + def test_get_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_listing({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_listing name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_listing({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_listing_client_stub.call_rpc_count + end + end + + def test_create_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + listing_id = "hello world" + listing = {} + + create_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["listing_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing), request["listing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_listing parent: parent, listing_id: listing_id, listing: listing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_listing_client_stub.call_rpc_count + end + end + + def test_update_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + listing = {} + + update_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing), request["listing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_listing({ update_mask: update_mask, listing: listing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_listing update_mask: update_mask, listing: listing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_listing({ update_mask: update_mask, listing: listing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_listing_client_stub.call_rpc_count + end + end + + def test_delete_listing + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delete_commercial = true + + delete_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["delete_commercial"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_listing({ name: name, delete_commercial: delete_commercial }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_listing name: name, delete_commercial: delete_commercial do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_listing({ name: name, delete_commercial: delete_commercial }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_listing_client_stub.call_rpc_count + end + end + + def test_subscribe_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + destination_dataset = {} + name = "hello world" + + subscribe_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :subscribe_listing, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset), request["destination_dataset"] + assert_equal :destination_dataset, request.destination + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, subscribe_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.subscribe_listing destination_dataset: destination_dataset, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.subscribe_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.subscribe_listing({ destination_dataset: destination_dataset, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.subscribe_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, subscribe_listing_client_stub.call_rpc_count + end + end + + def test_subscribe_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination = "hello world" + destination_dataset = {} + subscription = "hello world" + subscriber_contact = "hello world" + + subscribe_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :subscribe_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["destination"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset), request["destination_dataset"] + assert_equal "hello world", request["subscription"] + assert_equal "hello world", request["subscriber_contact"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, subscribe_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.subscribe_data_exchange name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.subscribe_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.subscribe_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, subscribe_data_exchange_client_stub.call_rpc_count + end + end + + def test_refresh_subscription + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + refresh_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :refresh_subscription, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, refresh_subscription_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.refresh_subscription({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.refresh_subscription name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.refresh_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.refresh_subscription({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.refresh_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, refresh_subscription_client_stub.call_rpc_count + end + end + + def test_get_subscription + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_subscription, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_subscription_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_subscription({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_subscription_client_stub.call_rpc_count + end + end + + def test_list_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_subscriptions, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_subscriptions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_subscriptions({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_subscriptions parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_subscriptions({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_subscriptions_client_stub.call_rpc_count + end + end + + def test_list_shared_resource_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + include_deleted_subscriptions = true + page_size = 42 + page_token = "hello world" + + list_shared_resource_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_shared_resource_subscriptions, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal true, request["include_deleted_subscriptions"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_shared_resource_subscriptions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_shared_resource_subscriptions resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_shared_resource_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_shared_resource_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_shared_resource_subscriptions_client_stub.call_rpc_count + end + end + + def test_revoke_subscription + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revoke_commercial = true + + revoke_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :revoke_subscription, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["revoke_commercial"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, revoke_subscription_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.revoke_subscription name: name, revoke_commercial: revoke_commercial do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.revoke_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.revoke_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, revoke_subscription_client_stub.call_rpc_count + end + end + + def test_delete_subscription + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_subscription, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_subscription_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_subscription({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_subscription name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_subscription({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_subscription_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_create_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query_template_id = "hello world" + query_template = {} + + create_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query_template_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate), request["query_template"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_query_template parent: parent, query_template_id: query_template_id, query_template: query_template do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_query_template_client_stub.call_rpc_count + end + end + + def test_get_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_query_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_query_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_query_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_query_template_client_stub.call_rpc_count + end + end + + def test_list_query_templates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_query_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_query_templates, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_query_templates_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_query_templates({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_query_templates parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_query_templates ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_query_templates({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_query_templates(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_query_templates_client_stub.call_rpc_count + end + end + + def test_update_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + query_template = {} + + update_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate), request["query_template"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_query_template({ update_mask: update_mask, query_template: query_template }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_query_template update_mask: update_mask, query_template: query_template do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_query_template({ update_mask: update_mask, query_template: query_template }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_query_template_client_stub.call_rpc_count + end + end + + def test_delete_query_template + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_query_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_query_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_query_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_query_template_client_stub.call_rpc_count + end + end + + def test_submit_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + submit_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :submit_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, submit_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.submit_query_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.submit_query_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.submit_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.submit_query_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.submit_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, submit_query_template_client_stub.call_rpc_count + end + end + + def test_approve_query_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + approve_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :approve_query_template, name + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, approve_query_template_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.approve_query_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.approve_query_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.approve_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.approve_query_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.approve_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, approve_query_template_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-connection-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-connection-v1/.repo-metadata.json new file mode 100644 index 000000000000..137868d89899 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "bigqueryconnection.googleapis.com", + "api_shortname": "bigqueryconnection", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-connection-v1/latest", + "distribution_name": "google-cloud-bigquery-connection-v1", + "is_cloud": true, + "language": "ruby", + "name": "bigqueryconnection", + "name_pretty": "BigQuery Connection V1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs/reference/bigqueryconnection", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The BigQuery Connection API allows users to manage BigQuery connections to external data sources. Note that google-cloud-bigquery-connection-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-connection instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BIGQUERY_CONNECTION", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/bigqueryconnection", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-connection-v1/.rubocop.yml new file mode 100644 index 000000000000..96bdb8ab4f80 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-connection-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-connection-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-connection-v1/.yardopts new file mode 100644 index 000000000000..745155345cd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Connection V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..bb4a847fed2a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-connection-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-connection-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/connection/v1" + +client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/connection/v1" + +::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-bigquery-connection-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/connection/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-connection-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/README.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/README.md new file mode 100644 index 000000000000..812740de6cb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Connection V1 API + +Allows users to manage BigQuery connections to external data sources. + +The BigQuery Connection API allows users to manage BigQuery connections to external data sources. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Connection V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-connection](https://rubygems.org/gems/google-cloud-bigquery-connection). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-connection-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/bigqueryconnection.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/connection/v1" + +client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new +request = ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new # (request fields as keyword arguments...) +response = client.create_connection request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-connection-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/bigqueryconnection) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/bigquery/connection/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-bigquery-connection`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-connection-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-connection`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-bigquery-connection-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-connection-v1/Rakefile new file mode 100644 index 000000000000..c30d4af45324 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-connection-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BIGQUERY_CONNECTION_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BIGQUERY_CONNECTION_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BIGQUERY_CONNECTION_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BIGQUERY_CONNECTION_TEST_PROJECT=test123 BIGQUERY_CONNECTION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/connection/v1/connection_service/credentials" + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BIGQUERY_CONNECTION_PROJECT"] = project + ENV["BIGQUERY_CONNECTION_TEST_PROJECT"] = project + ENV["BIGQUERY_CONNECTION_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-connection-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-connection-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-connection-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-connection-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-connection-v1" + header "google-cloud-bigquery-connection-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-connection-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-connection-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-connection-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-connection-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-connection-v1/gapic_metadata.json new file mode 100644 index 000000000000..561e530ec862 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.connection.v1", + "libraryPackage": "::Google::Cloud::Bigquery::Connection::V1", + "services": { + "ConnectionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client", + "rpcs": { + "CreateConnection": { + "methods": [ + "create_connection" + ] + }, + "GetConnection": { + "methods": [ + "get_connection" + ] + }, + "ListConnections": { + "methods": [ + "list_connections" + ] + }, + "UpdateConnection": { + "methods": [ + "update_connection" + ] + }, + "DeleteConnection": { + "methods": [ + "delete_connection" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec new file mode 100644 index 000000000000..0d6c71d0297e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/connection/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-connection-v1" + gem.version = Google::Cloud::Bigquery::Connection::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The BigQuery Connection API allows users to manage BigQuery connections to external data sources. Note that google-cloud-bigquery-connection-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-connection instead. See the readme for more details." + gem.summary = "Allows users to manage BigQuery connections to external data sources." + 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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google-cloud-bigquery-connection-v1.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google-cloud-bigquery-connection-v1.rb new file mode 100644 index 000000000000..32fd5f734450 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google-cloud-bigquery-connection-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/connection/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1.rb new file mode 100644 index 000000000000..d79993abf9d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/connection/v1/connection_service" +require "google/cloud/bigquery/connection/v1/version" + +module Google + module Cloud + module Bigquery + module Connection + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/connection/v1" + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/connection/v1" + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/connection/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_pb.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_pb.rb new file mode 100644 index 000000000000..2235398a9ca7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/connection/v1/connection.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n4google/cloud/bigquery/connection/v1/connection.proto\x12#google.cloud.bigquery.connection.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xba\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rconnection_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12H\n\nconnection\x18\x03 \x01(\x0b\x32/.google.cloud.bigquery.connection.v1.ConnectionB\x03\xe0\x41\x02\"Z\n\x14GetConnectionRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\"\x7f\n\x16ListConnectionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x03 \x01(\t\"x\n\x17ListConnectionsResponse\x12\x17\n\x0fnext_page_token\x18\x01 \x01(\t\x12\x44\n\x0b\x63onnections\x18\x02 \x03(\x0b\x32/.google.cloud.bigquery.connection.v1.Connection\"\xdd\x01\n\x17UpdateConnectionRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\x12H\n\nconnection\x18\x02 \x01(\x0b\x32/.google.cloud.bigquery.connection.v1.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"]\n\x17\x44\x65leteConnectionRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\"\xda\x06\n\nConnection\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rfriendly_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12L\n\tcloud_sql\x18\x04 \x01(\x0b\x32\x37.google.cloud.bigquery.connection.v1.CloudSqlPropertiesH\x00\x12\x41\n\x03\x61ws\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.connection.v1.AwsPropertiesH\x00\x12\x45\n\x05\x61zure\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.connection.v1.AzurePropertiesH\x00\x12T\n\rcloud_spanner\x18\x15 \x01(\x0b\x32;.google.cloud.bigquery.connection.v1.CloudSpannerPropertiesH\x00\x12V\n\x0e\x63loud_resource\x18\x16 \x01(\x0b\x32<.google.cloud.bigquery.connection.v1.CloudResourcePropertiesH\x00\x12\x45\n\x05spark\x18\x17 \x01(\x0b\x32\x34.google.cloud.bigquery.connection.v1.SparkPropertiesH\x00\x12h\n\x15salesforce_data_cloud\x18\x18 \x01(\x0b\x32\x42.google.cloud.bigquery.connection.v1.SalesforceDataCloudPropertiesB\x03\xe0\x41\x01H\x00\x12\x1a\n\rcreation_time\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12last_modified_time\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0ehas_credential\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03:s\xea\x41p\n,bigqueryconnection.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"\xca\x02\n\x12\x43loudSqlProperties\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12R\n\x04type\x18\x03 \x01(\x0e\x32\x44.google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType\x12P\n\ncredential\x18\x04 \x01(\x0b\x32\x37.google.cloud.bigquery.connection.v1.CloudSqlCredentialB\x03\xe0\x41\x04\x12\x1f\n\x12service_account_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\"F\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08POSTGRES\x10\x01\x12\t\n\x05MYSQL\x10\x02\"8\n\x12\x43loudSqlCredential\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xb2\x01\n\x16\x43loudSpannerProperties\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x17\n\x0fuse_parallelism\x18\x02 \x01(\x08\x12\x17\n\x0fmax_parallelism\x18\x05 \x01(\x05\x12 \n\x18use_serverless_analytics\x18\x03 \x01(\x08\x12\x16\n\x0euse_data_boost\x18\x06 \x01(\x08\x12\x1a\n\rdatabase_role\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xcf\x01\n\rAwsProperties\x12Z\n\x12\x63ross_account_role\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.connection.v1.AwsCrossAccountRoleB\x02\x18\x01H\x00\x12I\n\x0b\x61\x63\x63\x65ss_role\x18\x03 \x01(\x0b\x32\x32.google.cloud.bigquery.connection.v1.AwsAccessRoleH\x00\x42\x17\n\x15\x61uthentication_method\"^\n\x13\x41wsCrossAccountRole\x12\x13\n\x0biam_role_id\x18\x01 \x01(\t\x12\x18\n\x0biam_user_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\"6\n\rAwsAccessRole\x12\x13\n\x0biam_role_id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\"\xcd\x01\n\x0f\x41zureProperties\x12\x18\n\x0b\x61pplication\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tclient_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tobject_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\x12\x63ustomer_tenant_id\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x05 \x01(\t\x12\'\n\x1f\x66\x65\x64\x65rated_application_client_id\x18\x06 \x01(\t\x12\x15\n\x08identity\x18\x07 \x01(\tB\x03\xe0\x41\x03\":\n\x17\x43loudResourceProperties\x12\x1f\n\x12service_account_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\"]\n\x16MetastoreServiceConfig\x12\x43\n\x11metastore_service\x18\x01 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n metastore.googleapis.com/Service\"]\n\x18SparkHistoryServerConfig\x12\x41\n\x10\x64\x61taproc_cluster\x18\x01 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x64\x61taproc.googleapis.com/Cluster\"\xff\x01\n\x0fSparkProperties\x12\x1f\n\x12service_account_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x18metastore_service_config\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.connection.v1.MetastoreServiceConfigB\x03\xe0\x41\x01\x12g\n\x1bspark_history_server_config\x18\x04 \x01(\x0b\x32=.google.cloud.bigquery.connection.v1.SparkHistoryServerConfigB\x03\xe0\x41\x01\"_\n\x1dSalesforceDataCloudProperties\x12\x14\n\x0cinstance_uri\x18\x01 \x01(\t\x12\x15\n\x08identity\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\ttenant_id\x18\x03 \x01(\t2\xcc\r\n\x11\x43onnectionService\x12\xe8\x01\n\x10\x43reateConnection\x12<.google.cloud.bigquery.connection.v1.CreateConnectionRequest\x1a/.google.cloud.bigquery.connection.v1.Connection\"e\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/connections:\nconnection\x12\xbb\x01\n\rGetConnection\x12\x39.google.cloud.bigquery.connection.v1.GetConnectionRequest\x1a/.google.cloud.bigquery.connection.v1.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/connections/*}\x12\xce\x01\n\x0fListConnections\x12;.google.cloud.bigquery.connection.v1.ListConnectionsRequest\x1a<.google.cloud.bigquery.connection.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/connections\x12\xe4\x01\n\x10UpdateConnection\x12<.google.cloud.bigquery.connection.v1.UpdateConnectionRequest\x1a/.google.cloud.bigquery.connection.v1.Connection\"a\xda\x41\x1bname,connection,update_mask\x82\xd3\xe4\x93\x02=2//v1/{name=projects/*/locations/*/connections/*}:\nconnection\x12\xa8\x01\n\x10\x44\x65leteConnection\x12<.google.cloud.bigquery.connection.v1.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/connections/*}\x12\xa9\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"^\xda\x41\x10resource,options\x82\xd3\xe4\x93\x02\x45\"@/v1/{resource=projects/*/locations/*/connections/*}:getIamPolicy:\x01*\x12\xa8\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"]\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x45\"@/v1/{resource=projects/*/locations/*/connections/*}:setIamPolicy:\x01*\x12\xd3\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"h\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02K\"F/v1/{resource=projects/*/locations/*/connections/*}:testIamPermissions:\x01*\x1a~\xca\x41!bigqueryconnection.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xfd\x02\n\'com.google.cloud.bigquery.connection.v1P\x01ZGcloud.google.com/go/bigquery/connection/apiv1/connectionpb;connectionpb\xaa\x02#Google.Cloud.BigQuery.Connection.V1\xca\x02#Google\\Cloud\\BigQuery\\Connection\\V1\xea\x41Y\n\x1f\x64\x61taproc.googleapis.com/Cluster\x12\x36projects/{project}/regions/{region}/clusters/{cluster}\xea\x41^\n metastore.googleapis.com/Service\x12:projects/{project}/locations/{location}/services/{service}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Connection + module V1 + CreateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CreateConnectionRequest").msgclass + GetConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.GetConnectionRequest").msgclass + ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.ListConnectionsRequest").msgclass + ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.ListConnectionsResponse").msgclass + UpdateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.UpdateConnectionRequest").msgclass + DeleteConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.DeleteConnectionRequest").msgclass + Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.Connection").msgclass + CloudSqlProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlProperties").msgclass + CloudSqlProperties::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType").enummodule + CloudSqlCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlCredential").msgclass + CloudSpannerProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSpannerProperties").msgclass + AwsProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsProperties").msgclass + AwsCrossAccountRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsCrossAccountRole").msgclass + AwsAccessRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsAccessRole").msgclass + AzureProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AzureProperties").msgclass + CloudResourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudResourceProperties").msgclass + MetastoreServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.MetastoreServiceConfig").msgclass + SparkHistoryServerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.SparkHistoryServerConfig").msgclass + SparkProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.SparkProperties").msgclass + SalesforceDataCloudProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service.rb new file mode 100644 index 000000000000..d4140bdaa896 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/connection/v1/version" + +require "google/cloud/bigquery/connection/v1/connection_service/credentials" +require "google/cloud/bigquery/connection/v1/connection_service/paths" +require "google/cloud/bigquery/connection/v1/connection_service/client" +require "google/cloud/bigquery/connection/v1/connection_service/rest" + +module Google + module Cloud + module Bigquery + module Connection + module V1 + ## + # Manages external data source connections and credentials. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/connection/v1/connection_service" + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/connection/v1/connection_service/rest" + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + module ConnectionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "connection_service", "helpers.rb" +require "google/cloud/bigquery/connection/v1/connection_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb new file mode 100644 index 000000000000..4eb76da7998d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb @@ -0,0 +1,1202 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/connection/v1/connection_pb" + +module Google + module Cloud + module Bigquery + module Connection + module V1 + module ConnectionService + ## + # Client for the ConnectionService service. + # + # Manages external data source connections and credentials. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigqueryconnection.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :connection_service_stub + + ## + # Configure the ConnectionService Client class. + # + # See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConnectionService clients + # ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "Connection", "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_connection.timeout = 60.0 + + default_config.rpcs.get_connection.timeout = 60.0 + default_config.rpcs.get_connection.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_connections.timeout = 60.0 + default_config.rpcs.list_connections.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_connection.timeout = 60.0 + + default_config.rpcs.delete_connection.timeout = 60.0 + default_config.rpcs.delete_connection.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConnectionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @connection_service_stub.universe_domain + end + + ## + # Create a new ConnectionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConnectionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/bigquery/connection/v1/connection_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @connection_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @connection_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 + @connection_service_stub.logger + end + + # Service calls + + ## + # Creates a new connection. + # + # @overload create_connection(request, options = nil) + # Pass arguments to `create_connection` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_connection(parent: nil, connection_id: nil, connection: nil) + # Pass arguments to `create_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # Must be in the format `projects/{project_id}/locations/{location_id}` + # @param connection_id [::String] + # Optional. Connection id that should be assigned to the created connection. + # @param connection [::Google::Cloud::Bigquery::Connection::V1::Connection, ::Hash] + # Required. Connection to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new + # + # # Call the create_connection method. + # result = client.create_connection request + # + # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + # p result + # + def create_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.call_rpc :create_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns specified connection. + # + # @overload get_connection(request, options = nil) + # Pass arguments to `get_connection` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_connection(name: nil) + # Pass arguments to `get_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested connection, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new + # + # # Call the get_connection method. + # result = client.get_connection request + # + # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + # p result + # + def get_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.call_rpc :get_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of connections in the given project. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_connections(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # Must be in the form: `projects/{project_id}/locations/{location_id}` + # @param page_size [::Integer] + # Required. Page size. + # @param page_token [::String] + # Page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Connection::V1::Connection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Connection::V1::Connection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Connection::V1::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.call_rpc :list_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @connection_service_stub, :list_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified connection. For security reasons, also resets + # credential if connection properties are in the update field mask. + # + # @overload update_connection(request, options = nil) + # Pass arguments to `update_connection` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_connection(name: nil, connection: nil, update_mask: nil) + # Pass arguments to `update_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the connection to update, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # @param connection [::Google::Cloud::Bigquery::Connection::V1::Connection, ::Hash] + # Required. Connection containing the updated fields. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Update mask for the connection fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new + # + # # Call the update_connection method. + # result = client.update_connection request + # + # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + # p result + # + def update_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.call_rpc :update_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes connection and associated credential. + # + # @overload delete_connection(request, options = nil) + # Pass arguments to `delete_connection` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_connection(name: nil) + # Pass arguments to `delete_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the deleted connection, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new + # + # # Call the delete_connection method. + # result = client.delete_connection request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.call_rpc :delete_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION + metadata[:"x-goog-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 + + @connection_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION + metadata[:"x-goog-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 + + @connection_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a `NOT_FOUND` error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION + metadata[:"x-goog-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 + + @connection_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConnectionService API. + # + # This class represents the configuration for ConnectionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_connection to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_connection.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_connection.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "bigqueryconnection.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConnectionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connection + ## + # RPC-specific configuration for `get_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connection + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + ## + # RPC-specific configuration for `update_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connection + ## + # RPC-specific configuration for `delete_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connection + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection + @create_connection = ::Gapic::Config::Method.new create_connection_config + get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection + @get_connection = ::Gapic::Config::Method.new get_connection_config + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection + @update_connection = ::Gapic::Config::Method.new update_connection_config + delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection + @delete_connection = ::Gapic::Config::Method.new delete_connection_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/credentials.rb new file mode 100644 index 000000000000..176f6fd7904c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/credentials.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module Connection + module V1 + module ConnectionService + # Credentials for the ConnectionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BIGQUERY_CONNECTION_CREDENTIALS", + "BIGQUERY_CONNECTION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BIGQUERY_CONNECTION_CREDENTIALS_JSON", + "BIGQUERY_CONNECTION_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/paths.rb new file mode 100644 index 000000000000..4381ee78ebc8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/paths.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Connection + module V1 + module ConnectionService + # Path helper methods for the ConnectionService API. + module Paths + ## + # Create a fully-qualified Cluster resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/clusters/{cluster}` + # + # @param project [String] + # @param region [String] + # @param cluster [String] + # + # @return [::String] + def cluster_path project:, region:, cluster: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/clusters/#{cluster}" + end + + ## + # Create a fully-qualified Connection resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # + # @return [::String] + def connection_path project:, location:, connection: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}" + 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 Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/services/#{service}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest.rb new file mode 100644 index 000000000000..bad778c25357 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/connection/v1/version" + +require "google/cloud/bigquery/connection/v1/connection_service/credentials" +require "google/cloud/bigquery/connection/v1/connection_service/paths" +require "google/cloud/bigquery/connection/v1/connection_service/rest/client" + +module Google + module Cloud + module Bigquery + module Connection + module V1 + ## + # Manages external data source connections and credentials. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/connection/v1/connection_service/rest" + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + module ConnectionService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/connection/v1/connection_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/client.rb new file mode 100644 index 000000000000..d0206f090d15 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/client.rb @@ -0,0 +1,1103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/connection/v1/connection_pb" +require "google/cloud/bigquery/connection/v1/connection_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module Connection + module V1 + module ConnectionService + module Rest + ## + # REST client for the ConnectionService service. + # + # Manages external data source connections and credentials. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigqueryconnection.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :connection_service_stub + + ## + # Configure the ConnectionService Client class. + # + # See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConnectionService clients + # ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "Connection", "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_connection.timeout = 60.0 + + default_config.rpcs.get_connection.timeout = 60.0 + default_config.rpcs.get_connection.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_connections.timeout = 60.0 + default_config.rpcs.list_connections.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_connection.timeout = 60.0 + + default_config.rpcs.delete_connection.timeout = 60.0 + default_config.rpcs.delete_connection.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConnectionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::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 + @connection_service_stub.universe_domain + end + + ## + # Create a new ConnectionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConnectionService 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 + + @connection_service_stub = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @connection_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 + @connection_service_stub.logger + end + + # Service calls + + ## + # Creates a new connection. + # + # @overload create_connection(request, options = nil) + # Pass arguments to `create_connection` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_connection(parent: nil, connection_id: nil, connection: nil) + # Pass arguments to `create_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # Must be in the format `projects/{project_id}/locations/{location_id}` + # @param connection_id [::String] + # Optional. Connection id that should be assigned to the created connection. + # @param connection [::Google::Cloud::Bigquery::Connection::V1::Connection, ::Hash] + # Required. Connection to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new + # + # # Call the create_connection method. + # result = client.create_connection request + # + # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + # p result + # + def create_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.create_connection request, 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 specified connection. + # + # @overload get_connection(request, options = nil) + # Pass arguments to `get_connection` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_connection(name: nil) + # Pass arguments to `get_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested connection, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new + # + # # Call the get_connection method. + # result = client.get_connection request + # + # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + # p result + # + def get_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.get_connection request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of connections in the given project. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_connections(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # Must be in the form: `projects/{project_id}/locations/{location_id}` + # @param page_size [::Integer] + # Required. Page size. + # @param page_token [::String] + # Page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Connection::V1::Connection>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Connection::V1::Connection>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Connection::V1::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_connections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.list_connections request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @connection_service_stub, :list_connections, "connections", request, result, 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 connection. For security reasons, also resets + # credential if connection properties are in the update field mask. + # + # @overload update_connection(request, options = nil) + # Pass arguments to `update_connection` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_connection(name: nil, connection: nil, update_mask: nil) + # Pass arguments to `update_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the connection to update, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # @param connection [::Google::Cloud::Bigquery::Connection::V1::Connection, ::Hash] + # Required. Connection containing the updated fields. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Update mask for the connection fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new + # + # # Call the update_connection method. + # result = client.update_connection request + # + # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + # p result + # + def update_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.update_connection request, 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 connection and associated credential. + # + # @overload delete_connection(request, options = nil) + # Pass arguments to `delete_connection` via a request object, either of type + # {::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_connection(name: nil) + # Pass arguments to `delete_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the deleted connection, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new + # + # # Call the delete_connection method. + # result = client.delete_connection request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @connection_service_stub.delete_connection request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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 + + @connection_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @connection_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a `NOT_FOUND` error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/connection/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @connection_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ConnectionService REST API. + # + # This class represents the configuration for ConnectionService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_connection to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_connection.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_connection.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "bigqueryconnection.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ConnectionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connection + ## + # RPC-specific configuration for `get_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connection + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + ## + # RPC-specific configuration for `update_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connection + ## + # RPC-specific configuration for `delete_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connection + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection + @create_connection = ::Gapic::Config::Method.new create_connection_config + get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection + @get_connection = ::Gapic::Config::Method.new get_connection_config + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection + @update_connection = ::Gapic::Config::Method.new update_connection_config + delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection + @delete_connection = ::Gapic::Config::Method.new delete_connection_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/service_stub.rb new file mode 100644 index 000000000000..73162bbb8e85 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/service_stub.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/bigquery/connection/v1/connection_pb" + +module Google + module Cloud + module Bigquery + module Connection + module V1 + module ConnectionService + module Rest + ## + # REST service stub for the ConnectionService 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_connection REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # A result object deserialized from the server's reply + def create_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Connection::V1::Connection.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_connection REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # A result object deserialized from the server's reply + def get_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Connection::V1::Connection.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_connections REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse] + # A result object deserialized from the server's reply + def list_connections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_connections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_connection REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # A result object deserialized from the server's reply + def update_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Connection::V1::Connection.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_connection REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_connection REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/connections", + body: "connection", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_connection REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_connections REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_connections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/connections", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_connection REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "connection", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_connection REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb new file mode 100644 index 000000000000..3ae4a6f5dca0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb @@ -0,0 +1,73 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/connection/v1/connection.proto for package 'google.cloud.bigquery.connection.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/bigquery/connection/v1/connection_pb' + +module Google + module Cloud + module Bigquery + module Connection + module V1 + module ConnectionService + # Manages external data source connections and credentials. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.connection.v1.ConnectionService' + + # Creates a new connection. + rpc :CreateConnection, ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest, ::Google::Cloud::Bigquery::Connection::V1::Connection + # Returns specified connection. + rpc :GetConnection, ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest, ::Google::Cloud::Bigquery::Connection::V1::Connection + # Returns a list of connections in the given project. + rpc :ListConnections, ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest, ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse + # Updates the specified connection. For security reasons, also resets + # credential if connection properties are in the update field mask. + rpc :UpdateConnection, ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest, ::Google::Cloud::Bigquery::Connection::V1::Connection + # Deletes connection and associated credential. + rpc :DeleteConnection, ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest, ::Google::Protobuf::Empty + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a `NOT_FOUND` error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/rest.rb new file mode 100644 index 000000000000..60a27346974b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/connection/v1/connection_service/rest" +require "google/cloud/bigquery/connection/v1/version" + +module Google + module Cloud + module Bigquery + module Connection + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/connection/v1/rest" + # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/version.rb new file mode 100644 index 000000000000..75be6e0a8d53 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Connection + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/README.md new file mode 100644 index 000000000000..c8c765733a5d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Connection V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/cloud/bigquery/connection/v1/connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/cloud/bigquery/connection/v1/connection.rb new file mode 100644 index 000000000000..6e7a038c7c2c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/cloud/bigquery/connection/v1/connection.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! + + +module Google + module Cloud + module Bigquery + module Connection + module V1 + # The request for + # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#create_connection ConnectionService.CreateConnection}. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # Must be in the format `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] connection_id + # @return [::String] + # Optional. Connection id that should be assigned to the created connection. + # @!attribute [rw] connection + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # Required. Connection to create. + class CreateConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_connection ConnectionService.GetConnection}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested connection, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + class GetConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections ConnectionService.ListConnections}. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # Must be in the form: `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Required. Page size. + # @!attribute [rw] page_token + # @return [::String] + # Page token. + class ListConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections ConnectionService.ListConnections}. + # @!attribute [rw] next_page_token + # @return [::String] + # Next page token. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::Bigquery::Connection::V1::Connection>] + # List of connections. + class ListConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#update_connection ConnectionService.UpdateConnection}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the connection to update, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # @!attribute [rw] connection + # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] + # Required. Connection containing the updated fields. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Update mask for the connection fields to be updated. + class UpdateConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for [ConnectionService.DeleteConnectionRequest][]. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the deleted connection, for example: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + class DeleteConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration parameters to establish connection with an external data + # source, except the credential attributes. + # @!attribute [rw] name + # @return [::String] + # The resource name of the connection in the form of: + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # @!attribute [rw] friendly_name + # @return [::String] + # User provided display name for the connection. + # @!attribute [rw] description + # @return [::String] + # User provided description. + # @!attribute [rw] cloud_sql + # @return [::Google::Cloud::Bigquery::Connection::V1::CloudSqlProperties] + # Cloud SQL properties. + # + # Note: The following fields are mutually exclusive: `cloud_sql`, `aws`, `azure`, `cloud_spanner`, `cloud_resource`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] aws + # @return [::Google::Cloud::Bigquery::Connection::V1::AwsProperties] + # Amazon Web Services (AWS) properties. + # + # Note: The following fields are mutually exclusive: `aws`, `cloud_sql`, `azure`, `cloud_spanner`, `cloud_resource`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure + # @return [::Google::Cloud::Bigquery::Connection::V1::AzureProperties] + # Azure properties. + # + # Note: The following fields are mutually exclusive: `azure`, `cloud_sql`, `aws`, `cloud_spanner`, `cloud_resource`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_spanner + # @return [::Google::Cloud::Bigquery::Connection::V1::CloudSpannerProperties] + # Cloud Spanner properties. + # + # Note: The following fields are mutually exclusive: `cloud_spanner`, `cloud_sql`, `aws`, `azure`, `cloud_resource`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_resource + # @return [::Google::Cloud::Bigquery::Connection::V1::CloudResourceProperties] + # Cloud Resource properties. + # + # Note: The following fields are mutually exclusive: `cloud_resource`, `cloud_sql`, `aws`, `azure`, `cloud_spanner`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] spark + # @return [::Google::Cloud::Bigquery::Connection::V1::SparkProperties] + # Spark properties. + # + # Note: The following fields are mutually exclusive: `spark`, `cloud_sql`, `aws`, `azure`, `cloud_spanner`, `cloud_resource`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] salesforce_data_cloud + # @return [::Google::Cloud::Bigquery::Connection::V1::SalesforceDataCloudProperties] + # Optional. Salesforce DataCloud properties. This field is intended for + # use only by Salesforce partner projects. This field contains properties + # for your Salesforce DataCloud connection. + # + # Note: The following fields are mutually exclusive: `salesforce_data_cloud`, `cloud_sql`, `aws`, `azure`, `cloud_spanner`, `cloud_resource`, `spark`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] creation_time + # @return [::Integer] + # Output only. The creation timestamp of the connection. + # @!attribute [r] last_modified_time + # @return [::Integer] + # Output only. The last update timestamp of the connection. + # @!attribute [r] has_credential + # @return [::Boolean] + # Output only. True, if credential is configured for this connection. + class Connection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Connection properties specific to the Cloud SQL. + # @!attribute [rw] instance_id + # @return [::String] + # Cloud SQL instance ID in the form `project:location:instance`. + # @!attribute [rw] database + # @return [::String] + # Database name. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Connection::V1::CloudSqlProperties::DatabaseType] + # Type of the Cloud SQL database. + # @!attribute [rw] credential + # @return [::Google::Cloud::Bigquery::Connection::V1::CloudSqlCredential] + # Input only. Cloud SQL credential. + # @!attribute [r] service_account_id + # @return [::String] + # Output only. The account ID of the service used for the purpose of this + # connection. + # + # When the connection is used in the context of an operation in + # BigQuery, this service account will serve as the identity being used for + # connecting to the CloudSQL instance specified in this connection. + class CloudSqlProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported Cloud SQL database types. + module DatabaseType + # Unspecified database type. + DATABASE_TYPE_UNSPECIFIED = 0 + + # Cloud SQL for PostgreSQL. + POSTGRES = 1 + + # Cloud SQL for MySQL. + MYSQL = 2 + end + end + + # Credential info for the Cloud SQL. + # @!attribute [rw] username + # @return [::String] + # The username for the credential. + # @!attribute [rw] password + # @return [::String] + # The password for the credential. + class CloudSqlCredential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Connection properties specific to Cloud Spanner. + # @!attribute [rw] database + # @return [::String] + # Cloud Spanner database in the form `project/instance/database' + # @!attribute [rw] use_parallelism + # @return [::Boolean] + # If parallelism should be used when reading from Cloud Spanner + # @!attribute [rw] max_parallelism + # @return [::Integer] + # Allows setting max parallelism per query when executing on Spanner + # independent compute resources. If unspecified, default values of + # parallelism are chosen that are dependent on the Cloud Spanner instance + # configuration. + # + # REQUIRES: `use_parallelism` must be set. + # REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be + # set. + # @!attribute [rw] use_serverless_analytics + # @return [::Boolean] + # If the serverless analytics service should be used to read data from Cloud + # Spanner. + # Note: `use_parallelism` must be set when using serverless analytics. + # @!attribute [rw] use_data_boost + # @return [::Boolean] + # If set, the request will be executed via Spanner independent compute + # resources. + # REQUIRES: `use_parallelism` must be set. + # + # NOTE: `use_serverless_analytics` will be deprecated. Prefer + # `use_data_boost` over `use_serverless_analytics`. + # @!attribute [rw] database_role + # @return [::String] + # Optional. Cloud Spanner database role for fine-grained access control. + # The Cloud Spanner admin should have provisioned the database role with + # appropriate permissions, such as `SELECT` and `INSERT`. Other users should + # only use roles provided by their Cloud Spanner admins. + # + # For more details, see [About fine-grained access control] + # (https://cloud.google.com/spanner/docs/fgac-about). + # + # REQUIRES: The database role name must start with a letter, and can only + # contain letters, numbers, and underscores. + class CloudSpannerProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Connection properties specific to Amazon Web Services (AWS). + # @!attribute [rw] cross_account_role + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Bigquery::Connection::V1::AwsCrossAccountRole] + # Authentication using Google owned AWS IAM user's access key to assume + # into customer's AWS IAM Role. + # Deprecated, do not use. + # + # Note: The following fields are mutually exclusive: `cross_account_role`, `access_role`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] access_role + # @return [::Google::Cloud::Bigquery::Connection::V1::AwsAccessRole] + # Authentication using Google owned service account to assume into + # customer's AWS IAM Role. + # + # Note: The following fields are mutually exclusive: `access_role`, `cross_account_role`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AwsProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Authentication method for Amazon Web Services (AWS) that uses Google owned + # AWS IAM user's access key to assume into customer's AWS IAM Role. + # @!attribute [rw] iam_role_id + # @return [::String] + # The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + # Connection. + # @!attribute [r] iam_user_id + # @return [::String] + # Output only. Google-owned AWS IAM User for a Connection. + # @!attribute [r] external_id + # @return [::String] + # Output only. A Google-generated id for representing Connection’s identity + # in AWS. External Id is also used for preventing the Confused Deputy + # Problem. See + # https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html + class AwsCrossAccountRole + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Authentication method for Amazon Web Services (AWS) that uses Google owned + # Google service account to assume into customer's AWS IAM Role. + # @!attribute [rw] iam_role_id + # @return [::String] + # The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + # Connection. + # @!attribute [rw] identity + # @return [::String] + # A unique Google-owned and Google-generated identity for the Connection. + # This identity will be used to access the user's AWS IAM Role. + class AwsAccessRole + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for connection properties specific to Azure. + # @!attribute [r] application + # @return [::String] + # Output only. The name of the Azure Active Directory Application. + # @!attribute [r] client_id + # @return [::String] + # Output only. The client id of the Azure Active Directory Application. + # @!attribute [r] object_id + # @return [::String] + # Output only. The object id of the Azure Active Directory Application. + # @!attribute [rw] customer_tenant_id + # @return [::String] + # The id of customer's directory that host the data. + # @!attribute [rw] redirect_uri + # @return [::String] + # The URL user will be redirected to after granting consent during connection + # setup. + # @!attribute [rw] federated_application_client_id + # @return [::String] + # The client ID of the user's Azure Active Directory Application used for a + # federated connection. + # @!attribute [r] identity + # @return [::String] + # Output only. A unique Google-owned and Google-generated identity for the + # Connection. This identity will be used to access the user's Azure Active + # Directory Application. + class AzureProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for connection properties for delegation of access to GCP + # resources. + # @!attribute [r] service_account_id + # @return [::String] + # Output only. The account ID of the service created for the purpose of this + # connection. + # + # The service account does not have any permissions associated with it + # when it is created. After creation, customers delegate permissions + # to the service account. When the connection is used in the context of an + # operation in BigQuery, the service account will be used to connect to the + # desired resources in GCP. + # + # The account ID is in the form of: + # @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com + class CloudResourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration of the Dataproc Metastore Service. + # @!attribute [rw] metastore_service + # @return [::String] + # Optional. Resource name of an existing Dataproc Metastore service. + # + # Example: + # + # * `projects/[project_id]/locations/[region]/services/[service_id]` + class MetastoreServiceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration of the Spark History Server. + # @!attribute [rw] dataproc_cluster + # @return [::String] + # Optional. Resource name of an existing Dataproc Cluster to act as a Spark + # History Server for the connection. + # + # Example: + # + # * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` + class SparkHistoryServerConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for connection properties to execute stored procedures for Apache + # Spark. + # @!attribute [r] service_account_id + # @return [::String] + # Output only. The account ID of the service created for the purpose of this + # connection. + # + # The service account does not have any permissions associated with it when + # it is created. After creation, customers delegate permissions to the + # service account. When the connection is used in the context of a stored + # procedure for Apache Spark in BigQuery, the service account is used to + # connect to the desired resources in Google Cloud. + # + # The account ID is in the form of: + # bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com + # @!attribute [rw] metastore_service_config + # @return [::Google::Cloud::Bigquery::Connection::V1::MetastoreServiceConfig] + # Optional. Dataproc Metastore Service configuration for the connection. + # @!attribute [rw] spark_history_server_config + # @return [::Google::Cloud::Bigquery::Connection::V1::SparkHistoryServerConfig] + # Optional. Spark History Server configuration for the connection. + class SparkProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Connection properties specific to Salesforce DataCloud. This is intended for + # use only by Salesforce partner projects. + # @!attribute [rw] instance_uri + # @return [::String] + # The URL to the user's Salesforce DataCloud instance. + # @!attribute [r] identity + # @return [::String] + # Output only. A unique Google-owned and Google-generated service account + # identity for the connection. + # @!attribute [rw] tenant_id + # @return [::String] + # The ID of the user's Salesforce tenant. + class SalesforceDataCloudProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/Gemfile new file mode 100644 index 000000000000..f9b4542516a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-connection-v1", path: "../" +else + gem "google-cloud-bigquery-connection-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/create_connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/create_connection.rb new file mode 100644 index 000000000000..f1946b18ab01 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/create_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync] +require "google/cloud/bigquery/connection/v1" + +## +# Snippet for the create_connection call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#create_connection. +# +def create_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new + + # Call the create_connection method. + result = client.create_connection request + + # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + p result +end +# [END bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/delete_connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/delete_connection.rb new file mode 100644 index 000000000000..a6d2dd64ad99 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/delete_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync] +require "google/cloud/bigquery/connection/v1" + +## +# Snippet for the delete_connection call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#delete_connection. +# +def delete_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new + + # Call the delete_connection method. + result = client.delete_connection request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_connection.rb new file mode 100644 index 000000000000..63f5465b20e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync] +require "google/cloud/bigquery/connection/v1" + +## +# Snippet for the get_connection call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_connection. +# +def get_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new + + # Call the get_connection method. + result = client.get_connection request + + # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + p result +end +# [END bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_iam_policy.rb new file mode 100644 index 000000000000..6a1780760df0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync] +require "google/cloud/bigquery/connection/v1" + +## +# Snippet for the get_iam_policy call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::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 bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/list_connections.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/list_connections.rb new file mode 100644 index 000000000000..c79131fa819b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/list_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync] +require "google/cloud/bigquery/connection/v1" + +## +# Snippet for the list_connections call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections. +# +def list_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new + + # Call the list_connections method. + result = client.list_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Connection::V1::Connection. + p item + end +end +# [END bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/set_iam_policy.rb new file mode 100644 index 000000000000..3e030fb7baf4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync] +require "google/cloud/bigquery/connection/v1" + +## +# Snippet for the set_iam_policy call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::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 bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/test_iam_permissions.rb new file mode 100644 index 000000000000..d3e2960233a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync] +require "google/cloud/bigquery/connection/v1" + +## +# Snippet for the test_iam_permissions call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::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 bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/update_connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/update_connection.rb new file mode 100644 index 000000000000..59692b640522 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/update_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync] +require "google/cloud/bigquery/connection/v1" + +## +# Snippet for the update_connection call in the ConnectionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#update_connection. +# +def update_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new + + # Call the update_connection method. + result = client.update_connection request + + # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. + p result +end +# [END bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/snippet_metadata_google.cloud.bigquery.connection.v1.json b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/snippet_metadata_google.cloud.bigquery.connection.v1.json new file mode 100644 index 000000000000..7fbfcd74f2a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/snippet_metadata_google.cloud.bigquery.connection.v1.json @@ -0,0 +1,335 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-connection-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.connection.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync", + "title": "Snippet for the create_connection call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#create_connection.", + "file": "connection_service/create_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_connection", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#create_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Connection::V1::Connection", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" + }, + "method": { + "short_name": "CreateConnection", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.CreateConnection", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync", + "title": "Snippet for the get_connection call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_connection.", + "file": "connection_service/get_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_connection", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Connection::V1::Connection", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" + }, + "method": { + "short_name": "GetConnection", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.GetConnection", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync", + "title": "Snippet for the list_connections call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections.", + "file": "connection_service/list_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_connections", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" + }, + "method": { + "short_name": "ListConnections", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.ListConnections", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync", + "title": "Snippet for the update_connection call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#update_connection.", + "file": "connection_service/update_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_connection", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#update_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Connection::V1::Connection", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" + }, + "method": { + "short_name": "UpdateConnection", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.UpdateConnection", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync", + "title": "Snippet for the delete_connection call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#delete_connection.", + "file": "connection_service/delete_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_connection", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#delete_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" + }, + "method": { + "short_name": "DeleteConnection", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.DeleteConnection", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_iam_policy.", + "file": "connection_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.GetIamPolicy", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#set_iam_policy.", + "file": "connection_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.SetIamPolicy", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ConnectionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#test_iam_permissions.", + "file": "connection_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ConnectionService::Client", + "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.TestIamPermissions", + "service": { + "short_name": "ConnectionService", + "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_paths_test.rb new file mode 100644 index 000000000000..1b20e0bb6e19 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/connection/v1/connection_service" + +class ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::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_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::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cluster_path project: "value0", region: "value1", cluster: "value2" + assert_equal "projects/value0/regions/value1/clusters/value2", path + end + end + + def test_connection_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connection_path project: "value0", location: "value1", connection: "value2" + assert_equal "projects/value0/locations/value1/connections/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::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_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", service: "value2" + assert_equal "projects/value0/locations/value1/services/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_rest_test.rb new file mode 100644 index 000000000000..371a3d9e115d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_rest_test.rb @@ -0,0 +1,541 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/bigquery/connection/v1/connection_pb" +require "google/cloud/bigquery/connection/v1/connection_service/rest" + + +class ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::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_connection + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Connection::V1::Connection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + connection_id = "hello world" + connection = {} + + create_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_create_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_connection_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_connection({ parent: parent, connection_id: connection_id, connection: connection }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_connection parent: parent, connection_id: connection_id, connection: connection do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_connection ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_connection({ parent: parent, connection_id: connection_id, connection: connection }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_connection(::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_connection_client_stub.call_count + end + end + end + + def test_get_connection + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Connection::V1::Connection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_get_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_connection_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_connection({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_connection name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_connection ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_connection({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_connection(::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_connection_client_stub.call_count + end + end + end + + def test_list_connections + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse.new + http_response = OpenStruct.new 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_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_list_connections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_connections_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_connections parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_connections ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_connections(::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.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_connections_client_stub.call_count + end + end + end + + def test_update_connection + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Connection::V1::Connection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + connection = {} + update_mask = {} + + update_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_update_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_connection_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_connection({ name: name, connection: connection, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_connection name: name, connection: connection, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_connection ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_connection({ name: name, connection: connection, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_connection(::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_connection_client_stub.call_count + end + end + end + + def test_delete_connection + # 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_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_delete_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_connection_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_connection({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_connection name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_connection ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_connection({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_connection(::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_connection_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb new file mode 100644 index 000000000000..699bd68315e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/connection/v1/connection_pb" +require "google/cloud/bigquery/connection/v1/connection_service" + +class ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + 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_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Connection::V1::Connection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + connection_id = "hello world" + connection = {} + + create_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_connection, name + assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["connection_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Connection::V1::Connection), request["connection"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_connection_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_connection({ parent: parent, connection_id: connection_id, connection: connection }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_connection parent: parent, connection_id: connection_id, connection: connection do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_connection ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_connection({ parent: parent, connection_id: connection_id, connection: connection }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_connection(::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_connection_client_stub.call_rpc_count + end + end + + def test_get_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Connection::V1::Connection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_connection, name + assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_connection_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_connection ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_connection({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_connection(::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_connection_client_stub.call_rpc_count + end + end + + def test_list_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_connections, name + assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest, 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_connections_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_connections parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_connections ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_connections(::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.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_connections_client_stub.call_rpc_count + end + end + + def test_update_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Connection::V1::Connection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + connection = {} + update_mask = {} + + update_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_connection, name + assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Connection::V1::Connection), request["connection"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_connection_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_connection({ name: name, connection: connection, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_connection name: name, connection: connection, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_connection ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_connection({ name: name, connection: connection, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_connection(::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new(name: name, connection: connection, 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_connection_client_stub.call_rpc_count + end + end + + def test_delete_connection + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_connection, name + assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_connection_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_connection ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_connection({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_connection(::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new(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_connection_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 + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From ad51ddc3fd31cb15b2b33bef71a2035702fec53f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 1 Apr 2026 08:12:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/type/date.rb | 17 +- .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../google-cloud-apigee_connect-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-apigee_connect-v1/.toys.rb | 28 - .../google-cloud-apigee_connect-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-apigee_connect-v1/Gemfile | 14 - .../google-cloud-apigee_connect-v1/LICENSE.md | 201 - .../google-cloud-apigee_connect-v1/README.md | 154 - .../google-cloud-apigee_connect-v1/Rakefile | 169 - .../gapic_metadata.json | 37 - .../google-cloud-apigee_connect-v1.gemspec | 28 - .../lib/google-cloud-apigee_connect-v1.rb | 21 - .../lib/google/cloud/apigee_connect/v1.rb | 46 - .../apigee_connect/v1/connection_service.rb | 55 - .../v1/connection_service/client.rb | 497 -- .../v1/connection_service/credentials.rb | 51 - .../v1/connection_service/paths.rb | 50 - .../v1/connection_service/rest.rb | 52 - .../v1/connection_service/rest/client.rb | 447 -- .../connection_service/rest/service_stub.rb | 142 - .../google/cloud/apigee_connect/v1/rest.rb | 37 - .../google/cloud/apigee_connect/v1/tether.rb | 50 - .../cloud/apigee_connect/v1/tether/client.rb | 473 -- .../apigee_connect/v1/tether/credentials.rb | 51 - .../google/cloud/apigee_connect/v1/version.rb | 28 - .../cloud/apigeeconnect/v1/connection_pb.rb | 29 - .../v1/connection_services_pb.rb | 46 - .../cloud/apigeeconnect/v1/tether_pb.rb | 35 - .../apigeeconnect/v1/tether_services_pb.rb | 53 - .../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/apigeeconnect/v1/connection.rb | 88 - .../google/cloud/apigeeconnect/v1/tether.rb | 221 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../connection_service/list_connections.rb | 51 - ...etadata_google.cloud.apigeeconnect.v1.json | 95 - .../snippets/tether/egress.rb | 56 - .../v1/connection_service_paths_test.rb | 55 - .../v1/connection_service_rest_test.rb | 155 - .../v1/connection_service_test.rb | 171 - .../cloud/apigee_connect/v1/tether_test.rb | 204 - .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-apigee_registry-v1/.toys.rb | 28 - .../google-cloud-apigee_registry-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-apigee_registry-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../google-cloud-apigee_registry-v1/README.md | 154 - .../google-cloud-apigee_registry-v1/Rakefile | 169 - .../gapic_metadata.json | 217 - .../google-cloud-apigee_registry-v1.gemspec | 30 - .../lib/google-cloud-apigee_registry-v1.rb | 21 - .../lib/google/cloud/apigee_registry/v1.rb | 46 - .../apigee_registry/v1/bindings_override.rb | 324 - .../cloud/apigee_registry/v1/provisioning.rb | 57 - .../apigee_registry/v1/provisioning/client.rb | 730 --- .../v1/provisioning/credentials.rb | 47 - .../v1/provisioning/operations.rb | 841 --- .../apigee_registry/v1/provisioning/paths.rb | 69 - .../apigee_registry/v1/provisioning/rest.rb | 55 - .../v1/provisioning/rest/client.rb | 675 -- .../v1/provisioning/rest/operations.rb | 925 --- .../v1/provisioning/rest/service_stub.rb | 265 - .../cloud/apigee_registry/v1/registry.rb | 55 - .../apigee_registry/v1/registry/client.rb | 4095 ------------ .../v1/registry/credentials.rb | 47 - .../apigee_registry/v1/registry/paths.rb | 238 - .../cloud/apigee_registry/v1/registry/rest.rb | 53 - .../v1/registry/rest/client.rb | 3816 ----------- .../v1/registry/rest/service_stub.rb | 2406 ------- .../google/cloud/apigee_registry/v1/rest.rb | 39 - .../cloud/apigee_registry/v1/version.rb | 28 - .../v1/provisioning_service_pb.rb | 34 - .../v1/provisioning_service_services_pb.rb | 50 - .../apigeeregistry/v1/registry_models_pb.rb | 29 - .../apigeeregistry/v1/registry_service_pb.rb | 71 - .../v1/registry_service_services_pb.rb | 128 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/httpbody.rb | 80 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../apigeeregistry/v1/provisioning_service.rb | 157 - .../apigeeregistry/v1/registry_models.rb | 407 -- .../apigeeregistry/v1/registry_service.rb | 712 --- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../snippets/provisioning/create_instance.rb | 54 - .../snippets/provisioning/delete_instance.rb | 54 - .../snippets/provisioning/get_instance.rb | 47 - .../snippets/registry/create_api.rb | 47 - .../registry/create_api_deployment.rb | 47 - .../snippets/registry/create_api_spec.rb | 47 - .../snippets/registry/create_api_version.rb | 47 - .../snippets/registry/create_artifact.rb | 47 - .../snippets/registry/delete_api.rb | 47 - .../registry/delete_api_deployment.rb | 47 - .../delete_api_deployment_revision.rb | 47 - .../snippets/registry/delete_api_spec.rb | 47 - .../registry/delete_api_spec_revision.rb | 47 - .../snippets/registry/delete_api_version.rb | 47 - .../snippets/registry/delete_artifact.rb | 47 - .../snippets/registry/get_api.rb | 47 - .../snippets/registry/get_api_deployment.rb | 47 - .../snippets/registry/get_api_spec.rb | 47 - .../registry/get_api_spec_contents.rb | 47 - .../snippets/registry/get_api_version.rb | 47 - .../snippets/registry/get_artifact.rb | 47 - .../registry/get_artifact_contents.rb | 47 - .../registry/list_api_deployment_revisions.rb | 51 - .../snippets/registry/list_api_deployments.rb | 51 - .../registry/list_api_spec_revisions.rb | 51 - .../snippets/registry/list_api_specs.rb | 51 - .../snippets/registry/list_api_versions.rb | 51 - .../snippets/registry/list_apis.rb | 51 - .../snippets/registry/list_artifacts.rb | 51 - .../snippets/registry/replace_artifact.rb | 47 - .../registry/rollback_api_deployment.rb | 47 - .../snippets/registry/rollback_api_spec.rb | 47 - .../registry/tag_api_deployment_revision.rb | 47 - .../registry/tag_api_spec_revision.rb | 47 - .../snippets/registry/update_api.rb | 47 - .../registry/update_api_deployment.rb | 47 - .../snippets/registry/update_api_spec.rb | 47 - .../snippets/registry/update_api_version.rb | 47 - ...tadata_google.cloud.apigeeregistry.v1.json | 1535 ----- .../v1/provisioning_operations_test.rb | 400 -- .../v1/provisioning_paths_test.rb | 67 - .../v1/provisioning_rest_test.rb | 263 - .../apigee_registry/v1/provisioning_test.rb | 306 - .../apigee_registry/v1/registry_paths_test.rb | 127 - .../apigee_registry/v1/registry_rest_test.rb | 2034 ------ .../cloud/apigee_registry/v1/registry_test.rb | 2259 ------- .../test/helper.rb | 26 - .../google-cloud-app_engine-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-app_engine-v1/.rubocop.yml | 33 - .../google-cloud-app_engine-v1/.toys.rb | 28 - .../google-cloud-app_engine-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-app_engine-v1/CHANGELOG.md | 2 - .../google-cloud-app_engine-v1/Gemfile | 14 - .../google-cloud-app_engine-v1/LICENSE.md | 201 - .../google-cloud-app_engine-v1/README.md | 154 - .../google-cloud-app_engine-v1/Rakefile | 169 - .../gapic_metadata.json | 251 - .../google-cloud-app_engine-v1.gemspec | 28 - .../lib/google-cloud-app_engine-v1.rb | 21 - .../lib/google/appengine/v1/app_yaml_pb.rb | 37 - .../lib/google/appengine/v1/appengine_pb.rb | 79 - .../appengine/v1/appengine_services_pb.rb | 314 - .../lib/google/appengine/v1/application_pb.rb | 28 - .../lib/google/appengine/v1/audit_data_pb.rb | 25 - .../lib/google/appengine/v1/certificate_pb.rb | 26 - .../lib/google/appengine/v1/deploy_pb.rb | 27 - .../google/appengine/v1/deployed_files_pb.rb | 20 - .../google/appengine/v1/domain_mapping_pb.rb | 25 - .../lib/google/appengine/v1/domain_pb.rb | 21 - .../lib/google/appengine/v1/firewall_pb.rb | 22 - .../lib/google/appengine/v1/instance_pb.rb | 28 - .../lib/google/appengine/v1/location_pb.rb | 23 - .../appengine/v1/network_settings_pb.rb | 22 - .../lib/google/appengine/v1/operation_pb.rb | 24 - .../lib/google/appengine/v1/service_pb.rb | 25 - .../lib/google/appengine/v1/version_pb.rb | 44 - .../lib/google/cloud/app_engine/v1.rb | 52 - .../cloud/app_engine/v1/applications.rb | 55 - .../app_engine/v1/applications/client.rb | 805 --- .../app_engine/v1/applications/credentials.rb | 53 - .../app_engine/v1/applications/operations.rb | 841 --- .../cloud/app_engine/v1/applications/rest.rb | 52 - .../app_engine/v1/applications/rest/client.rb | 742 --- .../v1/applications/rest/operations.rb | 925 --- .../v1/applications/rest/service_stub.rb | 326 - .../app_engine/v1/authorized_certificates.rb | 55 - .../v1/authorized_certificates/client.rb | 870 --- .../v1/authorized_certificates/credentials.rb | 53 - .../v1/authorized_certificates/rest.rb | 52 - .../v1/authorized_certificates/rest/client.rb | 792 --- .../rest/service_stub.rb | 388 -- .../cloud/app_engine/v1/authorized_domains.rb | 56 - .../v1/authorized_domains/client.rb | 484 -- .../v1/authorized_domains/credentials.rb | 53 - .../app_engine/v1/authorized_domains/rest.rb | 53 - .../v1/authorized_domains/rest/client.rb | 434 -- .../authorized_domains/rest/service_stub.rb | 142 - .../cloud/app_engine/v1/domain_mappings.rb | 55 - .../app_engine/v1/domain_mappings/client.rb | 911 --- .../v1/domain_mappings/credentials.rb | 53 - .../v1/domain_mappings/operations.rb | 841 --- .../app_engine/v1/domain_mappings/rest.rb | 52 - .../v1/domain_mappings/rest/client.rb | 833 --- .../v1/domain_mappings/rest/operations.rb | 925 --- .../v1/domain_mappings/rest/service_stub.rb | 388 -- .../google/cloud/app_engine/v1/firewall.rb | 63 - .../cloud/app_engine/v1/firewall/client.rb | 982 --- .../app_engine/v1/firewall/credentials.rb | 53 - .../cloud/app_engine/v1/firewall/rest.rb | 60 - .../app_engine/v1/firewall/rest/client.rb | 897 --- .../v1/firewall/rest/service_stub.rb | 450 -- .../google/cloud/app_engine/v1/instances.rb | 55 - .../cloud/app_engine/v1/instances/client.rb | 823 --- .../app_engine/v1/instances/credentials.rb | 53 - .../app_engine/v1/instances/operations.rb | 841 --- .../cloud/app_engine/v1/instances/rest.rb | 52 - .../app_engine/v1/instances/rest/client.rb | 752 --- .../v1/instances/rest/operations.rb | 925 --- .../v1/instances/rest/service_stub.rb | 326 - .../lib/google/cloud/app_engine/v1/rest.rb | 44 - .../google/cloud/app_engine/v1/services.rb | 55 - .../cloud/app_engine/v1/services/client.rb | 808 --- .../app_engine/v1/services/credentials.rb | 53 - .../app_engine/v1/services/operations.rb | 841 --- .../cloud/app_engine/v1/services/rest.rb | 52 - .../app_engine/v1/services/rest/client.rb | 737 --- .../app_engine/v1/services/rest/operations.rb | 925 --- .../v1/services/rest/service_stub.rb | 326 - .../lib/google/cloud/app_engine/v1/version.rb | 28 - .../google/cloud/app_engine/v1/versions.rb | 55 - .../cloud/app_engine/v1/versions/client.rb | 944 --- .../app_engine/v1/versions/credentials.rb | 53 - .../app_engine/v1/versions/operations.rb | 841 --- .../cloud/app_engine/v1/versions/rest.rb | 52 - .../app_engine/v1/versions/rest/client.rb | 866 --- .../app_engine/v1/versions/rest/operations.rb | 925 --- .../v1/versions/rest/service_stub.rb | 388 -- .../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/appengine/v1/app_yaml.rb | 385 -- .../google/appengine/v1/appengine.rb | 639 -- .../google/appengine/v1/application.rb | 197 - .../google/appengine/v1/audit_data.rb | 60 - .../google/appengine/v1/certificate.rb | 161 - .../proto_docs/google/appengine/v1/deploy.rb | 130 - .../proto_docs/google/appengine/v1/domain.rb | 42 - .../google/appengine/v1/domain_mapping.rb | 127 - .../google/appengine/v1/firewall.rb | 72 - .../google/appengine/v1/instance.rb | 137 - .../google/appengine/v1/location.rb | 42 - .../google/appengine/v1/network_settings.rb | 51 - .../google/appengine/v1/operation.rb | 67 - .../proto_docs/google/appengine/v1/service.rb | 125 - .../proto_docs/google/appengine/v1/version.rb | 650 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../applications/create_application.rb | 54 - .../snippets/applications/get_application.rb | 47 - .../applications/repair_application.rb | 54 - .../applications/update_application.rb | 54 - .../create_authorized_certificate.rb | 47 - .../delete_authorized_certificate.rb | 47 - .../get_authorized_certificate.rb | 47 - .../list_authorized_certificates.rb | 51 - .../update_authorized_certificate.rb | 47 - .../list_authorized_domains.rb | 51 - .../domain_mappings/create_domain_mapping.rb | 54 - .../domain_mappings/delete_domain_mapping.rb | 54 - .../domain_mappings/get_domain_mapping.rb | 47 - .../domain_mappings/list_domain_mappings.rb | 51 - .../domain_mappings/update_domain_mapping.rb | 54 - .../firewall/batch_update_ingress_rules.rb | 47 - .../snippets/firewall/create_ingress_rule.rb | 47 - .../snippets/firewall/delete_ingress_rule.rb | 47 - .../snippets/firewall/get_ingress_rule.rb | 47 - .../snippets/firewall/list_ingress_rules.rb | 51 - .../snippets/firewall/update_ingress_rule.rb | 47 - .../snippets/instances/debug_instance.rb | 54 - .../snippets/instances/delete_instance.rb | 54 - .../snippets/instances/get_instance.rb | 47 - .../snippets/instances/list_instances.rb | 51 - .../snippets/services/delete_service.rb | 54 - .../snippets/services/get_service.rb | 47 - .../snippets/services/list_services.rb | 51 - .../snippets/services/update_service.rb | 54 - .../snippet_metadata_google.appengine.v1.json | 1375 ---- .../snippets/versions/create_version.rb | 54 - .../snippets/versions/delete_version.rb | 54 - .../snippets/versions/get_version.rb | 47 - .../snippets/versions/list_versions.rb | 51 - .../snippets/versions/update_version.rb | 54 - .../v1/applications_operations_test.rb | 400 -- .../app_engine/v1/applications_rest_test.rb | 317 - .../cloud/app_engine/v1/applications_test.rb | 369 -- .../v1/authorized_certificates_rest_test.rb | 376 -- .../v1/authorized_certificates_test.rb | 413 -- .../v1/authorized_domains_rest_test.rb | 155 - .../app_engine/v1/authorized_domains_test.rb | 171 - .../v1/domain_mappings_operations_test.rb | 400 -- .../v1/domain_mappings_rest_test.rb | 375 -- .../app_engine/v1/domain_mappings_test.rb | 440 -- .../cloud/app_engine/v1/firewall_rest_test.rb | 430 -- .../cloud/app_engine/v1/firewall_test.rb | 471 -- .../v1/instances_operations_test.rb | 400 -- .../app_engine/v1/instances_rest_test.rb | 318 - .../cloud/app_engine/v1/instances_test.rb | 371 -- .../app_engine/v1/services_operations_test.rb | 400 -- .../cloud/app_engine/v1/services_rest_test.rb | 320 - .../cloud/app_engine/v1/services_test.rb | 375 -- .../app_engine/v1/versions_operations_test.rb | 400 -- .../cloud/app_engine/v1/versions_rest_test.rb | 376 -- .../cloud/app_engine/v1/versions_test.rb | 442 -- .../google-cloud-app_engine-v1/test/helper.rb | 26 - .../google-cloud-app_hub-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-app_hub-v1/.rubocop.yml | 33 - .../google-cloud-app_hub-v1/.toys.rb | 28 - .../google-cloud-app_hub-v1/.yardopts | 12 - .../google-cloud-app_hub-v1/AUTHENTICATION.md | 122 - .../google-cloud-app_hub-v1/CHANGELOG.md | 2 - .../google-cloud-app_hub-v1/Gemfile | 14 - .../google-cloud-app_hub-v1/LICENSE.md | 201 - .../google-cloud-app_hub-v1/README.md | 154 - .../google-cloud-app_hub-v1/Rakefile | 169 - .../gapic_metadata.json | 153 - .../google-cloud-app_hub-v1.gemspec | 30 - .../lib/google-cloud-app_hub-v1.rb | 21 - .../lib/google/cloud/app_hub/v1.rb | 45 - .../lib/google/cloud/app_hub/v1/app_hub.rb | 56 - .../google/cloud/app_hub/v1/app_hub/client.rb | 3468 ---------- .../cloud/app_hub/v1/app_hub/credentials.rb | 47 - .../cloud/app_hub/v1/app_hub/operations.rb | 841 --- .../google/cloud/app_hub/v1/app_hub/paths.rb | 182 - .../google/cloud/app_hub/v1/app_hub/rest.rb | 54 - .../cloud/app_hub/v1/app_hub/rest/client.rb | 3245 ---------- .../app_hub/v1/app_hub/rest/operations.rb | 925 --- .../app_hub/v1/app_hub/rest/service_stub.rb | 1736 ----- .../cloud/app_hub/v1/bindings_override.rb | 108 - .../lib/google/cloud/app_hub/v1/rest.rb | 38 - .../lib/google/cloud/app_hub/v1/version.rb | 28 - .../cloud/apphub/v1/apphub_service_pb.rb | 71 - .../apphub/v1/apphub_service_services_pb.rb | 104 - .../google/cloud/apphub/v1/application_pb.rb | 30 - .../google/cloud/apphub/v1/attributes_pb.rb | 28 - .../lib/google/cloud/apphub/v1/service_pb.rb | 31 - .../v1/service_project_attachment_pb.rb | 27 - .../lib/google/cloud/apphub/v1/workload_pb.rb | 31 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/apphub/v1/apphub_service.rb | 787 --- .../google/cloud/apphub/v1/application.rb | 103 - .../google/cloud/apphub/v1/attributes.rb | 115 - .../google/cloud/apphub/v1/service.rb | 139 - .../apphub/v1/service_project_attachment.rb | 72 - .../google/cloud/apphub/v1/workload.rb | 140 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-app_hub-v1/snippets/Gemfile | 32 - .../snippets/app_hub/create_application.rb | 54 - .../snippets/app_hub/create_service.rb | 54 - .../create_service_project_attachment.rb | 54 - .../snippets/app_hub/create_workload.rb | 54 - .../snippets/app_hub/delete_application.rb | 54 - .../snippets/app_hub/delete_service.rb | 54 - .../delete_service_project_attachment.rb | 54 - .../snippets/app_hub/delete_workload.rb | 54 - .../detach_service_project_attachment.rb | 47 - .../snippets/app_hub/get_application.rb | 47 - .../app_hub/get_discovered_service.rb | 47 - .../app_hub/get_discovered_workload.rb | 47 - .../snippets/app_hub/get_service.rb | 47 - .../app_hub/get_service_project_attachment.rb | 47 - .../snippets/app_hub/get_workload.rb | 47 - .../snippets/app_hub/list_applications.rb | 51 - .../app_hub/list_discovered_services.rb | 51 - .../app_hub/list_discovered_workloads.rb | 51 - .../list_service_project_attachments.rb | 51 - .../snippets/app_hub/list_services.rb | 51 - .../snippets/app_hub/list_workloads.rb | 51 - .../app_hub/lookup_discovered_service.rb | 47 - .../app_hub/lookup_discovered_workload.rb | 47 - .../lookup_service_project_attachment.rb | 47 - .../snippets/app_hub/update_application.rb | 54 - .../snippets/app_hub/update_service.rb | 54 - .../snippets/app_hub/update_workload.rb | 54 - ...ippet_metadata_google.cloud.apphub.v1.json | 1095 ---- .../app_hub/v1/app_hub_operations_test.rb | 400 -- .../cloud/app_hub/v1/app_hub_paths_test.rb | 139 - .../cloud/app_hub/v1/app_hub_rest_test.rb | 1605 ----- .../google/cloud/app_hub/v1/app_hub_test.rb | 1865 ------ .../google-cloud-app_hub-v1/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-artifact_registry-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 268 - .../google-cloud-artifact_registry-v1.gemspec | 30 - .../lib/google-cloud-artifact_registry-v1.rb | 21 - .../lib/google/cloud/artifact_registry/v1.rb | 45 - .../artifact_registry/v1/artifact_registry.rb | 68 - .../v1/artifact_registry/client.rb | 5572 ----------------- .../v1/artifact_registry/credentials.rb | 52 - .../v1/artifact_registry/operations.rb | 841 --- .../v1/artifact_registry/paths.rb | 333 - .../v1/artifact_registry/rest.rb | 66 - .../v1/artifact_registry/rest/client.rb | 5187 --------------- .../v1/artifact_registry/rest/operations.rb | 925 --- .../v1/artifact_registry/rest/service_stub.rb | 3149 ---------- .../artifact_registry/v1/bindings_override.rb | 75 - .../google/cloud/artifact_registry/v1/rest.rb | 38 - .../cloud/artifact_registry/v1/version.rb | 28 - .../artifactregistry/v1/apt_artifact_pb.rb | 31 - .../artifactregistry/v1/artifact_pb.rb | 41 - .../artifactregistry/v1/attachment_pb.rb | 30 - .../devtools/artifactregistry/v1/export_pb.rb | 29 - .../devtools/artifactregistry/v1/file_pb.rb | 33 - .../artifactregistry/v1/generic_pb.rb | 25 - .../devtools/artifactregistry/v1/go_pb.rb | 25 - .../artifactregistry/v1/kfp_artifact_pb.rb | 24 - .../artifactregistry/v1/package_pb.rb | 31 - .../artifactregistry/v1/repository_pb.rb | 72 - .../devtools/artifactregistry/v1/rule_pb.rb | 34 - .../artifactregistry/v1/service_pb.rb | 41 - .../v1/service_services_pb.rb | 172 - .../artifactregistry/v1/settings_pb.rb | 28 - .../devtools/artifactregistry/v1/tag_pb.rb | 30 - .../artifactregistry/v1/version_pb.rb | 37 - .../artifactregistry/v1/vpcsc_config_pb.rb | 28 - .../artifactregistry/v1/yum_artifact_pb.rb | 31 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../artifactregistry/v1/apt_artifact.rb | 118 - .../devtools/artifactregistry/v1/artifact.rb | 384 -- .../artifactregistry/v1/attachment.rb | 152 - .../devtools/artifactregistry/v1/export.rb | 91 - .../devtools/artifactregistry/v1/file.rb | 211 - .../devtools/artifactregistry/v1/generic.rb | 48 - .../google/devtools/artifactregistry/v1/go.rb | 45 - .../artifactregistry/v1/kfp_artifact.rb | 42 - .../devtools/artifactregistry/v1/package.rb | 169 - .../artifactregistry/v1/repository.rb | 848 --- .../devtools/artifactregistry/v1/rule.rb | 149 - .../devtools/artifactregistry/v1/service.rb | 32 - .../devtools/artifactregistry/v1/settings.rb | 90 - .../devtools/artifactregistry/v1/tag.rb | 152 - .../devtools/artifactregistry/v1/version.rb | 237 - .../artifactregistry/v1/vpcsc_config.rb | 82 - .../artifactregistry/v1/yum_artifact.rb | 110 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../batch_delete_versions.rb | 54 - .../artifact_registry/create_attachment.rb | 54 - .../artifact_registry/create_repository.rb | 54 - .../snippets/artifact_registry/create_rule.rb | 47 - .../snippets/artifact_registry/create_tag.rb | 47 - .../artifact_registry/delete_attachment.rb | 54 - .../snippets/artifact_registry/delete_file.rb | 54 - .../artifact_registry/delete_package.rb | 54 - .../artifact_registry/delete_repository.rb | 54 - .../snippets/artifact_registry/delete_rule.rb | 47 - .../snippets/artifact_registry/delete_tag.rb | 47 - .../artifact_registry/delete_version.rb | 54 - .../artifact_registry/export_artifact.rb | 54 - .../artifact_registry/get_attachment.rb | 47 - .../artifact_registry/get_docker_image.rb | 47 - .../snippets/artifact_registry/get_file.rb | 47 - .../artifact_registry/get_iam_policy.rb | 47 - .../artifact_registry/get_maven_artifact.rb | 47 - .../artifact_registry/get_npm_package.rb | 47 - .../snippets/artifact_registry/get_package.rb | 47 - .../artifact_registry/get_project_settings.rb | 47 - .../artifact_registry/get_python_package.rb | 47 - .../artifact_registry/get_repository.rb | 47 - .../snippets/artifact_registry/get_rule.rb | 47 - .../snippets/artifact_registry/get_tag.rb | 47 - .../snippets/artifact_registry/get_version.rb | 47 - .../artifact_registry/get_vpcsc_config.rb | 47 - .../artifact_registry/import_apt_artifacts.rb | 54 - .../artifact_registry/import_yum_artifacts.rb | 54 - .../artifact_registry/list_attachments.rb | 51 - .../artifact_registry/list_docker_images.rb | 51 - .../snippets/artifact_registry/list_files.rb | 51 - .../artifact_registry/list_maven_artifacts.rb | 51 - .../artifact_registry/list_npm_packages.rb | 51 - .../artifact_registry/list_packages.rb | 51 - .../artifact_registry/list_python_packages.rb | 51 - .../artifact_registry/list_repositories.rb | 51 - .../snippets/artifact_registry/list_rules.rb | 51 - .../snippets/artifact_registry/list_tags.rb | 51 - .../artifact_registry/list_versions.rb | 51 - .../artifact_registry/set_iam_policy.rb | 47 - .../artifact_registry/test_iam_permissions.rb | 47 - .../snippets/artifact_registry/update_file.rb | 47 - .../artifact_registry/update_package.rb | 47 - .../update_project_settings.rb | 47 - .../artifact_registry/update_repository.rb | 47 - .../snippets/artifact_registry/update_rule.rb | 47 - .../snippets/artifact_registry/update_tag.rb | 47 - .../artifact_registry/update_version.rb | 47 - .../artifact_registry/update_vpcsc_config.rb | 47 - ...a_google.devtools.artifactregistry.v1.json | 2015 ------ .../v1/artifact_registry_operations_test.rb | 400 -- .../v1/artifact_registry_paths_test.rb | 223 - .../v1/artifact_registry_rest_test.rb | 2861 --------- .../v1/artifact_registry_test.rb | 3256 ---------- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 143 - ...le-cloud-artifact_registry-v1beta2.gemspec | 30 - .../google-cloud-artifact_registry-v1beta2.rb | 21 - .../google/cloud/artifact_registry/v1beta2.rb | 45 - .../v1beta2/artifact_registry.rb | 68 - .../v1beta2/artifact_registry/client.rb | 3002 --------- .../v1beta2/artifact_registry/credentials.rb | 52 - .../v1beta2/artifact_registry/operations.rb | 841 --- .../v1beta2/artifact_registry/paths.rb | 106 - .../v1beta2/artifact_registry/rest.rb | 66 - .../v1beta2/artifact_registry/rest/client.rb | 2792 --------- .../artifact_registry/rest/operations.rb | 925 --- .../artifact_registry/rest/service_stub.rb | 1615 ----- .../v1beta2/bindings_override.rb | 75 - .../cloud/artifact_registry/v1beta2/rest.rb | 38 - .../artifact_registry/v1beta2/version.rb | 28 - .../v1beta2/apt_artifact_pb.rb | 31 - .../artifactregistry/v1beta2/file_pb.rb | 29 - .../artifactregistry/v1beta2/package_pb.rb | 27 - .../artifactregistry/v1beta2/repository_pb.rb | 35 - .../artifactregistry/v1beta2/service_pb.rb | 36 - .../v1beta2/service_services_pb.rb | 116 - .../artifactregistry/v1beta2/settings_pb.rb | 28 - .../artifactregistry/v1beta2/tag_pb.rb | 30 - .../artifactregistry/v1beta2/version_pb.rb | 32 - .../v1beta2/yum_artifact_pb.rb | 31 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../artifactregistry/v1beta2/apt_artifact.rb | 118 - .../devtools/artifactregistry/v1beta2/file.rb | 128 - .../artifactregistry/v1beta2/package.rb | 93 - .../artifactregistry/v1beta2/repository.rb | 202 - .../artifactregistry/v1beta2/service.rb | 32 - .../artifactregistry/v1beta2/settings.rb | 80 - .../devtools/artifactregistry/v1beta2/tag.rb | 132 - .../artifactregistry/v1beta2/version.rb | 132 - .../artifactregistry/v1beta2/yum_artifact.rb | 110 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../artifact_registry/create_repository.rb | 54 - .../snippets/artifact_registry/create_tag.rb | 47 - .../artifact_registry/delete_package.rb | 54 - .../artifact_registry/delete_repository.rb | 54 - .../snippets/artifact_registry/delete_tag.rb | 47 - .../artifact_registry/delete_version.rb | 54 - .../snippets/artifact_registry/get_file.rb | 47 - .../artifact_registry/get_iam_policy.rb | 47 - .../snippets/artifact_registry/get_package.rb | 47 - .../artifact_registry/get_project_settings.rb | 47 - .../artifact_registry/get_repository.rb | 47 - .../snippets/artifact_registry/get_tag.rb | 47 - .../snippets/artifact_registry/get_version.rb | 47 - .../artifact_registry/import_apt_artifacts.rb | 54 - .../artifact_registry/import_yum_artifacts.rb | 54 - .../snippets/artifact_registry/list_files.rb | 51 - .../artifact_registry/list_packages.rb | 51 - .../artifact_registry/list_repositories.rb | 51 - .../snippets/artifact_registry/list_tags.rb | 51 - .../artifact_registry/list_versions.rb | 51 - .../artifact_registry/set_iam_policy.rb | 47 - .../artifact_registry/test_iam_permissions.rb | 47 - .../update_project_settings.rb | 47 - .../artifact_registry/update_repository.rb | 47 - .../snippets/artifact_registry/update_tag.rb | 47 - ...gle.devtools.artifactregistry.v1beta2.json | 1015 --- .../artifact_registry_operations_test.rb | 400 -- .../v1beta2/artifact_registry_paths_test.rb | 91 - .../v1beta2/artifact_registry_rest_test.rb | 1478 ----- .../v1beta2/artifact_registry_test.rb | 1683 ----- .../test/helper.rb | 26 - .../google-cloud-asset-v1/.gitignore | 22 - .../google-cloud-asset-v1/.repo-metadata.json | 18 - .../google-cloud-asset-v1/.rubocop.yml | 33 - .../google-cloud-asset-v1/.toys.rb | 28 - .../google-cloud-asset-v1/.yardopts | 12 - .../google-cloud-asset-v1/AUTHENTICATION.md | 122 - .../google-cloud-asset-v1/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-asset-v1/Gemfile | 14 - .../google-cloud-asset-v1/LICENSE.md | 201 - .../google-cloud-asset-v1/README.md | 154 - .../google-cloud-asset-v1/Rakefile | 169 - .../google-cloud-asset-v1/gapic_metadata.json | 133 - .../google-cloud-asset-v1.gemspec | 31 - .../lib/google-cloud-asset-v1.rb | 21 - .../lib/google/cloud/asset/v1.rb | 45 - .../v1/asset_enrichment_resourceowners_pb.rb | 21 - .../google/cloud/asset/v1/asset_service.rb | 56 - .../cloud/asset/v1/asset_service/client.rb | 3484 ----------- .../asset/v1/asset_service/credentials.rb | 51 - .../asset/v1/asset_service/operations.rb | 841 --- .../cloud/asset/v1/asset_service/paths.rb | 179 - .../cloud/asset/v1/asset_service/rest.rb | 53 - .../asset/v1/asset_service/rest/client.rb | 3280 ---------- .../asset/v1/asset_service/rest/operations.rb | 925 --- .../v1/asset_service/rest/service_stub.rb | 1491 ----- .../google/cloud/asset/v1/asset_service_pb.rb | 125 - .../asset/v1/asset_service_services_pb.rb | 187 - .../lib/google/cloud/asset/v1/assets_pb.rb | 61 - .../lib/google/cloud/asset/v1/rest.rb | 37 - .../lib/google/cloud/asset/v1/version.rb | 28 - .../google/cloud/orgpolicy/v1/orgpolicy_pb.rb | 27 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1/asset_enrichment_resourceowners.rb | 35 - .../google/cloud/asset/v1/asset_service.rb | 2646 -------- .../google/cloud/asset/v1/assets.rb | 1173 ---- .../google/cloud/orgpolicy/v1/orgpolicy.rb | 313 - .../google/cloud/osconfig/v1/inventory.rb | 425 -- .../proto_docs/google/iam/v1/policy.rb | 426 -- .../type/device_resources.rb | 84 - .../accesscontextmanager/v1/access_level.rb | 201 - .../accesscontextmanager/v1/access_policy.rb | 76 - .../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/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/code.rb | 185 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 56 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-asset-v1/snippets/Gemfile | 32 - .../asset_service/analyze_iam_policy.rb | 47 - .../analyze_iam_policy_longrunning.rb | 54 - .../snippets/asset_service/analyze_move.rb | 47 - .../asset_service/analyze_org_policies.rb | 51 - .../analyze_org_policy_governed_assets.rb | 51 - .../analyze_org_policy_governed_containers.rb | 51 - .../asset_service/batch_get_assets_history.rb | 47 - .../batch_get_effective_iam_policies.rb | 47 - .../snippets/asset_service/create_feed.rb | 47 - .../asset_service/create_saved_query.rb | 47 - .../snippets/asset_service/delete_feed.rb | 47 - .../asset_service/delete_saved_query.rb | 47 - .../snippets/asset_service/export_assets.rb | 54 - .../snippets/asset_service/get_feed.rb | 47 - .../snippets/asset_service/get_saved_query.rb | 47 - .../snippets/asset_service/list_assets.rb | 51 - .../snippets/asset_service/list_feeds.rb | 47 - .../asset_service/list_saved_queries.rb | 51 - .../snippets/asset_service/query_assets.rb | 47 - .../asset_service/search_all_iam_policies.rb | 51 - .../asset_service/search_all_resources.rb | 51 - .../snippets/asset_service/update_feed.rb | 47 - .../asset_service/update_saved_query.rb | 47 - ...nippet_metadata_google.cloud.asset.v1.json | 935 --- .../asset/v1/asset_service_operations_test.rb | 400 -- .../asset/v1/asset_service_paths_test.rb | 115 - .../cloud/asset/v1/asset_service_rest_test.rb | 1401 ----- .../cloud/asset/v1/asset_service_test.rb | 1622 ----- .../google-cloud-asset-v1/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-assured_workloads-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 63 - .../google-cloud-assured_workloads-v1.gemspec | 28 - .../lib/google-cloud-assured_workloads-v1.rb | 21 - .../lib/google/cloud/assured_workloads/v1.rb | 45 - .../v1/assured_workloads_service.rb | 56 - .../v1/assured_workloads_service/client.rb | 1303 ---- .../assured_workloads_service/credentials.rb | 51 - .../assured_workloads_service/operations.rb | 841 --- .../v1/assured_workloads_service/paths.rb | 90 - .../v1/assured_workloads_service/rest.rb | 53 - .../assured_workloads_service/rest/client.rb | 928 --- .../rest/operations.rb | 925 --- .../rest/service_stub.rb | 450 -- .../google/cloud/assured_workloads/v1/rest.rb | 37 - .../cloud/assured_workloads/v1/version.rb | 28 - .../v1/assuredworkloads_pb.rb | 64 - .../v1/assuredworkloads_services_pb.rb | 78 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../assuredworkloads/v1/assuredworkloads.rb | 720 --- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../acknowledge_violation.rb | 47 - .../create_workload.rb | 54 - .../delete_workload.rb | 47 - .../get_violation.rb | 47 - .../assured_workloads_service/get_workload.rb | 47 - .../list_violations.rb | 51 - .../list_workloads.rb | 51 - .../restrict_allowed_resources.rb | 47 - .../update_workload.rb | 47 - ...data_google.cloud.assuredworkloads.v1.json | 375 -- ...sured_workloads_service_operations_test.rb | 400 -- .../assured_workloads_service_paths_test.rb | 79 - .../v1/assured_workloads_service_rest_test.rb | 431 -- .../v1/assured_workloads_service_test.rb | 683 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 53 - ...le-cloud-assured_workloads-v1beta1.gemspec | 28 - .../google-cloud-assured_workloads-v1beta1.rb | 21 - .../google/cloud/assured_workloads/v1beta1.rb | 45 - .../v1beta1/assured_workloads_service.rb | 56 - .../assured_workloads_service/client.rb | 1121 ---- .../assured_workloads_service/credentials.rb | 51 - .../assured_workloads_service/operations.rb | 841 --- .../assured_workloads_service/paths.rb | 69 - .../v1beta1/assured_workloads_service/rest.rb | 53 - .../assured_workloads_service/rest/client.rb | 653 -- .../rest/operations.rb | 925 --- .../rest/service_stub.rb | 266 - .../cloud/assured_workloads/v1beta1/rest.rb | 37 - .../assured_workloads/v1beta1/version.rb | 28 - .../v1beta1/assuredworkloads_pb.rb | 52 - .../v1beta1/assuredworkloads_service_pb.rb | 26 - .../assuredworkloads_service_services_pb.rb | 71 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1beta1/assuredworkloads.rb | 557 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../analyze_workload_move.rb | 47 - .../create_workload.rb | 54 - .../delete_workload.rb | 47 - .../assured_workloads_service/get_workload.rb | 47 - .../list_workloads.rb | 51 - .../restrict_allowed_resources.rb | 47 - .../update_workload.rb | 47 - ...google.cloud.assuredworkloads.v1beta1.json | 295 - ...sured_workloads_service_operations_test.rb | 400 -- .../assured_workloads_service_paths_test.rb | 67 - .../assured_workloads_service_rest_test.rb | 265 - .../v1beta1/assured_workloads_service_test.rb | 553 -- .../test/helper.rb | 26 - .../google-cloud-automl-v1/.gitignore | 22 - .../.repo-metadata.json | 20 - .../google-cloud-automl-v1/.rubocop.yml | 33 - .../google-cloud-automl-v1/.toys.rb | 28 - .../google-cloud-automl-v1/.yardopts | 12 - .../google-cloud-automl-v1/AUTHENTICATION.md | 122 - .../google-cloud-automl-v1/CHANGELOG.md | 2 - .../google-cloud-automl-v1/Gemfile | 14 - .../google-cloud-automl-v1/LICENSE.md | 201 - .../google-cloud-automl-v1/README.md | 154 - .../google-cloud-automl-v1/Rakefile | 168 - .../gapic_metadata.json | 127 - .../google-cloud-automl-v1.gemspec | 28 - .../lib/google-cloud-automl-v1.rb | 21 - .../lib/google/cloud/automl/v1.rb | 46 - .../cloud/automl/v1/annotation_payload_pb.rb | 27 - .../cloud/automl/v1/annotation_spec_pb.rb | 23 - .../lib/google/cloud/automl/v1/automl.rb | 69 - .../google/cloud/automl/v1/automl/client.rb | 2349 ------- .../cloud/automl/v1/automl/credentials.rb | 51 - .../cloud/automl/v1/automl/operations.rb | 849 --- .../google/cloud/automl/v1/automl/paths.rb | 130 - .../lib/google/cloud/automl/v1/automl/rest.rb | 66 - .../cloud/automl/v1/automl/rest/client.rb | 2180 ------- .../cloud/automl/v1/automl/rest/operations.rb | 1093 ---- .../automl/v1/automl/rest/service_stub.rb | 1188 ---- .../cloud/automl/v1/classification_pb.rb | 26 - .../google/cloud/automl/v1/data_items_pb.rb | 32 - .../lib/google/cloud/automl/v1/dataset_pb.rb | 27 - .../google/cloud/automl/v1/detection_pb.rb | 26 - .../lib/google/cloud/automl/v1/geometry_pb.rb | 22 - .../lib/google/cloud/automl/v1/image_pb.rb | 29 - .../lib/google/cloud/automl/v1/io_pb.rb | 30 - .../cloud/automl/v1/model_evaluation_pb.rb | 29 - .../lib/google/cloud/automl/v1/model_pb.rb | 28 - .../google/cloud/automl/v1/operations_pb.rb | 37 - .../cloud/automl/v1/prediction_service.rb | 59 - .../automl/v1/prediction_service/client.rb | 768 --- .../v1/prediction_service/credentials.rb | 51 - .../v1/prediction_service/operations.rb | 849 --- .../automl/v1/prediction_service/paths.rb | 52 - .../automl/v1/prediction_service/rest.rb | 56 - .../v1/prediction_service/rest/client.rb | 711 --- .../v1/prediction_service/rest/operations.rb | 1093 ---- .../prediction_service/rest/service_stub.rb | 205 - .../cloud/automl/v1/prediction_service_pb.rb | 33 - .../v1/prediction_service_services_pb.rb | 99 - .../lib/google/cloud/automl/v1/rest.rb | 38 - .../lib/google/cloud/automl/v1/service_pb.rb | 55 - .../cloud/automl/v1/service_services_pb.rb | 136 - .../cloud/automl/v1/text_extraction_pb.rb | 25 - .../lib/google/cloud/automl/v1/text_pb.rb | 28 - .../google/cloud/automl/v1/text_segment_pb.rb | 21 - .../cloud/automl/v1/text_sentiment_pb.rb | 24 - .../google/cloud/automl/v1/translation_pb.rb | 27 - .../lib/google/cloud/automl/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/automl/v1/annotation_payload.rb | 70 - .../google/cloud/automl/v1/annotation_spec.rb | 45 - .../google/cloud/automl/v1/classification.rb | 189 - .../google/cloud/automl/v1/data_items.rb | 202 - .../google/cloud/automl/v1/dataset.rb | 106 - .../google/cloud/automl/v1/detection.rb | 97 - .../google/cloud/automl/v1/geometry.rb | 53 - .../google/cloud/automl/v1/image.rb | 215 - .../proto_docs/google/cloud/automl/v1/io.rb | 1345 ---- .../google/cloud/automl/v1/model.rb | 121 - .../cloud/automl/v1/model_evaluation.rb | 100 - .../google/cloud/automl/v1/operations.rb | 197 - .../cloud/automl/v1/prediction_service.rb | 270 - .../google/cloud/automl/v1/service.rb | 326 - .../proto_docs/google/cloud/automl/v1/text.rb | 76 - .../google/cloud/automl/v1/text_extraction.rb | 73 - .../google/cloud/automl/v1/text_segment.rb | 44 - .../google/cloud/automl/v1/text_sentiment.rb | 82 - .../google/cloud/automl/v1/translation.rb | 79 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../google-cloud-automl-v1/snippets/Gemfile | 32 - .../snippets/automl/create_dataset.rb | 54 - .../snippets/automl/create_model.rb | 54 - .../snippets/automl/delete_dataset.rb | 54 - .../snippets/automl/delete_model.rb | 54 - .../snippets/automl/deploy_model.rb | 54 - .../snippets/automl/export_data.rb | 54 - .../snippets/automl/export_model.rb | 54 - .../snippets/automl/get_annotation_spec.rb | 47 - .../snippets/automl/get_dataset.rb | 47 - .../snippets/automl/get_model.rb | 47 - .../snippets/automl/get_model_evaluation.rb | 47 - .../snippets/automl/import_data.rb | 54 - .../snippets/automl/list_datasets.rb | 51 - .../snippets/automl/list_model_evaluations.rb | 51 - .../snippets/automl/list_models.rb | 51 - .../snippets/automl/undeploy_model.rb | 54 - .../snippets/automl/update_dataset.rb | 47 - .../snippets/automl/update_model.rb | 47 - .../prediction_service/batch_predict.rb | 54 - .../snippets/prediction_service/predict.rb | 47 - ...ippet_metadata_google.cloud.automl.v1.json | 815 --- .../cloud/automl/v1/automl_operations_test.rb | 400 -- .../cloud/automl/v1/automl_paths_test.rb | 103 - .../cloud/automl/v1/automl_rest_test.rb | 1088 ---- .../google/cloud/automl/v1/automl_test.rb | 1257 ---- .../v1/prediction_service_operations_test.rb | 400 -- .../v1/prediction_service_paths_test.rb | 55 - .../automl/v1/prediction_service_rest_test.rb | 212 - .../automl/v1/prediction_service_test.rb | 249 - .../google-cloud-automl-v1/test/helper.rb | 26 - .../google-cloud-automl-v1beta1/.gitignore | 22 - .../.repo-metadata.json | 20 - .../google-cloud-automl-v1beta1/.rubocop.yml | 33 - .../google-cloud-automl-v1beta1/.toys.rb | 28 - .../google-cloud-automl-v1beta1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-automl-v1beta1/CHANGELOG.md | 2 - .../google-cloud-automl-v1beta1/Gemfile | 14 - .../google-cloud-automl-v1beta1/LICENSE.md | 201 - .../google-cloud-automl-v1beta1/README.md | 154 - .../google-cloud-automl-v1beta1/Rakefile | 169 - .../gapic_metadata.json | 157 - .../google-cloud-automl-v1beta1.gemspec | 28 - .../lib/google-cloud-automl-v1beta1.rb | 21 - .../lib/google/cloud/automl/v1beta1.rb | 46 - .../automl/v1beta1/annotation_payload_pb.rb | 28 - .../automl/v1beta1/annotation_spec_pb.rb | 23 - .../lib/google/cloud/automl/v1beta1/automl.rb | 69 - .../cloud/automl/v1beta1/automl/client.rb | 2983 --------- .../automl/v1beta1/automl/credentials.rb | 51 - .../cloud/automl/v1beta1/automl/operations.rb | 849 --- .../cloud/automl/v1beta1/automl/paths.rb | 174 - .../cloud/automl/v1beta1/automl/rest.rb | 66 - .../automl/v1beta1/automl/rest/client.rb | 2772 -------- .../automl/v1beta1/automl/rest/operations.rb | 1093 ---- .../v1beta1/automl/rest/service_stub.rb | 1556 ----- .../cloud/automl/v1beta1/classification_pb.rb | 29 - .../cloud/automl/v1beta1/column_spec_pb.rb | 26 - .../cloud/automl/v1beta1/data_items_pb.rb | 35 - .../cloud/automl/v1beta1/data_stats_pb.rb | 32 - .../cloud/automl/v1beta1/data_types_pb.rb | 23 - .../google/cloud/automl/v1beta1/dataset_pb.rb | 29 - .../cloud/automl/v1beta1/detection_pb.rb | 29 - .../cloud/automl/v1beta1/geometry_pb.rb | 22 - .../google/cloud/automl/v1beta1/image_pb.rb | 29 - .../lib/google/cloud/automl/v1beta1/io_pb.rb | 32 - .../automl/v1beta1/model_evaluation_pb.rb | 31 - .../google/cloud/automl/v1beta1/model_pb.rb | 30 - .../cloud/automl/v1beta1/operations_pb.rb | 40 - .../automl/v1beta1/prediction_service.rb | 59 - .../v1beta1/prediction_service/client.rb | 725 --- .../v1beta1/prediction_service/credentials.rb | 51 - .../v1beta1/prediction_service/operations.rb | 849 --- .../v1beta1/prediction_service/paths.rb | 52 - .../automl/v1beta1/prediction_service/rest.rb | 56 - .../v1beta1/prediction_service/rest/client.rb | 668 -- .../prediction_service/rest/operations.rb | 1093 ---- .../prediction_service/rest/service_stub.rb | 205 - .../automl/v1beta1/prediction_service_pb.rb | 34 - .../v1beta1/prediction_service_services_pb.rb | 79 - .../google/cloud/automl/v1beta1/ranges_pb.rb | 21 - .../cloud/automl/v1beta1/regression_pb.rb | 21 - .../lib/google/cloud/automl/v1beta1/rest.rb | 38 - .../google/cloud/automl/v1beta1/service_pb.rb | 66 - .../automl/v1beta1/service_services_pb.rb | 163 - .../cloud/automl/v1beta1/table_spec_pb.rb | 24 - .../google/cloud/automl/v1beta1/tables_pb.rb | 34 - .../cloud/automl/v1beta1/temporal_pb.rb | 23 - .../automl/v1beta1/text_extraction_pb.rb | 25 - .../google/cloud/automl/v1beta1/text_pb.rb | 28 - .../cloud/automl/v1beta1/text_segment_pb.rb | 21 - .../cloud/automl/v1beta1/text_sentiment_pb.rb | 24 - .../cloud/automl/v1beta1/translation_pb.rb | 27 - .../google/cloud/automl/v1beta1/version.rb | 28 - .../google/cloud/automl/v1beta1/video_pb.rb | 26 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../automl/v1beta1/annotation_payload.rb | 86 - .../cloud/automl/v1beta1/annotation_spec.rb | 46 - .../cloud/automl/v1beta1/classification.rb | 235 - .../cloud/automl/v1beta1/column_spec.rb | 77 - .../google/cloud/automl/v1beta1/data_items.rb | 239 - .../google/cloud/automl/v1beta1/data_stats.rb | 239 - .../google/cloud/automl/v1beta1/data_types.rb | 124 - .../google/cloud/automl/v1beta1/dataset.rb | 102 - .../google/cloud/automl/v1beta1/detection.rb | 152 - .../google/cloud/automl/v1beta1/geometry.rb | 53 - .../google/cloud/automl/v1beta1/image.rb | 205 - .../google/cloud/automl/v1beta1/io.rb | 1214 ---- .../google/cloud/automl/v1beta1/model.rb | 113 - .../cloud/automl/v1beta1/model_evaluation.rb | 117 - .../google/cloud/automl/v1beta1/operations.rb | 232 - .../automl/v1beta1/prediction_service.rb | 238 - .../google/cloud/automl/v1beta1/ranges.rb | 38 - .../google/cloud/automl/v1beta1/regression.rb | 48 - .../google/cloud/automl/v1beta1/service.rb | 452 -- .../google/cloud/automl/v1beta1/table_spec.rb | 75 - .../google/cloud/automl/v1beta1/tables.rb | 304 - .../google/cloud/automl/v1beta1/temporal.rb | 40 - .../google/cloud/automl/v1beta1/text.rb | 84 - .../cloud/automl/v1beta1/text_extraction.rb | 73 - .../cloud/automl/v1beta1/text_segment.rb | 44 - .../cloud/automl/v1beta1/text_sentiment.rb | 87 - .../cloud/automl/v1beta1/translation.rb | 79 - .../google/cloud/automl/v1beta1/video.rb | 51 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../snippets/automl/create_dataset.rb | 47 - .../snippets/automl/create_model.rb | 54 - .../snippets/automl/delete_dataset.rb | 54 - .../snippets/automl/delete_model.rb | 54 - .../snippets/automl/deploy_model.rb | 54 - .../snippets/automl/export_data.rb | 54 - .../automl/export_evaluated_examples.rb | 54 - .../snippets/automl/export_model.rb | 54 - .../snippets/automl/get_annotation_spec.rb | 47 - .../snippets/automl/get_column_spec.rb | 47 - .../snippets/automl/get_dataset.rb | 47 - .../snippets/automl/get_model.rb | 47 - .../snippets/automl/get_model_evaluation.rb | 47 - .../snippets/automl/get_table_spec.rb | 47 - .../snippets/automl/import_data.rb | 54 - .../snippets/automl/list_column_specs.rb | 51 - .../snippets/automl/list_datasets.rb | 51 - .../snippets/automl/list_model_evaluations.rb | 51 - .../snippets/automl/list_models.rb | 51 - .../snippets/automl/list_table_specs.rb | 51 - .../snippets/automl/undeploy_model.rb | 54 - .../snippets/automl/update_column_spec.rb | 47 - .../snippets/automl/update_dataset.rb | 47 - .../snippets/automl/update_table_spec.rb | 47 - .../prediction_service/batch_predict.rb | 54 - .../snippets/prediction_service/predict.rb | 47 - ..._metadata_google.cloud.automl.v1beta1.json | 1055 ---- .../automl/v1beta1/automl_operations_test.rb | 400 -- .../cloud/automl/v1beta1/automl_paths_test.rb | 127 - .../cloud/automl/v1beta1/automl_rest_test.rb | 1424 ----- .../cloud/automl/v1beta1/automl_test.rb | 1639 ----- .../prediction_service_operations_test.rb | 400 -- .../v1beta1/prediction_service_paths_test.rb | 55 - .../v1beta1/prediction_service_rest_test.rb | 212 - .../automl/v1beta1/prediction_service_test.rb | 249 - .../test/helper.rb | 26 - .../google-cloud-backupdr-v1/.gitignore | 22 - .../.repo-metadata.json | 19 - .../google-cloud-backupdr-v1/.rubocop.yml | 33 - .../google-cloud-backupdr-v1/.toys.rb | 28 - .../google-cloud-backupdr-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-backupdr-v1/CHANGELOG.md | 2 - .../google-cloud-backupdr-v1/Gemfile | 14 - .../google-cloud-backupdr-v1/LICENSE.md | 201 - .../google-cloud-backupdr-v1/README.md | 154 - .../google-cloud-backupdr-v1/Rakefile | 169 - .../gapic_metadata.json | 217 - .../google-cloud-backupdr-v1.gemspec | 30 - .../lib/google-cloud-backupdr-v1.rb | 21 - .../lib/google/cloud/backupdr/v1.rb | 46 - .../v1/backup_dr_protection_summary.rb | 55 - .../v1/backup_dr_protection_summary/client.rb | 530 -- .../credentials.rb | 47 - .../v1/backup_dr_protection_summary/paths.rb | 50 - .../v1/backup_dr_protection_summary/rest.rb | 53 - .../rest/client.rb | 489 -- .../rest/service_stub.rb | 142 - .../lib/google/cloud/backupdr/v1/backupdr.rb | 56 - .../cloud/backupdr/v1/backupdr/client.rb | 4786 -------------- .../cloud/backupdr/v1/backupdr/credentials.rb | 47 - .../cloud/backupdr/v1/backupdr/operations.rb | 841 --- .../cloud/backupdr/v1/backupdr/paths.rb | 309 - .../google/cloud/backupdr/v1/backupdr/rest.rb | 54 - .../cloud/backupdr/v1/backupdr/rest/client.rb | 4493 ------------- .../backupdr/v1/backupdr/rest/operations.rb | 925 --- .../backupdr/v1/backupdr/rest/service_stub.rb | 2350 ------- .../google/cloud/backupdr/v1/backupdr_pb.rb | 51 - .../cloud/backupdr/v1/backupdr_services_pb.rb | 119 - .../google/cloud/backupdr/v1/backupplan_pb.rb | 47 - .../backupdr/v1/backupplanassociation_pb.rb | 42 - .../backupdr/v1/backupvault_alloydb_pb.rb | 27 - .../cloud/backupdr/v1/backupvault_ba_pb.rb | 24 - .../backupdr/v1/backupvault_cloudsql_pb.rb | 30 - .../cloud/backupdr/v1/backupvault_disk_pb.rb | 32 - .../cloud/backupdr/v1/backupvault_gce_pb.rb | 66 - .../cloud/backupdr/v1/backupvault_pb.rb | 80 - .../cloud/backupdr/v1/bindings_override.rb | 108 - .../backupdr/v1/datasourcereference_pb.rb | 34 - .../backupdr/v1/protection_summary_pb.rb | 40 - .../v1/protection_summary_services_pb.rb | 45 - .../lib/google/cloud/backupdr/v1/rest.rb | 39 - .../lib/google/cloud/backupdr/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/backupdr/v1/backupdr.rb | 415 -- .../google/cloud/backupdr/v1/backupplan.rb | 588 -- .../backupdr/v1/backupplanassociation.rb | 388 -- .../google/cloud/backupdr/v1/backupvault.rb | 1366 ---- .../cloud/backupdr/v1/backupvault_alloydb.rb | 69 - .../cloud/backupdr/v1/backupvault_ba.rb | 47 - .../cloud/backupdr/v1/backupvault_cloudsql.rb | 131 - .../cloud/backupdr/v1/backupvault_disk.rb | 241 - .../cloud/backupdr/v1/backupvault_gce.rb | 1001 --- .../cloud/backupdr/v1/datasourcereference.rb | 228 - .../cloud/backupdr/v1/protection_summary.rb | 309 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/dayofweek.rb | 49 - .../proto_docs/google/type/expr.rb | 75 - .../proto_docs/google/type/month.rb | 64 - .../google-cloud-backupdr-v1/snippets/Gemfile | 32 - .../list_resource_backup_configs.rb | 51 - .../snippets/backupdr/create_backup_plan.rb | 54 - .../create_backup_plan_association.rb | 54 - .../snippets/backupdr/create_backup_vault.rb | 54 - .../backupdr/create_management_server.rb | 54 - .../snippets/backupdr/delete_backup.rb | 54 - .../snippets/backupdr/delete_backup_plan.rb | 54 - .../delete_backup_plan_association.rb | 54 - .../snippets/backupdr/delete_backup_vault.rb | 54 - .../backupdr/delete_management_server.rb | 54 - ...kup_plan_associations_for_resource_type.rb | 51 - .../fetch_backups_for_resource_type.rb | 51 - ...ata_source_references_for_resource_type.rb | 51 - .../backupdr/fetch_usable_backup_vaults.rb | 51 - .../snippets/backupdr/get_backup.rb | 47 - .../snippets/backupdr/get_backup_plan.rb | 47 - .../backupdr/get_backup_plan_association.rb | 47 - .../backupdr/get_backup_plan_revision.rb | 47 - .../snippets/backupdr/get_backup_vault.rb | 47 - .../snippets/backupdr/get_data_source.rb | 47 - .../backupdr/get_data_source_reference.rb | 47 - .../backupdr/get_management_server.rb | 47 - .../snippets/backupdr/initialize_service.rb | 54 - .../backupdr/list_backup_plan_associations.rb | 51 - .../backupdr/list_backup_plan_revisions.rb | 51 - .../snippets/backupdr/list_backup_plans.rb | 51 - .../snippets/backupdr/list_backup_vaults.rb | 51 - .../snippets/backupdr/list_backups.rb | 51 - .../backupdr/list_data_source_references.rb | 51 - .../snippets/backupdr/list_data_sources.rb | 51 - .../backupdr/list_management_servers.rb | 51 - .../snippets/backupdr/restore_backup.rb | 54 - .../snippets/backupdr/trigger_backup.rb | 54 - .../snippets/backupdr/update_backup.rb | 54 - .../snippets/backupdr/update_backup_plan.rb | 54 - .../update_backup_plan_association.rb | 54 - .../snippets/backupdr/update_backup_vault.rb | 54 - .../snippets/backupdr/update_data_source.rb | 54 - ...pet_metadata_google.cloud.backupdr.v1.json | 1535 ----- ...backup_dr_protection_summary_paths_test.rb | 55 - .../backup_dr_protection_summary_rest_test.rb | 157 - .../v1/backup_dr_protection_summary_test.rb | 175 - .../backupdr/v1/backupdr_operations_test.rb | 400 -- .../cloud/backupdr/v1/backupdr_paths_test.rb | 211 - .../cloud/backupdr/v1/backupdr_rest_test.rb | 2196 ------- .../google/cloud/backupdr/v1/backupdr_test.rb | 2613 -------- .../google-cloud-backupdr-v1/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 238 - ...oogle-cloud-bare_metal_solution-v2.gemspec | 30 - .../google-cloud-bare_metal_solution-v2.rb | 21 - .../google/cloud/bare_metal_solution/v2.rb | 45 - .../v2/bare_metal_solution.rb | 63 - .../v2/bare_metal_solution/client.rb | 4836 -------------- .../v2/bare_metal_solution/credentials.rb | 47 - .../v2/bare_metal_solution/operations.rb | 841 --- .../v2/bare_metal_solution/paths.rb | 301 - .../v2/bare_metal_solution/rest.rb | 61 - .../v2/bare_metal_solution/rest/client.rb | 4493 ------------- .../v2/bare_metal_solution/rest/operations.rb | 925 --- .../bare_metal_solution/rest/service_stub.rb | 2789 --------- .../v2/bindings_override.rb | 75 - .../cloud/bare_metal_solution/v2/rest.rb | 38 - .../cloud/bare_metal_solution/v2/version.rb | 28 - .../v2/baremetalsolution_pb.rb | 38 - .../v2/baremetalsolution_services_pb.rb | 154 - .../cloud/baremetalsolution/v2/common_pb.rb | 22 - .../cloud/baremetalsolution/v2/instance_pb.rb | 49 - .../cloud/baremetalsolution/v2/lun_pb.rb | 32 - .../cloud/baremetalsolution/v2/network_pb.rb | 43 - .../baremetalsolution/v2/nfs_share_pb.rb | 36 - .../cloud/baremetalsolution/v2/osimage_pb.rb | 26 - .../baremetalsolution/v2/provisioning_pb.rb | 53 - .../cloud/baremetalsolution/v2/ssh_key_pb.rb | 28 - .../cloud/baremetalsolution/v2/volume_pb.rb | 40 - .../v2/volume_snapshot_pb.rb | 32 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../baremetalsolution/v2/baremetalsolution.rb | 63 - .../cloud/baremetalsolution/v2/common.rb | 53 - .../cloud/baremetalsolution/v2/instance.rb | 354 -- .../google/cloud/baremetalsolution/v2/lun.rb | 161 - .../cloud/baremetalsolution/v2/network.rb | 379 -- .../cloud/baremetalsolution/v2/nfs_share.rb | 243 - .../cloud/baremetalsolution/v2/osimage.rb | 80 - .../baremetalsolution/v2/provisioning.rb | 603 -- .../cloud/baremetalsolution/v2/ssh_key.rb | 97 - .../cloud/baremetalsolution/v2/volume.rb | 325 - .../baremetalsolution/v2/volume_snapshot.rb | 134 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../bare_metal_solution/create_nfs_share.rb | 54 - .../create_provisioning_config.rb | 47 - .../bare_metal_solution/create_ssh_key.rb | 47 - .../create_volume_snapshot.rb | 47 - .../bare_metal_solution/delete_nfs_share.rb | 54 - .../bare_metal_solution/delete_ssh_key.rb | 47 - .../delete_volume_snapshot.rb | 47 - .../bare_metal_solution/detach_lun.rb | 54 - .../disable_interactive_serial_console.rb | 54 - .../enable_interactive_serial_console.rb | 54 - .../snippets/bare_metal_solution/evict_lun.rb | 54 - .../bare_metal_solution/evict_volume.rb | 54 - .../bare_metal_solution/get_instance.rb | 47 - .../snippets/bare_metal_solution/get_lun.rb | 47 - .../bare_metal_solution/get_network.rb | 47 - .../bare_metal_solution/get_nfs_share.rb | 47 - .../get_provisioning_config.rb | 47 - .../bare_metal_solution/get_volume.rb | 47 - .../get_volume_snapshot.rb | 47 - .../bare_metal_solution/list_instances.rb | 51 - .../snippets/bare_metal_solution/list_luns.rb | 51 - .../bare_metal_solution/list_network_usage.rb | 47 - .../bare_metal_solution/list_networks.rb | 51 - .../bare_metal_solution/list_nfs_shares.rb | 51 - .../bare_metal_solution/list_os_images.rb | 51 - .../list_provisioning_quotas.rb | 51 - .../bare_metal_solution/list_ssh_keys.rb | 51 - .../list_volume_snapshots.rb | 51 - .../bare_metal_solution/list_volumes.rb | 51 - .../bare_metal_solution/rename_instance.rb | 47 - .../bare_metal_solution/rename_network.rb | 47 - .../bare_metal_solution/rename_nfs_share.rb | 47 - .../bare_metal_solution/rename_volume.rb | 47 - .../bare_metal_solution/reset_instance.rb | 54 - .../bare_metal_solution/resize_volume.rb | 54 - .../restore_volume_snapshot.rb | 54 - .../bare_metal_solution/start_instance.rb | 54 - .../bare_metal_solution/stop_instance.rb | 54 - .../submit_provisioning_config.rb | 47 - .../bare_metal_solution/update_instance.rb | 54 - .../bare_metal_solution/update_network.rb | 54 - .../bare_metal_solution/update_nfs_share.rb | 54 - .../update_provisioning_config.rb | 47 - .../bare_metal_solution/update_volume.rb | 54 - ...ata_google.cloud.baremetalsolution.v2.json | 1775 ------ .../v2/bare_metal_solution_operations_test.rb | 400 -- .../v2/bare_metal_solution_paths_test.rb | 211 - .../v2/bare_metal_solution_rest_test.rb | 2518 -------- .../v2/bare_metal_solution_test.rb | 2881 --------- .../test/helper.rb | 26 - .../google-cloud-batch-v1/.gitignore | 22 - .../google-cloud-batch-v1/.repo-metadata.json | 15 - .../google-cloud-batch-v1/.rubocop.yml | 33 - .../google-cloud-batch-v1/.toys.rb | 28 - .../google-cloud-batch-v1/.yardopts | 12 - .../google-cloud-batch-v1/AUTHENTICATION.md | 122 - .../google-cloud-batch-v1/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-batch-v1/Gemfile | 14 - .../google-cloud-batch-v1/LICENSE.md | 201 - .../google-cloud-batch-v1/README.md | 151 - .../google-cloud-batch-v1/Rakefile | 169 - .../google-cloud-batch-v1/gapic_metadata.json | 53 - .../google-cloud-batch-v1.gemspec | 30 - .../lib/google-cloud-batch-v1.rb | 22 - .../lib/google/cloud/batch/v1.rb | 45 - .../lib/google/cloud/batch/v1/batch_pb.rb | 42 - .../google/cloud/batch/v1/batch_service.rb | 58 - .../cloud/batch/v1/batch_service/client.rb | 1190 ---- .../batch/v1/batch_service/credentials.rb | 47 - .../batch/v1/batch_service/operations.rb | 841 --- .../cloud/batch/v1/batch_service/paths.rb | 113 - .../cloud/batch/v1/batch_service/rest.rb | 56 - .../batch/v1/batch_service/rest/client.rb | 1106 ---- .../batch/v1/batch_service/rest/operations.rb | 925 --- .../v1/batch_service/rest/service_stub.rb | 510 -- .../cloud/batch/v1/batch_services_pb.rb | 59 - .../cloud/batch/v1/bindings_override.rb | 75 - .../lib/google/cloud/batch/v1/job_pb.rb | 51 - .../lib/google/cloud/batch/v1/rest.rb | 38 - .../lib/google/cloud/batch/v1/task_pb.rb | 42 - .../lib/google/cloud/batch/v1/version.rb | 28 - .../lib/google/cloud/batch/v1/volume_pb.rb | 23 - .../lib/google/iam/v1.rb | 43 - .../lib/google/iam/v1/bindings_override.rb | 73 - .../lib/google/iam/v1/iam_policy.rb | 76 - .../lib/google/iam/v1/iam_policy/client.rb | 727 --- .../google/iam/v1/iam_policy/credentials.rb | 42 - .../lib/google/iam/v1/iam_policy/rest.rb | 74 - .../google/iam/v1/iam_policy/rest/client.rb | 671 -- .../iam/v1/iam_policy/rest/service_stub.rb | 265 - .../lib/google/iam/v1/rest.rb | 36 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/cloud/batch/v1/batch.rb | 246 - .../proto_docs/google/cloud/batch/v1/job.rb | 789 --- .../proto_docs/google/cloud/batch/v1/task.rb | 547 -- .../google/cloud/batch/v1/volume.rb | 92 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-batch-v1/snippets/Gemfile | 32 - .../snippets/batch_service/cancel_job.rb | 54 - .../snippets/batch_service/create_job.rb | 47 - .../snippets/batch_service/delete_job.rb | 54 - .../snippets/batch_service/get_job.rb | 47 - .../snippets/batch_service/get_task.rb | 47 - .../snippets/batch_service/list_jobs.rb | 51 - .../snippets/batch_service/list_tasks.rb | 51 - .../snippets/iam_policy/get_iam_policy.rb | 47 - .../snippets/iam_policy/set_iam_policy.rb | 47 - .../iam_policy/test_iam_permissions.rb | 47 - ...nippet_metadata_google.cloud.batch.v1.json | 295 - .../snippet_metadata_google.iam.v1.json | 135 - .../batch/v1/batch_service_operations_test.rb | 400 -- .../batch/v1/batch_service_paths_test.rb | 91 - .../cloud/batch/v1/batch_service_rest_test.rb | 490 -- .../cloud/batch/v1/batch_service_test.rb | 570 -- .../google/iam/v1/iam_policy_rest_test.rb | 265 - .../test/google/iam/v1/iam_policy_test.rb | 286 - .../google-cloud-batch-v1/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...oud-beyond_corp-app_connections-v1.gemspec | 30 - ...le-cloud-beyond_corp-app_connections-v1.rb | 21 - .../cloud/beyond_corp/app_connections/v1.rb | 42 - .../v1/app_connections_service.rb | 65 - .../v1/app_connections_service/client.rb | 1141 ---- .../v1/app_connections_service/credentials.rb | 49 - .../v1/app_connections_service/operations.rb | 843 --- .../v1/app_connections_service/paths.rb | 109 - .../beyond_corp/app_connections/v1/version.rb | 30 - .../v1/app_connections_service_pb.rb | 46 - .../v1/app_connections_service_services_pb.rb | 72 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1/app_connections_service.rb | 411 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../create_app_connection.rb | 54 - .../delete_app_connection.rb | 54 - .../get_app_connection.rb | 47 - .../list_app_connections.rb | 51 - .../resolve_app_connections.rb | 51 - .../update_app_connection.rb | 54 - ...le.cloud.beyondcorp.appconnections.v1.json | 255 - ...app_connections_service_operations_test.rb | 400 -- .../v1/app_connections_service_paths_test.rb | 91 - .../v1/app_connections_service_test.rb | 525 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...loud-beyond_corp-app_connectors-v1.gemspec | 30 - ...gle-cloud-beyond_corp-app_connectors-v1.rb | 21 - .../cloud/beyond_corp/app_connectors/v1.rb | 42 - .../v1/app_connectors_service.rb | 65 - .../v1/app_connectors_service/client.rb | 1144 ---- .../v1/app_connectors_service/credentials.rb | 49 - .../v1/app_connectors_service/operations.rb | 843 --- .../v1/app_connectors_service/paths.rb | 71 - .../beyond_corp/app_connectors/v1/version.rb | 30 - .../v1/app_connector_instance_config_pb.rb | 29 - .../v1/app_connectors_service_pb.rb | 44 - .../v1/app_connectors_service_services_pb.rb | 70 - .../appconnectors/v1/resource_info_pb.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1/app_connector_instance_config.rb | 82 - .../v1/app_connectors_service.rb | 341 - .../appconnectors/v1/resource_info.rb | 78 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../create_app_connector.rb | 54 - .../delete_app_connector.rb | 54 - .../get_app_connector.rb | 47 - .../list_app_connectors.rb | 51 - .../app_connectors_service/report_status.rb | 54 - .../update_app_connector.rb | 54 - ...gle.cloud.beyondcorp.appconnectors.v1.json | 255 - .../app_connectors_service_operations_test.rb | 400 -- .../v1/app_connectors_service_paths_test.rb | 67 - .../v1/app_connectors_service_test.rb | 523 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 38 - ...-cloud-beyond_corp-app_gateways-v1.gemspec | 30 - ...oogle-cloud-beyond_corp-app_gateways-v1.rb | 21 - .../cloud/beyond_corp/app_gateways/v1.rb | 42 - .../app_gateways/v1/app_gateways_service.rb | 65 - .../v1/app_gateways_service/client.rb | 897 --- .../v1/app_gateways_service/credentials.rb | 49 - .../v1/app_gateways_service/operations.rb | 843 --- .../v1/app_gateways_service/paths.rb | 71 - .../beyond_corp/app_gateways/v1/version.rb | 30 - .../appgateways/v1/app_gateways_service_pb.rb | 40 - .../v1/app_gateways_service_services_pb.rb | 66 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../appgateways/v1/app_gateways_service.rb | 291 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../create_app_gateway.rb | 54 - .../delete_app_gateway.rb | 54 - .../app_gateways_service/get_app_gateway.rb | 47 - .../app_gateways_service/list_app_gateways.rb | 51 - ...oogle.cloud.beyondcorp.appgateways.v1.json | 175 - .../app_gateways_service_operations_test.rb | 400 -- .../v1/app_gateways_service_paths_test.rb | 67 - .../v1/app_gateways_service_test.rb | 385 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 38 - ...oud-beyond_corp-client_gateways-v1.gemspec | 30 - ...le-cloud-beyond_corp-client_gateways-v1.rb | 21 - .../cloud/beyond_corp/client_gateways/v1.rb | 42 - .../v1/client_gateways_service.rb | 62 - .../v1/client_gateways_service/client.rb | 882 --- .../v1/client_gateways_service/credentials.rb | 49 - .../v1/client_gateways_service/operations.rb | 843 --- .../v1/client_gateways_service/paths.rb | 71 - .../beyond_corp/client_gateways/v1/version.rb | 30 - .../v1/client_gateways_service_pb.rb | 37 - .../v1/client_gateways_service_services_pb.rb | 63 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1/client_gateways_service.rb | 221 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../create_client_gateway.rb | 54 - .../delete_client_gateway.rb | 54 - .../get_client_gateway.rb | 47 - .../list_client_gateways.rb | 51 - ...le.cloud.beyondcorp.clientgateways.v1.json | 175 - ...client_gateways_service_operations_test.rb | 400 -- .../v1/client_gateways_service_paths_test.rb | 67 - .../v1/client_gateways_service_test.rb | 385 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 163 - ...le-cloud-bigquery-analytics_hub-v1.gemspec | 29 - .../google-cloud-bigquery-analytics_hub-v1.rb | 21 - .../google/cloud/bigquery/analytics_hub/v1.rb | 47 - .../analytics_hub/v1/analytics_hub_service.rb | 63 - .../v1/analytics_hub_service/client.rb | 3310 ---------- .../v1/analytics_hub_service/credentials.rb | 50 - .../v1/analytics_hub_service/operations.rb | 843 --- .../v1/analytics_hub_service/paths.rb | 218 - .../v1/analytics_hub_service/rest.rb | 60 - .../v1/analytics_hub_service/rest/client.rb | 3064 --------- .../analytics_hub_service/rest/operations.rb | 927 --- .../rest/service_stub.rb | 1914 ------ .../cloud/bigquery/analytics_hub/v1/rest.rb | 39 - .../bigquery/analytics_hub/v1/version.rb | 30 - .../analyticshub/v1/analyticshub_pb.rb | 108 - .../v1/analyticshub_services_pb.rb | 119 - .../bigquery/analyticshub/v1/pubsub_pb.rb | 40 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../bigquery/analyticshub/v1/analyticshub.rb | 1364 ---- .../cloud/bigquery/analyticshub/v1/pubsub.rb | 559 -- .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../approve_query_template.rb | 47 - .../create_data_exchange.rb | 47 - .../analytics_hub_service/create_listing.rb | 47 - .../create_query_template.rb | 47 - .../delete_data_exchange.rb | 47 - .../analytics_hub_service/delete_listing.rb | 47 - .../delete_query_template.rb | 47 - .../delete_subscription.rb | 54 - .../get_data_exchange.rb | 47 - .../analytics_hub_service/get_iam_policy.rb | 47 - .../analytics_hub_service/get_listing.rb | 47 - .../get_query_template.rb | 47 - .../analytics_hub_service/get_subscription.rb | 47 - .../list_data_exchanges.rb | 51 - .../analytics_hub_service/list_listings.rb | 51 - .../list_org_data_exchanges.rb | 51 - .../list_query_templates.rb | 51 - .../list_shared_resource_subscriptions.rb | 51 - .../list_subscriptions.rb | 51 - .../refresh_subscription.rb | 54 - .../revoke_subscription.rb | 47 - .../analytics_hub_service/set_iam_policy.rb | 47 - .../submit_query_template.rb | 47 - .../subscribe_data_exchange.rb | 54 - .../subscribe_listing.rb | 47 - .../test_iam_permissions.rb | 47 - .../update_data_exchange.rb | 47 - .../analytics_hub_service/update_listing.rb | 47 - .../update_query_template.rb | 47 - ...google.cloud.bigquery.analyticshub.v1.json | 1175 ---- .../analytics_hub_service_operations_test.rb | 400 -- .../v1/analytics_hub_service_paths_test.rb | 163 - .../v1/analytics_hub_service_rest_test.rb | 1699 ----- .../v1/analytics_hub_service_test.rb | 1914 ------ .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 58 - ...oogle-cloud-bigquery-connection-v1.gemspec | 29 - .../google-cloud-bigquery-connection-v1.rb | 21 - .../google/cloud/bigquery/connection/v1.rb | 47 - .../bigquery/connection/v1/connection_pb.rb | 51 - .../connection/v1/connection_service.rb | 57 - .../v1/connection_service/client.rb | 1202 ---- .../v1/connection_service/credentials.rb | 54 - .../connection/v1/connection_service/paths.rb | 109 - .../connection/v1/connection_service/rest.rb | 54 - .../v1/connection_service/rest/client.rb | 1103 ---- .../connection_service/rest/service_stub.rb | 576 -- .../connection/v1/connection_services_pb.rb | 73 - .../cloud/bigquery/connection/v1/rest.rb | 39 - .../cloud/bigquery/connection/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../bigquery/connection/v1/connection.rb | 449 -- .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../connection_service/create_connection.rb | 47 - .../connection_service/delete_connection.rb | 47 - .../connection_service/get_connection.rb | 47 - .../connection_service/get_iam_policy.rb | 47 - .../connection_service/list_connections.rb | 51 - .../connection_service/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../connection_service/update_connection.rb | 47 - ...a_google.cloud.bigquery.connection.v1.json | 335 - .../v1/connection_service_paths_test.rb | 91 - .../v1/connection_service_rest_test.rb | 541 -- .../connection/v1/connection_service_test.rb | 593 -- .../test/helper.rb | 26 - 1784 files changed, 90 insertions(+), 393729 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google-cloud-apigee_connect-v1.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/connection.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/tether.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/snippets/connection_service/list_connections.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/snippets/snippet_metadata_google.cloud.apigeeconnect.v1.json delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/snippets/tether/egress.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_connect-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_models_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb delete mode 100644 owl-bot-staging/google-cloud-apigee_registry-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google-cloud-app_engine-v1.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/app_yaml_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/application_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/audit_data_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/certificate_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deploy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deployed_files_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_mapping_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/firewall_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/instance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/location_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/network_settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/operation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/version_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/app_yaml.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/appengine.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/application.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/audit_data.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/certificate.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/deploy.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain_mapping.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/firewall.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/instance.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/location.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/network_settings.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/operation.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/create_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/get_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/repair_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/update_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/create_authorized_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/delete_authorized_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/get_authorized_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/list_authorized_certificates.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/update_authorized_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_domains/list_authorized_domains.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/create_domain_mapping.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/delete_domain_mapping.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/get_domain_mapping.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/list_domain_mappings.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/update_domain_mapping.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/batch_update_ingress_rules.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/create_ingress_rule.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/delete_ingress_rule.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/get_ingress_rule.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/list_ingress_rules.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/update_ingress_rule.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/debug_instance.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/delete_instance.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/list_instances.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/services/delete_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/services/get_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/services/list_services.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/services/update_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/snippet_metadata_google.appengine.v1.json delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/create_version.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/delete_version.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/get_version.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/list_versions.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/update_version.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_engine-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/application_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/attributes_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/service_project_attachment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/workload_pb.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb delete mode 100644 owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb delete mode 100644 owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-asset-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-asset-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-asset-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-asset-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-asset-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-asset-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-asset-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-asset-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-asset-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-asset-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-asset-v1/google-cloud-asset-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google-cloud-asset-v1.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_enrichment_resourceowners_pb.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/assets_pb.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_enrichment_resourceowners.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_service.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/assets.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/osconfig/v1/inventory.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/code.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy_longrunning.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_move.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policies.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_assets.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_containers.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_assets_history.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_effective_iam_policies.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_feed.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_saved_query.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_feed.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_saved_query.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/export_assets.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_feed.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_saved_query.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_assets.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_feeds.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_saved_queries.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/query_assets.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_iam_policies.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_resources.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_feed.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_saved_query.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json delete mode 100644 owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-asset-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-automl-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/ranges_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/regression_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb delete mode 100644 owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-batch-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json delete mode 100644 owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb delete mode 100644 owl-bot-staging/google-cloud-batch-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google-cloud-bigquery-connection-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/cloud/bigquery/connection/v1/connection.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/create_connection.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/delete_connection.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_connection.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/list_connections.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/update_connection.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/snippet_metadata_google.cloud.bigquery.connection.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-connection-v1/test/helper.rb diff --git a/google-cloud-apigee_connect-v1/proto_docs/google/api/client.rb b/google-cloud-apigee_connect-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-apigee_connect-v1/proto_docs/google/api/client.rb +++ b/google-cloud-apigee_connect-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb b/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb +++ b/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-app_engine-v1/proto_docs/google/api/client.rb b/google-cloud-app_engine-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-app_engine-v1/proto_docs/google/api/client.rb +++ b/google-cloud-app_engine-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-app_hub-v1/proto_docs/google/api/client.rb b/google-cloud-app_hub-v1/proto_docs/google/api/client.rb index a8b1b06d1cad..c58739e32368 100644 --- a/google-cloud-app_hub-v1/proto_docs/google/api/client.rb +++ b/google-cloud-app_hub-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb b/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb b/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb +++ b/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-asset-v1/proto_docs/google/api/client.rb b/google-cloud-asset-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-asset-v1/proto_docs/google/api/client.rb +++ b/google-cloud-asset-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-asset-v1/proto_docs/google/type/date.rb b/google-cloud-asset-v1/proto_docs/google/type/date.rb index ad63b93044e0..a7ce5a595a1e 100644 --- a/google-cloud-asset-v1/proto_docs/google/type/date.rb +++ b/google-cloud-asset-v1/proto_docs/google/type/date.rb @@ -24,14 +24,17 @@ module Type # 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 value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date + # * 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 are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. + # 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 diff --git a/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb b/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb +++ b/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-automl-v1/proto_docs/google/api/client.rb b/google-cloud-automl-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-automl-v1/proto_docs/google/api/client.rb +++ b/google-cloud-automl-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-backupdr-v1/proto_docs/google/api/client.rb b/google-cloud-backupdr-v1/proto_docs/google/api/client.rb index a8b1b06d1cad..c58739e32368 100644 --- a/google-cloud-backupdr-v1/proto_docs/google/api/client.rb +++ b/google-cloud-backupdr-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb b/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb +++ b/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-batch-v1/proto_docs/google/api/client.rb b/google-cloud-batch-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-batch-v1/proto_docs/google/api/client.rb +++ b/google-cloud-batch-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb +++ b/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb +++ b/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb +++ b/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb +++ b/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/.gitignore b/owl-bot-staging/google-cloud-apigee_connect-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-apigee_connect-v1/.repo-metadata.json deleted file mode 100644 index 91826efe92e3..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "apigeeconnect.googleapis.com", - "api_shortname": "apigeeconnect", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_connect-v1/latest", - "distribution_name": "google-cloud-apigee_connect-v1", - "is_cloud": true, - "language": "ruby", - "name": "apigeeconnect", - "name_pretty": "Apigee Connect V1 API", - "product_documentation": "https://cloud.google.com/apigee/docs/hybrid/v1.4/apigee-connect", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Apigee Connect allows the Apigee hybrid management plane to connect securely to the MART service in the runtime plane without requiring you to expose the MART endpoint on the internet. If you use Apigee Connect, you do not need to configure the MART ingress gateway with a host alias and an authorized DNS certificate. Note that google-cloud-apigee_connect-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_connect instead. See the readme for more details.", - "ruby-cloud-env-prefix": "APIGEE_CONNECT", - "ruby-cloud-product-url": "https://cloud.google.com/apigee/docs/hybrid/v1.4/apigee-connect", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/.rubocop.yml b/owl-bot-staging/google-cloud-apigee_connect-v1/.rubocop.yml deleted file mode 100644 index fc7c16a5d866..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-apigee_connect-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-apigee_connect-v1.rb" diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/.toys.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/.yardopts b/owl-bot-staging/google-cloud-apigee_connect-v1/.yardopts deleted file mode 100644 index dd003fbe55df..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Apigee Connect 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-apigee_connect-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-apigee_connect-v1/AUTHENTICATION.md deleted file mode 100644 index 9bc1a46ec1cd..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-apigee_connect-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-apigee_connect-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/apigee_connect/v1" - -client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/apigee_connect/v1" - -::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::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-apigee_connect-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/apigee_connect/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::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-apigee_connect-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-apigee_connect-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/Gemfile b/owl-bot-staging/google-cloud-apigee_connect-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/Gemfile +++ /dev/null @@ -1,14 +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-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-apigee_connect-v1/LICENSE.md b/owl-bot-staging/google-cloud-apigee_connect-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/README.md b/owl-bot-staging/google-cloud-apigee_connect-v1/README.md deleted file mode 100644 index 025f0e36665d..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Apigee Connect V1 API - -API Client library for the Apigee Connect V1 API - -Apigee Connect allows the Apigee hybrid management plane to connect securely to the MART service in the runtime plane without requiring you to expose the MART endpoint on the internet. If you use Apigee Connect, you do not need to configure the MART ingress gateway with a host alias and an authorized DNS certificate. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Apigee Connect V1 API. Most users should consider using -the main client gem, -[google-cloud-apigee_connect](https://rubygems.org/gems/google-cloud-apigee_connect). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-apigee_connect-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/apigeeconnect.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/apigee_connect/v1" - -client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new -request = ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new # (request fields as keyword arguments...) -response = client.list_connections request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_connect-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/apigee/docs/hybrid/v1.4/apigee-connect) -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/apigee_connect/v1" -require "logger" - -client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-apigee_connect`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-apigee_connect-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-apigee_connect`. -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-apigee_connect-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-apigee_connect-v1/Rakefile b/owl-bot-staging/google-cloud-apigee_connect-v1/Rakefile deleted file mode 100644 index b7a281b5a147..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["APIGEE_CONNECT_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["APIGEE_CONNECT_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["APIGEE_CONNECT_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 APIGEE_CONNECT_TEST_PROJECT=test123 APIGEE_CONNECT_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/apigee_connect/v1/connection_service/credentials" - ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["APIGEE_CONNECT_PROJECT"] = project - ENV["APIGEE_CONNECT_TEST_PROJECT"] = project - ENV["APIGEE_CONNECT_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-apigee_connect-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-apigee_connect-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-apigee_connect-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-apigee_connect-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-apigee_connect-v1" - header "google-cloud-apigee_connect-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-apigee_connect-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-apigee_connect-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-apigee_connect-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-apigee_connect-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-apigee_connect-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-apigee_connect-v1/gapic_metadata.json deleted file mode 100644 index 4940800bad0c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/gapic_metadata.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.apigeeconnect.v1", - "libraryPackage": "::Google::Cloud::ApigeeConnect::V1", - "services": { - "ConnectionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client", - "rpcs": { - "ListConnections": { - "methods": [ - "list_connections" - ] - } - } - } - } - }, - "Tether": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ApigeeConnect::V1::Tether::Client", - "rpcs": { - "Egress": { - "methods": [ - "egress" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec b/owl-bot-staging/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec deleted file mode 100644 index 322f42b394a9..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/google-cloud-apigee_connect-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/apigee_connect/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-apigee_connect-v1" - gem.version = Google::Cloud::ApigeeConnect::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Apigee Connect allows the Apigee hybrid management plane to connect securely to the MART service in the runtime plane without requiring you to expose the MART endpoint on the internet. If you use Apigee Connect, you do not need to configure the MART ingress gateway with a host alias and an authorized DNS certificate. Note that google-cloud-apigee_connect-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_connect instead. See the readme for more details." - gem.summary = "API Client library for the Apigee Connect V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google-cloud-apigee_connect-v1.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google-cloud-apigee_connect-v1.rb deleted file mode 100644 index 1e52fc5c9c50..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google-cloud-apigee_connect-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/apigee_connect/v1" diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1.rb deleted file mode 100644 index 1479077da696..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigee_connect/v1/connection_service" -require "google/cloud/apigee_connect/v1/tether" -require "google/cloud/apigee_connect/v1/version" - -module Google - module Cloud - module ApigeeConnect - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/apigee_connect/v1" - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/apigee_connect/v1" - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/apigee_connect/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service.rb deleted file mode 100644 index a415294e9587..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_connect/v1/version" - -require "google/cloud/apigee_connect/v1/connection_service/credentials" -require "google/cloud/apigee_connect/v1/connection_service/paths" -require "google/cloud/apigee_connect/v1/connection_service/client" -require "google/cloud/apigee_connect/v1/connection_service/rest" - -module Google - module Cloud - module ApigeeConnect - module V1 - ## - # Service Interface for the Apigee Connect connection management APIs. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/apigee_connect/v1/connection_service" - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/apigee_connect/v1/connection_service/rest" - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new - # - module ConnectionService - end - end - end - end -end - -helper_path = ::File.join __dir__, "connection_service", "helpers.rb" -require "google/cloud/apigee_connect/v1/connection_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/client.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/client.rb deleted file mode 100644 index 1ae6da89b0c1..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/client.rb +++ /dev/null @@ -1,497 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apigeeconnect/v1/connection_pb" - -module Google - module Cloud - module ApigeeConnect - module V1 - module ConnectionService - ## - # Client for the ConnectionService service. - # - # Service Interface for the Apigee Connect connection management APIs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeconnect.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :connection_service_stub - - ## - # Configure the ConnectionService Client class. - # - # See {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConnectionService clients - # ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeConnect", "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_connections.timeout = 60.0 - default_config.rpcs.list_connections.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConnectionService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @connection_service_stub.universe_domain - end - - ## - # Create a new ConnectionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConnectionService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed 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/apigeeconnect/v1/connection_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @connection_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @connection_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 - @connection_service_stub.logger - end - - # Service calls - - ## - # Lists connections that are currently active for the given Apigee Connect - # endpoint. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_connections(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent name of the form: - # `projects/{project_number or project_id}/endpoints/{endpoint}`. - # @param page_size [::Integer] - # The maximum number of connections to return. The service may return fewer - # than this value. If unspecified, at most 100 connections 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 `ListConnections` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListConnections` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeConnect::V1::Connection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeConnect::V1::Connection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeConnect::V1::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.call_rpc :list_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @connection_service_stub, :list_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConnectionService API. - # - # This class represents the configuration for ConnectionService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_connections to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_connections.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_connections.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ConnectionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - - # @private - def initialize parent_rpcs = nil - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/credentials.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/credentials.rb deleted file mode 100644 index dc8578056d40..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ApigeeConnect - module V1 - module ConnectionService - # Credentials for the ConnectionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "APIGEE_CONNECT_CREDENTIALS", - "APIGEE_CONNECT_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APIGEE_CONNECT_CREDENTIALS_JSON", - "APIGEE_CONNECT_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-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/paths.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/paths.rb deleted file mode 100644 index 1b0007f89dcf..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/paths.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeConnect - module V1 - module ConnectionService - # Path helper methods for the ConnectionService API. - module Paths - ## - # Create a fully-qualified Endpoint resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/endpoints/{endpoint}` - # - # @param project [String] - # @param endpoint [String] - # - # @return [::String] - def endpoint_path project:, endpoint: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/endpoints/#{endpoint}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest.rb deleted file mode 100644 index 9ecb4dbed2ea..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_connect/v1/version" - -require "google/cloud/apigee_connect/v1/connection_service/credentials" -require "google/cloud/apigee_connect/v1/connection_service/paths" -require "google/cloud/apigee_connect/v1/connection_service/rest/client" - -module Google - module Cloud - module ApigeeConnect - module V1 - ## - # Service Interface for the Apigee Connect connection management APIs. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/apigee_connect/v1/connection_service/rest" - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new - # - module ConnectionService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/apigee_connect/v1/connection_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/client.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/client.rb deleted file mode 100644 index 79006b137a6b..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/client.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apigeeconnect/v1/connection_pb" -require "google/cloud/apigee_connect/v1/connection_service/rest/service_stub" - -module Google - module Cloud - module ApigeeConnect - module V1 - module ConnectionService - module Rest - ## - # REST client for the ConnectionService service. - # - # Service Interface for the Apigee Connect connection management APIs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeconnect.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :connection_service_stub - - ## - # Configure the ConnectionService Client class. - # - # See {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConnectionService clients - # ::Google::Cloud::ApigeeConnect::V1::ConnectionService::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", "ApigeeConnect", "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_connections.timeout = 60.0 - default_config.rpcs.list_connections.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConnectionService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeConnect::V1::ConnectionService::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 - @connection_service_stub.universe_domain - end - - ## - # Create a new ConnectionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConnectionService 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 - - @connection_service_stub = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @connection_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 - @connection_service_stub.logger - end - - # Service calls - - ## - # Lists connections that are currently active for the given Apigee Connect - # endpoint. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_connections(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent name of the form: - # `projects/{project_number or project_id}/endpoints/{endpoint}`. - # @param page_size [::Integer] - # The maximum number of connections to return. The service may return fewer - # than this value. If unspecified, at most 100 connections 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 `ListConnections` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListConnections` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeConnect::V1::Connection>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeConnect::V1::Connection>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeConnect::V1::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_connections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.list_connections request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @connection_service_stub, :list_connections, "connections", request, result, 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 ConnectionService REST API. - # - # This class represents the configuration for ConnectionService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_connections to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_connections.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_connections.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ConnectionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - - # @private - def initialize parent_rpcs = nil - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_service/rest/service_stub.rb deleted file mode 100644 index a99183b5f225..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/connection_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/cloud/apigeeconnect/v1/connection_pb" - -module Google - module Cloud - module ApigeeConnect - module V1 - module ConnectionService - module Rest - ## - # REST service stub for the ConnectionService 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_connections REST call - # - # @param request_pb [::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse] - # A result object deserialized from the server's reply - def list_connections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_connections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse.decode_json response.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_connections REST call - # - # @param request_pb [::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_connections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/connections", - matches: [ - ["parent", %r{^projects/[^/]+/endpoints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/rest.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/rest.rb deleted file mode 100644 index 00949ed51688..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigee_connect/v1/connection_service/rest" -require "google/cloud/apigee_connect/v1/version" - -module Google - module Cloud - module ApigeeConnect - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/apigee_connect/v1/rest" - # client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether.rb deleted file mode 100644 index 01a4b181b163..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_connect/v1/version" - -require "google/cloud/apigee_connect/v1/tether/credentials" -require "google/cloud/apigee_connect/v1/tether/client" - -module Google - module Cloud - module ApigeeConnect - module V1 - ## - # Tether provides a way for the control plane to send HTTP API requests to - # services in data planes that runs in a remote datacenter without - # requiring customers to open firewalls on their runtime plane. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/apigee_connect/v1/tether" - # client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new - # - module Tether - end - end - end - end -end - -helper_path = ::File.join __dir__, "tether", "helpers.rb" -require "google/cloud/apigee_connect/v1/tether/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/client.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/client.rb deleted file mode 100644 index b29a2fbdc57c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apigeeconnect/v1/tether_pb" - -module Google - module Cloud - module ApigeeConnect - module V1 - module Tether - ## - # Client for the Tether service. - # - # Tether provides a way for the control plane to send HTTP API requests to - # services in data planes that runs in a remote datacenter without - # requiring customers to open firewalls on their runtime plane. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeconnect.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :tether_stub - - ## - # Configure the Tether Client class. - # - # See {::Google::Cloud::ApigeeConnect::V1::Tether::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Tether clients - # ::Google::Cloud::ApigeeConnect::V1::Tether::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeConnect", "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 Tether Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeConnect::V1::Tether::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @tether_stub.universe_domain - end - - ## - # Create a new Tether client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Tether client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed 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/apigeeconnect/v1/tether_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @tether_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ApigeeConnect::V1::Tether::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @tether_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.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 - @tether_stub.logger - end - - # Service calls - - ## - # Egress streams egress requests and responses. Logically, this is not - # actually a streaming request, but uses streaming as a mechanism to flip - # the client-server relationship of gRPC so that the server can act as a - # client. - # The listener, the RPC server, accepts connections from the dialer, - # the RPC client. - # The listener streams http requests and the dialer streams http responses. - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::ApigeeConnect::V1::EgressResponse, ::Hash>] - # An enumerable of {::Google::Cloud::ApigeeConnect::V1::EgressResponse} instances. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::ApigeeConnect::V1::EgressRequest>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::ApigeeConnect::V1::EgressRequest>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeConnect::V1::Tether::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the egress method to start streaming. - # output = client.egress input - # - # # Send requests on the stream. For each request object, set fields by - # # passing keyword arguments. Be sure to close the stream when done. - # input << Google::Cloud::ApigeeConnect::V1::EgressResponse.new - # input << Google::Cloud::ApigeeConnect::V1::EgressResponse.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::ApigeeConnect::V1::EgressRequest - # output.each do |current_response| - # p current_response - # end - # - def egress request, options = nil - unless request.is_a? ::Enumerable - raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum - request = request.to_enum - end - - request = request.lazy.map do |req| - ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::ApigeeConnect::V1::EgressResponse - end - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.egress.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeConnect::V1::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.egress.timeout, - metadata: metadata, - retry_policy: @config.rpcs.egress.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tether_stub.call_rpc :egress, request, 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 Tether API. - # - # This class represents the configuration for Tether, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeConnect::V1::Tether::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # egress to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeConnect::V1::Tether::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.egress.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.egress.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::ApigeeConnect::V1::Tether::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Tether API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `egress` - # @return [::Gapic::Config::Method] - # - attr_reader :egress - - # @private - def initialize parent_rpcs = nil - egress_config = parent_rpcs.egress if parent_rpcs.respond_to? :egress - @egress = ::Gapic::Config::Method.new egress_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/credentials.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/credentials.rb deleted file mode 100644 index 60743841a893..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/tether/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 ApigeeConnect - module V1 - module Tether - # Credentials for the Tether API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "APIGEE_CONNECT_CREDENTIALS", - "APIGEE_CONNECT_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APIGEE_CONNECT_CREDENTIALS_JSON", - "APIGEE_CONNECT_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-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/version.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/v1/version.rb deleted file mode 100644 index 637caa5512b7..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigee_connect/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 ApigeeConnect - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_pb.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_pb.rb deleted file mode 100644 index 9c3698701bf4..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/apigeeconnect/v1/connection.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/cloud/apigeeconnect/v1/connection.proto\x12\x1dgoogle.cloud.apigeeconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"~\n\x16ListConnectionsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeconnect.googleapis.com/Endpoint\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x17ListConnectionsResponse\x12>\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32).google.cloud.apigeeconnect.v1.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"m\n\nConnection\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x37\n\x07\x63luster\x18\x02 \x01(\x0b\x32&.google.cloud.apigeeconnect.v1.Cluster\x12\x14\n\x0cstream_count\x18\x03 \x01(\x05\"\'\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t2\xaa\x02\n\x11\x43onnectionService\x12\xc2\x01\n\x0fListConnections\x12\x35.google.cloud.apigeeconnect.v1.ListConnectionsRequest\x1a\x36.google.cloud.apigeeconnect.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/endpoints/*}/connections\x1aP\xca\x41\x1c\x61pigeeconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb5\x02\n!com.google.cloud.apigeeconnect.v1B\x0f\x43onnectionProtoP\x01ZGcloud.google.com/go/apigeeconnect/apiv1/apigeeconnectpb;apigeeconnectpb\xaa\x02\x1dGoogle.Cloud.ApigeeConnect.V1\xca\x02\x1dGoogle\\Cloud\\ApigeeConnect\\V1\xea\x02 Google::Cloud::ApigeeConnect::V1\xea\x41P\n%apigeeconnect.googleapis.com/Endpoint\x12\'projects/{project}/endpoints/{endpoint}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ApigeeConnect - module V1 - ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.ListConnectionsRequest").msgclass - ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.ListConnectionsResponse").msgclass - Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Connection").msgclass - Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Cluster").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_services_pb.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_services_pb.rb deleted file mode 100644 index 9afb7c1bfa61..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/connection_services_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/apigeeconnect/v1/connection.proto for package 'Google.Cloud.ApigeeConnect.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/apigeeconnect/v1/connection_pb' - -module Google - module Cloud - module ApigeeConnect - module V1 - module ConnectionService - # Service Interface for the Apigee Connect connection management APIs. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.apigeeconnect.v1.ConnectionService' - - # Lists connections that are currently active for the given Apigee Connect - # endpoint. - rpc :ListConnections, ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest, ::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_pb.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_pb.rb deleted file mode 100644 index 57d9c1d67542..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/apigeeconnect/v1/tether.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' -require 'google/rpc/status_pb' -require 'google/api/client_pb' - - -descriptor_data = "\n*google/cloud/apigeeconnect/v1/tether.proto\x12\x1dgoogle.cloud.apigeeconnect.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\x1a\x17google/api/client.proto\"\xe4\x01\n\rEgressRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x37\n\x07payload\x18\x02 \x01(\x0b\x32&.google.cloud.apigeeconnect.v1.Payload\x12?\n\x08\x65ndpoint\x18\x03 \x01(\x0e\x32-.google.cloud.apigeeconnect.v1.TetherEndpoint\x12\x0f\n\x07project\x18\x04 \x01(\t\x12\x10\n\x08trace_id\x18\x05 \x01(\t\x12*\n\x07timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xd0\x01\n\x07Payload\x12\x42\n\x0chttp_request\x18\x01 \x01(\x0b\x32*.google.cloud.apigeeconnect.v1.HttpRequestH\x00\x12@\n\x0bstream_info\x18\x02 \x01(\x0b\x32).google.cloud.apigeeconnect.v1.StreamInfoH\x00\x12\x37\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32%.google.cloud.apigeeconnect.v1.ActionH\x00\x42\x06\n\x04kind\"\x18\n\nStreamInfo\x12\n\n\x02id\x18\x01 \x01(\t\"\xf6\x01\n\x0e\x45gressResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x42\n\rhttp_response\x18\x02 \x01(\x0b\x32+.google.cloud.apigeeconnect.v1.HttpResponse\x12\"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0f\n\x07project\x18\x04 \x01(\t\x12\x10\n\x08trace_id\x18\x05 \x01(\t\x12?\n\x08\x65ndpoint\x18\x06 \x01(\x0e\x32-.google.cloud.apigeeconnect.v1.TetherEndpoint\x12\x0c\n\x04name\x18\x07 \x01(\t\"\xa0\x01\n\x0bHttpRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06method\x18\x02 \x01(\t\x12/\n\x03url\x18\x03 \x01(\x0b\x32\".google.cloud.apigeeconnect.v1.Url\x12\x36\n\x07headers\x18\x04 \x03(\x0b\x32%.google.cloud.apigeeconnect.v1.Header\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\"X\n\x03Url\x12\x35\n\x06scheme\x18\x01 \x01(\x0e\x32%.google.cloud.apigeeconnect.v1.Scheme\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x0c\n\x04path\x18\x03 \x01(\t\"%\n\x06Header\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\t\"\x9d\x01\n\x0cHttpResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06status\x18\x02 \x01(\t\x12\x13\n\x0bstatus_code\x18\x03 \x01(\x05\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12\x36\n\x07headers\x18\x05 \x03(\x0b\x32%.google.cloud.apigeeconnect.v1.Header\x12\x16\n\x0e\x63ontent_length\x18\x06 \x01(\x03*5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x13\n\x0fOPEN_NEW_STREAM\x10\x01*n\n\x0eTetherEndpoint\x12\x1f\n\x1bTETHER_ENDPOINT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41PIGEE_MART\x10\x01\x12\x12\n\x0e\x41PIGEE_RUNTIME\x10\x02\x12\x16\n\x12\x41PIGEE_MINT_RATING\x10\x03*+\n\x06Scheme\x12\x16\n\x12SCHEME_UNSPECIFIED\x10\x00\x12\t\n\x05HTTPS\x10\x01\x32\xc7\x01\n\x06Tether\x12k\n\x06\x45gress\x12-.google.cloud.apigeeconnect.v1.EgressResponse\x1a,.google.cloud.apigeeconnect.v1.EgressRequest\"\x00(\x01\x30\x01\x1aP\xca\x41\x1c\x61pigeeconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xde\x01\n!com.google.cloud.apigeeconnect.v1B\x0bTetherProtoP\x01ZGcloud.google.com/go/apigeeconnect/apiv1/apigeeconnectpb;apigeeconnectpb\xaa\x02\x1dGoogle.Cloud.ApigeeConnect.V1\xca\x02\x1dGoogle\\Cloud\\ApigeeConnect\\V1\xea\x02 Google::Cloud::ApigeeConnect::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ApigeeConnect - module V1 - EgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.EgressRequest").msgclass - Payload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Payload").msgclass - StreamInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.StreamInfo").msgclass - EgressResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.EgressResponse").msgclass - HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.HttpRequest").msgclass - Url = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Url").msgclass - Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Header").msgclass - HttpResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.HttpResponse").msgclass - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Action").enummodule - TetherEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.TetherEndpoint").enummodule - Scheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeconnect.v1.Scheme").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_services_pb.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_services_pb.rb deleted file mode 100644 index 93ccf9bb3a74..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/lib/google/cloud/apigeeconnect/v1/tether_services_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/apigeeconnect/v1/tether.proto for package 'Google.Cloud.ApigeeConnect.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/apigeeconnect/v1/tether_pb' - -module Google - module Cloud - module ApigeeConnect - module V1 - module Tether - # Tether provides a way for the control plane to send HTTP API requests to - # services in data planes that runs in a remote datacenter without - # requiring customers to open firewalls on their runtime plane. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.apigeeconnect.v1.Tether' - - # Egress streams egress requests and responses. Logically, this is not - # actually a streaming request, but uses streaming as a mechanism to flip - # the client-server relationship of gRPC so that the server can act as a - # client. - # The listener, the RPC server, accepts connections from the dialer, - # the RPC client. - # The listener streams http requests and the dialer streams http responses. - rpc :Egress, stream(::Google::Cloud::ApigeeConnect::V1::EgressResponse), stream(::Google::Cloud::ApigeeConnect::V1::EgressRequest) - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/README.md deleted file mode 100644 index 7b1ef3536a41..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Apigee Connect 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-apigee_connect-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/connection.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/connection.rb deleted file mode 100644 index 68e600e41f38..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/connection.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeConnect - module V1 - # The request for [ListConnections][Management.ListConnections]. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent name of the form: - # `projects/{project_number or project_id}/endpoints/{endpoint}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of connections to return. The service may return fewer - # than this value. If unspecified, at most 100 connections 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 `ListConnections` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListConnections` must - # match the call that provided the page token. - class ListConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # [ListConnections][Management.ListConnections]. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::ApigeeConnect::V1::Connection>] - # A list of clients. - # @!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 ListConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] endpoint - # @return [::String] - # The endpoint that the connection is made against. - # Format: `projects/{project_number}/endpoints/{endpoint}` - # @!attribute [rw] cluster - # @return [::Google::Cloud::ApigeeConnect::V1::Cluster] - # Cluster information. - # @!attribute [rw] stream_count - # @return [::Integer] - # The count of streams. - class Connection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # The name of the cluster. - # @!attribute [rw] region - # @return [::String] - # The region of the cluster. - class Cluster - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/tether.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/tether.rb deleted file mode 100644 index a9029adc4965..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/cloud/apigeeconnect/v1/tether.rb +++ /dev/null @@ -1,221 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeConnect - module V1 - # gRPC request payload for tether. - # @!attribute [rw] id - # @return [::String] - # Unique identifier for the request. - # @!attribute [rw] payload - # @return [::Google::Cloud::ApigeeConnect::V1::Payload] - # Actual payload to send to agent. - # @!attribute [rw] endpoint - # @return [::Google::Cloud::ApigeeConnect::V1::TetherEndpoint] - # Tether Endpoint. - # @!attribute [rw] project - # @return [::String] - # GCP Project. - # Format: `projects/{project_number}`. - # @!attribute [rw] trace_id - # @return [::String] - # Unique identifier for clients to trace their request/response. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Timeout for the HTTP request. - class EgressRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Payload for EgressRequest. - # @!attribute [rw] http_request - # @return [::Google::Cloud::ApigeeConnect::V1::HttpRequest] - # The HttpRequest proto. - # - # Note: The following fields are mutually exclusive: `http_request`, `stream_info`, `action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] stream_info - # @return [::Google::Cloud::ApigeeConnect::V1::StreamInfo] - # The information of stream. - # - # Note: The following fields are mutually exclusive: `stream_info`, `http_request`, `action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] action - # @return [::Google::Cloud::ApigeeConnect::V1::Action] - # The action taken by agent. - # - # Note: The following fields are mutually exclusive: `action`, `http_request`, `stream_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Payload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Information of bi-directional stream. - # @!attribute [rw] id - # @return [::String] - # Unique identifier for the stream. - class StreamInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # gRPC response payload for tether. - # @!attribute [rw] id - # @return [::String] - # Unique identifier for the response. Matches the EgressRequest's id. - # @!attribute [rw] http_response - # @return [::Google::Cloud::ApigeeConnect::V1::HttpResponse] - # HttpResponse. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # Errors from application when handling the http request. - # @!attribute [rw] project - # @return [::String] - # GCP Project. - # Format: `projects/{project_number}`. - # @!attribute [rw] trace_id - # @return [::String] - # Unique identifier for clients to trace their request/response. Matches the - # EgressRequest's trace id - # @!attribute [rw] endpoint - # @return [::Google::Cloud::ApigeeConnect::V1::TetherEndpoint] - # Tether Endpoint. - # @!attribute [rw] name - # @return [::String] - # Name is the full resource path of endpoint. - # Format: `projects/{project_number or project_id}/endpoints/{endpoint}` - class EgressResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The proto definition of http request. - # @!attribute [rw] id - # @return [::String] - # A unique identifier for the request. - # @!attribute [rw] method - # @return [::String] - # The HTTP request method. - # Valid methods: "GET", "HEAD", "POST", "PUT", "PATCH","DELETE". - # @!attribute [rw] url - # @return [::Google::Cloud::ApigeeConnect::V1::Url] - # The HTTP request URL. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::ApigeeConnect::V1::Header>] - # The HTTP request headers. - # @!attribute [rw] body - # @return [::String] - # HTTP request body. - class HttpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The proto definition of url. - # A url represents a URL and the general form represented is: - # - # `[scheme://][google.cloud.apigeeconnect.v1.Url.host][path]` - # @!attribute [rw] scheme - # @return [::Google::Cloud::ApigeeConnect::V1::Scheme] - # Scheme. - # @!attribute [rw] host - # @return [::String] - # Host or Host:Port. - # @!attribute [rw] path - # @return [::String] - # Path starts with `/`. - class Url - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The http headers. - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] values - # @return [::Array<::String>] - class Header - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The proto definition of http response. - # @!attribute [rw] id - # @return [::String] - # A unique identifier that matches the request ID. - # @!attribute [rw] status - # @return [::String] - # Status of http response, e.g. "200 OK". - # @!attribute [rw] status_code - # @return [::Integer] - # Status code of http response, e.g. 200. - # @!attribute [rw] body - # @return [::String] - # The HTTP 1.1 response body. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::ApigeeConnect::V1::Header>] - # The HTTP response headers. - # @!attribute [rw] content_length - # @return [::Integer] - # Content length records the length of the associated content. The - # value -1 indicates that the length is unknown. Unless http method - # is "HEAD", values >= 0 indicate that the given number of bytes may - # be read from Body. - class HttpResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The action taken by agent. - module Action - # Unspecified Action. - ACTION_UNSPECIFIED = 0 - - # Indicates that agent should open a new stream. - OPEN_NEW_STREAM = 1 - end - - # Endpoint indicates where the messages will be delivered. - module TetherEndpoint - # Unspecified tether endpoint. - TETHER_ENDPOINT_UNSPECIFIED = 0 - - # Apigee MART endpoint. - APIGEE_MART = 1 - - # Apigee Runtime endpoint. - APIGEE_RUNTIME = 2 - - # Apigee Mint Rating endpoint. - APIGEE_MINT_RATING = 3 - end - - # HTTP Scheme. - module Scheme - # Unspecified scheme. - SCHEME_UNSPECIFIED = 0 - - # HTTPS protocol. - HTTPS = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/Gemfile deleted file mode 100644 index 9c6ef5c138e9..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-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-apigee_connect-v1", path: "../" -else - gem "google-cloud-apigee_connect-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-apigee_connect-v1/snippets/connection_service/list_connections.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/connection_service/list_connections.rb deleted file mode 100644 index 3fd279efc801..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/connection_service/list_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeconnect_v1_generated_ConnectionService_ListConnections_sync] -require "google/cloud/apigee_connect/v1" - -## -# Snippet for the list_connections call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeConnect::V1::ConnectionService::Client#list_connections. -# -def list_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new - - # Call the list_connections method. - result = client.list_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeConnect::V1::Connection. - p item - end -end -# [END apigeeconnect_v1_generated_ConnectionService_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/snippet_metadata_google.cloud.apigeeconnect.v1.json b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/snippet_metadata_google.cloud.apigeeconnect.v1.json deleted file mode 100644 index 645e9505766a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/snippet_metadata_google.cloud.apigeeconnect.v1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-apigee_connect-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.apigeeconnect.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "apigeeconnect_v1_generated_ConnectionService_ListConnections_sync", - "title": "Snippet for the list_connections call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeConnect::V1::ConnectionService::Client#list_connections.", - "file": "connection_service/list_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_connections", - "full_name": "::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client#list_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client" - }, - "method": { - "short_name": "ListConnections", - "full_name": "google.cloud.apigeeconnect.v1.ConnectionService.ListConnections", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.apigeeconnect.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeconnect_v1_generated_Tether_Egress_sync", - "title": "Snippet for the egress call in the Tether service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeConnect::V1::Tether::Client#egress.", - "file": "tether/egress.rb", - "language": "RUBY", - "client_method": { - "short_name": "egress", - "full_name": "::Google::Cloud::ApigeeConnect::V1::Tether::Client#egress", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeConnect::V1::EgressResponse", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeConnect::V1::EgressRequest", - "client": { - "short_name": "Tether::Client", - "full_name": "::Google::Cloud::ApigeeConnect::V1::Tether::Client" - }, - "method": { - "short_name": "Egress", - "full_name": "google.cloud.apigeeconnect.v1.Tether.Egress", - "service": { - "short_name": "Tether", - "full_name": "google.cloud.apigeeconnect.v1.Tether" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/tether/egress.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/tether/egress.rb deleted file mode 100644 index aa39c28e0152..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/snippets/tether/egress.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeconnect_v1_generated_Tether_Egress_sync] -require "google/cloud/apigee_connect/v1" - -## -# Snippet for the egress call in the Tether service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeConnect::V1::Tether::Client#egress. -# -def egress - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeConnect::V1::Tether::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the egress method to start streaming. - output = client.egress input - - # Send requests on the stream. For each request object, set fields by - # passing keyword arguments. Be sure to close the stream when done. - input << Google::Cloud::ApigeeConnect::V1::EgressResponse.new - input << Google::Cloud::ApigeeConnect::V1::EgressResponse.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::ApigeeConnect::V1::EgressRequest - output.each do |current_response| - p current_response - end -end -# [END apigeeconnect_v1_generated_Tether_Egress_sync] diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_paths_test.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_paths_test.rb deleted file mode 100644 index dd55407b3861..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigee_connect/v1/connection_service" - -class ::Google::Cloud::ApigeeConnect::V1::ConnectionService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_endpoint_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.endpoint_path project: "value0", endpoint: "value1" - assert_equal "projects/value0/endpoints/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_rest_test.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_rest_test.rb deleted file mode 100644 index a908f224ddcb..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/apigeeconnect/v1/connection_pb" -require "google/cloud/apigee_connect/v1/connection_service/rest" - - -class ::Google::Cloud::ApigeeConnect::V1::ConnectionService::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_connections - # Create test objects. - client_result = ::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse.new - http_response = OpenStruct.new 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_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::ServiceStub.stub :transcode_list_connections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_connections_client_stub do - # Create client - client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_connections parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_connections ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_connections(::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.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_connections_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::ApigeeConnect::V1::ConnectionService::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::ApigeeConnect::V1::ConnectionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_service_test.rb deleted file mode 100644 index b0cdc3db41d7..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/connection_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/cloud/apigeeconnect/v1/connection_pb" -require "google/cloud/apigee_connect/v1/connection_service" - -class ::Google::Cloud::ApigeeConnect::V1::ConnectionService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeConnect::V1::ListConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_connections, name - assert_kind_of ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest, 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_connections_client_stub do - # Create client - client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_connections parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_connections ::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_connections(::Google::Cloud::ApigeeConnect::V1::ListConnectionsRequest.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_connections_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client.new do |config| - 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::ApigeeConnect::V1::ConnectionService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::ApigeeConnect::V1::ConnectionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ApigeeConnect::V1::ConnectionService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb deleted file mode 100644 index ba15f710ca13..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/test/google/cloud/apigee_connect/v1/tether_test.rb +++ /dev/null @@ -1,204 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigeeconnect/v1/tether_pb" -require "google/cloud/apigee_connect/v1/tether" - -class ::Google::Cloud::ApigeeConnect::V1::Tether::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_egress - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeConnect::V1::EgressRequest.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a bidi streaming method. - id = "hello world" - http_response = {} - status = {} - project = "hello world" - trace_id = "hello world" - endpoint = :TETHER_ENDPOINT_UNSPECIFIED - name = "hello world" - - egress_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :egress, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, egress_client_stub do - # Create client - client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name } - request_proto = ::Google::Cloud::ApigeeConnect::V1::EgressResponse.new id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name - enum_input = [request_hash, request_proto].to_enum - client.egress enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressRequest, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name } - request_proto = ::Google::Cloud::ApigeeConnect::V1::EgressResponse.new id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name - stream_input = Gapic::StreamInput.new - client.egress stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressRequest, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Use enumerable object with hash and protobuf object with options. - request_hash = { id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name } - request_proto = ::Google::Cloud::ApigeeConnect::V1::EgressResponse.new id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name - enum_input = [request_hash, request_proto].to_enum - client.egress enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressRequest, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name } - request_proto = ::Google::Cloud::ApigeeConnect::V1::EgressResponse.new id: id, http_response: http_response, status: status, project: project, trace_id: trace_id, endpoint: endpoint, name: name - stream_input = Gapic::StreamInput.new - client.egress stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressRequest, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Verify method calls - assert_equal 4, egress_client_stub.call_rpc_count - egress_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::ApigeeConnect::V1::EgressResponse, r - assert_equal "hello world", r["id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeConnect::V1::HttpResponse), r["http_response"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Rpc::Status), r["status"] - assert_equal "hello world", r["project"] - assert_equal "hello world", r["trace_id"] - assert_equal :TETHER_ENDPOINT_UNSPECIFIED, r["endpoint"] - assert_equal "hello world", r["name"] - end - end - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeConnect::V1::Tether::Client.new do |config| - 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::ApigeeConnect::V1::Tether::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::ApigeeConnect::V1::Tether::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ApigeeConnect::V1::Tether::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_connect-v1/test/helper.rb b/owl-bot-staging/google-cloud-apigee_connect-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-apigee_connect-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.gitignore b/owl-bot-staging/google-cloud-apigee_registry-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-apigee_registry-v1/.repo-metadata.json deleted file mode 100644 index 2dcd44a3f293..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "apigeeregistry.googleapis.com", - "api_shortname": "apigeeregistry", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_registry-v1/latest", - "distribution_name": "google-cloud-apigee_registry-v1", - "is_cloud": true, - "language": "ruby", - "name": "apigeeregistry", - "name_pretty": "Apigee Registry V1 API", - "product_documentation": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. Note that google-cloud-apigee_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_registry instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.rubocop.yml b/owl-bot-staging/google-cloud-apigee_registry-v1/.rubocop.yml deleted file mode 100644 index 5d59c0e0425a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-apigee_registry-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-apigee_registry-v1.rb" diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.toys.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/.yardopts b/owl-bot-staging/google-cloud-apigee_registry-v1/.yardopts deleted file mode 100644 index 5e20653c53b0..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Apigee Registry V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-apigee_registry-v1/AUTHENTICATION.md deleted file mode 100644 index 8164d590dd10..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-apigee_registry-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-apigee_registry-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/apigee_registry/v1" - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/apigee_registry/v1" - -::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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-apigee_registry-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/apigee_registry/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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-apigee_registry-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-apigee_registry-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/Gemfile b/owl-bot-staging/google-cloud-apigee_registry-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/Gemfile +++ /dev/null @@ -1,14 +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-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-apigee_registry-v1/LICENSE.md b/owl-bot-staging/google-cloud-apigee_registry-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/README.md b/owl-bot-staging/google-cloud-apigee_registry-v1/README.md deleted file mode 100644 index 3db625accdac..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Apigee Registry V1 API - -API Client library for the Apigee Registry V1 API - -The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Apigee Registry V1 API. Most users should consider using -the main client gem, -[google-cloud-apigee_registry](https://rubygems.org/gems/google-cloud-apigee_registry). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-apigee_registry-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/apigeeregistry.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/apigee_registry/v1" - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new -request = ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new # (request fields as keyword arguments...) -response = client.create_instance request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_registry-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/apigee/docs/api-hub/get-started-registry-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/cloud/apigee_registry/v1" -require "logger" - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-apigee_registry`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-apigee_registry-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-apigee_registry`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-apigee_registry-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/Rakefile b/owl-bot-staging/google-cloud-apigee_registry-v1/Rakefile deleted file mode 100644 index dce0621adb61..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-apigee_registry-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/apigee_registry/v1/provisioning/credentials" - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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-apigee_registry-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-apigee_registry-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-apigee_registry-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-apigee_registry-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-apigee_registry-v1" - header "google-cloud-apigee_registry-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-apigee_registry-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-apigee_registry-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-apigee_registry-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-apigee_registry-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-apigee_registry-v1/gapic_metadata.json deleted file mode 100644 index 3d83788c1234..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/gapic_metadata.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.apigeeregistry.v1", - "libraryPackage": "::Google::Cloud::ApigeeRegistry::V1", - "services": { - "Provisioning": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client", - "rpcs": { - "CreateInstance": { - "methods": [ - "create_instance" - ] - }, - "DeleteInstance": { - "methods": [ - "delete_instance" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - } - } - } - } - }, - "Registry": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client", - "rpcs": { - "ListApis": { - "methods": [ - "list_apis" - ] - }, - "GetApi": { - "methods": [ - "get_api" - ] - }, - "CreateApi": { - "methods": [ - "create_api" - ] - }, - "UpdateApi": { - "methods": [ - "update_api" - ] - }, - "DeleteApi": { - "methods": [ - "delete_api" - ] - }, - "ListApiVersions": { - "methods": [ - "list_api_versions" - ] - }, - "GetApiVersion": { - "methods": [ - "get_api_version" - ] - }, - "CreateApiVersion": { - "methods": [ - "create_api_version" - ] - }, - "UpdateApiVersion": { - "methods": [ - "update_api_version" - ] - }, - "DeleteApiVersion": { - "methods": [ - "delete_api_version" - ] - }, - "ListApiSpecs": { - "methods": [ - "list_api_specs" - ] - }, - "GetApiSpec": { - "methods": [ - "get_api_spec" - ] - }, - "GetApiSpecContents": { - "methods": [ - "get_api_spec_contents" - ] - }, - "CreateApiSpec": { - "methods": [ - "create_api_spec" - ] - }, - "UpdateApiSpec": { - "methods": [ - "update_api_spec" - ] - }, - "DeleteApiSpec": { - "methods": [ - "delete_api_spec" - ] - }, - "TagApiSpecRevision": { - "methods": [ - "tag_api_spec_revision" - ] - }, - "ListApiSpecRevisions": { - "methods": [ - "list_api_spec_revisions" - ] - }, - "RollbackApiSpec": { - "methods": [ - "rollback_api_spec" - ] - }, - "DeleteApiSpecRevision": { - "methods": [ - "delete_api_spec_revision" - ] - }, - "ListApiDeployments": { - "methods": [ - "list_api_deployments" - ] - }, - "GetApiDeployment": { - "methods": [ - "get_api_deployment" - ] - }, - "CreateApiDeployment": { - "methods": [ - "create_api_deployment" - ] - }, - "UpdateApiDeployment": { - "methods": [ - "update_api_deployment" - ] - }, - "DeleteApiDeployment": { - "methods": [ - "delete_api_deployment" - ] - }, - "TagApiDeploymentRevision": { - "methods": [ - "tag_api_deployment_revision" - ] - }, - "ListApiDeploymentRevisions": { - "methods": [ - "list_api_deployment_revisions" - ] - }, - "RollbackApiDeployment": { - "methods": [ - "rollback_api_deployment" - ] - }, - "DeleteApiDeploymentRevision": { - "methods": [ - "delete_api_deployment_revision" - ] - }, - "ListArtifacts": { - "methods": [ - "list_artifacts" - ] - }, - "GetArtifact": { - "methods": [ - "get_artifact" - ] - }, - "GetArtifactContents": { - "methods": [ - "get_artifact_contents" - ] - }, - "CreateArtifact": { - "methods": [ - "create_artifact" - ] - }, - "ReplaceArtifact": { - "methods": [ - "replace_artifact" - ] - }, - "DeleteArtifact": { - "methods": [ - "delete_artifact" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec b/owl-bot-staging/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec deleted file mode 100644 index c74d733bcd54..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/apigee_registry/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-apigee_registry-v1" - gem.version = Google::Cloud::ApigeeRegistry::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. Note that google-cloud-apigee_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_registry instead. See the readme for more details." - gem.summary = "API Client library for the Apigee Registry V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb deleted file mode 100644 index f64e043fa173..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/apigee_registry/v1" diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb deleted file mode 100644 index f3b6f1a960ee..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigee_registry/v1/provisioning" -require "google/cloud/apigee_registry/v1/registry" -require "google/cloud/apigee_registry/v1/version" - -module Google - module Cloud - module ApigeeRegistry - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/apigee_registry/v1" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/apigee_registry/v1" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/apigee_registry/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb deleted file mode 100644 index eb77273af921..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb +++ /dev/null @@ -1,324 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 ApigeeRegistry - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/apigee_registry/v1/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeRegistry"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, 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/[^/]+/apis/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, 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/[^/]+/apis/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb deleted file mode 100644 index 200d82ffa656..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.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/apigee_registry/v1/version" - -require "google/cloud/apigee_registry/v1/provisioning/credentials" -require "google/cloud/apigee_registry/v1/provisioning/paths" -require "google/cloud/apigee_registry/v1/provisioning/operations" -require "google/cloud/apigee_registry/v1/provisioning/client" -require "google/cloud/apigee_registry/v1/provisioning/rest" - -module Google - module Cloud - module ApigeeRegistry - module V1 - ## - # The service that is used for managing the data plane provisioning of the - # Registry. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/apigee_registry/v1/provisioning" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/apigee_registry/v1/provisioning/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module Provisioning - end - end - end - end -end - -helper_path = ::File.join __dir__, "provisioning", "helpers.rb" -require "google/cloud/apigee_registry/v1/provisioning/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb deleted file mode 100644 index 71fbfca7f71e..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb +++ /dev/null @@ -1,730 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - ## - # Client for the Provisioning service. - # - # The service that is used for managing the data plane provisioning of the - # Registry. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :provisioning_stub - - ## - # Configure the Provisioning Client class. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Provisioning clients - # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeRegistry", "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 Provisioning Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @provisioning_stub.universe_domain - end - - ## - # Create a new Provisioning client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Provisioning client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed 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/apigeeregistry/v1/provisioning_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 - - @provisioning_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @provisioning_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @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 = @provisioning_stub.endpoint - config.universe_domain = @provisioning_stub.universe_domain - config.logger = @provisioning_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 = @provisioning_stub.endpoint - config.universe_domain = @provisioning_stub.universe_domain - config.logger = @provisioning_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Provisioning::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 - @provisioning_stub.logger - end - - # Service calls - - ## - # Provisions instance resources for the Registry. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_instance(parent: nil, instance_id: nil, instance: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` - # @param instance_id [::String] - # Required. Identifier to assign to the Instance. Must be unique within scope of the - # parent resource. - # @param instance [::Google::Cloud::ApigeeRegistry::V1::Instance, ::Hash] - # Required. The Instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.call_rpc :create_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the Registry instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance(name: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Instance to delete. - # Format: `projects/*/locations/*/instances/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.call_rpc :delete_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Instance to retrieve. - # Format: `projects/*/locations/*/instances/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.call_rpc :get_instance, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Provisioning API. - # - # This class represents the configuration for Provisioning, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_instance.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::ApigeeRegistry::V1::Provisioning::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Provisioning API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb deleted file mode 100644 index dc86b72153cd..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/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 ApigeeRegistry - module V1 - module Provisioning - # Credentials for the Provisioning 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-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb deleted file mode 100644 index 2b1d010bf4dc..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Provisioning 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 Provisioning 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::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb deleted file mode 100644 index 9339b6d79e9a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/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 ApigeeRegistry - module V1 - module Provisioning - # Path helper methods for the Provisioning API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified 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-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb deleted file mode 100644 index 034dfcf2b2a9..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/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/apigee_registry/v1/version" -require "google/cloud/apigee_registry/v1/bindings_override" - -require "google/cloud/apigee_registry/v1/provisioning/credentials" -require "google/cloud/apigee_registry/v1/provisioning/paths" -require "google/cloud/apigee_registry/v1/provisioning/rest/operations" -require "google/cloud/apigee_registry/v1/provisioning/rest/client" - -module Google - module Cloud - module ApigeeRegistry - module V1 - ## - # The service that is used for managing the data plane provisioning of the - # Registry. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/apigee_registry/v1/provisioning/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module Provisioning - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/apigee_registry/v1/provisioning/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb deleted file mode 100644 index b58ff12afdac..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb +++ /dev/null @@ -1,675 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigee_registry/v1/provisioning/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - module Rest - ## - # REST client for the Provisioning service. - # - # The service that is used for managing the data plane provisioning of the - # Registry. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :provisioning_stub - - ## - # Configure the Provisioning Client class. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Provisioning clients - # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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", "ApigeeRegistry", "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 Provisioning Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::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 - @provisioning_stub.universe_domain - end - - ## - # Create a new Provisioning REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Provisioning 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::ApigeeRegistry::V1::Provisioning::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 - - @provisioning_stub = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @provisioning_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 = @provisioning_stub.endpoint - config.universe_domain = @provisioning_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @provisioning_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 = @provisioning_stub.endpoint - config.universe_domain = @provisioning_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @provisioning_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Provisioning::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 - @provisioning_stub.logger - end - - # Service calls - - ## - # Provisions instance resources for the Registry. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_instance(parent: nil, instance_id: nil, instance: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` - # @param instance_id [::String] - # Required. Identifier to assign to the Instance. Must be unique within scope of the - # parent resource. - # @param instance [::Google::Cloud::ApigeeRegistry::V1::Instance, ::Hash] - # Required. The Instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.create_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the Registry instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance(name: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Instance to delete. - # Format: `projects/*/locations/*/instances/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.delete_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Instance to retrieve. - # Format: `projects/*/locations/*/instances/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.get_instance request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Provisioning REST API. - # - # This class represents the configuration for Provisioning REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_instance.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::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 Provisioning API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb deleted file mode 100644 index 49286aa839ae..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Provisioning 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 Provisioning 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::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb deleted file mode 100644 index c7c68dda1528..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/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/cloud/apigeeregistry/v1/provisioning_service_pb" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - module Rest - ## - # REST service stub for the Provisioning 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_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Instance.decode_json response.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_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/instances", - body: "instance", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb deleted file mode 100644 index f323425b4428..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_registry/v1/version" - -require "google/cloud/apigee_registry/v1/registry/credentials" -require "google/cloud/apigee_registry/v1/registry/paths" -require "google/cloud/apigee_registry/v1/registry/client" -require "google/cloud/apigee_registry/v1/registry/rest" - -module Google - module Cloud - module ApigeeRegistry - module V1 - ## - # The Registry service allows teams to manage descriptions of APIs. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/apigee_registry/v1/registry" - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/apigee_registry/v1/registry/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - module Registry - end - end - end - end -end - -helper_path = ::File.join __dir__, "registry", "helpers.rb" -require "google/cloud/apigee_registry/v1/registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb deleted file mode 100644 index 4a3f6e137a79..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb +++ /dev/null @@ -1,4095 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/apigeeregistry/v1/registry_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - ## - # Client for the Registry service. - # - # The Registry service allows teams to manage descriptions of APIs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :registry_stub - - ## - # Configure the Registry Client class. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Registry clients - # ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeRegistry", "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_apis.timeout = 60.0 - default_config.rpcs.list_apis.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api.timeout = 60.0 - default_config.rpcs.get_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api.timeout = 60.0 - default_config.rpcs.create_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api.timeout = 60.0 - default_config.rpcs.update_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api.timeout = 60.0 - default_config.rpcs.delete_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_versions.timeout = 60.0 - default_config.rpcs.list_api_versions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_version.timeout = 60.0 - default_config.rpcs.get_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_version.timeout = 60.0 - default_config.rpcs.create_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_version.timeout = 60.0 - default_config.rpcs.update_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_version.timeout = 60.0 - default_config.rpcs.delete_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_specs.timeout = 60.0 - default_config.rpcs.list_api_specs.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_spec.timeout = 60.0 - default_config.rpcs.get_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_spec_contents.timeout = 60.0 - default_config.rpcs.get_api_spec_contents.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_spec.timeout = 60.0 - default_config.rpcs.create_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_spec.timeout = 60.0 - default_config.rpcs.update_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_spec.timeout = 60.0 - default_config.rpcs.delete_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.tag_api_spec_revision.timeout = 60.0 - default_config.rpcs.tag_api_spec_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_spec_revisions.timeout = 60.0 - default_config.rpcs.list_api_spec_revisions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.rollback_api_spec.timeout = 60.0 - - default_config.rpcs.delete_api_spec_revision.timeout = 60.0 - default_config.rpcs.delete_api_spec_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_deployments.timeout = 60.0 - default_config.rpcs.list_api_deployments.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_deployment.timeout = 60.0 - default_config.rpcs.get_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_deployment.timeout = 60.0 - default_config.rpcs.create_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_deployment.timeout = 60.0 - default_config.rpcs.update_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_deployment.timeout = 60.0 - default_config.rpcs.delete_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.tag_api_deployment_revision.timeout = 60.0 - default_config.rpcs.tag_api_deployment_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_deployment_revisions.timeout = 60.0 - default_config.rpcs.list_api_deployment_revisions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.rollback_api_deployment.timeout = 60.0 - - default_config.rpcs.delete_api_deployment_revision.timeout = 60.0 - default_config.rpcs.delete_api_deployment_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_artifacts.timeout = 60.0 - default_config.rpcs.list_artifacts.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_artifact.timeout = 60.0 - default_config.rpcs.get_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_artifact_contents.timeout = 60.0 - default_config.rpcs.get_artifact_contents.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_artifact.timeout = 60.0 - default_config.rpcs.create_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.replace_artifact.timeout = 60.0 - default_config.rpcs.replace_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_artifact.timeout = 60.0 - default_config.rpcs.delete_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Registry Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @registry_stub.universe_domain - end - - ## - # Create a new Registry client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Registry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed 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/apigeeregistry/v1/registry_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 - - @registry_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ApigeeRegistry::V1::Registry::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @registry_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @registry_stub.endpoint - config.universe_domain = @registry_stub.universe_domain - config.logger = @registry_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 = @registry_stub.endpoint - config.universe_domain = @registry_stub.universe_domain - config.logger = @registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @registry_stub.logger - end - - # Service calls - - ## - # Returns matching APIs. - # - # @overload list_apis(request, options = nil) - # Pass arguments to `list_apis` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApisRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_apis` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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 APIs. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # The maximum number of APIs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApis` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApis` must match - # the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new - # - # # Call the list_apis method. - # result = client.list_apis request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. - # p item - # end - # - def list_apis request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_apis.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_apis.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_apis.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_apis, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_apis, request, response, 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 specified API. - # - # @overload get_api(request, options = nil) - # Pass arguments to `get_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api(name: nil) - # Pass arguments to `get_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the API to retrieve. - # Format: `projects/*/locations/*/apis/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new - # - # # Call the get_api method. - # result = client.get_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def get_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api, request, 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 specified API. - # - # @overload create_api(request, options = nil) - # Pass arguments to `create_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_api(parent: nil, api: nil, api_id: nil) - # Pass arguments to `create_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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 APIs. - # Format: `projects/*/locations/*` - # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] - # Required. The API to create. - # @param api_id [::String] - # Required. The ID to use for the API, which will become the final component of - # the API's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new - # - # # Call the create_api method. - # result = client.create_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def create_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_api.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_api, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified API. - # - # @overload update_api(request, options = nil) - # Pass arguments to `update_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_api(api: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] - # Required. The API to update. - # - # The `name` field is used to identify the API to update. - # Format: `projects/*/locations/*/apis/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the API is not found, a new API will be created. - # In this situation, `update_mask` is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new - # - # # Call the update_api method. - # result = client.update_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def update_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.api&.name - header_params["api.name"] = request.api.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_api.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :update_api, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified API and all of the resources that it - # owns. - # - # @overload delete_api(request, options = nil) - # Pass arguments to `delete_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api(name: nil, force: nil) - # Pass arguments to `delete_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the API to delete. - # Format: `projects/*/locations/*/apis/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new - # - # # Call the delete_api method. - # result = client.delete_api request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api, request, 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 matching versions. - # - # @overload list_api_versions(request, options = nil) - # Pass arguments to `list_api_versions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @param page_size [::Integer] - # The maximum number of versions to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiVersions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiVersions` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new - # - # # Call the list_api_versions method. - # result = client.list_api_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p item - # end - # - def list_api_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified version. - # - # @overload get_api_version(request, options = nil) - # Pass arguments to `get_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api_version(name: nil) - # Pass arguments to `get_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the version to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new - # - # # Call the get_api_version method. - # result = client.get_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def get_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified version. - # - # @overload create_api_version(request, options = nil) - # Pass arguments to `create_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_api_version(parent: nil, api_version: nil, api_version_id: nil) - # Pass arguments to `create_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] - # Required. The version to create. - # @param api_version_id [::String] - # Required. The ID to use for the version, which will become the final component of - # the version's resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new - # - # # Call the create_api_version method. - # result = client.create_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def create_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_api_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_api_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified version. - # - # @overload update_api_version(request, options = nil) - # Pass arguments to `update_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_api_version(api_version: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] - # Required. The version to update. - # - # The `name` field is used to identify the version to update. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the version is not found, a new version will be - # created. In this situation, `update_mask` is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new - # - # # Call the update_api_version method. - # result = client.update_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def update_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.api_version&.name - header_params["api_version.name"] = request.api_version.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_api_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :update_api_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified version and all of the resources that - # it owns. - # - # @overload delete_api_version(request, options = nil) - # Pass arguments to `delete_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_version(name: nil, force: nil) - # Pass arguments to `delete_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the version to delete. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new - # - # # Call the delete_api_version method. - # result = client.delete_api_version request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching specs. - # - # @overload list_api_specs(request, options = nil) - # Pass arguments to `list_api_specs` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param page_size [::Integer] - # The maximum number of specs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiSpecs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiSpecs` must match - # the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new - # - # # Call the list_api_specs method. - # result = client.list_api_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p item - # end - # - def list_api_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_specs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_specs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_specs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified spec. - # - # @overload get_api_spec(request, options = nil) - # Pass arguments to `get_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api_spec(name: nil) - # Pass arguments to `get_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new - # - # # Call the get_api_spec method. - # result = client.get_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def get_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the contents of a specified spec. - # If specs are stored with GZip compression, the default behavior - # is to return the spec uncompressed (the mime_type response field - # indicates the exact format returned). - # - # @overload get_api_spec_contents(request, options = nil) - # Pass arguments to `get_api_spec_contents` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api_spec_contents(name: nil) - # Pass arguments to `get_api_spec_contents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec whose contents should be retrieved. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Api::HttpBody] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Api::HttpBody] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new - # - # # Call the get_api_spec_contents method. - # result = client.get_api_spec_contents request - # - # # The returned object is of type Google::Api::HttpBody. - # p result - # - def get_api_spec_contents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api_spec_contents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api_spec_contents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api_spec_contents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api_spec_contents, request, 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 specified spec. - # - # @overload create_api_spec(request, options = nil) - # Pass arguments to `create_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_api_spec(parent: nil, api_spec: nil, api_spec_id: nil) - # Pass arguments to `create_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] - # Required. The spec to create. - # @param api_spec_id [::String] - # Required. The ID to use for the spec, which will become the final component of - # the spec's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new - # - # # Call the create_api_spec method. - # result = client.create_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def create_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified spec. - # - # @overload update_api_spec(request, options = nil) - # Pass arguments to `update_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] - # Required. The spec to update. - # - # The `name` field is used to identify the spec to update. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the spec is not found, a new spec will be created. - # In this situation, `update_mask` is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new - # - # # Call the update_api_spec method. - # result = client.update_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def update_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.api_spec&.name - header_params["api_spec.name"] = request.api_spec.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :update_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified spec, all revisions, and all child - # resources (e.g., artifacts). - # - # @overload delete_api_spec(request, options = nil) - # Pass arguments to `delete_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_spec(name: nil, force: nil) - # Pass arguments to `delete_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to delete. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new - # - # # Call the delete_api_spec method. - # result = client.delete_api_spec request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a tag to a specified revision of a spec. - # - # @overload tag_api_spec_revision(request, options = nil) - # Pass arguments to `tag_api_spec_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload tag_api_spec_revision(name: nil, tag: nil) - # Pass arguments to `tag_api_spec_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to be tagged, including the revision ID. - # @param tag [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new - # - # # Call the tag_api_spec_revision method. - # result = client.tag_api_spec_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def tag_api_spec_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.tag_api_spec_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.tag_api_spec_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.tag_api_spec_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :tag_api_spec_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of a spec. - # Revisions are returned in descending order of revision creation time. - # - # @overload list_api_spec_revisions(request, options = nil) - # Pass arguments to `list_api_spec_revisions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_spec_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_api_spec_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. The name of the spec to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListApiSpecRevisions 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::ApigeeRegistry::V1::ApiSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new - # - # # Call the list_api_spec_revisions method. - # result = client.list_api_spec_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::ApigeeRegistry::V1::ApiSpec. - # p item - # end - # - def list_api_spec_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_spec_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::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_spec_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_spec_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_spec_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_spec_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 - - ## - # Sets the current revision to a specified prior revision. - # Note that this creates a new revision with a new revision ID. - # - # @overload rollback_api_spec(request, options = nil) - # Pass arguments to `rollback_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rollback_api_spec(name: nil, revision_id: nil) - # Pass arguments to `rollback_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The spec being rolled back. - # @param revision_id [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same spec. - # - # Example: `c7cfa2a8` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new - # - # # Call the rollback_api_spec method. - # result = client.rollback_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def rollback_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rollback_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rollback_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rollback_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :rollback_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a revision of a spec. - # - # @overload delete_api_spec_revision(request, options = nil) - # Pass arguments to `delete_api_spec_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_spec_revision(name: nil) - # Pass arguments to `delete_api_spec_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new - # - # # Call the delete_api_spec_revision method. - # result = client.delete_api_spec_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def delete_api_spec_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_spec_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_spec_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_spec_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_spec_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching deployments. - # - # @overload list_api_deployments(request, options = nil) - # Pass arguments to `list_api_deployments` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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 deployments. - # Format: `projects/*/locations/*/apis/*` - # @param page_size [::Integer] - # The maximum number of deployments to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiDeployments` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new - # - # # Call the list_api_deployments method. - # result = client.list_api_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p item - # end - # - def list_api_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_deployments, request, response, 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 specified deployment. - # - # @overload get_api_deployment(request, options = nil) - # Pass arguments to `get_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api_deployment(name: nil) - # Pass arguments to `get_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to retrieve. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new - # - # # Call the get_api_deployment method. - # result = client.get_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def get_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api_deployment, request, 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 specified deployment. - # - # @overload create_api_deployment(request, options = nil) - # Pass arguments to `create_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil) - # Pass arguments to `create_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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 deployments. - # Format: `projects/*/locations/*/apis/*` - # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] - # Required. The deployment to create. - # @param api_deployment_id [::String] - # Required. The ID to use for the deployment, which will become the final component of - # the deployment's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new - # - # # Call the create_api_deployment method. - # result = client.create_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def create_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_api_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified deployment. - # - # @overload update_api_deployment(request, options = nil) - # Pass arguments to `update_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] - # Required. The deployment to update. - # - # The `name` field is used to identify the deployment to update. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the deployment is not found, a new deployment will be - # created. In this situation, `update_mask` is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new - # - # # Call the update_api_deployment method. - # result = client.update_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def update_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.api_deployment&.name - header_params["api_deployment.name"] = request.api_deployment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :update_api_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified deployment, all revisions, and all - # child resources (e.g., artifacts). - # - # @overload delete_api_deployment(request, options = nil) - # Pass arguments to `delete_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_deployment(name: nil, force: nil) - # Pass arguments to `delete_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to delete. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new - # - # # Call the delete_api_deployment method. - # result = client.delete_api_deployment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a tag to a specified revision of a - # deployment. - # - # @overload tag_api_deployment_revision(request, options = nil) - # Pass arguments to `tag_api_deployment_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload tag_api_deployment_revision(name: nil, tag: nil) - # Pass arguments to `tag_api_deployment_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to be tagged, including the revision ID. - # @param tag [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new - # - # # Call the tag_api_deployment_revision method. - # result = client.tag_api_deployment_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def tag_api_deployment_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.tag_api_deployment_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.tag_api_deployment_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.tag_api_deployment_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :tag_api_deployment_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of a deployment. - # Revisions are returned in descending order of revision creation time. - # - # @overload list_api_deployment_revisions(request, options = nil) - # Pass arguments to `list_api_deployment_revisions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_deployment_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_api_deployment_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. The name of the deployment to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListApiDeploymentRevisions 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::ApigeeRegistry::V1::ApiDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new - # - # # Call the list_api_deployment_revisions method. - # result = client.list_api_deployment_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::ApigeeRegistry::V1::ApiDeployment. - # p item - # end - # - def list_api_deployment_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_deployment_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::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_deployment_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_deployment_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_deployment_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_deployment_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 - - ## - # Sets the current revision to a specified prior - # revision. Note that this creates a new revision with a new revision ID. - # - # @overload rollback_api_deployment(request, options = nil) - # Pass arguments to `rollback_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rollback_api_deployment(name: nil, revision_id: nil) - # Pass arguments to `rollback_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The deployment being rolled back. - # @param revision_id [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same deployment. - # - # Example: `c7cfa2a8` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new - # - # # Call the rollback_api_deployment method. - # result = client.rollback_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def rollback_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rollback_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rollback_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rollback_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :rollback_api_deployment, request, 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 revision of a deployment. - # - # @overload delete_api_deployment_revision(request, options = nil) - # Pass arguments to `delete_api_deployment_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_deployment_revision(name: nil) - # Pass arguments to `delete_api_deployment_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new - # - # # Call the delete_api_deployment_revision method. - # result = client.delete_api_deployment_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def delete_api_deployment_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_deployment_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_deployment_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_deployment_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_deployment_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching artifacts. - # - # @overload list_artifacts(request, options = nil) - # Pass arguments to `list_artifacts` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @param page_size [::Integer] - # The maximum number of artifacts to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListArtifacts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListArtifacts` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new - # - # # Call the list_artifacts method. - # result = client.list_artifacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. - # p item - # end - # - def list_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_artifacts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_artifacts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified artifact. - # - # @overload get_artifact(request, options = nil) - # Pass arguments to `get_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_artifact(name: nil) - # Pass arguments to `get_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact to retrieve. - # Format: `{parent}/artifacts/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new - # - # # Call the get_artifact method. - # result = client.get_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def get_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the contents of a specified artifact. - # If artifacts are stored with GZip compression, the default behavior - # is to return the artifact uncompressed (the mime_type response field - # indicates the exact format returned). - # - # @overload get_artifact_contents(request, options = nil) - # Pass arguments to `get_artifact_contents` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_artifact_contents(name: nil) - # Pass arguments to `get_artifact_contents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact whose contents should be retrieved. - # Format: `{parent}/artifacts/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Api::HttpBody] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Api::HttpBody] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new - # - # # Call the get_artifact_contents method. - # result = client.get_artifact_contents request - # - # # The returned object is of type Google::Api::HttpBody. - # p result - # - def get_artifact_contents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_artifact_contents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_artifact_contents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_artifact_contents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_artifact_contents, request, 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 specified artifact. - # - # @overload create_artifact(request, options = nil) - # Pass arguments to `create_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_artifact(parent: nil, artifact: nil, artifact_id: nil) - # Pass arguments to `create_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] - # Required. The artifact to create. - # @param artifact_id [::String] - # Required. The ID to use for the artifact, which will become the final component of - # the artifact's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new - # - # # Call the create_artifact method. - # result = client.create_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def create_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to replace a specified artifact. - # - # @overload replace_artifact(request, options = nil) - # Pass arguments to `replace_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_artifact(artifact: nil) - # Pass arguments to `replace_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] - # Required. The artifact to replace. - # - # The `name` field is used to identify the artifact to replace. - # Format: `{parent}/artifacts/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new - # - # # Call the replace_artifact method. - # result = client.replace_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def replace_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest - - # Converts hash and nil to 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_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.artifact&.name - header_params["artifact.name"] = request.artifact.name - end - - request_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_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.replace_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :replace_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified artifact. - # - # @overload delete_artifact(request, options = nil) - # Pass arguments to `delete_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_artifact(name: nil) - # Pass arguments to `delete_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact to delete. - # Format: `{parent}/artifacts/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new - # - # # Call the delete_artifact method. - # result = client.delete_artifact request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Registry API. - # - # This class represents the configuration for Registry, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_apis to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_apis.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_apis.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::ApigeeRegistry::V1::Registry::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Registry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_apis` - # @return [::Gapic::Config::Method] - # - attr_reader :list_apis - ## - # RPC-specific configuration for `get_api` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api - ## - # RPC-specific configuration for `create_api` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api - ## - # RPC-specific configuration for `update_api` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api - ## - # RPC-specific configuration for `delete_api` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api - ## - # RPC-specific configuration for `list_api_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_versions - ## - # RPC-specific configuration for `get_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_version - ## - # RPC-specific configuration for `create_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_version - ## - # RPC-specific configuration for `update_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_version - ## - # RPC-specific configuration for `delete_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_version - ## - # RPC-specific configuration for `list_api_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_specs - ## - # RPC-specific configuration for `get_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_spec - ## - # RPC-specific configuration for `get_api_spec_contents` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_spec_contents - ## - # RPC-specific configuration for `create_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_spec - ## - # RPC-specific configuration for `update_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_spec - ## - # RPC-specific configuration for `delete_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_spec - ## - # RPC-specific configuration for `tag_api_spec_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :tag_api_spec_revision - ## - # RPC-specific configuration for `list_api_spec_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_spec_revisions - ## - # RPC-specific configuration for `rollback_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_api_spec - ## - # RPC-specific configuration for `delete_api_spec_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_spec_revision - ## - # RPC-specific configuration for `list_api_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_deployments - ## - # RPC-specific configuration for `get_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_deployment - ## - # RPC-specific configuration for `create_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_deployment - ## - # RPC-specific configuration for `update_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_deployment - ## - # RPC-specific configuration for `delete_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_deployment - ## - # RPC-specific configuration for `tag_api_deployment_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :tag_api_deployment_revision - ## - # RPC-specific configuration for `list_api_deployment_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_deployment_revisions - ## - # RPC-specific configuration for `rollback_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_api_deployment - ## - # RPC-specific configuration for `delete_api_deployment_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_deployment_revision - ## - # RPC-specific configuration for `list_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_artifacts - ## - # RPC-specific configuration for `get_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_artifact - ## - # RPC-specific configuration for `get_artifact_contents` - # @return [::Gapic::Config::Method] - # - attr_reader :get_artifact_contents - ## - # RPC-specific configuration for `create_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :create_artifact - ## - # RPC-specific configuration for `replace_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_artifact - ## - # RPC-specific configuration for `delete_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_artifact - - # @private - def initialize parent_rpcs = nil - list_apis_config = parent_rpcs.list_apis if parent_rpcs.respond_to? :list_apis - @list_apis = ::Gapic::Config::Method.new list_apis_config - get_api_config = parent_rpcs.get_api if parent_rpcs.respond_to? :get_api - @get_api = ::Gapic::Config::Method.new get_api_config - create_api_config = parent_rpcs.create_api if parent_rpcs.respond_to? :create_api - @create_api = ::Gapic::Config::Method.new create_api_config - update_api_config = parent_rpcs.update_api if parent_rpcs.respond_to? :update_api - @update_api = ::Gapic::Config::Method.new update_api_config - delete_api_config = parent_rpcs.delete_api if parent_rpcs.respond_to? :delete_api - @delete_api = ::Gapic::Config::Method.new delete_api_config - list_api_versions_config = parent_rpcs.list_api_versions if parent_rpcs.respond_to? :list_api_versions - @list_api_versions = ::Gapic::Config::Method.new list_api_versions_config - get_api_version_config = parent_rpcs.get_api_version if parent_rpcs.respond_to? :get_api_version - @get_api_version = ::Gapic::Config::Method.new get_api_version_config - create_api_version_config = parent_rpcs.create_api_version if parent_rpcs.respond_to? :create_api_version - @create_api_version = ::Gapic::Config::Method.new create_api_version_config - update_api_version_config = parent_rpcs.update_api_version if parent_rpcs.respond_to? :update_api_version - @update_api_version = ::Gapic::Config::Method.new update_api_version_config - delete_api_version_config = parent_rpcs.delete_api_version if parent_rpcs.respond_to? :delete_api_version - @delete_api_version = ::Gapic::Config::Method.new delete_api_version_config - list_api_specs_config = parent_rpcs.list_api_specs if parent_rpcs.respond_to? :list_api_specs - @list_api_specs = ::Gapic::Config::Method.new list_api_specs_config - get_api_spec_config = parent_rpcs.get_api_spec if parent_rpcs.respond_to? :get_api_spec - @get_api_spec = ::Gapic::Config::Method.new get_api_spec_config - get_api_spec_contents_config = parent_rpcs.get_api_spec_contents if parent_rpcs.respond_to? :get_api_spec_contents - @get_api_spec_contents = ::Gapic::Config::Method.new get_api_spec_contents_config - create_api_spec_config = parent_rpcs.create_api_spec if parent_rpcs.respond_to? :create_api_spec - @create_api_spec = ::Gapic::Config::Method.new create_api_spec_config - update_api_spec_config = parent_rpcs.update_api_spec if parent_rpcs.respond_to? :update_api_spec - @update_api_spec = ::Gapic::Config::Method.new update_api_spec_config - delete_api_spec_config = parent_rpcs.delete_api_spec if parent_rpcs.respond_to? :delete_api_spec - @delete_api_spec = ::Gapic::Config::Method.new delete_api_spec_config - tag_api_spec_revision_config = parent_rpcs.tag_api_spec_revision if parent_rpcs.respond_to? :tag_api_spec_revision - @tag_api_spec_revision = ::Gapic::Config::Method.new tag_api_spec_revision_config - list_api_spec_revisions_config = parent_rpcs.list_api_spec_revisions if parent_rpcs.respond_to? :list_api_spec_revisions - @list_api_spec_revisions = ::Gapic::Config::Method.new list_api_spec_revisions_config - rollback_api_spec_config = parent_rpcs.rollback_api_spec if parent_rpcs.respond_to? :rollback_api_spec - @rollback_api_spec = ::Gapic::Config::Method.new rollback_api_spec_config - delete_api_spec_revision_config = parent_rpcs.delete_api_spec_revision if parent_rpcs.respond_to? :delete_api_spec_revision - @delete_api_spec_revision = ::Gapic::Config::Method.new delete_api_spec_revision_config - list_api_deployments_config = parent_rpcs.list_api_deployments if parent_rpcs.respond_to? :list_api_deployments - @list_api_deployments = ::Gapic::Config::Method.new list_api_deployments_config - get_api_deployment_config = parent_rpcs.get_api_deployment if parent_rpcs.respond_to? :get_api_deployment - @get_api_deployment = ::Gapic::Config::Method.new get_api_deployment_config - create_api_deployment_config = parent_rpcs.create_api_deployment if parent_rpcs.respond_to? :create_api_deployment - @create_api_deployment = ::Gapic::Config::Method.new create_api_deployment_config - update_api_deployment_config = parent_rpcs.update_api_deployment if parent_rpcs.respond_to? :update_api_deployment - @update_api_deployment = ::Gapic::Config::Method.new update_api_deployment_config - delete_api_deployment_config = parent_rpcs.delete_api_deployment if parent_rpcs.respond_to? :delete_api_deployment - @delete_api_deployment = ::Gapic::Config::Method.new delete_api_deployment_config - tag_api_deployment_revision_config = parent_rpcs.tag_api_deployment_revision if parent_rpcs.respond_to? :tag_api_deployment_revision - @tag_api_deployment_revision = ::Gapic::Config::Method.new tag_api_deployment_revision_config - list_api_deployment_revisions_config = parent_rpcs.list_api_deployment_revisions if parent_rpcs.respond_to? :list_api_deployment_revisions - @list_api_deployment_revisions = ::Gapic::Config::Method.new list_api_deployment_revisions_config - rollback_api_deployment_config = parent_rpcs.rollback_api_deployment if parent_rpcs.respond_to? :rollback_api_deployment - @rollback_api_deployment = ::Gapic::Config::Method.new rollback_api_deployment_config - delete_api_deployment_revision_config = parent_rpcs.delete_api_deployment_revision if parent_rpcs.respond_to? :delete_api_deployment_revision - @delete_api_deployment_revision = ::Gapic::Config::Method.new delete_api_deployment_revision_config - list_artifacts_config = parent_rpcs.list_artifacts if parent_rpcs.respond_to? :list_artifacts - @list_artifacts = ::Gapic::Config::Method.new list_artifacts_config - get_artifact_config = parent_rpcs.get_artifact if parent_rpcs.respond_to? :get_artifact - @get_artifact = ::Gapic::Config::Method.new get_artifact_config - get_artifact_contents_config = parent_rpcs.get_artifact_contents if parent_rpcs.respond_to? :get_artifact_contents - @get_artifact_contents = ::Gapic::Config::Method.new get_artifact_contents_config - create_artifact_config = parent_rpcs.create_artifact if parent_rpcs.respond_to? :create_artifact - @create_artifact = ::Gapic::Config::Method.new create_artifact_config - replace_artifact_config = parent_rpcs.replace_artifact if parent_rpcs.respond_to? :replace_artifact - @replace_artifact = ::Gapic::Config::Method.new replace_artifact_config - delete_artifact_config = parent_rpcs.delete_artifact if parent_rpcs.respond_to? :delete_artifact - @delete_artifact = ::Gapic::Config::Method.new delete_artifact_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb deleted file mode 100644 index 91849cf37779..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/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 ApigeeRegistry - module V1 - module Registry - # Credentials for the Registry 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-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb deleted file mode 100644 index 73a8ff56638d..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb +++ /dev/null @@ -1,238 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - # Path helper methods for the Registry API. - module Paths - ## - # Create a fully-qualified Api resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # - # @return [::String] - def api_path project:, location:, api: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}" - end - - ## - # Create a fully-qualified ApiDeployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param deployment [String] - # - # @return [::String] - def api_deployment_path project:, location:, api:, deployment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/deployments/#{deployment}" - end - - ## - # Create a fully-qualified ApiSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param version [String] - # @param spec [String] - # - # @return [::String] - def api_spec_path project:, location:, api:, version:, spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/specs/#{spec}" - end - - ## - # Create a fully-qualified ApiVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/versions/{version}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param version [String] - # - # @return [::String] - def api_version_path project:, location:, api:, version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}" - end - - ## - # Create a fully-qualified Artifact resource string. - # - # @overload artifact_path(project:, location:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param artifact [String] - # - # @overload artifact_path(project:, location:, api:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param artifact [String] - # - # @overload artifact_path(project:, location:, api:, version:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param version [String] - # @param artifact [String] - # - # @overload artifact_path(project:, location:, api:, version:, spec:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param version [String] - # @param spec [String] - # @param artifact [String] - # - # @overload artifact_path(project:, location:, api:, deployment:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param deployment [String] - # @param artifact [String] - # - # @return [::String] - def artifact_path **args - resources = { - "artifact:location:project" => (proc do |project:, location:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/artifacts/#{artifact}" - end), - "api:artifact:location:project" => (proc do |project:, location:, api:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/artifacts/#{artifact}" - end), - "api:artifact:location:project:version" => (proc do |project:, location:, api:, version:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/artifacts/#{artifact}" - end), - "api:artifact:location:project:spec:version" => (proc do |project:, location:, api:, version:, spec:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" - raise ::ArgumentError, "spec cannot contain /" if spec.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/specs/#{spec}/artifacts/#{artifact}" - end), - "api:artifact:deployment:location:project" => (proc do |project:, location:, api:, deployment:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - raise ::ArgumentError, "deployment cannot contain /" if deployment.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/deployments/#{deployment}/artifacts/#{artifact}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb deleted file mode 100644 index 947e953e032a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_registry/v1/version" -require "google/cloud/apigee_registry/v1/bindings_override" - -require "google/cloud/apigee_registry/v1/registry/credentials" -require "google/cloud/apigee_registry/v1/registry/paths" -require "google/cloud/apigee_registry/v1/registry/rest/client" - -module Google - module Cloud - module ApigeeRegistry - module V1 - ## - # The Registry service allows teams to manage descriptions of APIs. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/apigee_registry/v1/registry/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - module Registry - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/apigee_registry/v1/registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb deleted file mode 100644 index 096fd3d615a5..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb +++ /dev/null @@ -1,3816 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/apigeeregistry/v1/registry_service_pb" -require "google/cloud/apigee_registry/v1/registry/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - module Rest - ## - # REST client for the Registry service. - # - # The Registry service allows teams to manage descriptions of APIs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :registry_stub - - ## - # Configure the Registry Client class. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Registry clients - # ::Google::Cloud::ApigeeRegistry::V1::Registry::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", "ApigeeRegistry", "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_apis.timeout = 60.0 - default_config.rpcs.list_apis.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api.timeout = 60.0 - default_config.rpcs.get_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api.timeout = 60.0 - default_config.rpcs.create_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api.timeout = 60.0 - default_config.rpcs.update_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api.timeout = 60.0 - default_config.rpcs.delete_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_versions.timeout = 60.0 - default_config.rpcs.list_api_versions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_version.timeout = 60.0 - default_config.rpcs.get_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_version.timeout = 60.0 - default_config.rpcs.create_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_version.timeout = 60.0 - default_config.rpcs.update_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_version.timeout = 60.0 - default_config.rpcs.delete_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_specs.timeout = 60.0 - default_config.rpcs.list_api_specs.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_spec.timeout = 60.0 - default_config.rpcs.get_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_spec_contents.timeout = 60.0 - default_config.rpcs.get_api_spec_contents.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_spec.timeout = 60.0 - default_config.rpcs.create_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_spec.timeout = 60.0 - default_config.rpcs.update_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_spec.timeout = 60.0 - default_config.rpcs.delete_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.tag_api_spec_revision.timeout = 60.0 - default_config.rpcs.tag_api_spec_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_spec_revisions.timeout = 60.0 - default_config.rpcs.list_api_spec_revisions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.rollback_api_spec.timeout = 60.0 - - default_config.rpcs.delete_api_spec_revision.timeout = 60.0 - default_config.rpcs.delete_api_spec_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_deployments.timeout = 60.0 - default_config.rpcs.list_api_deployments.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_deployment.timeout = 60.0 - default_config.rpcs.get_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_deployment.timeout = 60.0 - default_config.rpcs.create_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_deployment.timeout = 60.0 - default_config.rpcs.update_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_deployment.timeout = 60.0 - default_config.rpcs.delete_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.tag_api_deployment_revision.timeout = 60.0 - default_config.rpcs.tag_api_deployment_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_deployment_revisions.timeout = 60.0 - default_config.rpcs.list_api_deployment_revisions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.rollback_api_deployment.timeout = 60.0 - - default_config.rpcs.delete_api_deployment_revision.timeout = 60.0 - default_config.rpcs.delete_api_deployment_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_artifacts.timeout = 60.0 - default_config.rpcs.list_artifacts.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_artifact.timeout = 60.0 - default_config.rpcs.get_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_artifact_contents.timeout = 60.0 - default_config.rpcs.get_artifact_contents.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_artifact.timeout = 60.0 - default_config.rpcs.create_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.replace_artifact.timeout = 60.0 - default_config.rpcs.replace_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_artifact.timeout = 60.0 - default_config.rpcs.delete_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Registry Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Registry::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 - @registry_stub.universe_domain - end - - ## - # Create a new Registry REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Registry 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 - - @registry_stub = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @registry_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @registry_stub.endpoint - config.universe_domain = @registry_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @registry_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 = @registry_stub.endpoint - config.universe_domain = @registry_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @registry_stub.logger - end - - # Service calls - - ## - # Returns matching APIs. - # - # @overload list_apis(request, options = nil) - # Pass arguments to `list_apis` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApisRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_apis` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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 APIs. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # The maximum number of APIs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApis` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApis` must match - # the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new - # - # # Call the list_apis method. - # result = client.list_apis request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. - # p item - # end - # - def list_apis request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_apis.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_apis.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_apis.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_apis request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_apis, "apis", request, result, 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 specified API. - # - # @overload get_api(request, options = nil) - # Pass arguments to `get_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api(name: nil) - # Pass arguments to `get_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the API to retrieve. - # Format: `projects/*/locations/*/apis/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new - # - # # Call the get_api method. - # result = client.get_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def get_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api request, 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 specified API. - # - # @overload create_api(request, options = nil) - # Pass arguments to `create_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_api(parent: nil, api: nil, api_id: nil) - # Pass arguments to `create_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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 APIs. - # Format: `projects/*/locations/*` - # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] - # Required. The API to create. - # @param api_id [::String] - # Required. The ID to use for the API, which will become the final component of - # the API's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new - # - # # Call the create_api method. - # result = client.create_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def create_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_api.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_api request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified API. - # - # @overload update_api(request, options = nil) - # Pass arguments to `update_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_api(api: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] - # Required. The API to update. - # - # The `name` field is used to identify the API to update. - # Format: `projects/*/locations/*/apis/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the API is not found, a new API will be created. - # In this situation, `update_mask` is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new - # - # # Call the update_api method. - # result = client.update_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def update_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_api.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.update_api request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified API and all of the resources that it - # owns. - # - # @overload delete_api(request, options = nil) - # Pass arguments to `delete_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api(name: nil, force: nil) - # Pass arguments to `delete_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the API to delete. - # Format: `projects/*/locations/*/apis/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new - # - # # Call the delete_api method. - # result = client.delete_api request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api request, 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 matching versions. - # - # @overload list_api_versions(request, options = nil) - # Pass arguments to `list_api_versions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @param page_size [::Integer] - # The maximum number of versions to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiVersions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiVersions` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new - # - # # Call the list_api_versions method. - # result = client.list_api_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p item - # end - # - def list_api_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_versions, "api_versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified version. - # - # @overload get_api_version(request, options = nil) - # Pass arguments to `get_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api_version(name: nil) - # Pass arguments to `get_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the version to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new - # - # # Call the get_api_version method. - # result = client.get_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def get_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified version. - # - # @overload create_api_version(request, options = nil) - # Pass arguments to `create_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_api_version(parent: nil, api_version: nil, api_version_id: nil) - # Pass arguments to `create_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] - # Required. The version to create. - # @param api_version_id [::String] - # Required. The ID to use for the version, which will become the final component of - # the version's resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new - # - # # Call the create_api_version method. - # result = client.create_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def create_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_api_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_api_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified version. - # - # @overload update_api_version(request, options = nil) - # Pass arguments to `update_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_api_version(api_version: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] - # Required. The version to update. - # - # The `name` field is used to identify the version to update. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the version is not found, a new version will be - # created. In this situation, `update_mask` is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new - # - # # Call the update_api_version method. - # result = client.update_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def update_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_api_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.update_api_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified version and all of the resources that - # it owns. - # - # @overload delete_api_version(request, options = nil) - # Pass arguments to `delete_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_version(name: nil, force: nil) - # Pass arguments to `delete_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the version to delete. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new - # - # # Call the delete_api_version method. - # result = client.delete_api_version request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching specs. - # - # @overload list_api_specs(request, options = nil) - # Pass arguments to `list_api_specs` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param page_size [::Integer] - # The maximum number of specs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiSpecs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiSpecs` must match - # the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new - # - # # Call the list_api_specs method. - # result = client.list_api_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p item - # end - # - def list_api_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_specs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_specs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_specs, "api_specs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified spec. - # - # @overload get_api_spec(request, options = nil) - # Pass arguments to `get_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api_spec(name: nil) - # Pass arguments to `get_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new - # - # # Call the get_api_spec method. - # result = client.get_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def get_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the contents of a specified spec. - # If specs are stored with GZip compression, the default behavior - # is to return the spec uncompressed (the mime_type response field - # indicates the exact format returned). - # - # @overload get_api_spec_contents(request, options = nil) - # Pass arguments to `get_api_spec_contents` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api_spec_contents(name: nil) - # Pass arguments to `get_api_spec_contents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec whose contents should be retrieved. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::HttpBody] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::HttpBody] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new - # - # # Call the get_api_spec_contents method. - # result = client.get_api_spec_contents request - # - # # The returned object is of type Google::Api::HttpBody. - # p result - # - def get_api_spec_contents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api_spec_contents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api_spec_contents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api_spec_contents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api_spec_contents request, 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 specified spec. - # - # @overload create_api_spec(request, options = nil) - # Pass arguments to `create_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_api_spec(parent: nil, api_spec: nil, api_spec_id: nil) - # Pass arguments to `create_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] - # Required. The spec to create. - # @param api_spec_id [::String] - # Required. The ID to use for the spec, which will become the final component of - # the spec's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new - # - # # Call the create_api_spec method. - # result = client.create_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def create_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified spec. - # - # @overload update_api_spec(request, options = nil) - # Pass arguments to `update_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] - # Required. The spec to update. - # - # The `name` field is used to identify the spec to update. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the spec is not found, a new spec will be created. - # In this situation, `update_mask` is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new - # - # # Call the update_api_spec method. - # result = client.update_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def update_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.update_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified spec, all revisions, and all child - # resources (e.g., artifacts). - # - # @overload delete_api_spec(request, options = nil) - # Pass arguments to `delete_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_spec(name: nil, force: nil) - # Pass arguments to `delete_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to delete. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new - # - # # Call the delete_api_spec method. - # result = client.delete_api_spec request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a tag to a specified revision of a spec. - # - # @overload tag_api_spec_revision(request, options = nil) - # Pass arguments to `tag_api_spec_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload tag_api_spec_revision(name: nil, tag: nil) - # Pass arguments to `tag_api_spec_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to be tagged, including the revision ID. - # @param tag [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new - # - # # Call the tag_api_spec_revision method. - # result = client.tag_api_spec_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def tag_api_spec_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.tag_api_spec_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.tag_api_spec_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.tag_api_spec_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.tag_api_spec_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of a spec. - # Revisions are returned in descending order of revision creation time. - # - # @overload list_api_spec_revisions(request, options = nil) - # Pass arguments to `list_api_spec_revisions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_spec_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_api_spec_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. The name of the spec to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListApiSpecRevisions 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::ApigeeRegistry::V1::ApiSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new - # - # # Call the list_api_spec_revisions method. - # result = client.list_api_spec_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::ApigeeRegistry::V1::ApiSpec. - # p item - # end - # - def list_api_spec_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_spec_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::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_spec_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_spec_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_spec_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_spec_revisions, "api_specs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the current revision to a specified prior revision. - # Note that this creates a new revision with a new revision ID. - # - # @overload rollback_api_spec(request, options = nil) - # Pass arguments to `rollback_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rollback_api_spec(name: nil, revision_id: nil) - # Pass arguments to `rollback_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The spec being rolled back. - # @param revision_id [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same spec. - # - # Example: `c7cfa2a8` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new - # - # # Call the rollback_api_spec method. - # result = client.rollback_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def rollback_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rollback_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rollback_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rollback_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.rollback_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a revision of a spec. - # - # @overload delete_api_spec_revision(request, options = nil) - # Pass arguments to `delete_api_spec_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_spec_revision(name: nil) - # Pass arguments to `delete_api_spec_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new - # - # # Call the delete_api_spec_revision method. - # result = client.delete_api_spec_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def delete_api_spec_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_spec_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_spec_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_spec_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_spec_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching deployments. - # - # @overload list_api_deployments(request, options = nil) - # Pass arguments to `list_api_deployments` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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 deployments. - # Format: `projects/*/locations/*/apis/*` - # @param page_size [::Integer] - # The maximum number of deployments to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiDeployments` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new - # - # # Call the list_api_deployments method. - # result = client.list_api_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p item - # end - # - def list_api_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_deployments, "api_deployments", request, result, 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 specified deployment. - # - # @overload get_api_deployment(request, options = nil) - # Pass arguments to `get_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api_deployment(name: nil) - # Pass arguments to `get_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to retrieve. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new - # - # # Call the get_api_deployment method. - # result = client.get_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def get_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api_deployment request, 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 specified deployment. - # - # @overload create_api_deployment(request, options = nil) - # Pass arguments to `create_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil) - # Pass arguments to `create_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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 deployments. - # Format: `projects/*/locations/*/apis/*` - # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] - # Required. The deployment to create. - # @param api_deployment_id [::String] - # Required. The ID to use for the deployment, which will become the final component of - # the deployment's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new - # - # # Call the create_api_deployment method. - # result = client.create_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def create_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_api_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified deployment. - # - # @overload update_api_deployment(request, options = nil) - # Pass arguments to `update_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] - # Required. The deployment to update. - # - # The `name` field is used to identify the deployment to update. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the deployment is not found, a new deployment will be - # created. In this situation, `update_mask` is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new - # - # # Call the update_api_deployment method. - # result = client.update_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def update_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.update_api_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified deployment, all revisions, and all - # child resources (e.g., artifacts). - # - # @overload delete_api_deployment(request, options = nil) - # Pass arguments to `delete_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_deployment(name: nil, force: nil) - # Pass arguments to `delete_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to delete. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new - # - # # Call the delete_api_deployment method. - # result = client.delete_api_deployment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a tag to a specified revision of a - # deployment. - # - # @overload tag_api_deployment_revision(request, options = nil) - # Pass arguments to `tag_api_deployment_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload tag_api_deployment_revision(name: nil, tag: nil) - # Pass arguments to `tag_api_deployment_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to be tagged, including the revision ID. - # @param tag [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new - # - # # Call the tag_api_deployment_revision method. - # result = client.tag_api_deployment_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def tag_api_deployment_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.tag_api_deployment_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.tag_api_deployment_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.tag_api_deployment_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.tag_api_deployment_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of a deployment. - # Revisions are returned in descending order of revision creation time. - # - # @overload list_api_deployment_revisions(request, options = nil) - # Pass arguments to `list_api_deployment_revisions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_deployment_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_api_deployment_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. The name of the deployment to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListApiDeploymentRevisions 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::ApigeeRegistry::V1::ApiDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new - # - # # Call the list_api_deployment_revisions method. - # result = client.list_api_deployment_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::ApigeeRegistry::V1::ApiDeployment. - # p item - # end - # - def list_api_deployment_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_deployment_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::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_deployment_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_deployment_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_deployment_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_deployment_revisions, "api_deployments", request, result, 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 current revision to a specified prior - # revision. Note that this creates a new revision with a new revision ID. - # - # @overload rollback_api_deployment(request, options = nil) - # Pass arguments to `rollback_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rollback_api_deployment(name: nil, revision_id: nil) - # Pass arguments to `rollback_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The deployment being rolled back. - # @param revision_id [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same deployment. - # - # Example: `c7cfa2a8` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new - # - # # Call the rollback_api_deployment method. - # result = client.rollback_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def rollback_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rollback_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rollback_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rollback_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.rollback_api_deployment request, 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 revision of a deployment. - # - # @overload delete_api_deployment_revision(request, options = nil) - # Pass arguments to `delete_api_deployment_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_deployment_revision(name: nil) - # Pass arguments to `delete_api_deployment_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new - # - # # Call the delete_api_deployment_revision method. - # result = client.delete_api_deployment_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def delete_api_deployment_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_deployment_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_deployment_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_deployment_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_deployment_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching artifacts. - # - # @overload list_artifacts(request, options = nil) - # Pass arguments to `list_artifacts` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @param page_size [::Integer] - # The maximum number of artifacts to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListArtifacts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListArtifacts` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new - # - # # Call the list_artifacts method. - # result = client.list_artifacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. - # p item - # end - # - def list_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_artifacts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_artifacts, "artifacts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified artifact. - # - # @overload get_artifact(request, options = nil) - # Pass arguments to `get_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_artifact(name: nil) - # Pass arguments to `get_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact to retrieve. - # Format: `{parent}/artifacts/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new - # - # # Call the get_artifact method. - # result = client.get_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def get_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the contents of a specified artifact. - # If artifacts are stored with GZip compression, the default behavior - # is to return the artifact uncompressed (the mime_type response field - # indicates the exact format returned). - # - # @overload get_artifact_contents(request, options = nil) - # Pass arguments to `get_artifact_contents` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_artifact_contents(name: nil) - # Pass arguments to `get_artifact_contents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact whose contents should be retrieved. - # Format: `{parent}/artifacts/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::HttpBody] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::HttpBody] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new - # - # # Call the get_artifact_contents method. - # result = client.get_artifact_contents request - # - # # The returned object is of type Google::Api::HttpBody. - # p result - # - def get_artifact_contents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_artifact_contents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_artifact_contents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_artifact_contents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_artifact_contents request, 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 specified artifact. - # - # @overload create_artifact(request, options = nil) - # Pass arguments to `create_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_artifact(parent: nil, artifact: nil, artifact_id: nil) - # Pass arguments to `create_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] - # Required. The artifact to create. - # @param artifact_id [::String] - # Required. The ID to use for the artifact, which will become the final component of - # the artifact's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new - # - # # Call the create_artifact method. - # result = client.create_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def create_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to replace a specified artifact. - # - # @overload replace_artifact(request, options = nil) - # Pass arguments to `replace_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_artifact(artifact: nil) - # Pass arguments to `replace_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] - # Required. The artifact to replace. - # - # The `name` field is used to identify the artifact to replace. - # Format: `{parent}/artifacts/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new - # - # # Call the replace_artifact method. - # result = client.replace_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def replace_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest - - # Converts hash and nil to an 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_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.replace_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.replace_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified artifact. - # - # @overload delete_artifact(request, options = nil) - # Pass arguments to `delete_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_artifact(name: nil) - # Pass arguments to `delete_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact to delete. - # Format: `{parent}/artifacts/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new - # - # # Call the delete_artifact method. - # result = client.delete_artifact request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Registry REST API. - # - # This class represents the configuration for Registry REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_apis to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_apis.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_apis.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::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 Registry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_apis` - # @return [::Gapic::Config::Method] - # - attr_reader :list_apis - ## - # RPC-specific configuration for `get_api` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api - ## - # RPC-specific configuration for `create_api` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api - ## - # RPC-specific configuration for `update_api` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api - ## - # RPC-specific configuration for `delete_api` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api - ## - # RPC-specific configuration for `list_api_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_versions - ## - # RPC-specific configuration for `get_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_version - ## - # RPC-specific configuration for `create_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_version - ## - # RPC-specific configuration for `update_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_version - ## - # RPC-specific configuration for `delete_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_version - ## - # RPC-specific configuration for `list_api_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_specs - ## - # RPC-specific configuration for `get_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_spec - ## - # RPC-specific configuration for `get_api_spec_contents` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_spec_contents - ## - # RPC-specific configuration for `create_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_spec - ## - # RPC-specific configuration for `update_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_spec - ## - # RPC-specific configuration for `delete_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_spec - ## - # RPC-specific configuration for `tag_api_spec_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :tag_api_spec_revision - ## - # RPC-specific configuration for `list_api_spec_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_spec_revisions - ## - # RPC-specific configuration for `rollback_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_api_spec - ## - # RPC-specific configuration for `delete_api_spec_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_spec_revision - ## - # RPC-specific configuration for `list_api_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_deployments - ## - # RPC-specific configuration for `get_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_deployment - ## - # RPC-specific configuration for `create_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_deployment - ## - # RPC-specific configuration for `update_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_deployment - ## - # RPC-specific configuration for `delete_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_deployment - ## - # RPC-specific configuration for `tag_api_deployment_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :tag_api_deployment_revision - ## - # RPC-specific configuration for `list_api_deployment_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_deployment_revisions - ## - # RPC-specific configuration for `rollback_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_api_deployment - ## - # RPC-specific configuration for `delete_api_deployment_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_deployment_revision - ## - # RPC-specific configuration for `list_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_artifacts - ## - # RPC-specific configuration for `get_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_artifact - ## - # RPC-specific configuration for `get_artifact_contents` - # @return [::Gapic::Config::Method] - # - attr_reader :get_artifact_contents - ## - # RPC-specific configuration for `create_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :create_artifact - ## - # RPC-specific configuration for `replace_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_artifact - ## - # RPC-specific configuration for `delete_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_artifact - - # @private - def initialize parent_rpcs = nil - list_apis_config = parent_rpcs.list_apis if parent_rpcs.respond_to? :list_apis - @list_apis = ::Gapic::Config::Method.new list_apis_config - get_api_config = parent_rpcs.get_api if parent_rpcs.respond_to? :get_api - @get_api = ::Gapic::Config::Method.new get_api_config - create_api_config = parent_rpcs.create_api if parent_rpcs.respond_to? :create_api - @create_api = ::Gapic::Config::Method.new create_api_config - update_api_config = parent_rpcs.update_api if parent_rpcs.respond_to? :update_api - @update_api = ::Gapic::Config::Method.new update_api_config - delete_api_config = parent_rpcs.delete_api if parent_rpcs.respond_to? :delete_api - @delete_api = ::Gapic::Config::Method.new delete_api_config - list_api_versions_config = parent_rpcs.list_api_versions if parent_rpcs.respond_to? :list_api_versions - @list_api_versions = ::Gapic::Config::Method.new list_api_versions_config - get_api_version_config = parent_rpcs.get_api_version if parent_rpcs.respond_to? :get_api_version - @get_api_version = ::Gapic::Config::Method.new get_api_version_config - create_api_version_config = parent_rpcs.create_api_version if parent_rpcs.respond_to? :create_api_version - @create_api_version = ::Gapic::Config::Method.new create_api_version_config - update_api_version_config = parent_rpcs.update_api_version if parent_rpcs.respond_to? :update_api_version - @update_api_version = ::Gapic::Config::Method.new update_api_version_config - delete_api_version_config = parent_rpcs.delete_api_version if parent_rpcs.respond_to? :delete_api_version - @delete_api_version = ::Gapic::Config::Method.new delete_api_version_config - list_api_specs_config = parent_rpcs.list_api_specs if parent_rpcs.respond_to? :list_api_specs - @list_api_specs = ::Gapic::Config::Method.new list_api_specs_config - get_api_spec_config = parent_rpcs.get_api_spec if parent_rpcs.respond_to? :get_api_spec - @get_api_spec = ::Gapic::Config::Method.new get_api_spec_config - get_api_spec_contents_config = parent_rpcs.get_api_spec_contents if parent_rpcs.respond_to? :get_api_spec_contents - @get_api_spec_contents = ::Gapic::Config::Method.new get_api_spec_contents_config - create_api_spec_config = parent_rpcs.create_api_spec if parent_rpcs.respond_to? :create_api_spec - @create_api_spec = ::Gapic::Config::Method.new create_api_spec_config - update_api_spec_config = parent_rpcs.update_api_spec if parent_rpcs.respond_to? :update_api_spec - @update_api_spec = ::Gapic::Config::Method.new update_api_spec_config - delete_api_spec_config = parent_rpcs.delete_api_spec if parent_rpcs.respond_to? :delete_api_spec - @delete_api_spec = ::Gapic::Config::Method.new delete_api_spec_config - tag_api_spec_revision_config = parent_rpcs.tag_api_spec_revision if parent_rpcs.respond_to? :tag_api_spec_revision - @tag_api_spec_revision = ::Gapic::Config::Method.new tag_api_spec_revision_config - list_api_spec_revisions_config = parent_rpcs.list_api_spec_revisions if parent_rpcs.respond_to? :list_api_spec_revisions - @list_api_spec_revisions = ::Gapic::Config::Method.new list_api_spec_revisions_config - rollback_api_spec_config = parent_rpcs.rollback_api_spec if parent_rpcs.respond_to? :rollback_api_spec - @rollback_api_spec = ::Gapic::Config::Method.new rollback_api_spec_config - delete_api_spec_revision_config = parent_rpcs.delete_api_spec_revision if parent_rpcs.respond_to? :delete_api_spec_revision - @delete_api_spec_revision = ::Gapic::Config::Method.new delete_api_spec_revision_config - list_api_deployments_config = parent_rpcs.list_api_deployments if parent_rpcs.respond_to? :list_api_deployments - @list_api_deployments = ::Gapic::Config::Method.new list_api_deployments_config - get_api_deployment_config = parent_rpcs.get_api_deployment if parent_rpcs.respond_to? :get_api_deployment - @get_api_deployment = ::Gapic::Config::Method.new get_api_deployment_config - create_api_deployment_config = parent_rpcs.create_api_deployment if parent_rpcs.respond_to? :create_api_deployment - @create_api_deployment = ::Gapic::Config::Method.new create_api_deployment_config - update_api_deployment_config = parent_rpcs.update_api_deployment if parent_rpcs.respond_to? :update_api_deployment - @update_api_deployment = ::Gapic::Config::Method.new update_api_deployment_config - delete_api_deployment_config = parent_rpcs.delete_api_deployment if parent_rpcs.respond_to? :delete_api_deployment - @delete_api_deployment = ::Gapic::Config::Method.new delete_api_deployment_config - tag_api_deployment_revision_config = parent_rpcs.tag_api_deployment_revision if parent_rpcs.respond_to? :tag_api_deployment_revision - @tag_api_deployment_revision = ::Gapic::Config::Method.new tag_api_deployment_revision_config - list_api_deployment_revisions_config = parent_rpcs.list_api_deployment_revisions if parent_rpcs.respond_to? :list_api_deployment_revisions - @list_api_deployment_revisions = ::Gapic::Config::Method.new list_api_deployment_revisions_config - rollback_api_deployment_config = parent_rpcs.rollback_api_deployment if parent_rpcs.respond_to? :rollback_api_deployment - @rollback_api_deployment = ::Gapic::Config::Method.new rollback_api_deployment_config - delete_api_deployment_revision_config = parent_rpcs.delete_api_deployment_revision if parent_rpcs.respond_to? :delete_api_deployment_revision - @delete_api_deployment_revision = ::Gapic::Config::Method.new delete_api_deployment_revision_config - list_artifacts_config = parent_rpcs.list_artifacts if parent_rpcs.respond_to? :list_artifacts - @list_artifacts = ::Gapic::Config::Method.new list_artifacts_config - get_artifact_config = parent_rpcs.get_artifact if parent_rpcs.respond_to? :get_artifact - @get_artifact = ::Gapic::Config::Method.new get_artifact_config - get_artifact_contents_config = parent_rpcs.get_artifact_contents if parent_rpcs.respond_to? :get_artifact_contents - @get_artifact_contents = ::Gapic::Config::Method.new get_artifact_contents_config - create_artifact_config = parent_rpcs.create_artifact if parent_rpcs.respond_to? :create_artifact - @create_artifact = ::Gapic::Config::Method.new create_artifact_config - replace_artifact_config = parent_rpcs.replace_artifact if parent_rpcs.respond_to? :replace_artifact - @replace_artifact = ::Gapic::Config::Method.new replace_artifact_config - delete_artifact_config = parent_rpcs.delete_artifact if parent_rpcs.respond_to? :delete_artifact - @delete_artifact = ::Gapic::Config::Method.new delete_artifact_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb deleted file mode 100644 index 33c3fa1fe0c8..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb +++ /dev/null @@ -1,2406 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigeeregistry/v1/registry_service_pb" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - module Rest - ## - # REST service stub for the Registry 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_apis REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApisResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApisResponse] - # A result object deserialized from the server's reply - def list_apis request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_apis_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_apis", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # A result object deserialized from the server's reply - def get_api request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Api.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_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # A result object deserialized from the server's reply - def create_api request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_api_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_api", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Api.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # A result object deserialized from the server's reply - def update_api request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_api_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_api", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Api.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_api request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_api_versions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse] - # A result object deserialized from the server's reply - def list_api_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_api_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # A result object deserialized from the server's reply - def get_api_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.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_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # A result object deserialized from the server's reply - def create_api_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_api_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_api_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # A result object deserialized from the server's reply - def update_api_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_api_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_api_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_api_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_api_specs REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse] - # A result object deserialized from the server's reply - def list_api_specs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_specs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_api_specs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def get_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api_spec_contents REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::HttpBody] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::HttpBody] - # A result object deserialized from the server's reply - def get_api_spec_contents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_spec_contents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api_spec_contents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Api::HttpBody.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_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def create_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def update_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 tag_api_spec_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def tag_api_spec_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_tag_api_spec_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "tag_api_spec_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_api_spec_revisions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse] - # A result object deserialized from the server's reply - def list_api_spec_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_spec_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_api_spec_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rollback_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def rollback_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rollback_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rollback_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_spec_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def delete_api_spec_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_spec_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_spec_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_api_deployments REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse] - # A result object deserialized from the server's reply - def list_api_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_deployments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_api_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def get_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.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_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def create_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def update_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 tag_api_deployment_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def tag_api_deployment_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_tag_api_deployment_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "tag_api_deployment_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_api_deployment_revisions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse] - # A result object deserialized from the server's reply - def list_api_deployment_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_deployment_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_api_deployment_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rollback_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def rollback_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rollback_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rollback_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_deployment_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def delete_api_deployment_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_deployment_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_deployment_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_artifacts REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse] - # A result object deserialized from the server's reply - def list_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # A result object deserialized from the server's reply - def get_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_artifact_contents REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::HttpBody] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::HttpBody] - # A result object deserialized from the server's reply - def get_artifact_contents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_artifact_contents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_artifact_contents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Api::HttpBody.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_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # A result object deserialized from the server's reply - def create_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.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_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # A result object deserialized from the server's reply - def replace_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_replace_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "replace_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_apis REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_apis_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/apis", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_api_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/apis", - body: "api", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_api_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{api.name}", - body: "api", - matches: [ - ["api.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_versions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_api_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/versions", - body: "api_version", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_api_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{api_version.name}", - body: "api_version", - matches: [ - ["api_version.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_specs REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_specs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/specs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api_spec_contents REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_spec_contents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/specs", - body: "api_spec", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{api_spec.name}", - body: "api_spec", - matches: [ - ["api_spec.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the tag_api_spec_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_tag_api_spec_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:tagRevision", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_spec_revisions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_spec_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rollback_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rollback_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:rollback", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_spec_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_spec_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}:deleteRevision", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_deployments REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/deployments", - body: "api_deployment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{api_deployment.name}", - body: "api_deployment", - matches: [ - ["api_deployment.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the tag_api_deployment_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_tag_api_deployment_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:tagRevision", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_deployment_revisions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_deployment_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rollback_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rollback_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:rollback", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_deployment_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_deployment_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}:deleteRevision", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_artifacts REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_artifact_contents REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_artifact_contents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the replace_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest] - # 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_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb deleted file mode 100644 index 696eafb5d184..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigee_registry/v1/provisioning/rest" -require "google/cloud/apigee_registry/v1/registry/rest" -require "google/cloud/apigee_registry/v1/bindings_override" -require "google/cloud/apigee_registry/v1/version" - -module Google - module Cloud - module ApigeeRegistry - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/apigee_registry/v1/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb deleted file mode 100644 index 15cf2c14d1ab..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb deleted file mode 100644 index f5077b4ec514..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/cloud/apigeeregistry/v1/provisioning_service.proto\x12\x1egoogle.cloud.apigeeregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x15\x43reateInstanceRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x08instance\x18\x03 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.InstanceB\x03\xe0\x41\x02\"U\n\x15\x44\x65leteInstanceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Instance\"R\n\x12GetInstanceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Instance\"\xdd\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\x16\n\x0estatus_message\x18\x05 \x01(\t\x12\x1e\n\x16\x63\x61ncellation_requested\x18\x06 \x01(\x08\x12\x13\n\x0b\x61pi_version\x18\x07 \x01(\t\"\xc2\x04\n\x08Instance\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x04 \x01(\x0e\x32..google.cloud.apigeeregistry.v1.Instance.StateB\x03\xe0\x41\x03\x12\x1a\n\rstate_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x06\x63onfig\x18\x06 \x01(\x0b\x32/.google.cloud.apigeeregistry.v1.Instance.ConfigB\x03\xe0\x41\x02\x1a;\n\x06\x43onfig\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rcmek_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"n\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06:i\xea\x41\x66\n&apigeeregistry.googleapis.com/Instance\x12.google.cloud.apigeeregistry.v1.ApiDeployment.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n+apigeeregistry.googleapis.com/ApiDeployment\x12Kprojects/{project}/locations/{location}/apis/{api}/deployments/{deployment}\"\xb7\x05\n\x08\x41rtifact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\tmime_type\x18\x04 \x01(\t\x12\x17\n\nsize_bytes\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04hash\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x63ontents\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x04:\xda\x03\xea\x41\xd6\x03\n&apigeeregistry.googleapis.com/Artifact\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apigeeregistry.googleapis.com/ApiVersion\"\xbe\x01\n\x17\x43reateApiVersionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apigeeregistry.googleapis.com/ApiVersion\x12\x44\n\x0b\x61pi_version\x18\x02 \x01(\x0b\x32*.google.cloud.apigeeregistry.v1.ApiVersionB\x03\xe0\x41\x02\x12\x1b\n\x0e\x61pi_version_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa7\x01\n\x17UpdateApiVersionRequest\x12\x44\n\x0b\x61pi_version\x18\x01 \x01(\x0b\x32*.google.cloud.apigeeregistry.v1.ApiVersionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"h\n\x17\x44\x65leteApiVersionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apigeeregistry.googleapis.com/ApiVersion\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"\x8b\x01\n\x13ListApiSpecsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%apigeeregistry.googleapis.com/ApiSpec\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\"k\n\x14ListApiSpecsResponse\x12:\n\tapi_specs\x18\x01 \x03(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpec\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x11GetApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"X\n\x19GetApiSpecContentsRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"\xaf\x01\n\x14\x43reateApiSpecRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%apigeeregistry.googleapis.com/ApiSpec\x12>\n\x08\x61pi_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpecB\x03\xe0\x41\x02\x12\x18\n\x0b\x61pi_spec_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9e\x01\n\x14UpdateApiSpecRequest\x12>\n\x08\x61pi_spec\x18\x01 \x01(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpecB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"b\n\x14\x44\x65leteApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"j\n\x19TagApiSpecRevisionRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x10\n\x03tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n\x1bListApiSpecRevisionsRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x1cListApiSpecRevisionsResponse\x12:\n\tapi_specs\x18\x01 \x03(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpec\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x16RollbackApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"[\n\x1c\x44\x65leteApiSpecRevisionRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"\x97\x01\n\x19ListApiDeploymentsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+apigeeregistry.googleapis.com/ApiDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"}\n\x1aListApiDeploymentsResponse\x12\x46\n\x0f\x61pi_deployments\x18\x01 \x03(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x17GetApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\"\xcd\x01\n\x1a\x43reateApiDeploymentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+apigeeregistry.googleapis.com/ApiDeployment\x12J\n\x0e\x61pi_deployment\x18\x02 \x01(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeploymentB\x03\xe0\x41\x02\x12\x1e\n\x11\x61pi_deployment_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x1aUpdateApiDeploymentRequest\x12J\n\x0e\x61pi_deployment\x18\x01 \x01(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeploymentB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"n\n\x1a\x44\x65leteApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"v\n\x1fTagApiDeploymentRevisionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x10\n\x03tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x8d\x01\n!ListApiDeploymentRevisionsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\"ListApiDeploymentRevisionsResponse\x12\x46\n\x0f\x61pi_deployments\x18\x01 \x03(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x1cRollbackApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"g\n\"DeleteApiDeploymentRevisionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\"\x8d\x01\n\x14ListArtifactsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&apigeeregistry.googleapis.com/Artifact\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\"m\n\x15ListArtifactsResponse\x12;\n\tartifacts\x18\x01 \x03(\x0b\x32(.google.cloud.apigeeregistry.v1.Artifact\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x12GetArtifactRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact\"Z\n\x1aGetArtifactContentsRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact\"\xb2\x01\n\x15\x43reateArtifactRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&apigeeregistry.googleapis.com/Artifact\x12?\n\x08\x61rtifact\x18\x02 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.ArtifactB\x03\xe0\x41\x02\x12\x18\n\x0b\x61rtifact_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Y\n\x16ReplaceArtifactRequest\x12?\n\x08\x61rtifact\x18\x01 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.ArtifactB\x03\xe0\x41\x02\"U\n\x15\x44\x65leteArtifactRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact2\xc0\x45\n\x08Registry\x12\xa8\x01\n\x08ListApis\x12/.google.cloud.apigeeregistry.v1.ListApisRequest\x1a\x30.google.cloud.apigeeregistry.v1.ListApisResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/apis\x12\x95\x01\n\x06GetApi\x12-.google.cloud.apigeeregistry.v1.GetApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/apis/*}\x12\xad\x01\n\tCreateApi\x12\x30.google.cloud.apigeeregistry.v1.CreateApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"I\xda\x41\x11parent,api,api_id\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/apis:\x03\x61pi\x12\xaf\x01\n\tUpdateApi\x12\x30.google.cloud.apigeeregistry.v1.UpdateApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"K\xda\x41\x0f\x61pi,update_mask\x82\xd3\xe4\x93\x02\x33\x32,/v1/{api.name=projects/*/locations/*/apis/*}:\x03\x61pi\x12\x8e\x01\n\tDeleteApi\x12\x30.google.cloud.apigeeregistry.v1.DeleteApiRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/apis/*}\x12\xc8\x01\n\x0fListApiVersions\x12\x36.google.cloud.apigeeregistry.v1.ListApiVersionsRequest\x1a\x37.google.cloud.apigeeregistry.v1.ListApiVersionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*/apis/*}/versions\x12\xb5\x01\n\rGetApiVersion\x12\x34.google.cloud.apigeeregistry.v1.GetApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/apis/*/versions/*}\x12\xe5\x01\n\x10\x43reateApiVersion\x12\x37.google.cloud.apigeeregistry.v1.CreateApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"l\xda\x41!parent,api_version,api_version_id\x82\xd3\xe4\x93\x02\x42\"3/v1/{parent=projects/*/locations/*/apis/*}/versions:\x0b\x61pi_version\x12\xe7\x01\n\x10UpdateApiVersion\x12\x37.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"n\xda\x41\x17\x61pi_version,update_mask\x82\xd3\xe4\x93\x02N2?/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}:\x0b\x61pi_version\x12\xa7\x01\n\x10\x44\x65leteApiVersion\x12\x37.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/apis/*/versions/*}\x12\xc7\x01\n\x0cListApiSpecs\x12\x33.google.cloud.apigeeregistry.v1.ListApiSpecsRequest\x1a\x34.google.cloud.apigeeregistry.v1.ListApiSpecsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs\x12\xb4\x01\n\nGetApiSpec\x12\x31.google.cloud.apigeeregistry.v1.GetApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\x12\xbd\x01\n\x12GetApiSpecContents\x12\x39.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest\x1a\x14.google.api.HttpBody\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents\x12\xdb\x01\n\rCreateApiSpec\x12\x34.google.cloud.apigeeregistry.v1.CreateApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"k\xda\x41\x1bparent,api_spec,api_spec_id\x82\xd3\xe4\x93\x02G\";/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs:\x08\x61pi_spec\x12\xdd\x01\n\rUpdateApiSpec\x12\x34.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"m\xda\x41\x14\x61pi_spec,update_mask\x82\xd3\xe4\x93\x02P2D/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}:\x08\x61pi_spec\x12\xa9\x01\n\rDeleteApiSpec\x12\x34.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest\x1a\x16.google.protobuf.Empty\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\x12\xcc\x01\n\x12TagApiSpecRevision\x12\x39.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"R\x82\xd3\xe4\x93\x02L\"G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision:\x01*\x12\xe4\x01\n\x14ListApiSpecRevisions\x12;.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest\x1a<.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse\"Q\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions\x12\xc3\x01\n\x0fRollbackApiSpec\x12\x36.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"O\x82\xd3\xe4\x93\x02I\"D/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback:\x01*\x12\xd9\x01\n\x15\x44\x65leteApiSpecRevision\x12<.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision\x12\xd4\x01\n\x12ListApiDeployments\x12\x39.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest\x1a:.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*/apis/*}/deployments\x12\xc1\x01\n\x10GetApiDeployment\x12\x37.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/apis/*/deployments/*}\x12\xfa\x01\n\x13\x43reateApiDeployment\x12:.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"x\xda\x41\'parent,api_deployment,api_deployment_id\x82\xd3\xe4\x93\x02H\"6/v1/{parent=projects/*/locations/*/apis/*}/deployments:\x0e\x61pi_deployment\x12\xfc\x01\n\x13UpdateApiDeployment\x12:.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"z\xda\x41\x1a\x61pi_deployment,update_mask\x82\xd3\xe4\x93\x02W2E/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}:\x0e\x61pi_deployment\x12\xb0\x01\n\x13\x44\x65leteApiDeployment\x12:.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/apis/*/deployments/*}\x12\xd9\x01\n\x18TagApiDeploymentRevision\x12?.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"M\x82\xd3\xe4\x93\x02G\"B/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision:\x01*\x12\xf1\x01\n\x1aListApiDeploymentRevisions\x12\x41.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest\x1a\x42.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse\"L\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions\x12\xd0\x01\n\x15RollbackApiDeployment\x12<.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback:\x01*\x12\xe6\x01\n\x1b\x44\x65leteApiDeploymentRevision\x12\x42.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision\x12\xca\x03\n\rListArtifacts\x12\x34.google.cloud.apigeeregistry.v1.ListArtifactsRequest\x1a\x35.google.cloud.apigeeregistry.v1.ListArtifactsResponse\"\xcb\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xbb\x02\x12-/v1/{parent=projects/*/locations/*}/artifactsZ6\x12\x34/v1/{parent=projects/*/locations/*/apis/*}/artifactsZA\x12?/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifactsZI\x12G/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifactsZD\x12\x42/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts\x12\xb7\x03\n\x0bGetArtifact\x12\x32.google.cloud.apigeeregistry.v1.GetArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\xc9\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbb\x02\x12-/v1/{name=projects/*/locations/*/artifacts/*}Z6\x12\x34/v1/{name=projects/*/locations/*/apis/*/artifacts/*}ZA\x12?/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}ZI\x12G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}ZD\x12\x42/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}\x12\xef\x03\n\x13GetArtifactContents\x12:.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest\x1a\x14.google.api.HttpBody\"\x85\x03\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf7\x02\x12\x39/v1/{name=projects/*/locations/*/artifacts/*}:getContentsZB\x12@/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContentsZM\x12K/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContentsZU\x12S/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContentsZP\x12N/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents\x12\x86\x04\n\x0e\x43reateArtifact\x12\x35.google.cloud.apigeeregistry.v1.CreateArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\x92\x03\xda\x41\x1bparent,artifact,artifact_id\x82\xd3\xe4\x93\x02\xed\x02\"-/v1/{parent=projects/*/locations/*}/artifacts:\x08\x61rtifactZ@\"4/v1/{parent=projects/*/locations/*/apis/*}/artifacts:\x08\x61rtifactZK\"?/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts:\x08\x61rtifactZS\"G/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts:\x08\x61rtifactZN\"B/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts:\x08\x61rtifact\x12\xa2\x04\n\x0fReplaceArtifact\x12\x36.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\xac\x03\xda\x41\x08\x61rtifact\x82\xd3\xe4\x93\x02\x9a\x03\x1a\x36/v1/{artifact.name=projects/*/locations/*/artifacts/*}:\x08\x61rtifactZI\x1a=/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}:\x08\x61rtifactZT\x1aH/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:\x08\x61rtifactZ\\\x1aP/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:\x08\x61rtifactZW\x1aK/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:\x08\x61rtifact\x12\xab\x03\n\x0e\x44\x65leteArtifact\x12\x35.google.cloud.apigeeregistry.v1.DeleteArtifactRequest\x1a\x16.google.protobuf.Empty\"\xc9\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbb\x02*-/v1/{name=projects/*/locations/*/artifacts/*}Z6*4/v1/{name=projects/*/locations/*/apis/*/artifacts/*}ZA*?/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}ZI*G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}ZD*B/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}\x1aQ\xca\x41\x1d\x61pigeeregistry.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xee\x01\n\"com.google.cloud.apigeeregistry.v1B\x14RegistryServiceProtoP\x01ZJcloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb;apigeeregistrypb\xaa\x02\x1eGoogle.Cloud.ApigeeRegistry.V1\xca\x02\x1eGoogle\\Cloud\\ApigeeRegistry\\V1\xea\x02!Google::Cloud::ApigeeRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ApigeeRegistry - module V1 - ListApisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApisRequest").msgclass - ListApisResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApisResponse").msgclass - GetApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiRequest").msgclass - CreateApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiRequest").msgclass - UpdateApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiRequest").msgclass - DeleteApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiRequest").msgclass - ListApiVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiVersionsRequest").msgclass - ListApiVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiVersionsResponse").msgclass - GetApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiVersionRequest").msgclass - CreateApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiVersionRequest").msgclass - UpdateApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiVersionRequest").msgclass - DeleteApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiVersionRequest").msgclass - ListApiSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecsRequest").msgclass - ListApiSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecsResponse").msgclass - GetApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiSpecRequest").msgclass - GetApiSpecContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest").msgclass - CreateApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiSpecRequest").msgclass - UpdateApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiSpecRequest").msgclass - DeleteApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiSpecRequest").msgclass - TagApiSpecRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest").msgclass - ListApiSpecRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest").msgclass - ListApiSpecRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse").msgclass - RollbackApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.RollbackApiSpecRequest").msgclass - DeleteApiSpecRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest").msgclass - ListApiDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest").msgclass - ListApiDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse").msgclass - GetApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiDeploymentRequest").msgclass - CreateApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest").msgclass - UpdateApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest").msgclass - DeleteApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest").msgclass - TagApiDeploymentRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest").msgclass - ListApiDeploymentRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest").msgclass - ListApiDeploymentRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse").msgclass - RollbackApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest").msgclass - DeleteApiDeploymentRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest").msgclass - ListArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListArtifactsRequest").msgclass - ListArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListArtifactsResponse").msgclass - GetArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetArtifactRequest").msgclass - GetArtifactContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetArtifactContentsRequest").msgclass - CreateArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateArtifactRequest").msgclass - ReplaceArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ReplaceArtifactRequest").msgclass - DeleteArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteArtifactRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb deleted file mode 100644 index 3fb9990b50eb..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb +++ /dev/null @@ -1,128 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/apigeeregistry/v1/registry_service.proto for package 'Google.Cloud.ApigeeRegistry.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/apigeeregistry/v1/registry_service_pb' - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - # The Registry service allows teams to manage descriptions of APIs. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.apigeeregistry.v1.Registry' - - # Returns matching APIs. - rpc :ListApis, ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse - # Returns a specified API. - rpc :GetApi, ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api - # Creates a specified API. - rpc :CreateApi, ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api - # Used to modify a specified API. - rpc :UpdateApi, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api - # Removes a specified API and all of the resources that it - # owns. - rpc :DeleteApi, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Google::Protobuf::Empty - # Returns matching versions. - rpc :ListApiVersions, ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse - # Returns a specified version. - rpc :GetApiVersion, ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion - # Creates a specified version. - rpc :CreateApiVersion, ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion - # Used to modify a specified version. - rpc :UpdateApiVersion, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion - # Removes a specified version and all of the resources that - # it owns. - rpc :DeleteApiVersion, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Google::Protobuf::Empty - # Returns matching specs. - rpc :ListApiSpecs, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse - # Returns a specified spec. - rpc :GetApiSpec, ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Returns the contents of a specified spec. - # If specs are stored with GZip compression, the default behavior - # is to return the spec uncompressed (the mime_type response field - # indicates the exact format returned). - rpc :GetApiSpecContents, ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Google::Api::HttpBody - # Creates a specified spec. - rpc :CreateApiSpec, ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Used to modify a specified spec. - rpc :UpdateApiSpec, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Removes a specified spec, all revisions, and all child - # resources (e.g., artifacts). - rpc :DeleteApiSpec, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Google::Protobuf::Empty - # Adds a tag to a specified revision of a spec. - rpc :TagApiSpecRevision, ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Lists all revisions of a spec. - # Revisions are returned in descending order of revision creation time. - rpc :ListApiSpecRevisions, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse - # Sets the current revision to a specified prior revision. - # Note that this creates a new revision with a new revision ID. - rpc :RollbackApiSpec, ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Deletes a revision of a spec. - rpc :DeleteApiSpecRevision, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Returns matching deployments. - rpc :ListApiDeployments, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse - # Returns a specified deployment. - rpc :GetApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Creates a specified deployment. - rpc :CreateApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Used to modify a specified deployment. - rpc :UpdateApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Removes a specified deployment, all revisions, and all - # child resources (e.g., artifacts). - rpc :DeleteApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Google::Protobuf::Empty - # Adds a tag to a specified revision of a - # deployment. - rpc :TagApiDeploymentRevision, ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Lists all revisions of a deployment. - # Revisions are returned in descending order of revision creation time. - rpc :ListApiDeploymentRevisions, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse - # Sets the current revision to a specified prior - # revision. Note that this creates a new revision with a new revision ID. - rpc :RollbackApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Deletes a revision of a deployment. - rpc :DeleteApiDeploymentRevision, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Returns matching artifacts. - rpc :ListArtifacts, ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse - # Returns a specified artifact. - rpc :GetArtifact, ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact - # Returns the contents of a specified artifact. - # If artifacts are stored with GZip compression, the default behavior - # is to return the artifact uncompressed (the mime_type response field - # indicates the exact format returned). - rpc :GetArtifactContents, ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Google::Api::HttpBody - # Creates a specified artifact. - rpc :CreateArtifact, ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact - # Used to replace a specified artifact. - rpc :ReplaceArtifact, ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact - # Removes a specified artifact. - rpc :DeleteArtifact, ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/README.md deleted file mode 100644 index 6169ad3a961c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Apigee Registry V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb deleted file mode 100644 index 938f7ac6b2fd..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.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 Api - # Message that represents an arbitrary HTTP body. It should only be used for - # payload formats that can't be represented as JSON, such as raw binary or - # an HTML page. - # - # - # This message can be used both in streaming and non-streaming API methods in - # the request as well as the response. - # - # It can be used as a top-level request field, which is convenient if one - # wants to extract parameters from either the URL or HTTP template into the - # request fields and also want access to the raw HTTP body. - # - # Example: - # - # message GetResourceRequest { - # // A unique request id. - # string request_id = 1; - # - # // The raw HTTP body is bound to this field. - # google.api.HttpBody http_body = 2; - # - # } - # - # service ResourceService { - # rpc GetResource(GetResourceRequest) - # returns (google.api.HttpBody); - # rpc UpdateResource(google.api.HttpBody) - # returns (google.protobuf.Empty); - # - # } - # - # Example with streaming methods: - # - # service CaldavService { - # rpc GetCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # rpc UpdateCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # - # } - # - # Use of this type only changes how the request and response bodies are - # handled, all other features will continue to work unchanged. - # @!attribute [rw] content_type - # @return [::String] - # The HTTP Content-Type header value specifying the content type of the body. - # @!attribute [rw] data - # @return [::String] - # The HTTP request/response body as raw binary. - # @!attribute [rw] extensions - # @return [::Array<::Google::Protobuf::Any>] - # Application specific response metadata. Must be set in the first response - # for streaming APIs. - class HttpBody - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb deleted file mode 100644 index a114ffa9ee43..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - # Request message for CreateInstance. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` - # @!attribute [rw] instance_id - # @return [::String] - # Required. Identifier to assign to the Instance. Must be unique within scope of the - # parent resource. - # @!attribute [rw] instance - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] - # Required. The Instance. - class CreateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteInstance. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Instance to delete. - # Format: `projects/*/locations/*/instances/*`. - class DeleteInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetInstance. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Instance to retrieve. - # Format: `projects/*/locations/*/instances/*`. - class GetInstanceRequest - 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] status_message - # @return [::String] - # Human-readable status of the operation, if any. - # @!attribute [rw] cancellation_requested - # @return [::Boolean] - # 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 [rw] api_version - # @return [::String] - # API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Instance represents the instance resources of the Registry. - # Currently, only one instance is allowed for each project. - # @!attribute [rw] name - # @return [::String] - # Format: `projects/*/locations/*/instance`. - # Currently only `locations/global` is supported. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [r] state - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance::State] - # Output only. The current state of the Instance. - # @!attribute [r] state_message - # @return [::String] - # Output only. Extra information of Instance.State if the state is `FAILED`. - # @!attribute [rw] config - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance::Config] - # Required. Config of the Instance. - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Available configurations to provision an Instance. - # @!attribute [r] location - # @return [::String] - # Output only. The GCP location where the Instance resides. - # @!attribute [rw] cmek_key_name - # @return [::String] - # Required. The Customer Managed Encryption Key (CMEK) used for data encryption. - # The CMEK name should follow the format of - # `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`, - # where the `location` must match InstanceConfig.location. - class Config - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of the Instance. - module State - # The default value. This value is used if the state is omitted. - STATE_UNSPECIFIED = 0 - - # The Instance has not been initialized or has been deleted. - INACTIVE = 1 - - # The Instance is being created. - CREATING = 2 - - # The Instance has been created and is ready for use. - ACTIVE = 3 - - # The Instance is being updated. - UPDATING = 4 - - # The Instance is being deleted. - DELETING = 5 - - # The Instance encountered an error during a state change. - FAILED = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb deleted file mode 100644 index e62848d7ff0d..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.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! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - # A top-level description of an API. - # Produced by producers and are commitments to provide services. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] display_name - # @return [::String] - # Human-meaningful name. - # @!attribute [rw] description - # @return [::String] - # A detailed description. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [rw] availability - # @return [::String] - # A user-definable description of the availability of this service. - # Format: free-form, but we expect single words that describe availability, - # e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN". - # @!attribute [rw] recommended_version - # @return [::String] - # The recommended version of the API. - # Format: `apis/{api}/versions/{version}` - # @!attribute [rw] recommended_deployment - # @return [::String] - # The recommended deployment of the API. - # Format: `apis/{api}/deployments/{deployment}` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels attach identifying metadata to resources. Identifying metadata can - # be used to filter list operations. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores, and dashes. International characters are allowed. - # No more than 64 user labels can be associated with one resource (System - # labels are excluded). - # - # See https://goo.gl/xmQnxf for more information and examples of labels. - # System reserved label keys are prefixed with - # `apigeeregistry.googleapis.com/` and cannot be changed. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Annotations attach non-identifying metadata to resources. - # - # Annotation keys and values are less restricted than those of labels, but - # should be generally used for small values of broad interest. Larger, topic- - # specific metadata should be stored in Artifacts. - class Api - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes a particular version of an API. - # ApiVersions are what consumers actually use. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] display_name - # @return [::String] - # Human-meaningful name. - # @!attribute [rw] description - # @return [::String] - # A detailed description. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [rw] state - # @return [::String] - # A user-definable description of the lifecycle phase of this API version. - # Format: free-form, but we expect single words that describe API maturity, - # e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", - # "DEPRECATED", "RETIRED". - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels attach identifying metadata to resources. Identifying metadata can - # be used to filter list operations. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # No more than 64 user labels can be associated with one resource (System - # labels are excluded). - # - # See https://goo.gl/xmQnxf for more information and examples of labels. - # System reserved label keys are prefixed with - # `apigeeregistry.googleapis.com/` and cannot be changed. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Annotations attach non-identifying metadata to resources. - # - # Annotation keys and values are less restricted than those of labels, but - # should be generally used for small values of broad interest. Larger, topic- - # specific metadata should be stored in Artifacts. - class ApiVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes a version of an API in a structured way. - # ApiSpecs provide formal descriptions that consumers can use to use a version. - # ApiSpec resources are intended to be fully-resolved descriptions of an - # ApiVersion. When specs consist of multiple files, these should be bundled - # together (e.g., in a zip archive) and stored as a unit. Multiple specs can - # exist to provide representations in different API description formats. - # Synchronization of these representations would be provided by tooling and - # background services. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] filename - # @return [::String] - # A possibly-hierarchical name used to refer to the spec from other specs. - # @!attribute [rw] description - # @return [::String] - # A detailed description. - # @!attribute [r] revision_id - # @return [::String] - # Output only. Immutable. The revision ID of the spec. - # A new revision is committed whenever the spec contents are changed. - # The format is an 8-character hexadecimal string. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp; when the spec resource was created. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Revision creation timestamp; when the represented revision was created. - # @!attribute [r] revision_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp: when the represented revision was last modified. - # @!attribute [rw] mime_type - # @return [::String] - # A style (format) descriptor for this spec that is specified as a Media Type - # (https://en.wikipedia.org/wiki/Media_type). Possible values include - # `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and - # `application/vnd.apigee.graphql`, with possible suffixes representing - # compression types. These hypothetical names are defined in the vendor tree - # defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. - # Content types can specify compression. Currently only GZip compression is - # supported (indicated with "+gzip"). - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. The size of the spec file in bytes. If the spec is gzipped, this is the - # size of the uncompressed spec. - # @!attribute [r] hash - # @return [::String] - # Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is - # the hash of the uncompressed spec. - # @!attribute [rw] source_uri - # @return [::String] - # The original source URI of the spec (if one exists). - # This is an external location that can be used for reference purposes - # but which may not be authoritative since this external resource may - # change after the spec is retrieved. - # @!attribute [rw] contents - # @return [::String] - # Input only. The contents of the spec. - # Provided by API callers when specs are created or updated. - # To access the contents of a spec, use GetApiSpecContents. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels attach identifying metadata to resources. Identifying metadata can - # be used to filter list operations. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # No more than 64 user labels can be associated with one resource (System - # labels are excluded). - # - # See https://goo.gl/xmQnxf for more information and examples of labels. - # System reserved label keys are prefixed with - # `apigeeregistry.googleapis.com/` and cannot be changed. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Annotations attach non-identifying metadata to resources. - # - # Annotation keys and values are less restricted than those of labels, but - # should be generally used for small values of broad interest. Larger, topic- - # specific metadata should be stored in Artifacts. - class ApiSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes a service running at particular address that - # provides a particular version of an API. ApiDeployments have revisions which - # correspond to different configurations of a single deployment in time. - # Revision identifiers should be updated whenever the served API spec or - # endpoint address changes. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] display_name - # @return [::String] - # Human-meaningful name. - # @!attribute [rw] description - # @return [::String] - # A detailed description. - # @!attribute [r] revision_id - # @return [::String] - # Output only. Immutable. The revision ID of the deployment. - # A new revision is committed whenever the deployment contents are changed. - # The format is an 8-character hexadecimal string. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp; when the deployment resource was created. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Revision creation timestamp; when the represented revision was created. - # @!attribute [r] revision_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp: when the represented revision was last modified. - # @!attribute [rw] api_spec_revision - # @return [::String] - # The full resource name (including revision ID) of the spec of the API being - # served by the deployment. Changes to this value will update the revision. - # Format: `apis/{api}/deployments/{deployment}` - # @!attribute [rw] endpoint_uri - # @return [::String] - # The address where the deployment is serving. Changes to this value will - # update the revision. - # @!attribute [rw] external_channel_uri - # @return [::String] - # The address of the external channel of the API (e.g., the Developer - # Portal). Changes to this value will not affect the revision. - # @!attribute [rw] intended_audience - # @return [::String] - # Text briefly identifying the intended audience of the API. Changes to this - # value will not affect the revision. - # @!attribute [rw] access_guidance - # @return [::String] - # Text briefly describing how to access the endpoint. Changes to this value - # will not affect the revision. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels attach identifying metadata to resources. Identifying metadata can - # be used to filter list operations. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # No more than 64 user labels can be associated with one resource (System - # labels are excluded). - # - # See https://goo.gl/xmQnxf for more information and examples of labels. - # System reserved label keys are prefixed with - # `apigeeregistry.googleapis.com/` and cannot be changed. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Annotations attach non-identifying metadata to resources. - # - # Annotation keys and values are less restricted than those of labels, but - # should be generally used for small values of broad interest. Larger, topic- - # specific metadata should be stored in Artifacts. - class ApiDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Artifacts of resources. Artifacts are unique (single-value) per resource - # and are used to store metadata that is too large or numerous to be stored - # directly on the resource. Since artifacts are stored separately from parent - # resources, they should generally be used for metadata that is needed - # infrequently, i.e., not for display in primary views of the resource but - # perhaps displayed or downloaded upon request. The `ListArtifacts` method - # allows artifacts to be quickly enumerated and checked for presence without - # downloading their (potentially-large) contents. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [rw] mime_type - # @return [::String] - # A content type specifier for the artifact. - # Content type specifiers are Media Types - # (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" - # parameter that specifies a schema for the stored information. - # Content types can specify compression. Currently only GZip compression is - # supported (indicated with "+gzip"). - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. The size of the artifact in bytes. If the artifact is gzipped, this is - # the size of the uncompressed artifact. - # @!attribute [r] hash - # @return [::String] - # Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, - # this is the hash of the uncompressed artifact. - # @!attribute [rw] contents - # @return [::String] - # Input only. The contents of the artifact. - # Provided by API callers when artifacts are created or replaced. - # To access the contents of an artifact, use GetArtifactContents. - class Artifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb deleted file mode 100644 index 1fa0faa2c02b..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb +++ /dev/null @@ -1,712 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - # Request message for ListApis. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of APIs. - # Format: `projects/*/locations/*` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of APIs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListApis` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApis` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - class ListApisRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApis. - # @!attribute [rw] apis - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::Api>] - # The APIs 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 ListApisResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApi. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the API to retrieve. - # Format: `projects/*/locations/*/apis/*` - class GetApiRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateApi. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of APIs. - # Format: `projects/*/locations/*` - # @!attribute [rw] api - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # Required. The API to create. - # @!attribute [rw] api_id - # @return [::String] - # Required. The ID to use for the API, which will become the final component of - # the API's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateApiRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateApi. - # @!attribute [rw] api - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # Required. The API to update. - # - # The `name` field is used to identify the API to update. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the API is not found, a new API will be created. - # In this situation, `update_mask` is ignored. - class UpdateApiRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApi. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the API to delete. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - class DeleteApiRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiVersions. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of versions to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListApiVersions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiVersions` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - class ListApiVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiVersions. - # @!attribute [rw] api_versions - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # 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 ListApiVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApiVersion. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the version to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*` - class GetApiVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateApiVersion. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] api_version - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # Required. The version to create. - # @!attribute [rw] api_version_id - # @return [::String] - # Required. The ID to use for the version, which will become the final component of - # the version's resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateApiVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateApiVersion. - # @!attribute [rw] api_version - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # Required. The version to update. - # - # The `name` field is used to identify the version to update. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the version is not found, a new version will be - # created. In this situation, `update_mask` is ignored. - class UpdateApiVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiVersion. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the version to delete. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - class DeleteApiVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiSpecs. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of specs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListApiSpecs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiSpecs` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - class ListApiSpecsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiSpecs. - # @!attribute [rw] api_specs - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # The specs 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 ListApiSpecsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApiSpec. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - class GetApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApiSpecContents. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec whose contents should be retrieved. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - class GetApiSpecContentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateApiSpec. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @!attribute [rw] api_spec - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # Required. The spec to create. - # @!attribute [rw] api_spec_id - # @return [::String] - # Required. The ID to use for the spec, which will become the final component of - # the spec's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateApiSpec. - # @!attribute [rw] api_spec - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # Required. The spec to update. - # - # The `name` field is used to identify the spec to update. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the spec is not found, a new spec will be created. - # In this situation, `update_mask` is ignored. - class UpdateApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiSpec. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec to delete. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - class DeleteApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for TagApiSpecRevision. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec to be tagged, including the revision ID. - # @!attribute [rw] tag - # @return [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - class TagApiSpecRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiSpecRevisions. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec to list revisions for. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous ListApiSpecRevisions call. - # Provide this to retrieve the subsequent page. - class ListApiSpecRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiSpecRevisionsResponse. - # @!attribute [rw] api_specs - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # The revisions of the spec. - # @!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 ListApiSpecRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for RollbackApiSpec. - # @!attribute [rw] name - # @return [::String] - # Required. The spec being rolled back. - # @!attribute [rw] revision_id - # @return [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same spec. - # - # Example: `c7cfa2a8` - class RollbackApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiSpecRevision. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` - class DeleteApiSpecRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiDeployments. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of deployments. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of deployments to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListApiDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiDeployments` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - class ListApiDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiDeployments. - # @!attribute [rw] api_deployments - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # The deployments 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 ListApiDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApiDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to retrieve. - # Format: `projects/*/locations/*/apis/*/deployments/*` - class GetApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateApiDeployment. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of deployments. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] api_deployment - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # Required. The deployment to create. - # @!attribute [rw] api_deployment_id - # @return [::String] - # Required. The ID to use for the deployment, which will become the final component of - # the deployment's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateApiDeployment. - # @!attribute [rw] api_deployment - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # Required. The deployment to update. - # - # The `name` field is used to identify the deployment to update. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the deployment is not found, a new deployment will be - # created. In this situation, `update_mask` is ignored. - class UpdateApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to delete. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - class DeleteApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for TagApiDeploymentRevision. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to be tagged, including the revision ID. - # @!attribute [rw] tag - # @return [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - class TagApiDeploymentRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiDeploymentRevisions. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to list revisions for. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous ListApiDeploymentRevisions call. - # Provide this to retrieve the subsequent page. - class ListApiDeploymentRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiDeploymentRevisionsResponse. - # @!attribute [rw] api_deployments - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # The revisions of the deployment. - # @!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 ListApiDeploymentRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for RollbackApiDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The deployment being rolled back. - # @!attribute [rw] revision_id - # @return [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same deployment. - # - # Example: `c7cfa2a8` - class RollbackApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiDeploymentRevision. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` - class DeleteApiDeploymentRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListArtifacts. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListArtifacts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListArtifacts` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - class ListArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListArtifacts. - # @!attribute [rw] artifacts - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # The artifacts 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 ListArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetArtifact. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the artifact to retrieve. - # Format: `{parent}/artifacts/*` - class GetArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetArtifactContents. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the artifact whose contents should be retrieved. - # Format: `{parent}/artifacts/*` - class GetArtifactContentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateArtifact. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @!attribute [rw] artifact - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # Required. The artifact to create. - # @!attribute [rw] artifact_id - # @return [::String] - # Required. The ID to use for the artifact, which will become the final component of - # the artifact's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ReplaceArtifact. - # @!attribute [rw] artifact - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # Required. The artifact to replace. - # - # The `name` field is used to identify the artifact to replace. - # Format: `{parent}/artifacts/*` - class ReplaceArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteArtifact. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the artifact to delete. - # Format: `{parent}/artifacts/*` - class DeleteArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/Gemfile deleted file mode 100644 index 5e61b4338c62..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-apigee_registry-v1", path: "../" -else - gem "google-cloud-apigee_registry-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb deleted file mode 100644 index 92b09da67f30..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Provisioning_CreateInstance_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_instance call in the Provisioning service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance. -# -def create_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new - - # Call the create_instance method. - result = client.create_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apigeeregistry_v1_generated_Provisioning_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb deleted file mode 100644 index 3439fa1d65bf..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_instance call in the Provisioning service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance. -# -def delete_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new - - # Call the delete_instance method. - result = client.delete_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb deleted file mode 100644 index 2e1c86befd67..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Provisioning_GetInstance_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_instance call in the Provisioning service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. - p result -end -# [END apigeeregistry_v1_generated_Provisioning_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb deleted file mode 100644 index e413a726b047..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateApi_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_api call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api. -# -def create_api - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new - - # Call the create_api method. - result = client.create_api request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateApi_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb deleted file mode 100644 index e4304a1c23d5..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment. -# -def create_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new - - # Call the create_api_deployment method. - result = client.create_api_deployment request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb deleted file mode 100644 index 9da3a592518a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec. -# -def create_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new - - # Call the create_api_spec method. - result = client.create_api_spec request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb deleted file mode 100644 index a01d994dd33c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateApiVersion_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_api_version call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version. -# -def create_api_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new - - # Call the create_api_version method. - result = client.create_api_version request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateApiVersion_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb deleted file mode 100644 index 9f8fb5a67ded..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateArtifact_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_artifact call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact. -# -def create_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new - - # Call the create_artifact method. - result = client.create_artifact request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateArtifact_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb deleted file mode 100644 index 5a8c6fe61da4..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApi_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api. -# -def delete_api - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new - - # Call the delete_api method. - result = client.delete_api request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApi_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb deleted file mode 100644 index 881de56caad9..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment. -# -def delete_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new - - # Call the delete_api_deployment method. - result = client.delete_api_deployment request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb deleted file mode 100644 index 9d957a8b01a9..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_deployment_revision call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision. -# -def delete_api_deployment_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new - - # Call the delete_api_deployment_revision method. - result = client.delete_api_deployment_revision request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb deleted file mode 100644 index 02270c0a4f98..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec. -# -def delete_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new - - # Call the delete_api_spec method. - result = client.delete_api_spec request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb deleted file mode 100644 index 1c70d953d0c1..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_spec_revision call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision. -# -def delete_api_spec_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new - - # Call the delete_api_spec_revision method. - result = client.delete_api_spec_revision request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb deleted file mode 100644 index 01fc31de1684..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_version call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version. -# -def delete_api_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new - - # Call the delete_api_version method. - result = client.delete_api_version request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb deleted file mode 100644 index 0057d6a94abc..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteArtifact_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_artifact call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact. -# -def delete_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new - - # Call the delete_artifact method. - result = client.delete_artifact request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteArtifact_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb deleted file mode 100644 index 2feab9c7261d..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApi_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api. -# -def get_api - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new - - # Call the get_api method. - result = client.get_api request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApi_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb deleted file mode 100644 index f2a48c417109..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment. -# -def get_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new - - # Call the get_api_deployment method. - result = client.get_api_deployment request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb deleted file mode 100644 index 09d81f227fdc..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec. -# -def get_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new - - # Call the get_api_spec method. - result = client.get_api_spec request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb deleted file mode 100644 index 6e191fa1b95c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api_spec_contents call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents. -# -def get_api_spec_contents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new - - # Call the get_api_spec_contents method. - result = client.get_api_spec_contents request - - # The returned object is of type Google::Api::HttpBody. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb deleted file mode 100644 index c00ea49c4729..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApiVersion_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api_version call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version. -# -def get_api_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new - - # Call the get_api_version method. - result = client.get_api_version request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApiVersion_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb deleted file mode 100644 index 8fd90155a080..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetArtifact_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_artifact call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact. -# -def get_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new - - # Call the get_artifact method. - result = client.get_artifact request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetArtifact_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb deleted file mode 100644 index 5cf109ee300c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetArtifactContents_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_artifact_contents call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents. -# -def get_artifact_contents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new - - # Call the get_artifact_contents method. - result = client.get_artifact_contents request - - # The returned object is of type Google::Api::HttpBody. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetArtifactContents_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb deleted file mode 100644 index dc2af93bd4df..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_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 apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_deployment_revisions call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions. -# -def list_api_deployment_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new - - # Call the list_api_deployment_revisions method. - result = client.list_api_deployment_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::ApigeeRegistry::V1::ApiDeployment. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb deleted file mode 100644 index 8a9043424b3c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApiDeployments_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_deployments call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments. -# -def list_api_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new - - # Call the list_api_deployments method. - result = client.list_api_deployments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiDeployments_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb deleted file mode 100644 index 765430a2e352..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_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 apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_spec_revisions call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions. -# -def list_api_spec_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new - - # Call the list_api_spec_revisions method. - result = client.list_api_spec_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::ApigeeRegistry::V1::ApiSpec. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb deleted file mode 100644 index d8ba14c39356..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApiSpecs_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_specs call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs. -# -def list_api_specs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new - - # Call the list_api_specs method. - result = client.list_api_specs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiSpecs_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb deleted file mode 100644 index a75dbea1d9ca..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApiVersions_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_versions call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions. -# -def list_api_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new - - # Call the list_api_versions method. - result = client.list_api_versions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiVersions_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb deleted file mode 100644 index 262bd765ed18..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApis_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_apis call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis. -# -def list_apis - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new - - # Call the list_apis method. - result = client.list_apis request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApis_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb deleted file mode 100644 index a16b53c72f8c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListArtifacts_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_artifacts call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts. -# -def list_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new - - # Call the list_artifacts method. - result = client.list_artifacts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb deleted file mode 100644 index bbc5e280bff5..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the replace_artifact call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact. -# -def replace_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new - - # Call the replace_artifact method. - result = client.replace_artifact request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - p result -end -# [END apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb deleted file mode 100644 index b5d313111fb1..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the rollback_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment. -# -def rollback_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new - - # Call the rollback_api_deployment method. - result = client.rollback_api_deployment request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb deleted file mode 100644 index 89cb50ec1b82..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the rollback_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec. -# -def rollback_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new - - # Call the rollback_api_spec method. - result = client.rollback_api_spec request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb deleted file mode 100644 index 09aa8e252abb..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the tag_api_deployment_revision call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision. -# -def tag_api_deployment_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new - - # Call the tag_api_deployment_revision method. - result = client.tag_api_deployment_revision request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb deleted file mode 100644 index e304028fd40a..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the tag_api_spec_revision call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision. -# -def tag_api_spec_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new - - # Call the tag_api_spec_revision method. - result = client.tag_api_spec_revision request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb deleted file mode 100644 index 9fca75bea84d..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_UpdateApi_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the update_api call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api. -# -def update_api - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new - - # Call the update_api method. - result = client.update_api request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - p result -end -# [END apigeeregistry_v1_generated_Registry_UpdateApi_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb deleted file mode 100644 index 3d45bad7f2ed..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the update_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment. -# -def update_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new - - # Call the update_api_deployment method. - result = client.update_api_deployment request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb deleted file mode 100644 index e7aac52c622c..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the update_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec. -# -def update_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new - - # Call the update_api_spec method. - result = client.update_api_spec request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb deleted file mode 100644 index b71e3becf695..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the update_api_version call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version. -# -def update_api_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new - - # Call the update_api_version method. - result = client.update_api_version request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - p result -end -# [END apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync] diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json b/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json deleted file mode 100644 index efee9509b017..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json +++ /dev/null @@ -1,1535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-apigee_registry-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.apigeeregistry.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "apigeeregistry_v1_generated_Provisioning_CreateInstance_sync", - "title": "Snippet for the create_instance call in the Provisioning service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance.", - "file": "provisioning/create_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Provisioning::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" - }, - "method": { - "short_name": "CreateInstance", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", - "service": { - "short_name": "Provisioning", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync", - "title": "Snippet for the delete_instance call in the Provisioning service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance.", - "file": "provisioning/delete_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Provisioning::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" - }, - "method": { - "short_name": "DeleteInstance", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", - "service": { - "short_name": "Provisioning", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Provisioning_GetInstance_sync", - "title": "Snippet for the get_instance call in the Provisioning service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance.", - "file": "provisioning/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Instance", - "client": { - "short_name": "Provisioning::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", - "service": { - "short_name": "Provisioning", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApis_sync", - "title": "Snippet for the list_apis call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis.", - "file": "registry/list_apis.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_apis", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApisRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApisResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApis", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApis", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApi_sync", - "title": "Snippet for the get_api call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api.", - "file": "registry/get_api.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApi", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApi", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateApi_sync", - "title": "Snippet for the create_api call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api.", - "file": "registry/create_api.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_api", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateApi", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApi", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApi_sync", - "title": "Snippet for the update_api call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api.", - "file": "registry/update_api.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_api", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "UpdateApi", - "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApi_sync", - "title": "Snippet for the delete_api call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api.", - "file": "registry/delete_api.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApi", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiVersions_sync", - "title": "Snippet for the list_api_versions call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions.", - "file": "registry/list_api_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_versions", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiVersions", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApiVersion_sync", - "title": "Snippet for the get_api_version call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version.", - "file": "registry/get_api_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api_version", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApiVersion", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiVersion_sync", - "title": "Snippet for the create_api_version call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version.", - "file": "registry/create_api_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_api_version", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateApiVersion", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync", - "title": "Snippet for the update_api_version call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version.", - "file": "registry/update_api_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_api_version", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "UpdateApiVersion", - "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync", - "title": "Snippet for the delete_api_version call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version.", - "file": "registry/delete_api_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_version", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiVersion", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiSpecs_sync", - "title": "Snippet for the list_api_specs call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs.", - "file": "registry/list_api_specs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_specs", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiSpecs", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApiSpec_sync", - "title": "Snippet for the get_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec.", - "file": "registry/get_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync", - "title": "Snippet for the get_api_spec_contents call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents.", - "file": "registry/get_api_spec_contents.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api_spec_contents", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Api::HttpBody", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApiSpecContents", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiSpec_sync", - "title": "Snippet for the create_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec.", - "file": "registry/create_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync", - "title": "Snippet for the update_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec.", - "file": "registry/update_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "UpdateApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync", - "title": "Snippet for the delete_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec.", - "file": "registry/delete_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync", - "title": "Snippet for the tag_api_spec_revision call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision.", - "file": "registry/tag_api_spec_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "tag_api_spec_revision", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "TagApiSpecRevision", - "full_name": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync", - "title": "Snippet for the list_api_spec_revisions call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions.", - "file": "registry/list_api_spec_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_spec_revisions", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiSpecRevisions", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync", - "title": "Snippet for the rollback_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec.", - "file": "registry/rollback_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "rollback_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "RollbackApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync", - "title": "Snippet for the delete_api_spec_revision call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision.", - "file": "registry/delete_api_spec_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_spec_revision", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiSpecRevision", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiDeployments_sync", - "title": "Snippet for the list_api_deployments call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments.", - "file": "registry/list_api_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_deployments", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiDeployments", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApiDeployment_sync", - "title": "Snippet for the get_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment.", - "file": "registry/get_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync", - "title": "Snippet for the create_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment.", - "file": "registry/create_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync", - "title": "Snippet for the update_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment.", - "file": "registry/update_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "UpdateApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync", - "title": "Snippet for the delete_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment.", - "file": "registry/delete_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync", - "title": "Snippet for the tag_api_deployment_revision call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision.", - "file": "registry/tag_api_deployment_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "tag_api_deployment_revision", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "TagApiDeploymentRevision", - "full_name": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync", - "title": "Snippet for the list_api_deployment_revisions call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions.", - "file": "registry/list_api_deployment_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_deployment_revisions", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiDeploymentRevisions", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync", - "title": "Snippet for the rollback_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment.", - "file": "registry/rollback_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "rollback_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "RollbackApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync", - "title": "Snippet for the delete_api_deployment_revision call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision.", - "file": "registry/delete_api_deployment_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_deployment_revision", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiDeploymentRevision", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListArtifacts_sync", - "title": "Snippet for the list_artifacts call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts.", - "file": "registry/list_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_artifacts", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListArtifacts", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetArtifact_sync", - "title": "Snippet for the get_artifact call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact.", - "file": "registry/get_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_artifact", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetArtifact", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetArtifactContents_sync", - "title": "Snippet for the get_artifact_contents call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents.", - "file": "registry/get_artifact_contents.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_artifact_contents", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Api::HttpBody", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetArtifactContents", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateArtifact_sync", - "title": "Snippet for the create_artifact call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact.", - "file": "registry/create_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_artifact", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateArtifact", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync", - "title": "Snippet for the replace_artifact call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact.", - "file": "registry/replace_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "replace_artifact", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ReplaceArtifact", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteArtifact_sync", - "title": "Snippet for the delete_artifact call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact.", - "file": "registry/delete_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_artifact", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteArtifact", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "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-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb deleted file mode 100644 index 9015d58c65e2..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_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/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigeeregistry/v1/provisioning_service_services_pb" -require "google/cloud/apigee_registry/v1/provisioning" - -class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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::ApigeeRegistry::V1::Provisioning::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb deleted file mode 100644 index 0c3f0bb83129..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_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/apigee_registry/v1/provisioning" - -class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_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::ApigeeRegistry::V1::Provisioning::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-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb deleted file mode 100644 index be7ad7ae6549..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb +++ /dev/null @@ -1,263 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigee_registry/v1/provisioning/rest" - - -class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - - create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_instance parent: parent, instance_id: instance_id, instance: instance do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_instance ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_instance(::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_count - end - end - end - - def test_delete_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_instance ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_instance(::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_count - end - end - end - - def test_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::ApigeeRegistry::V1::Provisioning::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::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb deleted file mode 100644 index e0c29cccbd71..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb +++ /dev/null @@ -1,306 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigee_registry/v1/provisioning" - -class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - 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_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - - create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_instance, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["instance_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Instance), request["instance"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_instance_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_instance parent: parent, instance_id: instance_id, instance: instance do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_instance ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_instance(::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_rpc_count - end - end - - def test_delete_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_instance({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_instance name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_instance ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_instance({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_instance(::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.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_instance_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_instance ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_instance({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::ApigeeRegistry::V1::Provisioning::Client.new do |config| - 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::ApigeeRegistry::V1::Provisioning::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::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::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb deleted file mode 100644 index 1a7ce8fd65fe..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigee_registry/v1/registry" - -class ::Google::Cloud::ApigeeRegistry::V1::Registry::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_api_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.api_path project: "value0", location: "value1", api: "value2" - assert_equal "projects/value0/locations/value1/apis/value2", path - end - end - - def test_api_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.api_deployment_path project: "value0", location: "value1", api: "value2", deployment: "value3" - assert_equal "projects/value0/locations/value1/apis/value2/deployments/value3", path - end - end - - def test_api_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.api_spec_path project: "value0", location: "value1", api: "value2", version: "value3", spec: "value4" - assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/specs/value4", path - end - end - - def test_api_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::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.api_version_path project: "value0", location: "value1", api: "value2", version: "value3" - assert_equal "projects/value0/locations/value1/apis/value2/versions/value3", path - end - end - - def test_artifact_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.artifact_path project: "value0", location: "value1", artifact: "value2" - assert_equal "projects/value0/locations/value1/artifacts/value2", path - - path = client.artifact_path project: "value0", location: "value1", api: "value2", artifact: "value3" - assert_equal "projects/value0/locations/value1/apis/value2/artifacts/value3", path - - path = client.artifact_path project: "value0", location: "value1", api: "value2", version: "value3", artifact: "value4" - assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/artifacts/value4", path - - path = client.artifact_path project: "value0", location: "value1", api: "value2", version: "value3", spec: "value4", artifact: "value5" - assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/specs/value4/artifacts/value5", path - - path = client.artifact_path project: "value0", location: "value1", api: "value2", deployment: "value3", artifact: "value4" - assert_equal "projects/value0/locations/value1/apis/value2/deployments/value3/artifacts/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::ApigeeRegistry::V1::Registry::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-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb deleted file mode 100644 index 7c644ec0043d..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb +++ /dev/null @@ -1,2034 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/apigeeregistry/v1/registry_service_pb" -require "google/cloud/apigee_registry/v1/registry/rest" - - -class ::Google::Cloud::ApigeeRegistry::V1::Registry::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_apis - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.new - http_response = OpenStruct.new 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_apis_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_apis_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_apis_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_apis({ 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 - client.list_apis 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 - client.list_apis ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.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 - client.list_apis({ 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 - client.list_apis(::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.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_apis_client_stub.call_count - end - end - end - - def test_get_api - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_api({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_api name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_api ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_api({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_api(::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_client_stub.call_count - end - end - end - - def test_create_api - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api = {} - api_id = "hello world" - - create_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_api_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_api({ parent: parent, api: api, api_id: api_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_api parent: parent, api: api, api_id: api_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_api ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_api({ parent: parent, api: api, api_id: api_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_api(::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_api_client_stub.call_count - end - end - end - - def test_update_api - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - api = {} - update_mask = {} - allow_missing = true - - update_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_api_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_api api: api, update_mask: update_mask, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_api ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_api(::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_api_client_stub.call_count - end - end - end - - def test_delete_api - # 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_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_api({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_api name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_api ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_api({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_api(::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.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_api_client_stub.call_count - end - end - end - - def test_list_api_versions - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.new - http_response = OpenStruct.new 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_api_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_versions_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_api_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_api_versions ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.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 - client.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_api_versions(::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.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_api_versions_client_stub.call_count - end - end - end - - def test_get_api_version - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_version_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_api_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_api_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_api_version ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_api_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_api_version(::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_version_client_stub.call_count - end - end - end - - def test_create_api_version - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_version = {} - api_version_id = "hello world" - - create_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_api_version_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_api_version parent: parent, api_version: api_version, api_version_id: api_version_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_api_version ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_api_version(::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_api_version_client_stub.call_count - end - end - end - - def test_update_api_version - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - api_version = {} - update_mask = {} - allow_missing = true - - update_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_api_version_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_api_version api_version: api_version, update_mask: update_mask, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_api_version ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_api_version(::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_api_version_client_stub.call_count - end - end - end - - def test_delete_api_version - # 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_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_version_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_api_version({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_api_version name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_api_version ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_api_version({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_api_version(::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.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_api_version_client_stub.call_count - end - end - end - - def test_list_api_specs - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.new - http_response = OpenStruct.new 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_api_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_specs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_specs_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_api_specs({ 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 - client.list_api_specs 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 - client.list_api_specs ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.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 - client.list_api_specs({ 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 - client.list_api_specs(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.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_api_specs_client_stub.call_count - end - end - end - - def test_get_api_spec - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_api_spec({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_api_spec name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_api_spec ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_api_spec({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_api_spec(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_spec_client_stub.call_count - end - end - end - - def test_get_api_spec_contents - # Create test objects. - client_result = ::Google::Api::HttpBody.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_spec_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_spec_contents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_spec_contents_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_api_spec_contents({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_api_spec_contents name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_api_spec_contents ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_api_spec_contents({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_api_spec_contents(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_spec_contents_client_stub.call_count - end - end - end - - def test_create_api_spec - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_spec = {} - api_spec_id = "hello world" - - create_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_api_spec parent: parent, api_spec: api_spec, api_spec_id: api_spec_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_api_spec ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_api_spec(::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_api_spec_client_stub.call_count - end - end - end - - def test_update_api_spec - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - api_spec = {} - update_mask = {} - allow_missing = true - - update_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_api_spec api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_api_spec ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_api_spec(::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_api_spec_client_stub.call_count - end - end - end - - def test_delete_api_spec - # 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_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_api_spec({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_api_spec name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_api_spec ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_api_spec({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_api_spec(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.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_api_spec_client_stub.call_count - end - end - end - - def test_tag_api_spec_revision - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tag = "hello world" - - tag_api_spec_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_tag_api_spec_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, tag_api_spec_revision_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.tag_api_spec_revision({ name: name, tag: tag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.tag_api_spec_revision name: name, tag: tag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.tag_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.tag_api_spec_revision({ name: name, tag: tag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.tag_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, tag_api_spec_revision_client_stub.call_count - end - end - end - - def test_list_api_spec_revisions - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.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_api_spec_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::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_spec_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_spec_revisions_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_api_spec_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_api_spec_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_api_spec_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.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_api_spec_revisions_client_stub.call_count - end - end - end - - def test_rollback_api_spec - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.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" - - rollback_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_rollback_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rollback_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rollback_api_spec({ name: name, revision_id: revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rollback_api_spec name: name, revision_id: revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rollback_api_spec ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new(name: name, revision_id: revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rollback_api_spec({ name: name, revision_id: revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rollback_api_spec(::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.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, rollback_api_spec_client_stub.call_count - end - end - end - - def test_delete_api_spec_revision - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_api_spec_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_spec_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_spec_revision_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_api_spec_revision({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_api_spec_revision name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_api_spec_revision({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_api_spec_revision_client_stub.call_count - end - end - end - - def test_list_api_deployments - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.new - http_response = OpenStruct.new 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_api_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_deployments_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_api_deployments({ 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 - client.list_api_deployments 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 - client.list_api_deployments ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.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 - client.list_api_deployments({ 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 - client.list_api_deployments(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.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_api_deployments_client_stub.call_count - end - end - end - - def test_get_api_deployment - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_api_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_api_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_api_deployment ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_api_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_api_deployment(::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_deployment_client_stub.call_count - end - end - end - - def test_create_api_deployment - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_deployment = {} - api_deployment_id = "hello world" - - create_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_api_deployment parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_api_deployment ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_api_deployment(::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_api_deployment_client_stub.call_count - end - end - end - - def test_update_api_deployment - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - api_deployment = {} - update_mask = {} - allow_missing = true - - update_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_api_deployment api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_api_deployment ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_api_deployment(::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_api_deployment_client_stub.call_count - end - end - end - - def test_delete_api_deployment - # 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_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_api_deployment({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_api_deployment name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_api_deployment ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_api_deployment({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_api_deployment(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.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_api_deployment_client_stub.call_count - end - end - end - - def test_tag_api_deployment_revision - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tag = "hello world" - - tag_api_deployment_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_tag_api_deployment_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, tag_api_deployment_revision_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.tag_api_deployment_revision({ name: name, tag: tag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.tag_api_deployment_revision name: name, tag: tag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.tag_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.tag_api_deployment_revision({ name: name, tag: tag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.tag_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, tag_api_deployment_revision_client_stub.call_count - end - end - end - - def test_list_api_deployment_revisions - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.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_api_deployment_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::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_deployment_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_deployment_revisions_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_api_deployment_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_api_deployment_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_api_deployment_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.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_api_deployment_revisions_client_stub.call_count - end - end - end - - def test_rollback_api_deployment - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.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" - - rollback_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_rollback_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rollback_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rollback_api_deployment({ name: name, revision_id: revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rollback_api_deployment name: name, revision_id: revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rollback_api_deployment ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new(name: name, revision_id: revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rollback_api_deployment({ name: name, revision_id: revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rollback_api_deployment(::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.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, rollback_api_deployment_client_stub.call_count - end - end - end - - def test_delete_api_deployment_revision - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_api_deployment_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_deployment_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_deployment_revision_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_api_deployment_revision({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_api_deployment_revision name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_api_deployment_revision({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_api_deployment_revision_client_stub.call_count - end - end - end - - def test_list_artifacts - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.new - http_response = OpenStruct.new 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_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_artifacts({ 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 - client.list_artifacts 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 - client.list_artifacts ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.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 - client.list_artifacts({ 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 - client.list_artifacts(::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.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_artifacts_client_stub.call_count - end - end - end - - def test_get_artifact - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_artifact_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_artifact({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_artifact name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_artifact ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_artifact({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_artifact(::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_artifact_client_stub.call_count - end - end - end - - def test_get_artifact_contents - # Create test objects. - client_result = ::Google::Api::HttpBody.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_artifact_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_artifact_contents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_artifact_contents_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_artifact_contents({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_artifact_contents name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_artifact_contents ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_artifact_contents({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_artifact_contents(::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_artifact_contents_client_stub.call_count - end - end - end - - def test_create_artifact - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - artifact = {} - artifact_id = "hello world" - - create_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_artifact_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_artifact parent: parent, artifact: artifact, artifact_id: artifact_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_artifact ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_artifact(::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_artifact_client_stub.call_count - end - end - end - - def test_replace_artifact - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - artifact = {} - - replace_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_replace_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, replace_artifact_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.replace_artifact({ artifact: artifact }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.replace_artifact artifact: artifact do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.replace_artifact ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.replace_artifact({ artifact: artifact }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.replace_artifact(::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, replace_artifact_client_stub.call_count - end - end - end - - def test_delete_artifact - # 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_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_artifact_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_artifact({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_artifact name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_artifact ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_artifact({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_artifact(::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_artifact_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::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::ApigeeRegistry::V1::Registry::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb deleted file mode 100644 index 19a19336c35f..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb +++ /dev/null @@ -1,2259 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigeeregistry/v1/registry_service_pb" -require "google/cloud/apigee_registry/v1/registry" - -class ::Google::Cloud::ApigeeRegistry::V1::Registry::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_apis - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_apis_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_apis, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, 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_apis_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_apis({ 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 - client.list_apis 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 - client.list_apis ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.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 - client.list_apis({ 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 - client.list_apis(::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.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_apis_client_stub.call_rpc_count - end - end - - def test_get_api - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_api({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_api name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_api ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_api({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_api(::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_client_stub.call_rpc_count - end - end - - def test_create_api - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api = {} - api_id = "hello world" - - create_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_api, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Api), request["api"] - assert_equal "hello world", request["api_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_api_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_api({ parent: parent, api: api, api_id: api_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_api parent: parent, api: api, api_id: api_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_api ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_api({ parent: parent, api: api, api_id: api_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_api(::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_api_client_stub.call_rpc_count - end - end - - def test_update_api - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - api = {} - update_mask = {} - allow_missing = true - - update_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_api, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Api), request["api"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_api_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_api api: api, update_mask: update_mask, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_api ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_api(::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_api_client_stub.call_rpc_count - end - end - - def test_delete_api - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_api({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_api name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_api ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_api({ 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 - client.delete_api(::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.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_api_client_stub.call_rpc_count - end - end - - def test_list_api_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_api_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_versions, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, 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_api_versions_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_api_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_api_versions ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.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 - client.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_api_versions(::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.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_api_versions_client_stub.call_rpc_count - end - end - - def test_get_api_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api_version, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_version_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_api_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_api_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_api_version ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_api_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_api_version(::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_version_client_stub.call_rpc_count - end - end - - def test_create_api_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_version = {} - api_version_id = "hello world" - - create_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_api_version, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiVersion), request["api_version"] - assert_equal "hello world", request["api_version_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_api_version_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_api_version parent: parent, api_version: api_version, api_version_id: api_version_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_api_version ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_api_version(::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_api_version_client_stub.call_rpc_count - end - end - - def test_update_api_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - api_version = {} - update_mask = {} - allow_missing = true - - update_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_api_version, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiVersion), request["api_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_api_version_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_api_version api_version: api_version, update_mask: update_mask, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_api_version ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_api_version(::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_api_version_client_stub.call_rpc_count - end - end - - def test_delete_api_version - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_version, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_version_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_api_version({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_api_version name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_api_version ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_api_version({ 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 - client.delete_api_version(::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.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_api_version_client_stub.call_rpc_count - end - end - - def test_list_api_specs - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_api_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_specs, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, 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_api_specs_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_api_specs({ 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 - client.list_api_specs 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 - client.list_api_specs ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.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 - client.list_api_specs({ 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 - client.list_api_specs(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.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_api_specs_client_stub.call_rpc_count - end - end - - def test_get_api_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_api_spec({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_api_spec name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_api_spec ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_api_spec({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_api_spec(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_spec_client_stub.call_rpc_count - end - end - - def test_get_api_spec_contents - # Create GRPC objects. - grpc_response = ::Google::Api::HttpBody.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_spec_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api_spec_contents, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_spec_contents_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_api_spec_contents({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_api_spec_contents name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_api_spec_contents ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_api_spec_contents({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_api_spec_contents(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_spec_contents_client_stub.call_rpc_count - end - end - - def test_create_api_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_spec = {} - api_spec_id = "hello world" - - create_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiSpec), request["api_spec"] - assert_equal "hello world", request["api_spec_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_api_spec parent: parent, api_spec: api_spec, api_spec_id: api_spec_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_api_spec ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_api_spec(::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_api_spec_client_stub.call_rpc_count - end - end - - def test_update_api_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - api_spec = {} - update_mask = {} - allow_missing = true - - update_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiSpec), request["api_spec"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_api_spec api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_api_spec ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_api_spec(::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_api_spec_client_stub.call_rpc_count - end - end - - def test_delete_api_spec - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_api_spec({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_api_spec name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_api_spec ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_api_spec({ 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 - client.delete_api_spec(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.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_api_spec_client_stub.call_rpc_count - end - end - - def test_tag_api_spec_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tag = "hello world" - - tag_api_spec_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :tag_api_spec_revision, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["tag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, tag_api_spec_revision_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.tag_api_spec_revision({ name: name, tag: tag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.tag_api_spec_revision name: name, tag: tag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.tag_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.tag_api_spec_revision({ name: name, tag: tag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.tag_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, tag_api_spec_revision_client_stub.call_rpc_count - end - end - - def test_list_api_spec_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_api_spec_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_spec_revisions, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, 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_api_spec_revisions_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_api_spec_revisions name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_api_spec_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_api_spec_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.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_api_spec_revisions_client_stub.call_rpc_count - end - end - - def test_rollback_api_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - rollback_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rollback_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rollback_api_spec_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rollback_api_spec({ name: name, revision_id: revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rollback_api_spec name: name, revision_id: revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rollback_api_spec ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new(name: name, revision_id: revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rollback_api_spec({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rollback_api_spec(::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.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, rollback_api_spec_client_stub.call_rpc_count - end - end - - def test_delete_api_spec_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_api_spec_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_spec_revision, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_spec_revision_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_api_spec_revision({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_api_spec_revision name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_api_spec_revision({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(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_api_spec_revision_client_stub.call_rpc_count - end - end - - def test_list_api_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_api_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_deployments, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, 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_api_deployments_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_api_deployments({ 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 - client.list_api_deployments 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 - client.list_api_deployments ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.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 - client.list_api_deployments({ 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 - client.list_api_deployments(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.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_api_deployments_client_stub.call_rpc_count - end - end - - def test_get_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_api_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_api_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_api_deployment ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_api_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_api_deployment(::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_deployment_client_stub.call_rpc_count - end - end - - def test_create_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_deployment = {} - api_deployment_id = "hello world" - - create_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment), request["api_deployment"] - assert_equal "hello world", request["api_deployment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_api_deployment parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_api_deployment ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_api_deployment(::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_api_deployment_client_stub.call_rpc_count - end - end - - def test_update_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - api_deployment = {} - update_mask = {} - allow_missing = true - - update_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment), request["api_deployment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_api_deployment api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_api_deployment ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_api_deployment(::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_api_deployment_client_stub.call_rpc_count - end - end - - def test_delete_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_api_deployment({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_api_deployment name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_api_deployment ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_api_deployment({ 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 - client.delete_api_deployment(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.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_api_deployment_client_stub.call_rpc_count - end - end - - def test_tag_api_deployment_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tag = "hello world" - - tag_api_deployment_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :tag_api_deployment_revision, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["tag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, tag_api_deployment_revision_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.tag_api_deployment_revision({ name: name, tag: tag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.tag_api_deployment_revision name: name, tag: tag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.tag_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.tag_api_deployment_revision({ name: name, tag: tag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.tag_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, tag_api_deployment_revision_client_stub.call_rpc_count - end - end - - def test_list_api_deployment_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_api_deployment_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_deployment_revisions, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, 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_api_deployment_revisions_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_api_deployment_revisions name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_api_deployment_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_api_deployment_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.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_api_deployment_revisions_client_stub.call_rpc_count - end - end - - def test_rollback_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - rollback_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rollback_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rollback_api_deployment_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rollback_api_deployment({ name: name, revision_id: revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rollback_api_deployment name: name, revision_id: revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rollback_api_deployment ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new(name: name, revision_id: revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rollback_api_deployment({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rollback_api_deployment(::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.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, rollback_api_deployment_client_stub.call_rpc_count - end - end - - def test_delete_api_deployment_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_api_deployment_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_deployment_revision, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_deployment_revision_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_api_deployment_revision({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_api_deployment_revision name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_api_deployment_revision({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(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_api_deployment_revision_client_stub.call_rpc_count - end - end - - def test_list_artifacts - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_artifacts, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, 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_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_artifacts({ 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 - client.list_artifacts 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 - client.list_artifacts ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.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 - client.list_artifacts({ 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 - client.list_artifacts(::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.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_artifacts_client_stub.call_rpc_count - end - end - - def test_get_artifact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_artifact, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_artifact_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_artifact({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_artifact name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_artifact ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_artifact({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_artifact(::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_artifact_client_stub.call_rpc_count - end - end - - def test_get_artifact_contents - # Create GRPC objects. - grpc_response = ::Google::Api::HttpBody.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_artifact_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_artifact_contents, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_artifact_contents_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_artifact_contents({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_artifact_contents name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_artifact_contents ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_artifact_contents({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_artifact_contents(::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_artifact_contents_client_stub.call_rpc_count - end - end - - def test_create_artifact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - artifact = {} - artifact_id = "hello world" - - create_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_artifact, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Artifact), request["artifact"] - assert_equal "hello world", request["artifact_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_artifact_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_artifact parent: parent, artifact: artifact, artifact_id: artifact_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_artifact ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_artifact(::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_artifact_client_stub.call_rpc_count - end - end - - def test_replace_artifact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - artifact = {} - - replace_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :replace_artifact, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Artifact), request["artifact"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, replace_artifact_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.replace_artifact({ artifact: artifact }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.replace_artifact artifact: artifact do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.replace_artifact ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.replace_artifact({ artifact: artifact }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.replace_artifact(::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, replace_artifact_client_stub.call_rpc_count - end - end - - def test_delete_artifact - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_artifact, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_artifact_client_stub do - # Create client - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_artifact({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_artifact name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_artifact ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_artifact({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_artifact(::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(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_artifact_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - 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::ApigeeRegistry::V1::Registry::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Registry::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-apigee_registry-v1/test/helper.rb b/owl-bot-staging/google-cloud-apigee_registry-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-apigee_registry-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-app_engine-v1/.gitignore b/owl-bot-staging/google-cloud-app_engine-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-app_engine-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-app_engine-v1/.repo-metadata.json deleted file mode 100644 index 39c66675fa84..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "appengine.googleapis.com", - "api_shortname": "appengine", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-app_engine-v1/latest", - "distribution_name": "google-cloud-app_engine-v1", - "is_cloud": true, - "language": "ruby", - "name": "appengine", - "name_pretty": "App Engine Admin V1 API", - "product_documentation": "https://cloud.google.com/appengine/docs/admin-api/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The App Engine Admin API provisions and manages your App Engine applications. Note that google-cloud-app_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_engine instead. See the readme for more details.", - "ruby-cloud-env-prefix": "APP_ENGINE", - "ruby-cloud-product-url": "https://cloud.google.com/appengine/docs/admin-api/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-app_engine-v1/.rubocop.yml b/owl-bot-staging/google-cloud-app_engine-v1/.rubocop.yml deleted file mode 100644 index 720182a7512b..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-app_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-cloud-app_engine-v1.rb" diff --git a/owl-bot-staging/google-cloud-app_engine-v1/.toys.rb b/owl-bot-staging/google-cloud-app_engine-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/.yardopts b/owl-bot-staging/google-cloud-app_engine-v1/.yardopts deleted file mode 100644 index 86db5abb562d..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="App Engine Admin V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-app_engine-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-app_engine-v1/AUTHENTICATION.md deleted file mode 100644 index ab133c04ffac..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-app_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-cloud-app_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/cloud/app_engine/v1" - -client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/app_engine/v1" - -::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AppEngine::V1::Applications::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-app_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/cloud/app_engine/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AppEngine::V1::Applications::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-app_engine-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-app_engine-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-app_engine-v1/Gemfile b/owl-bot-staging/google-cloud-app_engine-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-app_engine-v1/LICENSE.md b/owl-bot-staging/google-cloud-app_engine-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/README.md b/owl-bot-staging/google-cloud-app_engine-v1/README.md deleted file mode 100644 index 32956c5fb1d8..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the App Engine Admin V1 API - -Provisions and manages developers' App Engine applications. - -The App Engine Admin API provisions and manages your App Engine applications. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the App Engine Admin V1 API. Most users should consider using -the main client gem, -[google-cloud-app_engine](https://rubygems.org/gems/google-cloud-app_engine). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-app_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/appengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/app_engine/v1" - -client = ::Google::Cloud::AppEngine::V1::Applications::Client.new -request = ::Google::Cloud::AppEngine::V1::GetApplicationRequest.new # (request fields as keyword arguments...) -response = client.get_application request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-app_engine-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/appengine/docs/admin-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/cloud/app_engine/v1" -require "logger" - -client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-app_engine`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-app_engine-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-app_engine`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-app_engine-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-app_engine-v1/Rakefile b/owl-bot-staging/google-cloud-app_engine-v1/Rakefile deleted file mode 100644 index 695ad6efa78c..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["APP_ENGINE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["APP_ENGINE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["APP_ENGINE_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or APP_ENGINE_TEST_PROJECT=test123 APP_ENGINE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/app_engine/v1/applications/credentials" - ::Google::Cloud::AppEngine::V1::Applications::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["APP_ENGINE_PROJECT"] = project - ENV["APP_ENGINE_TEST_PROJECT"] = project - ENV["APP_ENGINE_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-app_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-cloud-app_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-cloud-app_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-cloud-app_engine-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-app_engine-v1" - header "google-cloud-app_engine-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-app_engine-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-app_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-cloud-app_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-cloud-app_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-cloud-app_engine-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-app_engine-v1/gapic_metadata.json deleted file mode 100644 index 24e44df0c398..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/gapic_metadata.json +++ /dev/null @@ -1,251 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.appengine.v1", - "libraryPackage": "::Google::Cloud::AppEngine::V1", - "services": { - "Applications": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppEngine::V1::Applications::Client", - "rpcs": { - "GetApplication": { - "methods": [ - "get_application" - ] - }, - "CreateApplication": { - "methods": [ - "create_application" - ] - }, - "UpdateApplication": { - "methods": [ - "update_application" - ] - }, - "RepairApplication": { - "methods": [ - "repair_application" - ] - } - } - } - } - }, - "Services": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppEngine::V1::Services::Client", - "rpcs": { - "ListServices": { - "methods": [ - "list_services" - ] - }, - "GetService": { - "methods": [ - "get_service" - ] - }, - "UpdateService": { - "methods": [ - "update_service" - ] - }, - "DeleteService": { - "methods": [ - "delete_service" - ] - } - } - } - } - }, - "Versions": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppEngine::V1::Versions::Client", - "rpcs": { - "ListVersions": { - "methods": [ - "list_versions" - ] - }, - "GetVersion": { - "methods": [ - "get_version" - ] - }, - "CreateVersion": { - "methods": [ - "create_version" - ] - }, - "UpdateVersion": { - "methods": [ - "update_version" - ] - }, - "DeleteVersion": { - "methods": [ - "delete_version" - ] - } - } - } - } - }, - "Instances": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppEngine::V1::Instances::Client", - "rpcs": { - "ListInstances": { - "methods": [ - "list_instances" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - }, - "DeleteInstance": { - "methods": [ - "delete_instance" - ] - }, - "DebugInstance": { - "methods": [ - "debug_instance" - ] - } - } - } - } - }, - "Firewall": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppEngine::V1::Firewall::Client", - "rpcs": { - "ListIngressRules": { - "methods": [ - "list_ingress_rules" - ] - }, - "BatchUpdateIngressRules": { - "methods": [ - "batch_update_ingress_rules" - ] - }, - "CreateIngressRule": { - "methods": [ - "create_ingress_rule" - ] - }, - "GetIngressRule": { - "methods": [ - "get_ingress_rule" - ] - }, - "UpdateIngressRule": { - "methods": [ - "update_ingress_rule" - ] - }, - "DeleteIngressRule": { - "methods": [ - "delete_ingress_rule" - ] - } - } - } - } - }, - "AuthorizedDomains": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client", - "rpcs": { - "ListAuthorizedDomains": { - "methods": [ - "list_authorized_domains" - ] - } - } - } - } - }, - "AuthorizedCertificates": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client", - "rpcs": { - "ListAuthorizedCertificates": { - "methods": [ - "list_authorized_certificates" - ] - }, - "GetAuthorizedCertificate": { - "methods": [ - "get_authorized_certificate" - ] - }, - "CreateAuthorizedCertificate": { - "methods": [ - "create_authorized_certificate" - ] - }, - "UpdateAuthorizedCertificate": { - "methods": [ - "update_authorized_certificate" - ] - }, - "DeleteAuthorizedCertificate": { - "methods": [ - "delete_authorized_certificate" - ] - } - } - } - } - }, - "DomainMappings": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppEngine::V1::DomainMappings::Client", - "rpcs": { - "ListDomainMappings": { - "methods": [ - "list_domain_mappings" - ] - }, - "GetDomainMapping": { - "methods": [ - "get_domain_mapping" - ] - }, - "CreateDomainMapping": { - "methods": [ - "create_domain_mapping" - ] - }, - "UpdateDomainMapping": { - "methods": [ - "update_domain_mapping" - ] - }, - "DeleteDomainMapping": { - "methods": [ - "delete_domain_mapping" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec b/owl-bot-staging/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec deleted file mode 100644 index 2ce2db6e9908..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/google-cloud-app_engine-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/app_engine/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-app_engine-v1" - gem.version = Google::Cloud::AppEngine::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The App Engine Admin API provisions and manages your App Engine applications. Note that google-cloud-app_engine-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_engine instead. See the readme for more details." - gem.summary = "Provisions and manages developers' App Engine applications." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google-cloud-app_engine-v1.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google-cloud-app_engine-v1.rb deleted file mode 100644 index 6e59fa6bcf35..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google-cloud-app_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/cloud/app_engine/v1" diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/app_yaml_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/app_yaml_pb.rb deleted file mode 100644 index 6c16bcbffe41..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/app_yaml_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/app_yaml.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n\"google/appengine/v1/app_yaml.proto\x12\x13google.appengine.v1\x1a\x1egoogle/protobuf/duration.proto\"\xe0\x01\n\x10\x41piConfigHandler\x12=\n\x10\x61uth_fail_action\x18\x01 \x01(\x0e\x32#.google.appengine.v1.AuthFailAction\x12\x34\n\x05login\x18\x02 \x01(\x0e\x32%.google.appengine.v1.LoginRequirement\x12\x0e\n\x06script\x18\x03 \x01(\t\x12:\n\x0esecurity_level\x18\x04 \x01(\x0e\x32\".google.appengine.v1.SecurityLevel\x12\x0b\n\x03url\x18\x05 \x01(\t\"\x8f\x02\n\x0c\x45rrorHandler\x12?\n\nerror_code\x18\x01 \x01(\x0e\x32+.google.appengine.v1.ErrorHandler.ErrorCode\x12\x13\n\x0bstatic_file\x18\x02 \x01(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\"\x95\x01\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45RROR_CODE_DEFAULT\x10\x00\x12\x19\n\x15\x45RROR_CODE_OVER_QUOTA\x10\x01\x12\x1d\n\x19\x45RROR_CODE_DOS_API_DENIAL\x10\x02\x12\x16\n\x12\x45RROR_CODE_TIMEOUT\x10\x03\x1a\x02\x10\x01\"\xcd\x05\n\x06UrlMap\x12\x11\n\turl_regex\x18\x01 \x01(\t\x12?\n\x0cstatic_files\x18\x02 \x01(\x0b\x32\'.google.appengine.v1.StaticFilesHandlerH\x00\x12\x34\n\x06script\x18\x03 \x01(\x0b\x32\".google.appengine.v1.ScriptHandlerH\x00\x12?\n\x0c\x61pi_endpoint\x18\x04 \x01(\x0b\x32\'.google.appengine.v1.ApiEndpointHandlerH\x00\x12:\n\x0esecurity_level\x18\x05 \x01(\x0e\x32\".google.appengine.v1.SecurityLevel\x12\x34\n\x05login\x18\x06 \x01(\x0e\x32%.google.appengine.v1.LoginRequirement\x12=\n\x10\x61uth_fail_action\x18\x07 \x01(\x0e\x32#.google.appengine.v1.AuthFailAction\x12Y\n\x1bredirect_http_response_code\x18\x08 \x01(\x0e\x32\x34.google.appengine.v1.UrlMap.RedirectHttpResponseCode\"\xdb\x01\n\x18RedirectHttpResponseCode\x12+\n\'REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED\x10\x00\x12#\n\x1fREDIRECT_HTTP_RESPONSE_CODE_301\x10\x01\x12#\n\x1fREDIRECT_HTTP_RESPONSE_CODE_302\x10\x02\x12#\n\x1fREDIRECT_HTTP_RESPONSE_CODE_303\x10\x03\x12#\n\x1fREDIRECT_HTTP_RESPONSE_CODE_307\x10\x04\x42\x0e\n\x0chandler_type\"\xc0\x02\n\x12StaticFilesHandler\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x19\n\x11upload_path_regex\x18\x02 \x01(\t\x12N\n\x0chttp_headers\x18\x03 \x03(\x0b\x32\x38.google.appengine.v1.StaticFilesHandler.HttpHeadersEntry\x12\x11\n\tmime_type\x18\x04 \x01(\t\x12-\n\nexpiration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1d\n\x15require_matching_file\x18\x06 \x01(\x08\x12\x1c\n\x14\x61pplication_readable\x18\x07 \x01(\x08\x1a\x32\n\x10HttpHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"$\n\rScriptHandler\x12\x13\n\x0bscript_path\x18\x01 \x01(\t\")\n\x12\x41piEndpointHandler\x12\x13\n\x0bscript_path\x18\x01 \x01(\t\"\xeb\x01\n\x0bHealthCheck\x12\x1c\n\x14\x64isable_health_check\x18\x01 \x01(\x08\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x19\n\x11healthy_threshold\x18\x03 \x01(\r\x12\x1b\n\x13unhealthy_threshold\x18\x04 \x01(\r\x12\x19\n\x11restart_threshold\x18\x05 \x01(\r\x12\x31\n\x0e\x63heck_interval\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xf7\x01\n\x0eReadinessCheck\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x19\n\x11\x66\x61ilure_threshold\x18\x03 \x01(\r\x12\x19\n\x11success_threshold\x18\x04 \x01(\r\x12\x31\n\x0e\x63heck_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11\x61pp_start_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xf2\x01\n\rLivenessCheck\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04host\x18\x02 \x01(\t\x12\x19\n\x11\x66\x61ilure_threshold\x18\x03 \x01(\r\x12\x19\n\x11success_threshold\x18\x04 \x01(\r\x12\x31\n\x0e\x63heck_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x30\n\rinitial_delay\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"(\n\x07Library\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t*t\n\x0e\x41uthFailAction\x12 \n\x1c\x41UTH_FAIL_ACTION_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41UTH_FAIL_ACTION_REDIRECT\x10\x01\x12!\n\x1d\x41UTH_FAIL_ACTION_UNAUTHORIZED\x10\x02*b\n\x10LoginRequirement\x12\x15\n\x11LOGIN_UNSPECIFIED\x10\x00\x12\x12\n\x0eLOGIN_OPTIONAL\x10\x01\x12\x0f\n\x0bLOGIN_ADMIN\x10\x02\x12\x12\n\x0eLOGIN_REQUIRED\x10\x03*y\n\rSecurityLevel\x12\x16\n\x12SECURE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSECURE_DEFAULT\x10\x00\x12\x10\n\x0cSECURE_NEVER\x10\x01\x12\x13\n\x0fSECURE_OPTIONAL\x10\x02\x12\x11\n\rSECURE_ALWAYS\x10\x03\x1a\x02\x10\x01\x42\xbd\x01\n\x17\x63om.google.appengine.v1B\x0c\x41ppYamlProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - ApiConfigHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ApiConfigHandler").msgclass - ErrorHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ErrorHandler").msgclass - ErrorHandler::ErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ErrorHandler.ErrorCode").enummodule - UrlMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UrlMap").msgclass - UrlMap::RedirectHttpResponseCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UrlMap.RedirectHttpResponseCode").enummodule - StaticFilesHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.StaticFilesHandler").msgclass - ScriptHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ScriptHandler").msgclass - ApiEndpointHandler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ApiEndpointHandler").msgclass - HealthCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.HealthCheck").msgclass - ReadinessCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ReadinessCheck").msgclass - LivenessCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.LivenessCheck").msgclass - Library = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Library").msgclass - AuthFailAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuthFailAction").enummodule - LoginRequirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.LoginRequirement").enummodule - SecurityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.SecurityLevel").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_pb.rb deleted file mode 100644 index f320233132ef..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_pb.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/appengine.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/appengine/v1/application_pb' -require 'google/appengine/v1/certificate_pb' -require 'google/appengine/v1/domain_pb' -require 'google/appengine/v1/domain_mapping_pb' -require 'google/appengine/v1/firewall_pb' -require 'google/appengine/v1/instance_pb' -require 'google/appengine/v1/service_pb' -require 'google/appengine/v1/version_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n#google/appengine/v1/appengine.proto\x12\x13google.appengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a%google/appengine/v1/application.proto\x1a%google/appengine/v1/certificate.proto\x1a google/appengine/v1/domain.proto\x1a(google/appengine/v1/domain_mapping.proto\x1a\"google/appengine/v1/firewall.proto\x1a\"google/appengine/v1/instance.proto\x1a!google/appengine/v1/service.proto\x1a!google/appengine/v1/version.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"%\n\x15GetApplicationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"Q\n\x18\x43reateApplicationRequest\x12\x35\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32 .google.appengine.v1.Application\"\x90\x01\n\x18UpdateApplicationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32 .google.appengine.v1.Application\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"(\n\x18RepairApplicationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"L\n\x13ListServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"_\n\x14ListServicesResponse\x12.\n\x08services\x18\x01 \x03(\x0b\x32\x1c.google.appengine.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"!\n\x11GetServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x9d\x01\n\x14UpdateServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x07service\x18\x02 \x01(\x0b\x32\x1c.google.appengine.v1.Service\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x17\n\x0fmigrate_traffic\x18\x04 \x01(\x08\"$\n\x14\x44\x65leteServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"|\n\x13ListVersionsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12.\n\x04view\x18\x02 \x01(\x0e\x32 .google.appengine.v1.VersionView\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x14ListVersionsResponse\x12.\n\x08versions\x18\x01 \x03(\x0b\x32\x1c.google.appengine.v1.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\x04view\x18\x02 \x01(\x0e\x32 .google.appengine.v1.VersionView\"U\n\x14\x43reateVersionRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12-\n\x07version\x18\x02 \x01(\x0b\x32\x1c.google.appengine.v1.Version\"\x84\x01\n\x14UpdateVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x07version\x18\x02 \x01(\x0b\x32\x1c.google.appengine.v1.Version\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"$\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"M\n\x14ListInstancesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"b\n\x15ListInstancesResponse\x12\x30\n\tinstances\x18\x01 \x03(\x0b\x32\x1d.google.appengine.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\"\n\x12GetInstanceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"%\n\x15\x44\x65leteInstanceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"5\n\x14\x44\x65\x62ugInstanceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07ssh_key\x18\x02 \x01(\t\"j\n\x17ListIngressRulesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x18\n\x10matching_address\x18\x04 \x01(\t\"m\n\x18ListIngressRulesResponse\x12\x38\n\ringress_rules\x18\x01 \x03(\x0b\x32!.google.appengine.v1.FirewallRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"h\n\x1e\x42\x61tchUpdateIngressRulesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\ringress_rules\x18\x02 \x03(\x0b\x32!.google.appengine.v1.FirewallRule\"[\n\x1f\x42\x61tchUpdateIngressRulesResponse\x12\x38\n\ringress_rules\x18\x01 \x03(\x0b\x32!.google.appengine.v1.FirewallRule\"[\n\x18\x43reateIngressRuleRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12/\n\x04rule\x18\x02 \x01(\x0b\x32!.google.appengine.v1.FirewallRule\"%\n\x15GetIngressRuleRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x8a\x01\n\x18UpdateIngressRuleRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04rule\x18\x02 \x01(\x0b\x32!.google.appengine.v1.FirewallRule\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"(\n\x18\x44\x65leteIngressRuleRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"U\n\x1cListAuthorizedDomainsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"p\n\x1dListAuthorizedDomainsResponse\x12\x36\n\x07\x64omains\x18\x01 \x03(\x0b\x32%.google.appengine.v1.AuthorizedDomain\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x98\x01\n!ListAuthorizedCertificatesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12<\n\x04view\x18\x04 \x01(\x0e\x32..google.appengine.v1.AuthorizedCertificateView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x7f\n\"ListAuthorizedCertificatesResponse\x12@\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32*.google.appengine.v1.AuthorizedCertificate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"m\n\x1fGetAuthorizedCertificateRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x04view\x18\x02 \x01(\x0e\x32..google.appengine.v1.AuthorizedCertificateView\"u\n\"CreateAuthorizedCertificateRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12?\n\x0b\x63\x65rtificate\x18\x02 \x01(\x0b\x32*.google.appengine.v1.AuthorizedCertificate\"\xa4\x01\n\"UpdateAuthorizedCertificateRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x0b\x63\x65rtificate\x18\x02 \x01(\x0b\x32*.google.appengine.v1.AuthorizedCertificate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"2\n\"DeleteAuthorizedCertificateRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"R\n\x19ListDomainMappingsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x1aListDomainMappingsResponse\x12;\n\x0f\x64omain_mappings\x18\x01 \x03(\x0b\x32\".google.appengine.v1.DomainMapping\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\'\n\x17GetDomainMappingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xb0\x01\n\x1a\x43reateDomainMappingRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12:\n\x0e\x64omain_mapping\x18\x02 \x01(\x0b\x32\".google.appengine.v1.DomainMapping\x12\x46\n\x11override_strategy\x18\x04 \x01(\x0e\x32+.google.appengine.v1.DomainOverrideStrategy\"\x97\x01\n\x1aUpdateDomainMappingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x0e\x64omain_mapping\x18\x02 \x01(\x0b\x32\".google.appengine.v1.DomainMapping\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"*\n\x1a\x44\x65leteDomainMappingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t*\"\n\x0bVersionView\x12\t\n\x05\x42\x41SIC\x10\x00\x12\x08\n\x04\x46ULL\x10\x01*H\n\x19\x41uthorizedCertificateView\x12\x15\n\x11\x42\x41SIC_CERTIFICATE\x10\x00\x12\x14\n\x10\x46ULL_CERTIFICATE\x10\x01*\\\n\x16\x44omainOverrideStrategy\x12(\n$UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY\x10\x00\x12\n\n\x06STRICT\x10\x01\x12\x0c\n\x08OVERRIDE\x10\x02\x32\xd1\x06\n\x0c\x41pplications\x12\x80\x01\n\x0eGetApplication\x12*.google.appengine.v1.GetApplicationRequest\x1a .google.appengine.v1.Application\" \xda\x41\x04name\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/{name=apps/*}\x12\xa5\x01\n\x11\x43reateApplication\x12-.google.appengine.v1.CreateApplicationRequest\x1a\x1d.google.longrunning.Operation\"B\xca\x41\"\n\x0b\x41pplication\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x17\"\x08/v1/apps:\x0b\x61pplication\x12\xae\x01\n\x11UpdateApplication\x12-.google.appengine.v1.UpdateApplicationRequest\x1a\x1d.google.longrunning.Operation\"K\xca\x41\"\n\x0b\x41pplication\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02 2\x11/v1/{name=apps/*}:\x0b\x61pplication\x12\xab\x01\n\x11RepairApplication\x12-.google.appengine.v1.RepairApplicationRequest\x1a\x1d.google.longrunning.Operation\"H\xca\x41\"\n\x0b\x41pplication\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/{name=apps/*}:repair:\x01*\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\xa6\x06\n\x08Services\x12\x89\x01\n\x0cListServices\x12(.google.appengine.v1.ListServicesRequest\x1a).google.appengine.v1.ListServicesResponse\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{parent=apps/*}/services\x12x\n\nGetService\x12&.google.appengine.v1.GetServiceRequest\x1a\x1c.google.appengine.v1.Service\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=apps/*/services/*}\x12\xa9\x01\n\rUpdateService\x12).google.appengine.v1.UpdateServiceRequest\x1a\x1d.google.longrunning.Operation\"N\xca\x41\x1e\n\x07Service\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\'2\x1c/v1/{name=apps/*/services/*}:\x07service\x12\xae\x01\n\rDeleteService\x12).google.appengine.v1.DeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"S\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x1e*\x1c/v1/{name=apps/*/services/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\x8e\x08\n\x08Versions\x12\x94\x01\n\x0cListVersions\x12(.google.appengine.v1.ListVersionsRequest\x1a).google.appengine.v1.ListVersionsResponse\"/\x82\xd3\xe4\x93\x02)\x12\'/v1/{parent=apps/*/services/*}/versions\x12\x83\x01\n\nGetVersion\x12&.google.appengine.v1.GetVersionRequest\x1a\x1c.google.appengine.v1.Version\"/\x82\xd3\xe4\x93\x02)\x12\'/v1/{name=apps/*/services/*/versions/*}\x12\xb8\x01\n\rCreateVersion\x12).google.appengine.v1.CreateVersionRequest\x1a\x1d.google.longrunning.Operation\"]\xca\x41\"\n\x07Version\x12\x17\x43reateVersionMetadataV1\x82\xd3\xe4\x93\x02\x32\"\'/v1/{parent=apps/*/services/*}/versions:\x07version\x12\xb4\x01\n\rUpdateVersion\x12).google.appengine.v1.UpdateVersionRequest\x1a\x1d.google.longrunning.Operation\"Y\xca\x41\x1e\n\x07Version\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x32\x32\'/v1/{name=apps/*/services/*/versions/*}:\x07version\x12\xb9\x01\n\rDeleteVersion\x12).google.appengine.v1.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"^\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02)*\'/v1/{name=apps/*/services/*/versions/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\x8d\x07\n\tInstances\x12\xa3\x01\n\rListInstances\x12).google.appengine.v1.ListInstancesRequest\x1a*.google.appengine.v1.ListInstancesResponse\";\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=apps/*/services/*/versions/*}/instances\x12\x92\x01\n\x0bGetInstance\x12\'.google.appengine.v1.GetInstanceRequest\x1a\x1d.google.appengine.v1.Instance\";\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=apps/*/services/*/versions/*/instances/*}\x12\xc7\x01\n\x0e\x44\x65leteInstance\x12*.google.appengine.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x35*3/v1/{name=apps/*/services/*/versions/*/instances/*}\x12\xc1\x01\n\rDebugInstance\x12).google.appengine.v1.DebugInstanceRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41\x1f\n\x08Instance\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02>\"9/v1/{name=apps/*/services/*/versions/*/instances/*}:debug:\x01*\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\x96\t\n\x08\x46irewall\x12\xa2\x01\n\x10ListIngressRules\x12,.google.appengine.v1.ListIngressRulesRequest\x1a-.google.appengine.v1.ListIngressRulesResponse\"1\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=apps/*}/firewall/ingressRules\x12\xc4\x01\n\x17\x42\x61tchUpdateIngressRules\x12\x33.google.appengine.v1.BatchUpdateIngressRulesRequest\x1a\x34.google.appengine.v1.BatchUpdateIngressRulesResponse\">\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=apps/*/firewall/ingressRules}:batchUpdate:\x01*\x12\x9e\x01\n\x11\x43reateIngressRule\x12-.google.appengine.v1.CreateIngressRuleRequest\x1a!.google.appengine.v1.FirewallRule\"7\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=apps/*}/firewall/ingressRules:\x04rule\x12\x92\x01\n\x0eGetIngressRule\x12*.google.appengine.v1.GetIngressRuleRequest\x1a!.google.appengine.v1.FirewallRule\"1\x82\xd3\xe4\x93\x02+\x12)/v1/{name=apps/*/firewall/ingressRules/*}\x12\x9e\x01\n\x11UpdateIngressRule\x12-.google.appengine.v1.UpdateIngressRuleRequest\x1a!.google.appengine.v1.FirewallRule\"7\x82\xd3\xe4\x93\x02\x31\x32)/v1/{name=apps/*/firewall/ingressRules/*}:\x04rule\x12\x8d\x01\n\x11\x44\x65leteIngressRule\x12-.google.appengine.v1.DeleteIngressRuleRequest\x1a\x16.google.protobuf.Empty\"1\x82\xd3\xe4\x93\x02+*)/v1/{name=apps/*/firewall/ingressRules/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\xfc\x02\n\x11\x41uthorizedDomains\x12\xad\x01\n\x15ListAuthorizedDomains\x12\x31.google.appengine.v1.ListAuthorizedDomainsRequest\x1a\x32.google.appengine.v1.ListAuthorizedDomainsResponse\"-\x82\xd3\xe4\x93\x02\'\x12%/v1/{parent=apps/*}/authorizedDomains\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\xf9\x08\n\x16\x41uthorizedCertificates\x12\xc1\x01\n\x1aListAuthorizedCertificates\x12\x36.google.appengine.v1.ListAuthorizedCertificatesRequest\x1a\x37.google.appengine.v1.ListAuthorizedCertificatesResponse\"2\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=apps/*}/authorizedCertificates\x12\xb0\x01\n\x18GetAuthorizedCertificate\x12\x34.google.appengine.v1.GetAuthorizedCertificateRequest\x1a*.google.appengine.v1.AuthorizedCertificate\"2\x82\xd3\xe4\x93\x02,\x12*/v1/{name=apps/*/authorizedCertificates/*}\x12\xc3\x01\n\x1b\x43reateAuthorizedCertificate\x12\x37.google.appengine.v1.CreateAuthorizedCertificateRequest\x1a*.google.appengine.v1.AuthorizedCertificate\"?\x82\xd3\xe4\x93\x02\x39\"*/v1/{parent=apps/*}/authorizedCertificates:\x0b\x63\x65rtificate\x12\xc3\x01\n\x1bUpdateAuthorizedCertificate\x12\x37.google.appengine.v1.UpdateAuthorizedCertificateRequest\x1a*.google.appengine.v1.AuthorizedCertificate\"?\x82\xd3\xe4\x93\x02\x39\x32*/v1/{name=apps/*/authorizedCertificates/*}:\x0b\x63\x65rtificate\x12\xa2\x01\n\x1b\x44\x65leteAuthorizedCertificate\x12\x37.google.appengine.v1.DeleteAuthorizedCertificateRequest\x1a\x16.google.protobuf.Empty\"2\x82\xd3\xe4\x93\x02,**/v1/{name=apps/*/authorizedCertificates/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only2\xd9\x08\n\x0e\x44omainMappings\x12\xa1\x01\n\x12ListDomainMappings\x12..google.appengine.v1.ListDomainMappingsRequest\x1a/.google.appengine.v1.ListDomainMappingsResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=apps/*}/domainMappings\x12\x90\x01\n\x10GetDomainMapping\x12,.google.appengine.v1.GetDomainMappingRequest\x1a\".google.appengine.v1.DomainMapping\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=apps/*/domainMappings/*}\x12\xc8\x01\n\x13\x43reateDomainMapping\x12/.google.appengine.v1.CreateDomainMappingRequest\x1a\x1d.google.longrunning.Operation\"a\xca\x41$\n\rDomainMapping\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x34\"\"/v1/{parent=apps/*}/domainMappings:\x0e\x64omain_mapping\x12\xc8\x01\n\x13UpdateDomainMapping\x12/.google.appengine.v1.UpdateDomainMappingRequest\x1a\x1d.google.longrunning.Operation\"a\xca\x41$\n\rDomainMapping\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02\x34\x32\"/v1/{name=apps/*/domainMappings/*}:\x0e\x64omain_mapping\x12\xc0\x01\n\x13\x44\x65leteDomainMapping\x12/.google.appengine.v1.DeleteDomainMappingRequest\x1a\x1d.google.longrunning.Operation\"Y\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\x82\xd3\xe4\x93\x02$*\"/v1/{name=apps/*/domainMappings/*}\x1a\xb6\x01\xca\x41\x18\x61ppengine.googleapis.com\xd2\x41\x97\x01https://www.googleapis.com/auth/appengine.admin,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xbf\x01\n\x17\x63om.google.appengine.v1B\x0e\x41ppengineProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - GetApplicationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetApplicationRequest").msgclass - CreateApplicationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateApplicationRequest").msgclass - UpdateApplicationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateApplicationRequest").msgclass - RepairApplicationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.RepairApplicationRequest").msgclass - ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListServicesRequest").msgclass - ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListServicesResponse").msgclass - GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetServiceRequest").msgclass - UpdateServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateServiceRequest").msgclass - DeleteServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteServiceRequest").msgclass - ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListVersionsRequest").msgclass - ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListVersionsResponse").msgclass - GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetVersionRequest").msgclass - CreateVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateVersionRequest").msgclass - UpdateVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateVersionRequest").msgclass - DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteVersionRequest").msgclass - ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListInstancesRequest").msgclass - ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListInstancesResponse").msgclass - GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetInstanceRequest").msgclass - DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteInstanceRequest").msgclass - DebugInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DebugInstanceRequest").msgclass - ListIngressRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListIngressRulesRequest").msgclass - ListIngressRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListIngressRulesResponse").msgclass - BatchUpdateIngressRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.BatchUpdateIngressRulesRequest").msgclass - BatchUpdateIngressRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.BatchUpdateIngressRulesResponse").msgclass - CreateIngressRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateIngressRuleRequest").msgclass - GetIngressRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetIngressRuleRequest").msgclass - UpdateIngressRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateIngressRuleRequest").msgclass - DeleteIngressRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteIngressRuleRequest").msgclass - ListAuthorizedDomainsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListAuthorizedDomainsRequest").msgclass - ListAuthorizedDomainsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListAuthorizedDomainsResponse").msgclass - ListAuthorizedCertificatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListAuthorizedCertificatesRequest").msgclass - ListAuthorizedCertificatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListAuthorizedCertificatesResponse").msgclass - GetAuthorizedCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetAuthorizedCertificateRequest").msgclass - CreateAuthorizedCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateAuthorizedCertificateRequest").msgclass - UpdateAuthorizedCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateAuthorizedCertificateRequest").msgclass - DeleteAuthorizedCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteAuthorizedCertificateRequest").msgclass - ListDomainMappingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListDomainMappingsRequest").msgclass - ListDomainMappingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ListDomainMappingsResponse").msgclass - GetDomainMappingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.GetDomainMappingRequest").msgclass - CreateDomainMappingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateDomainMappingRequest").msgclass - UpdateDomainMappingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateDomainMappingRequest").msgclass - DeleteDomainMappingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DeleteDomainMappingRequest").msgclass - VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.VersionView").enummodule - AuthorizedCertificateView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuthorizedCertificateView").enummodule - DomainOverrideStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DomainOverrideStrategy").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_services_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_services_pb.rb deleted file mode 100644 index 77c058829079..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/appengine_services_pb.rb +++ /dev/null @@ -1,314 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/appengine/v1/appengine.proto for package 'Google.Cloud.AppEngine.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/appengine/v1/appengine_pb' - -module Google - module Cloud - module AppEngine - module V1 - module Applications - # Manages App Engine applications. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.appengine.v1.Applications' - - # Gets information about an application. - rpc :GetApplication, ::Google::Cloud::AppEngine::V1::GetApplicationRequest, ::Google::Cloud::AppEngine::V1::Application - # Creates an App Engine application for a Google Cloud Platform project. - # Required fields: - # - # * `id` - The ID of the target Cloud Platform project. - # * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. - # - # For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). - rpc :CreateApplication, ::Google::Cloud::AppEngine::V1::CreateApplicationRequest, ::Google::Longrunning::Operation - # Updates the specified Application resource. - # You can update the following fields: - # - # * `auth_domain` - Google authentication domain for controlling user access to the application. - # * `default_cookie_expiration` - Cookie expiration policy for the application. - # * `iap` - Identity-Aware Proxy properties for the application. - rpc :UpdateApplication, ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, ::Google::Longrunning::Operation - # Recreates the required App Engine features for the specified App Engine - # application, for example a Cloud Storage bucket or App Engine service - # account. - # Use this method if you receive an error message about a missing feature, - # for example, *Error retrieving the App Engine service account*. - # If you have deleted your App Engine service account, this will - # not be able to recreate it. Instead, you should attempt to use the - # IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . - # If the deletion was recent, the numeric ID can be found in the Cloud - # Console Activity Log. - rpc :RepairApplication, ::Google::Cloud::AppEngine::V1::RepairApplicationRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - module Services - # Manages services of an application. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.appengine.v1.Services' - - # Lists all the services in the application. - rpc :ListServices, ::Google::Cloud::AppEngine::V1::ListServicesRequest, ::Google::Cloud::AppEngine::V1::ListServicesResponse - # Gets the current configuration of the specified service. - rpc :GetService, ::Google::Cloud::AppEngine::V1::GetServiceRequest, ::Google::Cloud::AppEngine::V1::Service - # Updates the configuration of the specified service. - rpc :UpdateService, ::Google::Cloud::AppEngine::V1::UpdateServiceRequest, ::Google::Longrunning::Operation - # Deletes the specified service and all enclosed versions. - rpc :DeleteService, ::Google::Cloud::AppEngine::V1::DeleteServiceRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - module Versions - # Manages versions of a service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.appengine.v1.Versions' - - # Lists the versions of a service. - rpc :ListVersions, ::Google::Cloud::AppEngine::V1::ListVersionsRequest, ::Google::Cloud::AppEngine::V1::ListVersionsResponse - # Gets the specified Version resource. - # By default, only a `BASIC_VIEW` will be returned. - # Specify the `FULL_VIEW` parameter to get the full resource. - rpc :GetVersion, ::Google::Cloud::AppEngine::V1::GetVersionRequest, ::Google::Cloud::AppEngine::V1::Version - # Deploys code and resource files to a new version. - rpc :CreateVersion, ::Google::Cloud::AppEngine::V1::CreateVersionRequest, ::Google::Longrunning::Operation - # Updates the specified Version resource. - # You can specify the following fields depending on the App Engine - # environment and type of scaling that the version resource uses: - # - # **Standard environment** - # - # * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) - # - # *automatic scaling* in the standard environment: - # - # * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # - # *basic scaling* or *manual scaling* in the standard environment: - # - # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) - # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) - # - # **Flexible environment** - # - # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) - # - # *automatic scaling* in the flexible environment: - # - # * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # - # *manual scaling* in the flexible environment: - # - # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) - rpc :UpdateVersion, ::Google::Cloud::AppEngine::V1::UpdateVersionRequest, ::Google::Longrunning::Operation - # Deletes an existing Version resource. - rpc :DeleteVersion, ::Google::Cloud::AppEngine::V1::DeleteVersionRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - module Instances - # Manages instances of a version. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.appengine.v1.Instances' - - # Lists the instances of a version. - # - # Tip: To aggregate details about instances over time, see the - # [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - rpc :ListInstances, ::Google::Cloud::AppEngine::V1::ListInstancesRequest, ::Google::Cloud::AppEngine::V1::ListInstancesResponse - # Gets instance information. - rpc :GetInstance, ::Google::Cloud::AppEngine::V1::GetInstanceRequest, ::Google::Cloud::AppEngine::V1::Instance - # Stops a running instance. - # - # The instance might be automatically recreated based on the scaling settings - # of the version. For more information, see "How Instances are Managed" - # ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | - # [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). - # - # To ensure that instances are not re-created and avoid getting billed, you - # can stop all instances within the target version by changing the serving - # status of the version to `STOPPED` with the - # [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) - # method. - rpc :DeleteInstance, ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation - # Enables debugging on a VM instance. This allows you to use the SSH - # command to connect to the virtual machine where the instance lives. - # While in "debug mode", the instance continues to serve live traffic. - # You should delete the instance when you are done debugging and then - # allow the system to take over and determine if another instance - # should be started. - # - # Only applicable for instances in App Engine flexible environment. - rpc :DebugInstance, ::Google::Cloud::AppEngine::V1::DebugInstanceRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - module Firewall - # Firewall resources are used to define a collection of access control rules - # for an Application. Each rule is defined with a position which specifies - # the rule's order in the sequence of rules, an IP range to be matched against - # requests, and an action to take upon matching requests. - # - # Every request is evaluated against the Firewall rules in priority order. - # Processesing stops at the first rule which matches the request's IP address. - # A final rule always specifies an action that applies to all remaining - # IP addresses. The default final rule for a newly-created application will be - # set to "allow" if not otherwise specified by the user. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.appengine.v1.Firewall' - - # Lists the firewall rules of an application. - rpc :ListIngressRules, ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest, ::Google::Cloud::AppEngine::V1::ListIngressRulesResponse - # Replaces the entire firewall ruleset in one bulk operation. This overrides - # and replaces the rules of an existing firewall with the new rules. - # - # If the final rule does not match traffic with the '*' wildcard IP range, - # then an "allow all" rule is explicitly added to the end of the list. - rpc :BatchUpdateIngressRules, ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest, ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse - # Creates a firewall rule for the application. - rpc :CreateIngressRule, ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest, ::Google::Cloud::AppEngine::V1::FirewallRule - # Gets the specified firewall rule. - rpc :GetIngressRule, ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest, ::Google::Cloud::AppEngine::V1::FirewallRule - # Updates the specified firewall rule. - rpc :UpdateIngressRule, ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest, ::Google::Cloud::AppEngine::V1::FirewallRule - # Deletes the specified firewall rule. - rpc :DeleteIngressRule, ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - module AuthorizedDomains - # Manages domains a user is authorized to administer. To authorize use of a - # domain, verify ownership via - # [Webmaster Central](https://www.google.com/webmasters/verification/home). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.appengine.v1.AuthorizedDomains' - - # Lists all domains the user is authorized to administer. - rpc :ListAuthorizedDomains, ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest, ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse - end - - Stub = Service.rpc_stub_class - end - module AuthorizedCertificates - # Manages SSL certificates a user is authorized to administer. A user can - # administer any SSL certificates applicable to their authorized domains. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.appengine.v1.AuthorizedCertificates' - - # Lists all SSL certificates the user is authorized to administer. - rpc :ListAuthorizedCertificates, ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse - # Gets the specified SSL certificate. - rpc :GetAuthorizedCertificate, ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, ::Google::Cloud::AppEngine::V1::AuthorizedCertificate - # Uploads the specified SSL certificate. - rpc :CreateAuthorizedCertificate, ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, ::Google::Cloud::AppEngine::V1::AuthorizedCertificate - # Updates the specified SSL certificate. To renew a certificate and maintain - # its existing domain mappings, update `certificate_data` with a new - # certificate. The new certificate must be applicable to the same domains as - # the original certificate. The certificate `display_name` may also be - # updated. - rpc :UpdateAuthorizedCertificate, ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, ::Google::Cloud::AppEngine::V1::AuthorizedCertificate - # Deletes the specified SSL certificate. - rpc :DeleteAuthorizedCertificate, ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - module DomainMappings - # Manages domains serving an application. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.appengine.v1.DomainMappings' - - # Lists the domain mappings on an application. - rpc :ListDomainMappings, ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, ::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse - # Gets the specified domain mapping. - rpc :GetDomainMapping, ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, ::Google::Cloud::AppEngine::V1::DomainMapping - # Maps a domain to an application. A user must be authorized to administer a - # domain in order to map it to an application. For a list of available - # authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`](). - rpc :CreateDomainMapping, ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, ::Google::Longrunning::Operation - # Updates the specified domain mapping. To map an SSL certificate to a - # domain mapping, update `certificate_id` to point to an `AuthorizedCertificate` - # resource. A user must be authorized to administer the associated domain - # in order to update a `DomainMapping` resource. - rpc :UpdateDomainMapping, ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, ::Google::Longrunning::Operation - # Deletes the specified domain mapping. A user must be authorized to - # administer the associated domain in order to delete a `DomainMapping` - # resource. - rpc :DeleteDomainMapping, ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/application_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/application_pb.rb deleted file mode 100644 index cae04fd7d0bb..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/application_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/application.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n%google/appengine/v1/application.proto\x12\x13google.appengine.v1\x1a\x1egoogle/protobuf/duration.proto\"\x89\x08\n\x0b\x41pplication\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12<\n\x0e\x64ispatch_rules\x18\x03 \x03(\x0b\x32$.google.appengine.v1.UrlDispatchRule\x12\x13\n\x0b\x61uth_domain\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\x12\x13\n\x0b\x63ode_bucket\x18\x08 \x01(\t\x12<\n\x19\x64\x65\x66\x61ult_cookie_expiration\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x46\n\x0eserving_status\x18\n \x01(\x0e\x32..google.appengine.v1.Application.ServingStatus\x12\x18\n\x10\x64\x65\x66\x61ult_hostname\x18\x0b \x01(\t\x12\x16\n\x0e\x64\x65\x66\x61ult_bucket\x18\x0c \x01(\t\x12\x17\n\x0fservice_account\x18\r \x01(\t\x12@\n\x03iap\x18\x0e \x01(\x0b\x32\x33.google.appengine.v1.Application.IdentityAwareProxy\x12\x12\n\ngcr_domain\x18\x10 \x01(\t\x12\x44\n\rdatabase_type\x18\x11 \x01(\x0e\x32-.google.appengine.v1.Application.DatabaseType\x12J\n\x10\x66\x65\x61ture_settings\x18\x12 \x01(\x0b\x32\x30.google.appengine.v1.Application.FeatureSettings\x1a\x82\x01\n\x12IdentityAwareProxy\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x18\n\x10oauth2_client_id\x18\x02 \x01(\t\x12\x1c\n\x14oauth2_client_secret\x18\x03 \x01(\t\x12#\n\x1boauth2_client_secret_sha256\x18\x04 \x01(\t\x1aR\n\x0f\x46\x65\x61tureSettings\x12\x1b\n\x13split_health_checks\x18\x01 \x01(\x08\x12\"\n\x1ause_container_optimized_os\x18\x02 \x01(\x08\"U\n\rServingStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x11\n\rUSER_DISABLED\x10\x02\x12\x13\n\x0fSYSTEM_DISABLED\x10\x03\"z\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LOUD_DATASTORE\x10\x01\x12\x13\n\x0f\x43LOUD_FIRESTORE\x10\x02\x12!\n\x1d\x43LOUD_DATASTORE_COMPATIBILITY\x10\x03\"@\n\x0fUrlDispatchRule\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\tB\xc1\x01\n\x17\x63om.google.appengine.v1B\x10\x41pplicationProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application").msgclass - Application::IdentityAwareProxy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application.IdentityAwareProxy").msgclass - Application::FeatureSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application.FeatureSettings").msgclass - Application::ServingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application.ServingStatus").enummodule - Application::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Application.DatabaseType").enummodule - UrlDispatchRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UrlDispatchRule").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/audit_data_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/audit_data_pb.rb deleted file mode 100644 index fe1f827bcd75..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/audit_data_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/audit_data.proto - -require 'google/protobuf' - -require 'google/appengine/v1/appengine_pb' - - -descriptor_data = "\n$google/appengine/v1/audit_data.proto\x12\x13google.appengine.v1\x1a#google/appengine/v1/appengine.proto\"\x9d\x01\n\tAuditData\x12\x42\n\x0eupdate_service\x18\x01 \x01(\x0b\x32(.google.appengine.v1.UpdateServiceMethodH\x00\x12\x42\n\x0e\x63reate_version\x18\x02 \x01(\x0b\x32(.google.appengine.v1.CreateVersionMethodH\x00\x42\x08\n\x06method\"Q\n\x13UpdateServiceMethod\x12:\n\x07request\x18\x01 \x01(\x0b\x32).google.appengine.v1.UpdateServiceRequest\"Q\n\x13\x43reateVersionMethod\x12:\n\x07request\x18\x01 \x01(\x0b\x32).google.appengine.v1.CreateVersionRequestB\xbf\x01\n\x17\x63om.google.appengine.v1B\x0e\x41uditDataProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - AuditData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuditData").msgclass - UpdateServiceMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.UpdateServiceMethod").msgclass - CreateVersionMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateVersionMethod").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/certificate_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/certificate_pb.rb deleted file mode 100644 index f977de580e70..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/certificate_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/certificate.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n%google/appengine/v1/certificate.proto\x12\x13google.appengine.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdb\x02\n\x15\x41uthorizedCertificate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x14\n\x0c\x64omain_names\x18\x04 \x03(\t\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\x14\x63\x65rtificate_raw_data\x18\x06 \x01(\x0b\x32\'.google.appengine.v1.CertificateRawData\x12\x44\n\x13managed_certificate\x18\x07 \x01(\x0b\x32\'.google.appengine.v1.ManagedCertificate\x12\x1f\n\x17visible_domain_mappings\x18\x08 \x03(\t\x12\x1d\n\x15\x64omain_mappings_count\x18\t \x01(\x05\"E\n\x12\x43\x65rtificateRawData\x12\x1a\n\x12public_certificate\x18\x01 \x01(\t\x12\x13\n\x0bprivate_key\x18\x02 \x01(\t\"\x82\x01\n\x12ManagedCertificate\x12\x35\n\x11last_renewal_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x06status\x18\x02 \x01(\x0e\x32%.google.appengine.v1.ManagementStatus*\xc6\x01\n\x10ManagementStatus\x12!\n\x1dMANAGEMENT_STATUS_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x1f\n\x1b\x46\x41ILED_RETRYING_NOT_VISIBLE\x10\x04\x12\x14\n\x10\x46\x41ILED_PERMANENT\x10\x06\x12!\n\x1d\x46\x41ILED_RETRYING_CAA_FORBIDDEN\x10\x07\x12 \n\x1c\x46\x41ILED_RETRYING_CAA_CHECKING\x10\x08\x42\xc1\x01\n\x17\x63om.google.appengine.v1B\x10\x43\x65rtificateProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - AuthorizedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuthorizedCertificate").msgclass - CertificateRawData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CertificateRawData").msgclass - ManagedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ManagedCertificate").msgclass - ManagementStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ManagementStatus").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deploy_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deploy_pb.rb deleted file mode 100644 index 515288edf7f5..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deploy_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/deploy.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n google/appengine/v1/deploy.proto\x12\x13google.appengine.v1\x1a\x1egoogle/protobuf/duration.proto\"\xbb\x02\n\nDeployment\x12\x39\n\x05\x66iles\x18\x01 \x03(\x0b\x32*.google.appengine.v1.Deployment.FilesEntry\x12\x35\n\tcontainer\x18\x02 \x01(\x0b\x32\".google.appengine.v1.ContainerInfo\x12)\n\x03zip\x18\x03 \x01(\x0b\x32\x1c.google.appengine.v1.ZipInfo\x12\x43\n\x13\x63loud_build_options\x18\x06 \x01(\x0b\x32&.google.appengine.v1.CloudBuildOptions\x1aK\n\nFilesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.google.appengine.v1.FileInfo:\x02\x38\x01\"C\n\x08\x46ileInfo\x12\x12\n\nsource_url\x18\x01 \x01(\t\x12\x10\n\x08sha1_sum\x18\x02 \x01(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\"\x1e\n\rContainerInfo\x12\r\n\x05image\x18\x01 \x01(\t\"b\n\x11\x43loudBuildOptions\x12\x15\n\rapp_yaml_path\x18\x01 \x01(\t\x12\x36\n\x13\x63loud_build_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"2\n\x07ZipInfo\x12\x12\n\nsource_url\x18\x03 \x01(\t\x12\x13\n\x0b\x66iles_count\x18\x04 \x01(\x05\x42\xbc\x01\n\x17\x63om.google.appengine.v1B\x0b\x44\x65ployProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Deployment").msgclass - FileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.FileInfo").msgclass - ContainerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ContainerInfo").msgclass - CloudBuildOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CloudBuildOptions").msgclass - ZipInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ZipInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deployed_files_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deployed_files_pb.rb deleted file mode 100644 index 0c0df0457dea..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/deployed_files_pb.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/deployed_files.proto - -require 'google/protobuf' - - -descriptor_data = "\n(google/appengine/v1/deployed_files.proto\x12\x13google.appengine.v1B\xc3\x01\n\x17\x63om.google.appengine.v1B\x12\x44\x65ployedFilesProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_mapping_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_mapping_pb.rb deleted file mode 100644 index e0674fa7382e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_mapping_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/domain_mapping.proto - -require 'google/protobuf' - - -descriptor_data = "\n(google/appengine/v1/domain_mapping.proto\x12\x13google.appengine.v1\"\xa0\x01\n\rDomainMapping\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x36\n\x0cssl_settings\x18\x03 \x01(\x0b\x32 .google.appengine.v1.SslSettings\x12=\n\x10resource_records\x18\x04 \x03(\x0b\x32#.google.appengine.v1.ResourceRecord\"\xf3\x01\n\x0bSslSettings\x12\x16\n\x0e\x63\x65rtificate_id\x18\x01 \x01(\t\x12O\n\x13ssl_management_type\x18\x03 \x01(\x0e\x32\x32.google.appengine.v1.SslSettings.SslManagementType\x12&\n\x1epending_managed_certificate_id\x18\x04 \x01(\t\"S\n\x11SslManagementType\x12#\n\x1fSSL_MANAGEMENT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAUTOMATIC\x10\x01\x12\n\n\x06MANUAL\x10\x02\"\xb3\x01\n\x0eResourceRecord\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06rrdata\x18\x02 \x01(\t\x12<\n\x04type\x18\x03 \x01(\x0e\x32..google.appengine.v1.ResourceRecord.RecordType\"E\n\nRecordType\x12\x1b\n\x17RECORD_TYPE_UNSPECIFIED\x10\x00\x12\x05\n\x01\x41\x10\x01\x12\x08\n\x04\x41\x41\x41\x41\x10\x02\x12\t\n\x05\x43NAME\x10\x03\x42\xc3\x01\n\x17\x63om.google.appengine.v1B\x12\x44omainMappingProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - DomainMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DomainMapping").msgclass - SslSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.SslSettings").msgclass - SslSettings::SslManagementType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.SslSettings.SslManagementType").enummodule - ResourceRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ResourceRecord").msgclass - ResourceRecord::RecordType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ResourceRecord.RecordType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_pb.rb deleted file mode 100644 index f6b8860988cb..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/domain_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/domain.proto - -require 'google/protobuf' - - -descriptor_data = "\n google/appengine/v1/domain.proto\x12\x13google.appengine.v1\",\n\x10\x41uthorizedDomain\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\tB\xbc\x01\n\x17\x63om.google.appengine.v1B\x0b\x44omainProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - AuthorizedDomain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AuthorizedDomain").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/firewall_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/firewall_pb.rb deleted file mode 100644 index c192769f20c4..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/firewall_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/firewall.proto - -require 'google/protobuf' - - -descriptor_data = "\n\"google/appengine/v1/firewall.proto\x12\x13google.appengine.v1\"\xbc\x01\n\x0c\x46irewallRule\x12\x10\n\x08priority\x18\x01 \x01(\x05\x12\x38\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32(.google.appengine.v1.FirewallRule.Action\x12\x14\n\x0csource_range\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12UNSPECIFIED_ACTION\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x42\xc7\x01\n com.google.appengine.v1.firewallB\rFirewallProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - FirewallRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.FirewallRule").msgclass - FirewallRule::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.FirewallRule.Action").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/instance_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/instance_pb.rb deleted file mode 100644 index b07a1180765b..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/instance_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/instance.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\"google/appengine/v1/instance.proto\x12\x13google.appengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\x06\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x61pp_engine_release\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x0c\x61vailability\x18\x04 \x01(\x0e\x32*.google.appengine.v1.Instance.AvailabilityB\x03\xe0\x41\x03\x12\x14\n\x07vm_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cvm_zone_name\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05vm_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08requests\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x13\n\x06\x65rrors\x18\n \x01(\x05\x42\x03\xe0\x41\x03\x12\x10\n\x03qps\x18\x0b \x01(\x02\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x61verage_latency\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cmemory_usage\x18\r \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tvm_status\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10vm_debug_enabled\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12\x12\n\x05vm_ip\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12N\n\x0bvm_liveness\x18\x11 \x01(\x0e\x32\x34.google.appengine.v1.Instance.Liveness.LivenessStateB\x03\xe0\x41\x03\x1a\x7f\n\x08Liveness\"s\n\rLivenessState\x12\x1e\n\x1aLIVENESS_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07HEALTHY\x10\x02\x12\r\n\tUNHEALTHY\x10\x03\x12\x0c\n\x08\x44RAINING\x10\x04\x12\x0b\n\x07TIMEOUT\x10\x05\":\n\x0c\x41vailability\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08RESIDENT\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02:m\xea\x41j\n!appengine.googleapis.com/Instance\x12\x45\x61pps/{app}/services/{service}/versions/{version}/instances/{instance}B\xbe\x01\n\x17\x63om.google.appengine.v1B\rInstanceProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Instance").msgclass - Instance::Liveness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Instance.Liveness").msgclass - Instance::Liveness::LivenessState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Instance.Liveness.LivenessState").enummodule - Instance::Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Instance.Availability").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/location_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/location_pb.rb deleted file mode 100644 index 81a9da3f9d46..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/location_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/location.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\"google/appengine/v1/location.proto\x12\x13google.appengine.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x85\x01\n\x10LocationMetadata\x12&\n\x1estandard_environment_available\x18\x02 \x01(\x08\x12&\n\x1e\x66lexible_environment_available\x18\x04 \x01(\x08\x12!\n\x14search_api_available\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x42\xbe\x01\n\x17\x63om.google.appengine.v1B\rLocationProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.LocationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/network_settings_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/network_settings_pb.rb deleted file mode 100644 index 78782d65b683..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/network_settings_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/network_settings.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/appengine/v1/network_settings.proto\x12\x13google.appengine.v1\"\xaa\x02\n\x0fNetworkSettings\x12[\n\x17ingress_traffic_allowed\x18\x01 \x01(\x0e\x32:.google.appengine.v1.NetworkSettings.IngressTrafficAllowed\"\xb9\x01\n\x15IngressTrafficAllowed\x12\'\n#INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED\x10\x00\x12\x1f\n\x1bINGRESS_TRAFFIC_ALLOWED_ALL\x10\x01\x12)\n%INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY\x10\x02\x12+\n\'INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB\x10\x03\x42\xc5\x01\n\x17\x63om.google.appengine.v1B\x14NetworkSettingsProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - NetworkSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.NetworkSettings").msgclass - NetworkSettings::IngressTrafficAllowed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.NetworkSettings.IngressTrafficAllowed").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/operation_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/operation_pb.rb deleted file mode 100644 index 9246c1625510..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/operation_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/operation.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n#google/appengine/v1/operation.proto\x12\x13google.appengine.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x02\n\x13OperationMetadataV1\x12\x0e\n\x06method\x18\x01 \x01(\t\x12/\n\x0binsert_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04user\x18\x04 \x01(\t\x12\x0e\n\x06target\x18\x05 \x01(\t\x12\x19\n\x11\x65phemeral_message\x18\x06 \x01(\t\x12\x0f\n\x07warning\x18\x07 \x03(\t\x12O\n\x17\x63reate_version_metadata\x18\x08 \x01(\x0b\x32,.google.appengine.v1.CreateVersionMetadataV1H\x00\x42\x11\n\x0fmethod_metadata\"1\n\x17\x43reateVersionMetadataV1\x12\x16\n\x0e\x63loud_build_id\x18\x01 \x01(\tB\xbf\x01\n\x17\x63om.google.appengine.v1B\x0eOperationProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - OperationMetadataV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.OperationMetadataV1").msgclass - CreateVersionMetadataV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CreateVersionMetadataV1").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/service_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/service_pb.rb deleted file mode 100644 index 8a25f262e7cc..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/service_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/service.proto - -require 'google/protobuf' - -require 'google/appengine/v1/network_settings_pb' - - -descriptor_data = "\n!google/appengine/v1/service.proto\x12\x13google.appengine.v1\x1a*google/appengine/v1/network_settings.proto\"\xfe\x01\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x30\n\x05split\x18\x03 \x01(\x0b\x32!.google.appengine.v1.TrafficSplit\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.google.appengine.v1.Service.LabelsEntry\x12>\n\x10network_settings\x18\x06 \x01(\x0b\x32$.google.appengine.v1.NetworkSettings\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x84\x02\n\x0cTrafficSplit\x12;\n\x08shard_by\x18\x01 \x01(\x0e\x32).google.appengine.v1.TrafficSplit.ShardBy\x12G\n\x0b\x61llocations\x18\x02 \x03(\x0b\x32\x32.google.appengine.v1.TrafficSplit.AllocationsEntry\x1a\x32\n\x10\x41llocationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\":\n\x07ShardBy\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06\x43OOKIE\x10\x01\x12\x06\n\x02IP\x10\x02\x12\n\n\x06RANDOM\x10\x03\x42\xbd\x01\n\x17\x63om.google.appengine.v1B\x0cServiceProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Service").msgclass - TrafficSplit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.TrafficSplit").msgclass - TrafficSplit::ShardBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.TrafficSplit.ShardBy").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/version_pb.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/version_pb.rb deleted file mode 100644 index 247fbb567ebe..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/appengine/v1/version_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/appengine/v1/version.proto - -require 'google/protobuf' - -require 'google/appengine/v1/app_yaml_pb' -require 'google/appengine/v1/deploy_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n!google/appengine/v1/version.proto\x12\x13google.appengine.v1\x1a\"google/appengine/v1/app_yaml.proto\x1a google/appengine/v1/deploy.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x0f\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x42\n\x11\x61utomatic_scaling\x18\x03 \x01(\x0b\x32%.google.appengine.v1.AutomaticScalingH\x00\x12:\n\rbasic_scaling\x18\x04 \x01(\x0b\x32!.google.appengine.v1.BasicScalingH\x00\x12<\n\x0emanual_scaling\x18\x05 \x01(\x0b\x32\".google.appengine.v1.ManualScalingH\x00\x12\x41\n\x10inbound_services\x18\x06 \x03(\x0e\x32\'.google.appengine.v1.InboundServiceType\x12\x16\n\x0einstance_class\x18\x07 \x01(\t\x12-\n\x07network\x18\x08 \x01(\x0b\x32\x1c.google.appengine.v1.Network\x12\r\n\x05zones\x18v \x03(\t\x12\x31\n\tresources\x18\t \x01(\x0b\x32\x1e.google.appengine.v1.Resources\x12\x0f\n\x07runtime\x18\n \x01(\t\x12\x17\n\x0fruntime_channel\x18u \x01(\t\x12\x12\n\nthreadsafe\x18\x0b \x01(\x08\x12\n\n\x02vm\x18\x0c \x01(\x08\x12\x18\n\x0f\x61pp_engine_apis\x18\x80\x01 \x01(\x08\x12\x45\n\rbeta_settings\x18\r \x03(\x0b\x32..google.appengine.v1.Version.BetaSettingsEntry\x12\x0b\n\x03\x65nv\x18\x0e \x01(\t\x12:\n\x0eserving_status\x18\x0f \x01(\x0e\x32\".google.appengine.v1.ServingStatus\x12\x12\n\ncreated_by\x18\x10 \x01(\t\x12/\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x64isk_usage_bytes\x18\x12 \x01(\x03\x12\x1b\n\x13runtime_api_version\x18\x15 \x01(\t\x12$\n\x1cruntime_main_executable_path\x18\x16 \x01(\t\x12\x17\n\x0fservice_account\x18\x7f \x01(\t\x12-\n\x08handlers\x18\x64 \x03(\x0b\x32\x1b.google.appengine.v1.UrlMap\x12\x39\n\x0e\x65rror_handlers\x18\x65 \x03(\x0b\x32!.google.appengine.v1.ErrorHandler\x12/\n\tlibraries\x18\x66 \x03(\x0b\x32\x1c.google.appengine.v1.Library\x12\x39\n\napi_config\x18g \x01(\x0b\x32%.google.appengine.v1.ApiConfigHandler\x12\x45\n\renv_variables\x18h \x03(\x0b\x32..google.appengine.v1.Version.EnvVariablesEntry\x12P\n\x13\x62uild_env_variables\x18} \x03(\x0b\x32\x33.google.appengine.v1.Version.BuildEnvVariablesEntry\x12\x35\n\x12\x64\x65\x66\x61ult_expiration\x18i \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x36\n\x0chealth_check\x18j \x01(\x0b\x32 .google.appengine.v1.HealthCheck\x12<\n\x0freadiness_check\x18p \x01(\x0b\x32#.google.appengine.v1.ReadinessCheck\x12:\n\x0eliveness_check\x18q \x01(\x0b\x32\".google.appengine.v1.LivenessCheck\x12\x1b\n\x13nobuild_files_regex\x18k \x01(\t\x12\x33\n\ndeployment\x18l \x01(\x0b\x32\x1f.google.appengine.v1.Deployment\x12\x13\n\x0bversion_url\x18m \x01(\t\x12G\n\x15\x65ndpoints_api_service\x18n \x01(\x0b\x32(.google.appengine.v1.EndpointsApiService\x12\x33\n\nentrypoint\x18z \x01(\x0b\x32\x1f.google.appengine.v1.Entrypoint\x12\x45\n\x14vpc_access_connector\x18y \x01(\x0b\x32\'.google.appengine.v1.VpcAccessConnector\x1a\x33\n\x11\x42\x65taSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11\x45nvVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x38\n\x16\x42uildEnvVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07scaling\"\xf7\x01\n\x13\x45ndpointsApiService\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tconfig_id\x18\x02 \x01(\t\x12R\n\x10rollout_strategy\x18\x03 \x01(\x0e\x32\x38.google.appengine.v1.EndpointsApiService.RolloutStrategy\x12\x1e\n\x16\x64isable_trace_sampling\x18\x04 \x01(\x08\"K\n\x0fRolloutStrategy\x12 \n\x1cUNSPECIFIED_ROLLOUT_STRATEGY\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07MANAGED\x10\x02\"\xa9\x05\n\x10\x41utomaticScaling\x12\x33\n\x10\x63ool_down_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x0f\x63pu_utilization\x18\x02 \x01(\x0b\x32#.google.appengine.v1.CpuUtilization\x12\x1f\n\x17max_concurrent_requests\x18\x03 \x01(\x05\x12\x1a\n\x12max_idle_instances\x18\x04 \x01(\x05\x12\x1b\n\x13max_total_instances\x18\x05 \x01(\x05\x12\x36\n\x13max_pending_latency\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12min_idle_instances\x18\x07 \x01(\x05\x12\x1b\n\x13min_total_instances\x18\x08 \x01(\x05\x12\x36\n\x13min_pending_latency\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x44\n\x13request_utilization\x18\n \x01(\x0b\x32\'.google.appengine.v1.RequestUtilization\x12>\n\x10\x64isk_utilization\x18\x0b \x01(\x0b\x32$.google.appengine.v1.DiskUtilization\x12\x44\n\x13network_utilization\x18\x0c \x01(\x0b\x32\'.google.appengine.v1.NetworkUtilization\x12S\n\x1bstandard_scheduler_settings\x18\x14 \x01(\x0b\x32..google.appengine.v1.StandardSchedulerSettings\"V\n\x0c\x42\x61sicScaling\x12/\n\x0cidle_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_instances\x18\x02 \x01(\x05\"\"\n\rManualScaling\x12\x11\n\tinstances\x18\x01 \x01(\x05\"j\n\x0e\x43puUtilization\x12<\n\x19\x61ggregation_window_length\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12target_utilization\x18\x02 \x01(\x01\"a\n\x12RequestUtilization\x12\'\n\x1ftarget_request_count_per_second\x18\x01 \x01(\x05\x12\"\n\x1atarget_concurrent_requests\x18\x02 \x01(\x05\"\xa7\x01\n\x0f\x44iskUtilization\x12%\n\x1dtarget_write_bytes_per_second\x18\x0e \x01(\x05\x12#\n\x1btarget_write_ops_per_second\x18\x0f \x01(\x05\x12$\n\x1ctarget_read_bytes_per_second\x18\x10 \x01(\x05\x12\"\n\x1atarget_read_ops_per_second\x18\x11 \x01(\x05\"\xb8\x01\n\x12NetworkUtilization\x12$\n\x1ctarget_sent_bytes_per_second\x18\x01 \x01(\x05\x12&\n\x1etarget_sent_packets_per_second\x18\x0b \x01(\x05\x12(\n target_received_bytes_per_second\x18\x0c \x01(\x05\x12*\n\"target_received_packets_per_second\x18\r \x01(\x05\"\x90\x01\n\x19StandardSchedulerSettings\x12\x1e\n\x16target_cpu_utilization\x18\x01 \x01(\x01\x12%\n\x1dtarget_throughput_utilization\x18\x02 \x01(\x01\x12\x15\n\rmin_instances\x18\x03 \x01(\x05\x12\x15\n\rmax_instances\x18\x04 \x01(\x05\"y\n\x07Network\x12\x17\n\x0f\x66orwarded_ports\x18\x01 \x03(\t\x12\x14\n\x0cinstance_tag\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x17\n\x0fsubnetwork_name\x18\x04 \x01(\t\x12\x18\n\x10session_affinity\x18\x05 \x01(\x08\"<\n\x06Volume\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0bvolume_type\x18\x02 \x01(\t\x12\x0f\n\x07size_gb\x18\x03 \x01(\x01\"\x85\x01\n\tResources\x12\x0b\n\x03\x63pu\x18\x01 \x01(\x01\x12\x0f\n\x07\x64isk_gb\x18\x02 \x01(\x01\x12\x11\n\tmemory_gb\x18\x03 \x01(\x01\x12,\n\x07volumes\x18\x04 \x03(\x0b\x32\x1b.google.appengine.v1.Volume\x12\x19\n\x11kms_key_reference\x18\x05 \x01(\t\"\xca\x01\n\x12VpcAccessConnector\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x0e\x65gress_setting\x18\x02 \x01(\x0e\x32\x35.google.appengine.v1.VpcAccessConnector.EgressSetting\"W\n\rEgressSetting\x12\x1e\n\x1a\x45GRESS_SETTING_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x01\x12\x15\n\x11PRIVATE_IP_RANGES\x10\x02\"(\n\nEntrypoint\x12\x0f\n\x05shell\x18\x01 \x01(\tH\x00\x42\t\n\x07\x63ommand*\xbb\x02\n\x12InboundServiceType\x12\x1f\n\x1bINBOUND_SERVICE_UNSPECIFIED\x10\x00\x12\x18\n\x14INBOUND_SERVICE_MAIL\x10\x01\x12\x1f\n\x1bINBOUND_SERVICE_MAIL_BOUNCE\x10\x02\x12\x1e\n\x1aINBOUND_SERVICE_XMPP_ERROR\x10\x03\x12 \n\x1cINBOUND_SERVICE_XMPP_MESSAGE\x10\x04\x12\"\n\x1eINBOUND_SERVICE_XMPP_SUBSCRIBE\x10\x05\x12!\n\x1dINBOUND_SERVICE_XMPP_PRESENCE\x10\x06\x12$\n INBOUND_SERVICE_CHANNEL_PRESENCE\x10\x07\x12\x1a\n\x16INBOUND_SERVICE_WARMUP\x10\t*I\n\rServingStatus\x12\x1e\n\x1aSERVING_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0b\n\x07STOPPED\x10\x02\x42\xbd\x01\n\x17\x63om.google.appengine.v1B\x0cVersionProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AppEngine - module V1 - Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Version").msgclass - EndpointsApiService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.EndpointsApiService").msgclass - EndpointsApiService::RolloutStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.EndpointsApiService.RolloutStrategy").enummodule - AutomaticScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AutomaticScaling").msgclass - BasicScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.BasicScaling").msgclass - ManualScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ManualScaling").msgclass - CpuUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CpuUtilization").msgclass - RequestUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.RequestUtilization").msgclass - DiskUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DiskUtilization").msgclass - NetworkUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.NetworkUtilization").msgclass - StandardSchedulerSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.StandardSchedulerSettings").msgclass - Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Network").msgclass - Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Volume").msgclass - Resources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Resources").msgclass - VpcAccessConnector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.VpcAccessConnector").msgclass - VpcAccessConnector::EgressSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.VpcAccessConnector.EgressSetting").enummodule - Entrypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Entrypoint").msgclass - InboundServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.InboundServiceType").enummodule - ServingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ServingStatus").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1.rb deleted file mode 100644 index 1e34509a1be6..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1.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 "google/cloud/app_engine/v1/applications" -require "google/cloud/app_engine/v1/services" -require "google/cloud/app_engine/v1/versions" -require "google/cloud/app_engine/v1/instances" -require "google/cloud/app_engine/v1/firewall" -require "google/cloud/app_engine/v1/authorized_domains" -require "google/cloud/app_engine/v1/authorized_certificates" -require "google/cloud/app_engine/v1/domain_mappings" -require "google/cloud/app_engine/v1/version" - -module Google - module Cloud - module AppEngine - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1" - # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/app_engine/v1" - # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/app_engine/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications.rb deleted file mode 100644 index 53bdcee89de8..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/applications/credentials" -require "google/cloud/app_engine/v1/applications/operations" -require "google/cloud/app_engine/v1/applications/client" -require "google/cloud/app_engine/v1/applications/rest" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages App Engine applications. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1/applications" - # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_engine/v1/applications/rest" - # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - module Applications - end - end - end - end -end - -helper_path = ::File.join __dir__, "applications", "helpers.rb" -require "google/cloud/app_engine/v1/applications/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/client.rb deleted file mode 100644 index 467071085aa8..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/client.rb +++ /dev/null @@ -1,805 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Applications - ## - # Client for the Applications service. - # - # Manages App Engine applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :applications_stub - - ## - # Configure the Applications Client class. - # - # See {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Applications clients - # ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppEngine", "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 Applications Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @applications_stub.universe_domain - end - - ## - # Create a new Applications client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Applications client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/appengine/v1/appengine_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @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 - - @applications_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppEngine::V1::Applications::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @applications_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::Applications::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @applications_stub.logger - end - - # Service calls - - ## - # Gets information about an application. - # - # @overload get_application(request, options = nil) - # Pass arguments to `get_application` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_application(name: nil) - # Pass arguments to `get_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Application resource to get. Example: `apps/myapp`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::Application] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::Application] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Applications::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetApplicationRequest.new - # - # # Call the get_application method. - # result = client.get_application request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::Application. - # p result - # - def get_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @applications_stub.call_rpc :get_application, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an App Engine application for a Google Cloud Platform project. - # Required fields: - # - # * `id` - The ID of the target Cloud Platform project. - # * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. - # - # For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). - # - # @overload create_application(request, options = nil) - # Pass arguments to `create_application` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_application(application: nil) - # Pass arguments to `create_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash] - # Application configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Applications::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateApplicationRequest.new - # - # # Call the create_application method. - # result = client.create_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::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_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @applications_stub.call_rpc :create_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified Application resource. - # You can update the following fields: - # - # * `auth_domain` - Google authentication domain for controlling user access to the application. - # * `default_cookie_expiration` - Cookie expiration policy for the application. - # * `iap` - Identity-Aware Proxy properties for the application. - # - # @overload update_application(request, options = nil) - # Pass arguments to `update_application` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_application(name: nil, application: nil, update_mask: nil) - # Pass arguments to `update_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Application resource to update. Example: `apps/myapp`. - # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash] - # An Application containing the updated resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Standard field mask for the set of fields to 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/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Applications::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new - # - # # Call the update_application method. - # result = client.update_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @applications_stub.call_rpc :update_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Recreates the required App Engine features for the specified App Engine - # application, for example a Cloud Storage bucket or App Engine service - # account. - # Use this method if you receive an error message about a missing feature, - # for example, *Error retrieving the App Engine service account*. - # If you have deleted your App Engine service account, this will - # not be able to recreate it. Instead, you should attempt to use the - # IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . - # If the deletion was recent, the numeric ID can be found in the Cloud - # Console Activity Log. - # - # @overload repair_application(request, options = nil) - # Pass arguments to `repair_application` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::RepairApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::RepairApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload repair_application(name: nil) - # Pass arguments to `repair_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the application to repair. Example: `apps/myapp` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Applications::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::RepairApplicationRequest.new - # - # # Call the repair_application method. - # result = client.repair_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def repair_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::RepairApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.repair_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.repair_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.repair_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @applications_stub.call_rpc :repair_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Applications API. - # - # This class represents the configuration for Applications, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_application to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_application.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_application.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::AppEngine::V1::Applications::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Applications API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_application` - # @return [::Gapic::Config::Method] - # - attr_reader :get_application - ## - # RPC-specific configuration for `create_application` - # @return [::Gapic::Config::Method] - # - attr_reader :create_application - ## - # RPC-specific configuration for `update_application` - # @return [::Gapic::Config::Method] - # - attr_reader :update_application - ## - # RPC-specific configuration for `repair_application` - # @return [::Gapic::Config::Method] - # - attr_reader :repair_application - - # @private - def initialize parent_rpcs = nil - get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application - @get_application = ::Gapic::Config::Method.new get_application_config - create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application - @create_application = ::Gapic::Config::Method.new create_application_config - update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application - @update_application = ::Gapic::Config::Method.new update_application_config - repair_application_config = parent_rpcs.repair_application if parent_rpcs.respond_to? :repair_application - @repair_application = ::Gapic::Config::Method.new repair_application_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/credentials.rb deleted file mode 100644 index ff8a8e28dd45..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/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 AppEngine - module V1 - module Applications - # Credentials for the Applications API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "APP_ENGINE_CREDENTIALS", - "APP_ENGINE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APP_ENGINE_CREDENTIALS_JSON", - "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/applications/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/operations.rb deleted file mode 100644 index 9b48e5fb400f..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Applications - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Applications 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 Applications 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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest.rb deleted file mode 100644 index 66ec09bd82e9..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/applications/credentials" -require "google/cloud/app_engine/v1/applications/rest/operations" -require "google/cloud/app_engine/v1/applications/rest/client" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages App Engine applications. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_engine/v1/applications/rest" - # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - module Applications - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_engine/v1/applications/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/client.rb deleted file mode 100644 index 643976d7873e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/client.rb +++ /dev/null @@ -1,742 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/applications/rest/service_stub" - -module Google - module Cloud - module AppEngine - module V1 - module Applications - module Rest - ## - # REST client for the Applications service. - # - # Manages App Engine applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :applications_stub - - ## - # Configure the Applications Client class. - # - # See {::Google::Cloud::AppEngine::V1::Applications::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Applications clients - # ::Google::Cloud::AppEngine::V1::Applications::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", "AppEngine", "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 Applications Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Applications::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 - @applications_stub.universe_domain - end - - ## - # Create a new Applications REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Applications 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::AppEngine::V1::Applications::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 - - @applications_stub = ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @applications_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::Applications::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @applications_stub.logger - end - - # Service calls - - ## - # Gets information about an application. - # - # @overload get_application(request, options = nil) - # Pass arguments to `get_application` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_application(name: nil) - # Pass arguments to `get_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Application resource to get. Example: `apps/myapp`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::Application] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::Application] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetApplicationRequest.new - # - # # Call the get_application method. - # result = client.get_application request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::Application. - # p result - # - def get_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @applications_stub.get_application request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an App Engine application for a Google Cloud Platform project. - # Required fields: - # - # * `id` - The ID of the target Cloud Platform project. - # * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. - # - # For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/). - # - # @overload create_application(request, options = nil) - # Pass arguments to `create_application` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_application(application: nil) - # Pass arguments to `create_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash] - # Application configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateApplicationRequest.new - # - # # Call the create_application method. - # result = client.create_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @applications_stub.create_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified Application resource. - # You can update the following fields: - # - # * `auth_domain` - Google authentication domain for controlling user access to the application. - # * `default_cookie_expiration` - Cookie expiration policy for the application. - # * `iap` - Identity-Aware Proxy properties for the application. - # - # @overload update_application(request, options = nil) - # Pass arguments to `update_application` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_application(name: nil, application: nil, update_mask: nil) - # Pass arguments to `update_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Application resource to update. Example: `apps/myapp`. - # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash] - # An Application containing the updated resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Standard field mask for the set of fields to 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/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new - # - # # Call the update_application method. - # result = client.update_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @applications_stub.update_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Recreates the required App Engine features for the specified App Engine - # application, for example a Cloud Storage bucket or App Engine service - # account. - # Use this method if you receive an error message about a missing feature, - # for example, *Error retrieving the App Engine service account*. - # If you have deleted your App Engine service account, this will - # not be able to recreate it. Instead, you should attempt to use the - # IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . - # If the deletion was recent, the numeric ID can be found in the Cloud - # Console Activity Log. - # - # @overload repair_application(request, options = nil) - # Pass arguments to `repair_application` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::RepairApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::RepairApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload repair_application(name: nil) - # Pass arguments to `repair_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the application to repair. Example: `apps/myapp` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::RepairApplicationRequest.new - # - # # Call the repair_application method. - # result = client.repair_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def repair_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::RepairApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.repair_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.repair_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.repair_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @applications_stub.repair_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Applications REST API. - # - # This class represents the configuration for Applications REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Applications::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_application to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_application.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_application.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Applications API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_application` - # @return [::Gapic::Config::Method] - # - attr_reader :get_application - ## - # RPC-specific configuration for `create_application` - # @return [::Gapic::Config::Method] - # - attr_reader :create_application - ## - # RPC-specific configuration for `update_application` - # @return [::Gapic::Config::Method] - # - attr_reader :update_application - ## - # RPC-specific configuration for `repair_application` - # @return [::Gapic::Config::Method] - # - attr_reader :repair_application - - # @private - def initialize parent_rpcs = nil - get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application - @get_application = ::Gapic::Config::Method.new get_application_config - create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application - @create_application = ::Gapic::Config::Method.new create_application_config - update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application - @update_application = ::Gapic::Config::Method.new update_application_config - repair_application_config = parent_rpcs.repair_application if parent_rpcs.respond_to? :repair_application - @repair_application = ::Gapic::Config::Method.new repair_application_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/operations.rb deleted file mode 100644 index e856615a232e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AppEngine - module V1 - module Applications - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Applications 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 Applications 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb deleted file mode 100644 index c643100535ef..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb +++ /dev/null @@ -1,326 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Applications - module Rest - ## - # REST service stub for the Applications 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_application REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::Application] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::Application] - # A result object deserialized from the server's reply - def get_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::Application.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_application REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_application REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the repair_application REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::RepairApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def repair_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_repair_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "repair_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_application REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_application REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/apps", - body: "application", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_application REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "application", - matches: [ - ["name", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the repair_application REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::RepairApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_repair_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:repair", - body: "*", - matches: [ - ["name", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates.rb deleted file mode 100644 index 85935d78cddf..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/authorized_certificates/credentials" -require "google/cloud/app_engine/v1/authorized_certificates/client" -require "google/cloud/app_engine/v1/authorized_certificates/rest" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages SSL certificates a user is authorized to administer. A user can - # administer any SSL certificates applicable to their authorized domains. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1/authorized_certificates" - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_engine/v1/authorized_certificates/rest" - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new - # - module AuthorizedCertificates - end - end - end - end -end - -helper_path = ::File.join __dir__, "authorized_certificates", "helpers.rb" -require "google/cloud/app_engine/v1/authorized_certificates/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb deleted file mode 100644 index 9d971ae005d8..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb +++ /dev/null @@ -1,870 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module AuthorizedCertificates - ## - # Client for the AuthorizedCertificates service. - # - # Manages SSL certificates a user is authorized to administer. A user can - # administer any SSL certificates applicable to their authorized domains. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :authorized_certificates_stub - - ## - # Configure the AuthorizedCertificates Client class. - # - # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AuthorizedCertificates clients - # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppEngine", "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 AuthorizedCertificates Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @authorized_certificates_stub.universe_domain - end - - ## - # Create a new AuthorizedCertificates client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AuthorizedCertificates client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/appengine/v1/appengine_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @authorized_certificates_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @authorized_certificates_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.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 - @authorized_certificates_stub.logger - end - - # Service calls - - ## - # Lists all SSL certificates the user is authorized to administer. - # - # @overload list_authorized_certificates(request, options = nil) - # Pass arguments to `list_authorized_certificates` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_authorized_certificates(parent: nil, view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_authorized_certificates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent `Application` resource. Example: `apps/myapp`. - # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] - # Controls the set of fields returned in the `LIST` response. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new - # - # # Call the list_authorized_certificates method. - # result = client.list_authorized_certificates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedCertificate. - # p item - # end - # - def list_authorized_certificates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_authorized_certificates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_authorized_certificates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_authorized_certificates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.call_rpc :list_authorized_certificates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @authorized_certificates_stub, :list_authorized_certificates, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the specified SSL certificate. - # - # @overload get_authorized_certificate(request, options = nil) - # Pass arguments to `get_authorized_certificate` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_authorized_certificate(name: nil, view: nil) - # Pass arguments to `get_authorized_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/authorizedCertificates/12345`. - # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] - # Controls the set of fields returned in the `GET` response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new - # - # # Call the get_authorized_certificate method. - # result = client.get_authorized_certificate request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - # p result - # - def get_authorized_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_authorized_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_authorized_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_authorized_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.call_rpc :get_authorized_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Uploads the specified SSL certificate. - # - # @overload create_authorized_certificate(request, options = nil) - # Pass arguments to `create_authorized_certificate` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_authorized_certificate(parent: nil, certificate: nil) - # Pass arguments to `create_authorized_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent `Application` resource. Example: `apps/myapp`. - # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash] - # SSL certificate data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new - # - # # Call the create_authorized_certificate method. - # result = client.create_authorized_certificate request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - # p result - # - def create_authorized_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_authorized_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_authorized_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_authorized_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.call_rpc :create_authorized_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified SSL certificate. To renew a certificate and maintain - # its existing domain mappings, update `certificate_data` with a new - # certificate. The new certificate must be applicable to the same domains as - # the original certificate. The certificate `display_name` may also be - # updated. - # - # @overload update_authorized_certificate(request, options = nil) - # Pass arguments to `update_authorized_certificate` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_authorized_certificate(name: nil, certificate: nil, update_mask: nil) - # Pass arguments to `update_authorized_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to update. Example: - # `apps/myapp/authorizedCertificates/12345`. - # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash] - # An `AuthorizedCertificate` containing the updated resource. Only fields set - # in the field mask will be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. Updates are only - # supported on the `certificate_raw_data` and `display_name` fields. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new - # - # # Call the update_authorized_certificate method. - # result = client.update_authorized_certificate request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - # p result - # - def update_authorized_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_authorized_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_authorized_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_authorized_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.call_rpc :update_authorized_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified SSL certificate. - # - # @overload delete_authorized_certificate(request, options = nil) - # Pass arguments to `delete_authorized_certificate` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_authorized_certificate(name: nil) - # Pass arguments to `delete_authorized_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to delete. Example: - # `apps/myapp/authorizedCertificates/12345`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new - # - # # Call the delete_authorized_certificate method. - # result = client.delete_authorized_certificate request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_authorized_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_authorized_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_authorized_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_authorized_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.call_rpc :delete_authorized_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AuthorizedCertificates API. - # - # This class represents the configuration for AuthorizedCertificates, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_authorized_certificates to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_authorized_certificates.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_authorized_certificates.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AuthorizedCertificates API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_authorized_certificates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_authorized_certificates - ## - # RPC-specific configuration for `get_authorized_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_authorized_certificate - ## - # RPC-specific configuration for `create_authorized_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_authorized_certificate - ## - # RPC-specific configuration for `update_authorized_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_authorized_certificate - ## - # RPC-specific configuration for `delete_authorized_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_authorized_certificate - - # @private - def initialize parent_rpcs = nil - list_authorized_certificates_config = parent_rpcs.list_authorized_certificates if parent_rpcs.respond_to? :list_authorized_certificates - @list_authorized_certificates = ::Gapic::Config::Method.new list_authorized_certificates_config - get_authorized_certificate_config = parent_rpcs.get_authorized_certificate if parent_rpcs.respond_to? :get_authorized_certificate - @get_authorized_certificate = ::Gapic::Config::Method.new get_authorized_certificate_config - create_authorized_certificate_config = parent_rpcs.create_authorized_certificate if parent_rpcs.respond_to? :create_authorized_certificate - @create_authorized_certificate = ::Gapic::Config::Method.new create_authorized_certificate_config - update_authorized_certificate_config = parent_rpcs.update_authorized_certificate if parent_rpcs.respond_to? :update_authorized_certificate - @update_authorized_certificate = ::Gapic::Config::Method.new update_authorized_certificate_config - delete_authorized_certificate_config = parent_rpcs.delete_authorized_certificate if parent_rpcs.respond_to? :delete_authorized_certificate - @delete_authorized_certificate = ::Gapic::Config::Method.new delete_authorized_certificate_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/credentials.rb deleted file mode 100644 index d7c3c73c7dcc..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/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 AppEngine - module V1 - module AuthorizedCertificates - # Credentials for the AuthorizedCertificates API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "APP_ENGINE_CREDENTIALS", - "APP_ENGINE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APP_ENGINE_CREDENTIALS_JSON", - "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb deleted file mode 100644 index fba197657d0e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/authorized_certificates/credentials" -require "google/cloud/app_engine/v1/authorized_certificates/rest/client" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages SSL certificates a user is authorized to administer. A user can - # administer any SSL certificates applicable to their authorized domains. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_engine/v1/authorized_certificates/rest" - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new - # - module AuthorizedCertificates - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_engine/v1/authorized_certificates/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb deleted file mode 100644 index 4dbafd6cac6d..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb +++ /dev/null @@ -1,792 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/authorized_certificates/rest/service_stub" - -module Google - module Cloud - module AppEngine - module V1 - module AuthorizedCertificates - module Rest - ## - # REST client for the AuthorizedCertificates service. - # - # Manages SSL certificates a user is authorized to administer. A user can - # administer any SSL certificates applicable to their authorized domains. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :authorized_certificates_stub - - ## - # Configure the AuthorizedCertificates Client class. - # - # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AuthorizedCertificates clients - # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::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", "AppEngine", "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 AuthorizedCertificates Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::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 - @authorized_certificates_stub.universe_domain - end - - ## - # Create a new AuthorizedCertificates REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AuthorizedCertificates 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 - - @authorized_certificates_stub = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @authorized_certificates_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 - @authorized_certificates_stub.logger - end - - # Service calls - - ## - # Lists all SSL certificates the user is authorized to administer. - # - # @overload list_authorized_certificates(request, options = nil) - # Pass arguments to `list_authorized_certificates` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_authorized_certificates(parent: nil, view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_authorized_certificates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent `Application` resource. Example: `apps/myapp`. - # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] - # Controls the set of fields returned in the `LIST` response. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new - # - # # Call the list_authorized_certificates method. - # result = client.list_authorized_certificates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedCertificate. - # p item - # end - # - def list_authorized_certificates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_authorized_certificates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_authorized_certificates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_authorized_certificates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.list_authorized_certificates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @authorized_certificates_stub, :list_authorized_certificates, "certificates", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the specified SSL certificate. - # - # @overload get_authorized_certificate(request, options = nil) - # Pass arguments to `get_authorized_certificate` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_authorized_certificate(name: nil, view: nil) - # Pass arguments to `get_authorized_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/authorizedCertificates/12345`. - # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] - # Controls the set of fields returned in the `GET` response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new - # - # # Call the get_authorized_certificate method. - # result = client.get_authorized_certificate request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - # p result - # - def get_authorized_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_authorized_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_authorized_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_authorized_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.get_authorized_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Uploads the specified SSL certificate. - # - # @overload create_authorized_certificate(request, options = nil) - # Pass arguments to `create_authorized_certificate` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_authorized_certificate(parent: nil, certificate: nil) - # Pass arguments to `create_authorized_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent `Application` resource. Example: `apps/myapp`. - # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash] - # SSL certificate data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new - # - # # Call the create_authorized_certificate method. - # result = client.create_authorized_certificate request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - # p result - # - def create_authorized_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_authorized_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_authorized_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_authorized_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.create_authorized_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified SSL certificate. To renew a certificate and maintain - # its existing domain mappings, update `certificate_data` with a new - # certificate. The new certificate must be applicable to the same domains as - # the original certificate. The certificate `display_name` may also be - # updated. - # - # @overload update_authorized_certificate(request, options = nil) - # Pass arguments to `update_authorized_certificate` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_authorized_certificate(name: nil, certificate: nil, update_mask: nil) - # Pass arguments to `update_authorized_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to update. Example: - # `apps/myapp/authorizedCertificates/12345`. - # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash] - # An `AuthorizedCertificate` containing the updated resource. Only fields set - # in the field mask will be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. Updates are only - # supported on the `certificate_raw_data` and `display_name` fields. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new - # - # # Call the update_authorized_certificate method. - # result = client.update_authorized_certificate request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - # p result - # - def update_authorized_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_authorized_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_authorized_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_authorized_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.update_authorized_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified SSL certificate. - # - # @overload delete_authorized_certificate(request, options = nil) - # Pass arguments to `delete_authorized_certificate` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_authorized_certificate(name: nil) - # Pass arguments to `delete_authorized_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to delete. Example: - # `apps/myapp/authorizedCertificates/12345`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new - # - # # Call the delete_authorized_certificate method. - # result = client.delete_authorized_certificate request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_authorized_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_authorized_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_authorized_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_authorized_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_certificates_stub.delete_authorized_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AuthorizedCertificates REST API. - # - # This class represents the configuration for AuthorizedCertificates REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_authorized_certificates to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_authorized_certificates.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_authorized_certificates.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AuthorizedCertificates API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_authorized_certificates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_authorized_certificates - ## - # RPC-specific configuration for `get_authorized_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_authorized_certificate - ## - # RPC-specific configuration for `create_authorized_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_authorized_certificate - ## - # RPC-specific configuration for `update_authorized_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_authorized_certificate - ## - # RPC-specific configuration for `delete_authorized_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_authorized_certificate - - # @private - def initialize parent_rpcs = nil - list_authorized_certificates_config = parent_rpcs.list_authorized_certificates if parent_rpcs.respond_to? :list_authorized_certificates - @list_authorized_certificates = ::Gapic::Config::Method.new list_authorized_certificates_config - get_authorized_certificate_config = parent_rpcs.get_authorized_certificate if parent_rpcs.respond_to? :get_authorized_certificate - @get_authorized_certificate = ::Gapic::Config::Method.new get_authorized_certificate_config - create_authorized_certificate_config = parent_rpcs.create_authorized_certificate if parent_rpcs.respond_to? :create_authorized_certificate - @create_authorized_certificate = ::Gapic::Config::Method.new create_authorized_certificate_config - update_authorized_certificate_config = parent_rpcs.update_authorized_certificate if parent_rpcs.respond_to? :update_authorized_certificate - @update_authorized_certificate = ::Gapic::Config::Method.new update_authorized_certificate_config - delete_authorized_certificate_config = parent_rpcs.delete_authorized_certificate if parent_rpcs.respond_to? :delete_authorized_certificate - @delete_authorized_certificate = ::Gapic::Config::Method.new delete_authorized_certificate_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/rest/service_stub.rb deleted file mode 100644 index b9b35fbb6413..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_certificates/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/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module AuthorizedCertificates - module Rest - ## - # REST service stub for the AuthorizedCertificates 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_authorized_certificates REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse] - # A result object deserialized from the server's reply - def list_authorized_certificates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_authorized_certificates_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_authorized_certificates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_authorized_certificate REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # A result object deserialized from the server's reply - def get_authorized_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_authorized_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_authorized_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.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_authorized_certificate REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # A result object deserialized from the server's reply - def create_authorized_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_authorized_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_authorized_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_authorized_certificate REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # A result object deserialized from the server's reply - def update_authorized_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_authorized_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_authorized_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_authorized_certificate REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_authorized_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_authorized_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_authorized_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_authorized_certificates REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_authorized_certificates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/authorizedCertificates", - matches: [ - ["parent", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_authorized_certificate REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_authorized_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/authorizedCertificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_authorized_certificate REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_authorized_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/authorizedCertificates", - body: "certificate", - matches: [ - ["parent", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_authorized_certificate REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_authorized_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "certificate", - matches: [ - ["name", %r{^apps/[^/]+/authorizedCertificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_authorized_certificate REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_authorized_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/authorizedCertificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains.rb deleted file mode 100644 index dad8ef13cedb..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/authorized_domains/credentials" -require "google/cloud/app_engine/v1/authorized_domains/client" -require "google/cloud/app_engine/v1/authorized_domains/rest" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages domains a user is authorized to administer. To authorize use of a - # domain, verify ownership via - # [Webmaster Central](https://www.google.com/webmasters/verification/home). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1/authorized_domains" - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_engine/v1/authorized_domains/rest" - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new - # - module AuthorizedDomains - end - end - end - end -end - -helper_path = ::File.join __dir__, "authorized_domains", "helpers.rb" -require "google/cloud/app_engine/v1/authorized_domains/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/client.rb deleted file mode 100644 index 108cdcdc7dcf..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/client.rb +++ /dev/null @@ -1,484 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module AuthorizedDomains - ## - # Client for the AuthorizedDomains service. - # - # Manages domains a user is authorized to administer. To authorize use of a - # domain, verify ownership via - # [Webmaster Central](https://www.google.com/webmasters/verification/home). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :authorized_domains_stub - - ## - # Configure the AuthorizedDomains Client class. - # - # See {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AuthorizedDomains clients - # ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppEngine", "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 AuthorizedDomains Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @authorized_domains_stub.universe_domain - end - - ## - # Create a new AuthorizedDomains client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AuthorizedDomains client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/appengine/v1/appengine_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @authorized_domains_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @authorized_domains_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.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 - @authorized_domains_stub.logger - end - - # Service calls - - ## - # Lists all domains the user is authorized to administer. - # - # @overload list_authorized_domains(request, options = nil) - # Pass arguments to `list_authorized_domains` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_authorized_domains(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_authorized_domains` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new - # - # # Call the list_authorized_domains method. - # result = client.list_authorized_domains request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedDomain. - # p item - # end - # - def list_authorized_domains request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_authorized_domains.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_authorized_domains.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_authorized_domains.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_domains_stub.call_rpc :list_authorized_domains, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @authorized_domains_stub, :list_authorized_domains, request, response, 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 AuthorizedDomains API. - # - # This class represents the configuration for AuthorizedDomains, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_authorized_domains to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_authorized_domains.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_authorized_domains.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::AppEngine::V1::AuthorizedDomains::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AuthorizedDomains API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_authorized_domains` - # @return [::Gapic::Config::Method] - # - attr_reader :list_authorized_domains - - # @private - def initialize parent_rpcs = nil - list_authorized_domains_config = parent_rpcs.list_authorized_domains if parent_rpcs.respond_to? :list_authorized_domains - @list_authorized_domains = ::Gapic::Config::Method.new list_authorized_domains_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/credentials.rb deleted file mode 100644 index 36cd39714e5e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/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 AppEngine - module V1 - module AuthorizedDomains - # Credentials for the AuthorizedDomains API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "APP_ENGINE_CREDENTIALS", - "APP_ENGINE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APP_ENGINE_CREDENTIALS_JSON", - "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb deleted file mode 100644 index 37c22b4ca21d..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/authorized_domains/credentials" -require "google/cloud/app_engine/v1/authorized_domains/rest/client" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages domains a user is authorized to administer. To authorize use of a - # domain, verify ownership via - # [Webmaster Central](https://www.google.com/webmasters/verification/home). - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_engine/v1/authorized_domains/rest" - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new - # - module AuthorizedDomains - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_engine/v1/authorized_domains/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.rb deleted file mode 100644 index a43cb403846f..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.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 "google/cloud/errors" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/authorized_domains/rest/service_stub" - -module Google - module Cloud - module AppEngine - module V1 - module AuthorizedDomains - module Rest - ## - # REST client for the AuthorizedDomains service. - # - # Manages domains a user is authorized to administer. To authorize use of a - # domain, verify ownership via - # [Webmaster Central](https://www.google.com/webmasters/verification/home). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :authorized_domains_stub - - ## - # Configure the AuthorizedDomains Client class. - # - # See {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AuthorizedDomains clients - # ::Google::Cloud::AppEngine::V1::AuthorizedDomains::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", "AppEngine", "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 AuthorizedDomains Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::AuthorizedDomains::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 - @authorized_domains_stub.universe_domain - end - - ## - # Create a new AuthorizedDomains REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AuthorizedDomains 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 - - @authorized_domains_stub = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @authorized_domains_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 - @authorized_domains_stub.logger - end - - # Service calls - - ## - # Lists all domains the user is authorized to administer. - # - # @overload list_authorized_domains(request, options = nil) - # Pass arguments to `list_authorized_domains` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_authorized_domains(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_authorized_domains` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new - # - # # Call the list_authorized_domains method. - # result = client.list_authorized_domains request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedDomain. - # p item - # end - # - def list_authorized_domains request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_authorized_domains.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_authorized_domains.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_authorized_domains.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @authorized_domains_stub.list_authorized_domains request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @authorized_domains_stub, :list_authorized_domains, "domains", request, result, 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 AuthorizedDomains REST API. - # - # This class represents the configuration for AuthorizedDomains REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_authorized_domains to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_authorized_domains.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_authorized_domains.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AuthorizedDomains API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_authorized_domains` - # @return [::Gapic::Config::Method] - # - attr_reader :list_authorized_domains - - # @private - def initialize parent_rpcs = nil - list_authorized_domains_config = parent_rpcs.list_authorized_domains if parent_rpcs.respond_to? :list_authorized_domains - @list_authorized_domains = ::Gapic::Config::Method.new list_authorized_domains_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/rest/service_stub.rb deleted file mode 100644 index c291e2080aa7..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/authorized_domains/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/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module AuthorizedDomains - module Rest - ## - # REST service stub for the AuthorizedDomains 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_authorized_domains REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse] - # A result object deserialized from the server's reply - def list_authorized_domains request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_authorized_domains_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_authorized_domains", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse.decode_json response.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_authorized_domains REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_authorized_domains_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/authorizedDomains", - matches: [ - ["parent", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings.rb deleted file mode 100644 index b0b67fa8bd56..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/domain_mappings/credentials" -require "google/cloud/app_engine/v1/domain_mappings/operations" -require "google/cloud/app_engine/v1/domain_mappings/client" -require "google/cloud/app_engine/v1/domain_mappings/rest" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages domains serving an application. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1/domain_mappings" - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_engine/v1/domain_mappings/rest" - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new - # - module DomainMappings - end - end - end - end -end - -helper_path = ::File.join __dir__, "domain_mappings", "helpers.rb" -require "google/cloud/app_engine/v1/domain_mappings/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/client.rb deleted file mode 100644 index a10fe918d650..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/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/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module DomainMappings - ## - # Client for the DomainMappings service. - # - # Manages domains serving an application. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :domain_mappings_stub - - ## - # Configure the DomainMappings Client class. - # - # See {::Google::Cloud::AppEngine::V1::DomainMappings::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DomainMappings clients - # ::Google::Cloud::AppEngine::V1::DomainMappings::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppEngine", "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 DomainMappings Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::DomainMappings::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @domain_mappings_stub.universe_domain - end - - ## - # Create a new DomainMappings client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DomainMappings client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/appengine/v1/appengine_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @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 - - @domain_mappings_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppEngine::V1::DomainMappings::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @domain_mappings_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::DomainMappings::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @domain_mappings_stub.logger - end - - # Service calls - - ## - # Lists the domain mappings on an application. - # - # @overload list_domain_mappings(request, options = nil) - # Pass arguments to `list_domain_mappings` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_domain_mappings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_domain_mappings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new - # - # # Call the list_domain_mappings method. - # result = client.list_domain_mappings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::DomainMapping. - # p item - # end - # - def list_domain_mappings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_domain_mappings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_domain_mappings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_domain_mappings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.call_rpc :list_domain_mappings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @domain_mappings_stub, :list_domain_mappings, request, response, 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 specified domain mapping. - # - # @overload get_domain_mapping(request, options = nil) - # Pass arguments to `get_domain_mapping` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetDomainMappingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_domain_mapping(name: nil) - # Pass arguments to `get_domain_mapping` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/domainMappings/example.com`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::DomainMapping] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::DomainMapping] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new - # - # # Call the get_domain_mapping method. - # result = client.get_domain_mapping request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::DomainMapping. - # p result - # - def get_domain_mapping request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_domain_mapping.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_domain_mapping.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_domain_mapping.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.call_rpc :get_domain_mapping, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Maps a domain to an application. A user must be authorized to administer a - # domain in order to map it to an application. For a list of available - # authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`](). - # - # @overload create_domain_mapping(request, options = nil) - # Pass arguments to `create_domain_mapping` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_domain_mapping(parent: nil, domain_mapping: nil, override_strategy: nil) - # Pass arguments to `create_domain_mapping` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @param domain_mapping [::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash] - # Domain mapping configuration. - # @param override_strategy [::Google::Cloud::AppEngine::V1::DomainOverrideStrategy] - # Whether the domain creation should override any existing mappings for this - # domain. By default, overrides are rejected. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new - # - # # Call the create_domain_mapping method. - # result = client.create_domain_mapping request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_domain_mapping request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_domain_mapping.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_domain_mapping.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_domain_mapping.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.call_rpc :create_domain_mapping, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 domain mapping. To map an SSL certificate to a - # domain mapping, update `certificate_id` to point to an `AuthorizedCertificate` - # resource. A user must be authorized to administer the associated domain - # in order to update a `DomainMapping` resource. - # - # @overload update_domain_mapping(request, options = nil) - # Pass arguments to `update_domain_mapping` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_domain_mapping(name: nil, domain_mapping: nil, update_mask: nil) - # Pass arguments to `update_domain_mapping` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to update. Example: - # `apps/myapp/domainMappings/example.com`. - # @param domain_mapping [::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash] - # A domain mapping containing the updated resource. Only fields set - # in the field mask will be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Standard field mask for the set of fields to 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/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new - # - # # Call the update_domain_mapping method. - # result = client.update_domain_mapping request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_domain_mapping request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_domain_mapping.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_domain_mapping.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_domain_mapping.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.call_rpc :update_domain_mapping, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 domain mapping. A user must be authorized to - # administer the associated domain in order to delete a `DomainMapping` - # resource. - # - # @overload delete_domain_mapping(request, options = nil) - # Pass arguments to `delete_domain_mapping` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_domain_mapping(name: nil) - # Pass arguments to `delete_domain_mapping` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to delete. Example: - # `apps/myapp/domainMappings/example.com`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new - # - # # Call the delete_domain_mapping method. - # result = client.delete_domain_mapping request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_domain_mapping request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_domain_mapping.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_domain_mapping.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_domain_mapping.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.call_rpc :delete_domain_mapping, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 DomainMappings API. - # - # This class represents the configuration for DomainMappings, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::DomainMappings::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_domain_mappings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::DomainMappings::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_domain_mappings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_domain_mappings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::AppEngine::V1::DomainMappings::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DomainMappings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_domain_mappings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_domain_mappings - ## - # RPC-specific configuration for `get_domain_mapping` - # @return [::Gapic::Config::Method] - # - attr_reader :get_domain_mapping - ## - # RPC-specific configuration for `create_domain_mapping` - # @return [::Gapic::Config::Method] - # - attr_reader :create_domain_mapping - ## - # RPC-specific configuration for `update_domain_mapping` - # @return [::Gapic::Config::Method] - # - attr_reader :update_domain_mapping - ## - # RPC-specific configuration for `delete_domain_mapping` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_domain_mapping - - # @private - def initialize parent_rpcs = nil - list_domain_mappings_config = parent_rpcs.list_domain_mappings if parent_rpcs.respond_to? :list_domain_mappings - @list_domain_mappings = ::Gapic::Config::Method.new list_domain_mappings_config - get_domain_mapping_config = parent_rpcs.get_domain_mapping if parent_rpcs.respond_to? :get_domain_mapping - @get_domain_mapping = ::Gapic::Config::Method.new get_domain_mapping_config - create_domain_mapping_config = parent_rpcs.create_domain_mapping if parent_rpcs.respond_to? :create_domain_mapping - @create_domain_mapping = ::Gapic::Config::Method.new create_domain_mapping_config - update_domain_mapping_config = parent_rpcs.update_domain_mapping if parent_rpcs.respond_to? :update_domain_mapping - @update_domain_mapping = ::Gapic::Config::Method.new update_domain_mapping_config - delete_domain_mapping_config = parent_rpcs.delete_domain_mapping if parent_rpcs.respond_to? :delete_domain_mapping - @delete_domain_mapping = ::Gapic::Config::Method.new delete_domain_mapping_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/credentials.rb deleted file mode 100644 index 17e07ea08acd..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/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 AppEngine - module V1 - module DomainMappings - # Credentials for the DomainMappings API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "APP_ENGINE_CREDENTIALS", - "APP_ENGINE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APP_ENGINE_CREDENTIALS_JSON", - "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb deleted file mode 100644 index 58837c3b66d2..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AppEngine - module V1 - module DomainMappings - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DomainMappings 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 DomainMappings 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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb deleted file mode 100644 index ffc634e03369..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/domain_mappings/credentials" -require "google/cloud/app_engine/v1/domain_mappings/rest/operations" -require "google/cloud/app_engine/v1/domain_mappings/rest/client" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages domains serving an application. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_engine/v1/domain_mappings/rest" - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new - # - module DomainMappings - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_engine/v1/domain_mappings/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb deleted file mode 100644 index 0995917b09e5..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb +++ /dev/null @@ -1,833 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/domain_mappings/rest/service_stub" - -module Google - module Cloud - module AppEngine - module V1 - module DomainMappings - module Rest - ## - # REST client for the DomainMappings service. - # - # Manages domains serving an application. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :domain_mappings_stub - - ## - # Configure the DomainMappings Client class. - # - # See {::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DomainMappings clients - # ::Google::Cloud::AppEngine::V1::DomainMappings::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", "AppEngine", "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 DomainMappings Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::DomainMappings::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 - @domain_mappings_stub.universe_domain - end - - ## - # Create a new DomainMappings REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DomainMappings 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::AppEngine::V1::DomainMappings::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 - - @domain_mappings_stub = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @domain_mappings_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @domain_mappings_stub.logger - end - - # Service calls - - ## - # Lists the domain mappings on an application. - # - # @overload list_domain_mappings(request, options = nil) - # Pass arguments to `list_domain_mappings` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_domain_mappings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_domain_mappings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::DomainMapping>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new - # - # # Call the list_domain_mappings method. - # result = client.list_domain_mappings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::DomainMapping. - # p item - # end - # - def list_domain_mappings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_domain_mappings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_domain_mappings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_domain_mappings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.list_domain_mappings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @domain_mappings_stub, :list_domain_mappings, "domain_mappings", request, result, options - 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 specified domain mapping. - # - # @overload get_domain_mapping(request, options = nil) - # Pass arguments to `get_domain_mapping` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetDomainMappingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_domain_mapping(name: nil) - # Pass arguments to `get_domain_mapping` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/domainMappings/example.com`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::DomainMapping] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::DomainMapping] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new - # - # # Call the get_domain_mapping method. - # result = client.get_domain_mapping request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::DomainMapping. - # p result - # - def get_domain_mapping request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_domain_mapping.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_domain_mapping.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_domain_mapping.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.get_domain_mapping request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Maps a domain to an application. A user must be authorized to administer a - # domain in order to map it to an application. For a list of available - # authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`](). - # - # @overload create_domain_mapping(request, options = nil) - # Pass arguments to `create_domain_mapping` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_domain_mapping(parent: nil, domain_mapping: nil, override_strategy: nil) - # Pass arguments to `create_domain_mapping` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @param domain_mapping [::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash] - # Domain mapping configuration. - # @param override_strategy [::Google::Cloud::AppEngine::V1::DomainOverrideStrategy] - # Whether the domain creation should override any existing mappings for this - # domain. By default, overrides are rejected. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new - # - # # Call the create_domain_mapping method. - # result = client.create_domain_mapping request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_domain_mapping request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_domain_mapping.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_domain_mapping.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_domain_mapping.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.create_domain_mapping request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 domain mapping. To map an SSL certificate to a - # domain mapping, update `certificate_id` to point to an `AuthorizedCertificate` - # resource. A user must be authorized to administer the associated domain - # in order to update a `DomainMapping` resource. - # - # @overload update_domain_mapping(request, options = nil) - # Pass arguments to `update_domain_mapping` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_domain_mapping(name: nil, domain_mapping: nil, update_mask: nil) - # Pass arguments to `update_domain_mapping` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to update. Example: - # `apps/myapp/domainMappings/example.com`. - # @param domain_mapping [::Google::Cloud::AppEngine::V1::DomainMapping, ::Hash] - # A domain mapping containing the updated resource. Only fields set - # in the field mask will be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Standard field mask for the set of fields to 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/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new - # - # # Call the update_domain_mapping method. - # result = client.update_domain_mapping request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_domain_mapping request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_domain_mapping.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_domain_mapping.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_domain_mapping.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.update_domain_mapping request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 domain mapping. A user must be authorized to - # administer the associated domain in order to delete a `DomainMapping` - # resource. - # - # @overload delete_domain_mapping(request, options = nil) - # Pass arguments to `delete_domain_mapping` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_domain_mapping(name: nil) - # Pass arguments to `delete_domain_mapping` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to delete. Example: - # `apps/myapp/domainMappings/example.com`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new - # - # # Call the delete_domain_mapping method. - # result = client.delete_domain_mapping request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_domain_mapping request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_domain_mapping.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_domain_mapping.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_domain_mapping.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @domain_mappings_stub.delete_domain_mapping request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 DomainMappings REST API. - # - # This class represents the configuration for DomainMappings REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_domain_mappings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_domain_mappings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_domain_mappings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DomainMappings API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_domain_mappings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_domain_mappings - ## - # RPC-specific configuration for `get_domain_mapping` - # @return [::Gapic::Config::Method] - # - attr_reader :get_domain_mapping - ## - # RPC-specific configuration for `create_domain_mapping` - # @return [::Gapic::Config::Method] - # - attr_reader :create_domain_mapping - ## - # RPC-specific configuration for `update_domain_mapping` - # @return [::Gapic::Config::Method] - # - attr_reader :update_domain_mapping - ## - # RPC-specific configuration for `delete_domain_mapping` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_domain_mapping - - # @private - def initialize parent_rpcs = nil - list_domain_mappings_config = parent_rpcs.list_domain_mappings if parent_rpcs.respond_to? :list_domain_mappings - @list_domain_mappings = ::Gapic::Config::Method.new list_domain_mappings_config - get_domain_mapping_config = parent_rpcs.get_domain_mapping if parent_rpcs.respond_to? :get_domain_mapping - @get_domain_mapping = ::Gapic::Config::Method.new get_domain_mapping_config - create_domain_mapping_config = parent_rpcs.create_domain_mapping if parent_rpcs.respond_to? :create_domain_mapping - @create_domain_mapping = ::Gapic::Config::Method.new create_domain_mapping_config - update_domain_mapping_config = parent_rpcs.update_domain_mapping if parent_rpcs.respond_to? :update_domain_mapping - @update_domain_mapping = ::Gapic::Config::Method.new update_domain_mapping_config - delete_domain_mapping_config = parent_rpcs.delete_domain_mapping if parent_rpcs.respond_to? :delete_domain_mapping - @delete_domain_mapping = ::Gapic::Config::Method.new delete_domain_mapping_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb deleted file mode 100644 index 40e80dc5ac21..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AppEngine - module V1 - module DomainMappings - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DomainMappings 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 DomainMappings 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/rest/service_stub.rb deleted file mode 100644 index 010f03d185ef..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/domain_mappings/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/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module DomainMappings - module Rest - ## - # REST service stub for the DomainMappings 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_domain_mappings REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse] - # A result object deserialized from the server's reply - def list_domain_mappings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_domain_mappings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_domain_mappings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_domain_mapping REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetDomainMappingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::DomainMapping] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::DomainMapping] - # A result object deserialized from the server's reply - def get_domain_mapping request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_domain_mapping_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_domain_mapping", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::DomainMapping.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_domain_mapping REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_domain_mapping request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_domain_mapping_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_domain_mapping", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_domain_mapping REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_domain_mapping request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_domain_mapping_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_domain_mapping", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_domain_mapping REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_domain_mapping request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_domain_mapping_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_domain_mapping", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_domain_mappings REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_domain_mappings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/domainMappings", - matches: [ - ["parent", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_domain_mapping REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetDomainMappingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_domain_mapping_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/domainMappings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_domain_mapping REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_domain_mapping_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/domainMappings", - body: "domain_mapping", - matches: [ - ["parent", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_domain_mapping REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_domain_mapping_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "domain_mapping", - matches: [ - ["name", %r{^apps/[^/]+/domainMappings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_domain_mapping REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_domain_mapping_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/domainMappings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall.rb deleted file mode 100644 index 129d1a2d364c..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/firewall/credentials" -require "google/cloud/app_engine/v1/firewall/client" -require "google/cloud/app_engine/v1/firewall/rest" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Firewall resources are used to define a collection of access control rules - # for an Application. Each rule is defined with a position which specifies - # the rule's order in the sequence of rules, an IP range to be matched against - # requests, and an action to take upon matching requests. - # - # Every request is evaluated against the Firewall rules in priority order. - # Processesing stops at the first rule which matches the request's IP address. - # A final rule always specifies an action that applies to all remaining - # IP addresses. The default final rule for a newly-created application will be - # set to "allow" if not otherwise specified by the user. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1/firewall" - # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_engine/v1/firewall/rest" - # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - module Firewall - end - end - end - end -end - -helper_path = ::File.join __dir__, "firewall", "helpers.rb" -require "google/cloud/app_engine/v1/firewall/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/client.rb deleted file mode 100644 index ccdfdb79dc34..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/client.rb +++ /dev/null @@ -1,982 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Firewall - ## - # Client for the Firewall service. - # - # Firewall resources are used to define a collection of access control rules - # for an Application. Each rule is defined with a position which specifies - # the rule's order in the sequence of rules, an IP range to be matched against - # requests, and an action to take upon matching requests. - # - # Every request is evaluated against the Firewall rules in priority order. - # Processesing stops at the first rule which matches the request's IP address. - # A final rule always specifies an action that applies to all remaining - # IP addresses. The default final rule for a newly-created application will be - # set to "allow" if not otherwise specified by the user. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :firewall_stub - - ## - # Configure the Firewall Client class. - # - # See {::Google::Cloud::AppEngine::V1::Firewall::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Firewall clients - # ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppEngine", "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 Firewall Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Firewall::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @firewall_stub.universe_domain - end - - ## - # Create a new Firewall client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Firewall client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/appengine/v1/appengine_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @firewall_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppEngine::V1::Firewall::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @firewall_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.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 - @firewall_stub.logger - end - - # Service calls - - ## - # Lists the firewall rules of an application. - # - # @overload list_ingress_rules(request, options = nil) - # Pass arguments to `list_ingress_rules` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListIngressRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListIngressRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_ingress_rules(parent: nil, page_size: nil, page_token: nil, matching_address: nil) - # Pass arguments to `list_ingress_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] - # Name of the Firewall collection to retrieve. - # Example: `apps/myapp/firewall/ingressRules`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # @param matching_address [::String] - # A valid IP Address. If set, only rules matching this address will be - # returned. The first returned rule will be the rule that fires on requests - # from this IP. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new - # - # # Call the list_ingress_rules method. - # result = client.list_ingress_rules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule. - # p item - # end - # - def list_ingress_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_ingress_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_ingress_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_ingress_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.call_rpc :list_ingress_rules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @firewall_stub, :list_ingress_rules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replaces the entire firewall ruleset in one bulk operation. This overrides - # and replaces the rules of an existing firewall with the new rules. - # - # If the final rule does not match traffic with the '*' wildcard IP range, - # then an "allow all" rule is explicitly added to the end of the list. - # - # @overload batch_update_ingress_rules(request, options = nil) - # Pass arguments to `batch_update_ingress_rules` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_update_ingress_rules(name: nil, ingress_rules: nil) - # Pass arguments to `batch_update_ingress_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 name [::String] - # Name of the Firewall collection to set. - # Example: `apps/myapp/firewall/ingressRules`. - # @param ingress_rules [::Array<::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash>] - # A list of FirewallRules to replace the existing set. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new - # - # # Call the batch_update_ingress_rules method. - # result = client.batch_update_ingress_rules request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse. - # p result - # - def batch_update_ingress_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest - - # Converts hash and nil to 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_update_ingress_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_update_ingress_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_update_ingress_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.call_rpc :batch_update_ingress_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 - - ## - # Creates a firewall rule for the application. - # - # @overload create_ingress_rule(request, options = nil) - # Pass arguments to `create_ingress_rule` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_ingress_rule(parent: nil, rule: nil) - # Pass arguments to `create_ingress_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Firewall collection in which to create a new rule. - # Example: `apps/myapp/firewall/ingressRules`. - # @param rule [::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash] - # A FirewallRule containing the new resource. - # - # The user may optionally provide a position at which the new rule will be - # placed. The positions define a sequential list starting at 1. If a rule - # already exists at the given position, rules greater than the provided - # position will be moved forward by one. - # - # If no position is provided, the server will place the rule as the second to - # last rule in the sequence before the required default allow-all or deny-all - # rule. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new - # - # # Call the create_ingress_rule method. - # result = client.create_ingress_rule request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - # p result - # - def create_ingress_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_ingress_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_ingress_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_ingress_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.call_rpc :create_ingress_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the specified firewall rule. - # - # @overload get_ingress_rule(request, options = nil) - # Pass arguments to `get_ingress_rule` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetIngressRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetIngressRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_ingress_rule(name: nil) - # Pass arguments to `get_ingress_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Firewall resource to retrieve. - # Example: `apps/myapp/firewall/ingressRules/100`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new - # - # # Call the get_ingress_rule method. - # result = client.get_ingress_rule request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - # p result - # - def get_ingress_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_ingress_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_ingress_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_ingress_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.call_rpc :get_ingress_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified firewall rule. - # - # @overload update_ingress_rule(request, options = nil) - # Pass arguments to `update_ingress_rule` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_ingress_rule(name: nil, rule: nil, update_mask: nil) - # Pass arguments to `update_ingress_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Firewall resource to update. - # Example: `apps/myapp/firewall/ingressRules/100`. - # @param rule [::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash] - # A FirewallRule containing the updated resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new - # - # # Call the update_ingress_rule method. - # result = client.update_ingress_rule request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - # p result - # - def update_ingress_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_ingress_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_ingress_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_ingress_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.call_rpc :update_ingress_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified firewall rule. - # - # @overload delete_ingress_rule(request, options = nil) - # Pass arguments to `delete_ingress_rule` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_ingress_rule(name: nil) - # Pass arguments to `delete_ingress_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Firewall resource to delete. - # Example: `apps/myapp/firewall/ingressRules/100`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new - # - # # Call the delete_ingress_rule method. - # result = client.delete_ingress_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_ingress_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_ingress_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_ingress_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_ingress_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.call_rpc :delete_ingress_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Firewall API. - # - # This class represents the configuration for Firewall, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Firewall::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_ingress_rules to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_ingress_rules.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_ingress_rules.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::AppEngine::V1::Firewall::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Firewall API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_ingress_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ingress_rules - ## - # RPC-specific configuration for `batch_update_ingress_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_update_ingress_rules - ## - # RPC-specific configuration for `create_ingress_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_ingress_rule - ## - # RPC-specific configuration for `get_ingress_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_ingress_rule - ## - # RPC-specific configuration for `update_ingress_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_ingress_rule - ## - # RPC-specific configuration for `delete_ingress_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_ingress_rule - - # @private - def initialize parent_rpcs = nil - list_ingress_rules_config = parent_rpcs.list_ingress_rules if parent_rpcs.respond_to? :list_ingress_rules - @list_ingress_rules = ::Gapic::Config::Method.new list_ingress_rules_config - batch_update_ingress_rules_config = parent_rpcs.batch_update_ingress_rules if parent_rpcs.respond_to? :batch_update_ingress_rules - @batch_update_ingress_rules = ::Gapic::Config::Method.new batch_update_ingress_rules_config - create_ingress_rule_config = parent_rpcs.create_ingress_rule if parent_rpcs.respond_to? :create_ingress_rule - @create_ingress_rule = ::Gapic::Config::Method.new create_ingress_rule_config - get_ingress_rule_config = parent_rpcs.get_ingress_rule if parent_rpcs.respond_to? :get_ingress_rule - @get_ingress_rule = ::Gapic::Config::Method.new get_ingress_rule_config - update_ingress_rule_config = parent_rpcs.update_ingress_rule if parent_rpcs.respond_to? :update_ingress_rule - @update_ingress_rule = ::Gapic::Config::Method.new update_ingress_rule_config - delete_ingress_rule_config = parent_rpcs.delete_ingress_rule if parent_rpcs.respond_to? :delete_ingress_rule - @delete_ingress_rule = ::Gapic::Config::Method.new delete_ingress_rule_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/credentials.rb deleted file mode 100644 index 11bd0f56417e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/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 AppEngine - module V1 - module Firewall - # Credentials for the Firewall API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "APP_ENGINE_CREDENTIALS", - "APP_ENGINE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APP_ENGINE_CREDENTIALS_JSON", - "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest.rb deleted file mode 100644 index 192ed20be872..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/firewall/credentials" -require "google/cloud/app_engine/v1/firewall/rest/client" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Firewall resources are used to define a collection of access control rules - # for an Application. Each rule is defined with a position which specifies - # the rule's order in the sequence of rules, an IP range to be matched against - # requests, and an action to take upon matching requests. - # - # Every request is evaluated against the Firewall rules in priority order. - # Processesing stops at the first rule which matches the request's IP address. - # A final rule always specifies an action that applies to all remaining - # IP addresses. The default final rule for a newly-created application will be - # set to "allow" if not otherwise specified by the user. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_engine/v1/firewall/rest" - # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - module Firewall - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_engine/v1/firewall/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/client.rb deleted file mode 100644 index 477ef070a149..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/client.rb +++ /dev/null @@ -1,897 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/firewall/rest/service_stub" - -module Google - module Cloud - module AppEngine - module V1 - module Firewall - module Rest - ## - # REST client for the Firewall service. - # - # Firewall resources are used to define a collection of access control rules - # for an Application. Each rule is defined with a position which specifies - # the rule's order in the sequence of rules, an IP range to be matched against - # requests, and an action to take upon matching requests. - # - # Every request is evaluated against the Firewall rules in priority order. - # Processesing stops at the first rule which matches the request's IP address. - # A final rule always specifies an action that applies to all remaining - # IP addresses. The default final rule for a newly-created application will be - # set to "allow" if not otherwise specified by the user. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :firewall_stub - - ## - # Configure the Firewall Client class. - # - # See {::Google::Cloud::AppEngine::V1::Firewall::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Firewall clients - # ::Google::Cloud::AppEngine::V1::Firewall::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", "AppEngine", "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 Firewall Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Firewall::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 - @firewall_stub.universe_domain - end - - ## - # Create a new Firewall REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Firewall 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 - - @firewall_stub = ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @firewall_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 - @firewall_stub.logger - end - - # Service calls - - ## - # Lists the firewall rules of an application. - # - # @overload list_ingress_rules(request, options = nil) - # Pass arguments to `list_ingress_rules` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListIngressRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListIngressRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_ingress_rules(parent: nil, page_size: nil, page_token: nil, matching_address: nil) - # Pass arguments to `list_ingress_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] - # Name of the Firewall collection to retrieve. - # Example: `apps/myapp/firewall/ingressRules`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # @param matching_address [::String] - # A valid IP Address. If set, only rules matching this address will be - # returned. The first returned rule will be the rule that fires on requests - # from this IP. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new - # - # # Call the list_ingress_rules method. - # result = client.list_ingress_rules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule. - # p item - # end - # - def list_ingress_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_ingress_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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_ingress_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_ingress_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.list_ingress_rules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @firewall_stub, :list_ingress_rules, "ingress_rules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Replaces the entire firewall ruleset in one bulk operation. This overrides - # and replaces the rules of an existing firewall with the new rules. - # - # If the final rule does not match traffic with the '*' wildcard IP range, - # then an "allow all" rule is explicitly added to the end of the list. - # - # @overload batch_update_ingress_rules(request, options = nil) - # Pass arguments to `batch_update_ingress_rules` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_update_ingress_rules(name: nil, ingress_rules: nil) - # Pass arguments to `batch_update_ingress_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 name [::String] - # Name of the Firewall collection to set. - # Example: `apps/myapp/firewall/ingressRules`. - # @param ingress_rules [::Array<::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash>] - # A list of FirewallRules to replace the existing set. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new - # - # # Call the batch_update_ingress_rules method. - # result = client.batch_update_ingress_rules request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse. - # p result - # - def batch_update_ingress_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest - - # Converts hash and nil to an 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_update_ingress_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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_update_ingress_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_update_ingress_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.batch_update_ingress_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 - - ## - # Creates a firewall rule for the application. - # - # @overload create_ingress_rule(request, options = nil) - # Pass arguments to `create_ingress_rule` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_ingress_rule(parent: nil, rule: nil) - # Pass arguments to `create_ingress_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Firewall collection in which to create a new rule. - # Example: `apps/myapp/firewall/ingressRules`. - # @param rule [::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash] - # A FirewallRule containing the new resource. - # - # The user may optionally provide a position at which the new rule will be - # placed. The positions define a sequential list starting at 1. If a rule - # already exists at the given position, rules greater than the provided - # position will be moved forward by one. - # - # If no position is provided, the server will place the rule as the second to - # last rule in the sequence before the required default allow-all or deny-all - # rule. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new - # - # # Call the create_ingress_rule method. - # result = client.create_ingress_rule request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - # p result - # - def create_ingress_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_ingress_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_ingress_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_ingress_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.create_ingress_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the specified firewall rule. - # - # @overload get_ingress_rule(request, options = nil) - # Pass arguments to `get_ingress_rule` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetIngressRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetIngressRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_ingress_rule(name: nil) - # Pass arguments to `get_ingress_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Firewall resource to retrieve. - # Example: `apps/myapp/firewall/ingressRules/100`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new - # - # # Call the get_ingress_rule method. - # result = client.get_ingress_rule request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - # p result - # - def get_ingress_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_ingress_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_ingress_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_ingress_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.get_ingress_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified firewall rule. - # - # @overload update_ingress_rule(request, options = nil) - # Pass arguments to `update_ingress_rule` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_ingress_rule(name: nil, rule: nil, update_mask: nil) - # Pass arguments to `update_ingress_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Firewall resource to update. - # Example: `apps/myapp/firewall/ingressRules/100`. - # @param rule [::Google::Cloud::AppEngine::V1::FirewallRule, ::Hash] - # A FirewallRule containing the updated resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new - # - # # Call the update_ingress_rule method. - # result = client.update_ingress_rule request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - # p result - # - def update_ingress_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_ingress_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_ingress_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_ingress_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.update_ingress_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified firewall rule. - # - # @overload delete_ingress_rule(request, options = nil) - # Pass arguments to `delete_ingress_rule` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_ingress_rule(name: nil) - # Pass arguments to `delete_ingress_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the Firewall resource to delete. - # Example: `apps/myapp/firewall/ingressRules/100`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new - # - # # Call the delete_ingress_rule method. - # result = client.delete_ingress_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_ingress_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_ingress_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_ingress_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_ingress_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firewall_stub.delete_ingress_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Firewall REST API. - # - # This class represents the configuration for Firewall REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Firewall::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_ingress_rules to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_ingress_rules.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_ingress_rules.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Firewall API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_ingress_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ingress_rules - ## - # RPC-specific configuration for `batch_update_ingress_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_update_ingress_rules - ## - # RPC-specific configuration for `create_ingress_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_ingress_rule - ## - # RPC-specific configuration for `get_ingress_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_ingress_rule - ## - # RPC-specific configuration for `update_ingress_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_ingress_rule - ## - # RPC-specific configuration for `delete_ingress_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_ingress_rule - - # @private - def initialize parent_rpcs = nil - list_ingress_rules_config = parent_rpcs.list_ingress_rules if parent_rpcs.respond_to? :list_ingress_rules - @list_ingress_rules = ::Gapic::Config::Method.new list_ingress_rules_config - batch_update_ingress_rules_config = parent_rpcs.batch_update_ingress_rules if parent_rpcs.respond_to? :batch_update_ingress_rules - @batch_update_ingress_rules = ::Gapic::Config::Method.new batch_update_ingress_rules_config - create_ingress_rule_config = parent_rpcs.create_ingress_rule if parent_rpcs.respond_to? :create_ingress_rule - @create_ingress_rule = ::Gapic::Config::Method.new create_ingress_rule_config - get_ingress_rule_config = parent_rpcs.get_ingress_rule if parent_rpcs.respond_to? :get_ingress_rule - @get_ingress_rule = ::Gapic::Config::Method.new get_ingress_rule_config - update_ingress_rule_config = parent_rpcs.update_ingress_rule if parent_rpcs.respond_to? :update_ingress_rule - @update_ingress_rule = ::Gapic::Config::Method.new update_ingress_rule_config - delete_ingress_rule_config = parent_rpcs.delete_ingress_rule if parent_rpcs.respond_to? :delete_ingress_rule - @delete_ingress_rule = ::Gapic::Config::Method.new delete_ingress_rule_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb deleted file mode 100644 index 08fbf0469747..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb +++ /dev/null @@ -1,450 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Firewall - module Rest - ## - # REST service stub for the Firewall 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_ingress_rules REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListIngressRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::ListIngressRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::ListIngressRulesResponse] - # A result object deserialized from the server's reply - def list_ingress_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_ingress_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_ingress_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::ListIngressRulesResponse.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_update_ingress_rules REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse] - # A result object deserialized from the server's reply - def batch_update_ingress_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_ingress_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: "batch_update_ingress_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.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_ingress_rule REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # A result object deserialized from the server's reply - def create_ingress_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_ingress_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_ingress_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::FirewallRule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_ingress_rule REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetIngressRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # A result object deserialized from the server's reply - def get_ingress_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_ingress_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_ingress_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::FirewallRule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_ingress_rule REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::FirewallRule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # A result object deserialized from the server's reply - def update_ingress_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_ingress_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_ingress_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::FirewallRule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_ingress_rule REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_ingress_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_ingress_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_ingress_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_ingress_rules REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListIngressRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_ingress_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/firewall/ingressRules", - matches: [ - ["parent", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_update_ingress_rules REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest] - # 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_update_ingress_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:batchUpdate", - body: "*", - matches: [ - ["name", %r{^apps/[^/]+/firewall/ingressRules/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_ingress_rule REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_ingress_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/firewall/ingressRules", - body: "rule", - matches: [ - ["parent", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_ingress_rule REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetIngressRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_ingress_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/firewall/ingressRules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_ingress_rule REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_ingress_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "rule", - matches: [ - ["name", %r{^apps/[^/]+/firewall/ingressRules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_ingress_rule REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_ingress_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/firewall/ingressRules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances.rb deleted file mode 100644 index 8059a9b51559..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/instances/credentials" -require "google/cloud/app_engine/v1/instances/operations" -require "google/cloud/app_engine/v1/instances/client" -require "google/cloud/app_engine/v1/instances/rest" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages instances of a version. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1/instances" - # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_engine/v1/instances/rest" - # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new - # - module Instances - end - end - end - end -end - -helper_path = ::File.join __dir__, "instances", "helpers.rb" -require "google/cloud/app_engine/v1/instances/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/client.rb deleted file mode 100644 index 89296e3e98b6..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/client.rb +++ /dev/null @@ -1,823 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Instances - ## - # Client for the Instances service. - # - # Manages instances of a version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :instances_stub - - ## - # Configure the Instances Client class. - # - # See {::Google::Cloud::AppEngine::V1::Instances::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Instances clients - # ::Google::Cloud::AppEngine::V1::Instances::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppEngine", "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 Instances Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Instances::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @instances_stub.universe_domain - end - - ## - # Create a new Instances client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Instances client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/appengine/v1/appengine_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @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 - - @instances_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppEngine::V1::Instances::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @instances_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::Instances::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @instances_stub.logger - end - - # Service calls - - ## - # Lists the instances of a version. - # - # Tip: To aggregate details about instances over time, see the - # [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Version resource. Example: - # `apps/myapp/services/default/versions/v1`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Instances::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListInstancesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_instances.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instances_stub.call_rpc :list_instances, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @instances_stub, :list_instances, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets instance information. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Instances::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instances_stub.call_rpc :get_instance, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops a running instance. - # - # The instance might be automatically recreated based on the scaling settings - # of the version. For more information, see "How Instances are Managed" - # ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | - # [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). - # - # To ensure that instances are not re-created and avoid getting billed, you - # can stop all instances within the target version by changing the serving - # status of the version to `STOPPED` with the - # [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) - # method. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance(name: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Instances::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instances_stub.call_rpc :delete_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enables debugging on a VM instance. This allows you to use the SSH - # command to connect to the virtual machine where the instance lives. - # While in "debug mode", the instance continues to serve live traffic. - # You should delete the instance when you are done debugging and then - # allow the system to take over and determine if another instance - # should be started. - # - # Only applicable for instances in App Engine flexible environment. - # - # @overload debug_instance(request, options = nil) - # Pass arguments to `debug_instance` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DebugInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DebugInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload debug_instance(name: nil, ssh_key: nil) - # Pass arguments to `debug_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - # @param ssh_key [::String] - # Public SSH key to add to the instance. Examples: - # - # * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]` - # * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}` - # - # For more information, see - # [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Instances::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DebugInstanceRequest.new - # - # # Call the debug_instance method. - # result = client.debug_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def debug_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DebugInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.debug_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.debug_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.debug_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instances_stub.call_rpc :debug_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Instances API. - # - # This class represents the configuration for Instances, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Instances::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Instances::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Instances API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `debug_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :debug_instance - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - debug_instance_config = parent_rpcs.debug_instance if parent_rpcs.respond_to? :debug_instance - @debug_instance = ::Gapic::Config::Method.new debug_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/credentials.rb deleted file mode 100644 index 701fd528a1fd..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/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 AppEngine - module V1 - module Instances - # Credentials for the Instances API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "APP_ENGINE_CREDENTIALS", - "APP_ENGINE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APP_ENGINE_CREDENTIALS_JSON", - "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/instances/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/operations.rb deleted file mode 100644 index ebe6b538cafa..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Instances - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Instances 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 Instances 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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest.rb deleted file mode 100644 index 9ccecad165fd..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/instances/credentials" -require "google/cloud/app_engine/v1/instances/rest/operations" -require "google/cloud/app_engine/v1/instances/rest/client" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages instances of a version. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_engine/v1/instances/rest" - # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new - # - module Instances - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_engine/v1/instances/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/client.rb deleted file mode 100644 index bc023f903bfa..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/client.rb +++ /dev/null @@ -1,752 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/instances/rest/service_stub" - -module Google - module Cloud - module AppEngine - module V1 - module Instances - module Rest - ## - # REST client for the Instances service. - # - # Manages instances of a version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :instances_stub - - ## - # Configure the Instances Client class. - # - # See {::Google::Cloud::AppEngine::V1::Instances::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Instances clients - # ::Google::Cloud::AppEngine::V1::Instances::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", "AppEngine", "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 Instances Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Instances::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 - @instances_stub.universe_domain - end - - ## - # Create a new Instances REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Instances 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::AppEngine::V1::Instances::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 - - @instances_stub = ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @instances_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::Instances::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @instances_stub.logger - end - - # Service calls - - ## - # Lists the instances of a version. - # - # Tip: To aggregate details about instances over time, see the - # [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Version resource. Example: - # `apps/myapp/services/default/versions/v1`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListInstancesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_instances.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instances_stub.list_instances request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list_instances, "instances", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets instance information. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instances_stub.get_instance request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops a running instance. - # - # The instance might be automatically recreated based on the scaling settings - # of the version. For more information, see "How Instances are Managed" - # ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | - # [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)). - # - # To ensure that instances are not re-created and avoid getting billed, you - # can stop all instances within the target version by changing the serving - # status of the version to `STOPPED` with the - # [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) - # method. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance(name: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instances_stub.delete_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enables debugging on a VM instance. This allows you to use the SSH - # command to connect to the virtual machine where the instance lives. - # While in "debug mode", the instance continues to serve live traffic. - # You should delete the instance when you are done debugging and then - # allow the system to take over and determine if another instance - # should be started. - # - # Only applicable for instances in App Engine flexible environment. - # - # @overload debug_instance(request, options = nil) - # Pass arguments to `debug_instance` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DebugInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DebugInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload debug_instance(name: nil, ssh_key: nil) - # Pass arguments to `debug_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - # @param ssh_key [::String] - # Public SSH key to add to the instance. Examples: - # - # * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]` - # * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}` - # - # For more information, see - # [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DebugInstanceRequest.new - # - # # Call the debug_instance method. - # result = client.debug_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def debug_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DebugInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.debug_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.debug_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.debug_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instances_stub.debug_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Instances REST API. - # - # This class represents the configuration for Instances REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Instances::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Instances API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `debug_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :debug_instance - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - debug_instance_config = parent_rpcs.debug_instance if parent_rpcs.respond_to? :debug_instance - @debug_instance = ::Gapic::Config::Method.new debug_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/operations.rb deleted file mode 100644 index 1e85f342312b..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AppEngine - module V1 - module Instances - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Instances 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 Instances 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb deleted file mode 100644 index 6f85f63088e2..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb +++ /dev/null @@ -1,326 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Instances - module Rest - ## - # REST service stub for the Instances service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_instances REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::ListInstancesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::ListInstancesResponse] - # A result object deserialized from the server's reply - def list_instances request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_instances", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_instance REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::Instance.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the debug_instance REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DebugInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def debug_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_debug_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "debug_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_instances REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_instances_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instances", - matches: [ - ["parent", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the debug_instance REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DebugInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_debug_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:debug", - body: "*", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/rest.rb deleted file mode 100644 index b20b5db4954d..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/rest.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! - -require "google/cloud/app_engine/v1/applications/rest" -require "google/cloud/app_engine/v1/services/rest" -require "google/cloud/app_engine/v1/versions/rest" -require "google/cloud/app_engine/v1/instances/rest" -require "google/cloud/app_engine/v1/firewall/rest" -require "google/cloud/app_engine/v1/authorized_domains/rest" -require "google/cloud/app_engine/v1/authorized_certificates/rest" -require "google/cloud/app_engine/v1/domain_mappings/rest" -require "google/cloud/app_engine/v1/version" - -module Google - module Cloud - module AppEngine - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/app_engine/v1/rest" - # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services.rb deleted file mode 100644 index ec5887f7f088..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/services/credentials" -require "google/cloud/app_engine/v1/services/operations" -require "google/cloud/app_engine/v1/services/client" -require "google/cloud/app_engine/v1/services/rest" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages services of an application. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1/services" - # client = ::Google::Cloud::AppEngine::V1::Services::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_engine/v1/services/rest" - # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new - # - module Services - end - end - end - end -end - -helper_path = ::File.join __dir__, "services", "helpers.rb" -require "google/cloud/app_engine/v1/services/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/client.rb deleted file mode 100644 index 4b4a84cb43d4..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/client.rb +++ /dev/null @@ -1,808 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Services - ## - # Client for the Services service. - # - # Manages services of an application. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :services_stub - - ## - # Configure the Services Client class. - # - # See {::Google::Cloud::AppEngine::V1::Services::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Services clients - # ::Google::Cloud::AppEngine::V1::Services::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppEngine", "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 Services Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Services::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @services_stub.universe_domain - end - - ## - # Create a new Services client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Services::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Services client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/appengine/v1/appengine_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @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 - - @services_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppEngine::V1::Services::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @services_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::Services::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @services_stub.logger - end - - # Service calls - - ## - # Lists all the services in the application. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Services::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @services_stub.call_rpc :list_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @services_stub, :list_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the current configuration of the specified service. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service(name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: `apps/myapp/services/default`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Services::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @services_stub.call_rpc :get_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the configuration of the specified service. - # - # @overload update_service(request, options = nil) - # Pass arguments to `update_service` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_service(name: nil, service: nil, update_mask: nil, migrate_traffic: nil) - # Pass arguments to `update_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to update. Example: `apps/myapp/services/default`. - # @param service [::Google::Cloud::AppEngine::V1::Service, ::Hash] - # A Service resource containing the updated service. Only fields set in the - # field mask will be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Standard field mask for the set of fields to be updated. - # @param migrate_traffic [::Boolean] - # Set to `true` to gradually shift traffic to one or more versions that you - # specify. By default, traffic is shifted immediately. - # For gradual traffic migration, the target versions - # must be located within instances that are configured for both - # [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) - # and - # [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). - # You must specify the - # [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) - # field in the Service resource. Gradual traffic migration is not - # supported in the App Engine flexible environment. For examples, see - # [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Services::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateServiceRequest.new - # - # # Call the update_service method. - # result = client.update_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @services_stub.call_rpc :update_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified service and all enclosed versions. - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_service(name: nil) - # Pass arguments to `delete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: `apps/myapp/services/default`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Services::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteServiceRequest.new - # - # # Call the delete_service method. - # result = client.delete_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @services_stub.call_rpc :delete_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Services API. - # - # This class represents the configuration for Services, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Services::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_services to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Services::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Services API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `update_service` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service - ## - # RPC-specific configuration for `delete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service - - # @private - def initialize parent_rpcs = nil - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service - @update_service = ::Gapic::Config::Method.new update_service_config - delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service - @delete_service = ::Gapic::Config::Method.new delete_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/credentials.rb deleted file mode 100644 index 37ece41f9d00..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/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 AppEngine - module V1 - module Services - # Credentials for the Services API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "APP_ENGINE_CREDENTIALS", - "APP_ENGINE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APP_ENGINE_CREDENTIALS_JSON", - "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/services/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/operations.rb deleted file mode 100644 index 873b5e1569ac..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Services - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Services 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 Services 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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest.rb deleted file mode 100644 index 1ddc4ce95ce1..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/services/credentials" -require "google/cloud/app_engine/v1/services/rest/operations" -require "google/cloud/app_engine/v1/services/rest/client" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages services of an application. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_engine/v1/services/rest" - # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new - # - module Services - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_engine/v1/services/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/client.rb deleted file mode 100644 index 7a85c337d18f..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/client.rb +++ /dev/null @@ -1,737 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/services/rest/service_stub" - -module Google - module Cloud - module AppEngine - module V1 - module Services - module Rest - ## - # REST client for the Services service. - # - # Manages services of an application. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :services_stub - - ## - # Configure the Services Client class. - # - # See {::Google::Cloud::AppEngine::V1::Services::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Services clients - # ::Google::Cloud::AppEngine::V1::Services::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", "AppEngine", "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 Services Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Services::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 - @services_stub.universe_domain - end - - ## - # Create a new Services REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Services 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::AppEngine::V1::Services::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 - - @services_stub = ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @services_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::Services::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @services_stub.logger - end - - # Service calls - - ## - # Lists all the services in the application. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @services_stub.list_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @services_stub, :list_services, "services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the current configuration of the specified service. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service(name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: `apps/myapp/services/default`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @services_stub.get_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the configuration of the specified service. - # - # @overload update_service(request, options = nil) - # Pass arguments to `update_service` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_service(name: nil, service: nil, update_mask: nil, migrate_traffic: nil) - # Pass arguments to `update_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to update. Example: `apps/myapp/services/default`. - # @param service [::Google::Cloud::AppEngine::V1::Service, ::Hash] - # A Service resource containing the updated service. Only fields set in the - # field mask will be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Standard field mask for the set of fields to be updated. - # @param migrate_traffic [::Boolean] - # Set to `true` to gradually shift traffic to one or more versions that you - # specify. By default, traffic is shifted immediately. - # For gradual traffic migration, the target versions - # must be located within instances that are configured for both - # [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) - # and - # [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). - # You must specify the - # [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) - # field in the Service resource. Gradual traffic migration is not - # supported in the App Engine flexible environment. For examples, see - # [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateServiceRequest.new - # - # # Call the update_service method. - # result = client.update_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @services_stub.update_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified service and all enclosed versions. - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_service(name: nil) - # Pass arguments to `delete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: `apps/myapp/services/default`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteServiceRequest.new - # - # # Call the delete_service method. - # result = client.delete_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @services_stub.delete_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Services REST API. - # - # This class represents the configuration for Services REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Services::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_services to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Services::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Services API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `update_service` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service - ## - # RPC-specific configuration for `delete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service - - # @private - def initialize parent_rpcs = nil - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service - @update_service = ::Gapic::Config::Method.new update_service_config - delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service - @delete_service = ::Gapic::Config::Method.new delete_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/operations.rb deleted file mode 100644 index 22bb5f045fcd..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AppEngine - module V1 - module Services - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Services 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 Services 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb deleted file mode 100644 index b25b03e57c36..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb +++ /dev/null @@ -1,326 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Services - module Rest - ## - # REST service stub for the Services service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_services REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::ListServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::ListServicesResponse] - # A result object deserialized from the server's reply - def list_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::Service] - # A result object deserialized from the server's reply - def get_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_service REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_service REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_services REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/services", - matches: [ - ["parent", %r{^apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "service", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/version.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/version.rb deleted file mode 100644 index 5831639cfbfc..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_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 Cloud - module AppEngine - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions.rb deleted file mode 100644 index d9b0f71b6f77..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/versions/credentials" -require "google/cloud/app_engine/v1/versions/operations" -require "google/cloud/app_engine/v1/versions/client" -require "google/cloud/app_engine/v1/versions/rest" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages versions of a service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_engine/v1/versions" - # client = ::Google::Cloud::AppEngine::V1::Versions::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_engine/v1/versions/rest" - # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new - # - module Versions - end - end - end - end -end - -helper_path = ::File.join __dir__, "versions", "helpers.rb" -require "google/cloud/app_engine/v1/versions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/client.rb deleted file mode 100644 index 527e5651f5c9..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/client.rb +++ /dev/null @@ -1,944 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Versions - ## - # Client for the Versions service. - # - # Manages versions of a service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :versions_stub - - ## - # Configure the Versions Client class. - # - # See {::Google::Cloud::AppEngine::V1::Versions::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Versions clients - # ::Google::Cloud::AppEngine::V1::Versions::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppEngine", "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 Versions Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Versions::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @versions_stub.universe_domain - end - - ## - # Create a new Versions client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Versions::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Versions client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/appengine/v1/appengine_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @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 - - @versions_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppEngine::V1::Versions::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @versions_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::Versions::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @versions_stub.logger - end - - # Service calls - - ## - # Lists the versions of a service. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_versions(parent: nil, view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Service resource. Example: - # `apps/myapp/services/default`. - # @param view [::Google::Cloud::AppEngine::V1::VersionView] - # Controls the set of fields returned in the `List` response. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Version>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppEngine::V1::Version>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.call_rpc :list_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @versions_stub, :list_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the specified Version resource. - # By default, only a `BASIC_VIEW` will be returned. - # Specify the `FULL_VIEW` parameter to get the full resource. - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1`. - # @param view [::Google::Cloud::AppEngine::V1::VersionView] - # Controls the set of fields returned in the `Get` response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppEngine::V1::Version] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppEngine::V1::Version] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.call_rpc :get_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys code and resource files to a new version. - # - # @overload create_version(request, options = nil) - # Pass arguments to `create_version` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_version(parent: nil, version: nil) - # Pass arguments to `create_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent resource to create this version under. Example: - # `apps/myapp/services/default`. - # @param version [::Google::Cloud::AppEngine::V1::Version, ::Hash] - # Application deployment configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateVersionRequest.new - # - # # Call the create_version method. - # result = client.create_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.call_rpc :create_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified Version resource. - # You can specify the following fields depending on the App Engine - # environment and type of scaling that the version resource uses: - # - # **Standard environment** - # - # * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) - # - # *automatic scaling* in the standard environment: - # - # * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # - # *basic scaling* or *manual scaling* in the standard environment: - # - # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) - # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) - # - # **Flexible environment** - # - # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) - # - # *automatic scaling* in the flexible environment: - # - # * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # - # *manual scaling* in the flexible environment: - # - # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) - # - # @overload update_version(request, options = nil) - # Pass arguments to `update_version` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_version(name: nil, version: nil, update_mask: nil) - # Pass arguments to `update_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to update. Example: - # `apps/myapp/services/default/versions/1`. - # @param version [::Google::Cloud::AppEngine::V1::Version, ::Hash] - # A Version containing the updated resource. Only fields set in the field - # mask will be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateVersionRequest.new - # - # # Call the update_version method. - # result = client.update_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.call_rpc :update_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing Version resource. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_version(name: nil) - # Pass arguments to `delete_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.call_rpc :delete_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Versions API. - # - # This class represents the configuration for Versions, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Versions::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_versions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Versions::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_versions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_versions.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::AppEngine::V1::Versions::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Versions API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `create_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_version - ## - # RPC-specific configuration for `update_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - - # @private - def initialize parent_rpcs = nil - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - create_version_config = parent_rpcs.create_version if parent_rpcs.respond_to? :create_version - @create_version = ::Gapic::Config::Method.new create_version_config - update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version - @update_version = ::Gapic::Config::Method.new update_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/credentials.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/credentials.rb deleted file mode 100644 index 9484ce0c1858..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/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 AppEngine - module V1 - module Versions - # Credentials for the Versions API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "APP_ENGINE_CREDENTIALS", - "APP_ENGINE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "APP_ENGINE_CREDENTIALS_JSON", - "APP_ENGINE_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-app_engine-v1/lib/google/cloud/app_engine/v1/versions/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/operations.rb deleted file mode 100644 index f2ac053dc7f8..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Versions - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Versions 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 Versions 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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::AppEngine::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest.rb deleted file mode 100644 index 1fda00233d3d..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_engine/v1/version" - -require "google/cloud/app_engine/v1/versions/credentials" -require "google/cloud/app_engine/v1/versions/rest/operations" -require "google/cloud/app_engine/v1/versions/rest/client" - -module Google - module Cloud - module AppEngine - module V1 - ## - # Manages versions of a service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_engine/v1/versions/rest" - # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new - # - module Versions - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_engine/v1/versions/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/client.rb deleted file mode 100644 index c14a061acf55..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/client.rb +++ /dev/null @@ -1,866 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/versions/rest/service_stub" - -module Google - module Cloud - module AppEngine - module V1 - module Versions - module Rest - ## - # REST client for the Versions service. - # - # Manages versions of a service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :versions_stub - - ## - # Configure the Versions Client class. - # - # See {::Google::Cloud::AppEngine::V1::Versions::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Versions clients - # ::Google::Cloud::AppEngine::V1::Versions::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", "AppEngine", "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 Versions Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppEngine::V1::Versions::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 - @versions_stub.universe_domain - end - - ## - # Create a new Versions REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Versions 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::AppEngine::V1::Versions::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 - - @versions_stub = ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @versions_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppEngine::V1::Versions::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @versions_stub.logger - end - - # Service calls - - ## - # Lists the versions of a service. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_versions(parent: nil, view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent Service resource. Example: - # `apps/myapp/services/default`. - # @param view [::Google::Cloud::AppEngine::V1::VersionView] - # Controls the set of fields returned in the `List` response. - # @param page_size [::Integer] - # Maximum results to return per page. - # @param page_token [::String] - # Continuation token for fetching the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Version>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Version>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppEngine::V1::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.list_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @versions_stub, :list_versions, "versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the specified Version resource. - # By default, only a `BASIC_VIEW` will be returned. - # Specify the `FULL_VIEW` parameter to get the full resource. - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1`. - # @param view [::Google::Cloud::AppEngine::V1::VersionView] - # Controls the set of fields returned in the `Get` response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::Version] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::AppEngine::V1::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.get_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys code and resource files to a new version. - # - # @overload create_version(request, options = nil) - # Pass arguments to `create_version` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::CreateVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::CreateVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_version(parent: nil, version: nil) - # Pass arguments to `create_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Name of the parent resource to create this version under. Example: - # `apps/myapp/services/default`. - # @param version [::Google::Cloud::AppEngine::V1::Version, ::Hash] - # Application deployment configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::CreateVersionRequest.new - # - # # Call the create_version method. - # result = client.create_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.create_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified Version resource. - # You can specify the following fields depending on the App Engine - # environment and type of scaling that the version resource uses: - # - # **Standard environment** - # - # * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) - # - # *automatic scaling* in the standard environment: - # - # * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) - # - # *basic scaling* or *manual scaling* in the standard environment: - # - # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) - # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) - # - # **Flexible environment** - # - # * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) - # - # *automatic scaling* in the flexible environment: - # - # * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) - # - # *manual scaling* in the flexible environment: - # - # * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) - # - # @overload update_version(request, options = nil) - # Pass arguments to `update_version` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::UpdateVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::UpdateVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_version(name: nil, version: nil, update_mask: nil) - # Pass arguments to `update_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource to update. Example: - # `apps/myapp/services/default/versions/1`. - # @param version [::Google::Cloud::AppEngine::V1::Version, ::Hash] - # A Version containing the updated resource. Only fields set in the field - # mask will be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::UpdateVersionRequest.new - # - # # Call the update_version method. - # result = client.update_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.update_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing Version resource. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::AppEngine::V1::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppEngine::V1::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_version(name: nil) - # Pass arguments to `delete_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_engine/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppEngine::V1::Versions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppEngine::V1::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @versions_stub.delete_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Versions REST API. - # - # This class represents the configuration for Versions REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppEngine::V1::Versions::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_versions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_versions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_versions.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Versions API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `create_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_version - ## - # RPC-specific configuration for `update_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - - # @private - def initialize parent_rpcs = nil - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - create_version_config = parent_rpcs.create_version if parent_rpcs.respond_to? :create_version - @create_version = ::Gapic::Config::Method.new create_version_config - update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version - @update_version = ::Gapic::Config::Method.new update_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/operations.rb deleted file mode 100644 index 20a5e9589a2c..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AppEngine - module V1 - module Versions - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "appengine.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Versions 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 Versions 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::AppEngine::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "appengine.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^apps/[^/]+/?$}, 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{^apps/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/rest/service_stub.rb deleted file mode 100644 index 660a3134b5d7..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/lib/google/cloud/app_engine/v1/versions/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/appengine/v1/appengine_pb" - -module Google - module Cloud - module AppEngine - module V1 - module Versions - module Rest - ## - # REST service stub for the Versions 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_versions REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::ListVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::ListVersionsResponse] - # A result object deserialized from the server's reply - def list_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_version REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppEngine::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppEngine::V1::Version] - # A result object deserialized from the server's reply - def get_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppEngine::V1::Version.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_version REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_version REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_version REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_versions REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/versions", - matches: [ - ["parent", %r{^apps/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_version REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::GetVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_version REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::CreateVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/versions", - body: "version", - matches: [ - ["parent", %r{^apps/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_version REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::UpdateVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "version", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_version REST call - # - # @param request_pb [::Google::Cloud::AppEngine::V1::DeleteVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^apps/[^/]+/services/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/README.md deleted file mode 100644 index e1b16a276a9a..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# App Engine Admin V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/appengine/v1/app_yaml.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/app_yaml.rb deleted file mode 100644 index f031e646eb4f..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/app_yaml.rb +++ /dev/null @@ -1,385 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/) - # configuration for API handlers. - # @!attribute [rw] auth_fail_action - # @return [::Google::Cloud::AppEngine::V1::AuthFailAction] - # Action to take when users access resources that require - # authentication. Defaults to `redirect`. - # @!attribute [rw] login - # @return [::Google::Cloud::AppEngine::V1::LoginRequirement] - # Level of login required to access this resource. Defaults to - # `optional`. - # @!attribute [rw] script - # @return [::String] - # Path to the script from the application root directory. - # @!attribute [rw] security_level - # @return [::Google::Cloud::AppEngine::V1::SecurityLevel] - # Security (HTTPS) enforcement for this URL. - # @!attribute [rw] url - # @return [::String] - # URL to serve the endpoint at. - class ApiConfigHandler - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Custom static error page to be served when an error occurs. - # @!attribute [rw] error_code - # @return [::Google::Cloud::AppEngine::V1::ErrorHandler::ErrorCode] - # Error condition this handler applies to. - # @!attribute [rw] static_file - # @return [::String] - # Static file content to be served for this error. - # @!attribute [rw] mime_type - # @return [::String] - # MIME type of file. Defaults to `text/html`. - class ErrorHandler - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error codes. - module ErrorCode - # Not specified. ERROR_CODE_DEFAULT is assumed. - ERROR_CODE_UNSPECIFIED = 0 - - # All other error types. - ERROR_CODE_DEFAULT = 0 - - # Application has exceeded a resource quota. - ERROR_CODE_OVER_QUOTA = 1 - - # Client blocked by the application's Denial of Service protection - # configuration. - ERROR_CODE_DOS_API_DENIAL = 2 - - # Deadline reached before the application responds. - ERROR_CODE_TIMEOUT = 3 - end - end - - # URL pattern and description of how the URL should be handled. App Engine can - # handle URLs by executing application code or by serving static files - # uploaded with the version, such as images, CSS, or JavaScript. - # @!attribute [rw] url_regex - # @return [::String] - # URL prefix. Uses regular expression syntax, which means regexp - # special characters must be escaped, but should not contain groupings. - # All URLs that begin with this prefix are handled by this handler, using the - # portion of the URL after the prefix as part of the file path. - # @!attribute [rw] static_files - # @return [::Google::Cloud::AppEngine::V1::StaticFilesHandler] - # Returns the contents of a file, such as an image, as the response. - # - # Note: The following fields are mutually exclusive: `static_files`, `script`, `api_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] script - # @return [::Google::Cloud::AppEngine::V1::ScriptHandler] - # Executes a script to handle the requests that match this URL - # pattern. Only the `auto` value is supported for Node.js in the - # App Engine standard environment, for example `"script": "auto"`. - # - # Note: The following fields are mutually exclusive: `script`, `static_files`, `api_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] api_endpoint - # @return [::Google::Cloud::AppEngine::V1::ApiEndpointHandler] - # Uses API Endpoints to handle requests. - # - # Note: The following fields are mutually exclusive: `api_endpoint`, `static_files`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] security_level - # @return [::Google::Cloud::AppEngine::V1::SecurityLevel] - # Security (HTTPS) enforcement for this URL. - # @!attribute [rw] login - # @return [::Google::Cloud::AppEngine::V1::LoginRequirement] - # Level of login required to access this resource. Not supported for Node.js - # in the App Engine standard environment. - # @!attribute [rw] auth_fail_action - # @return [::Google::Cloud::AppEngine::V1::AuthFailAction] - # Action to take when users access resources that require - # authentication. Defaults to `redirect`. - # @!attribute [rw] redirect_http_response_code - # @return [::Google::Cloud::AppEngine::V1::UrlMap::RedirectHttpResponseCode] - # `30x` code to use when performing redirects for the `secure` field. - # Defaults to `302`. - class UrlMap - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Redirect codes. - module RedirectHttpResponseCode - # Not specified. `302` is assumed. - REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0 - - # `301 Moved Permanently` code. - REDIRECT_HTTP_RESPONSE_CODE_301 = 1 - - # `302 Moved Temporarily` code. - REDIRECT_HTTP_RESPONSE_CODE_302 = 2 - - # `303 See Other` code. - REDIRECT_HTTP_RESPONSE_CODE_303 = 3 - - # `307 Temporary Redirect` code. - REDIRECT_HTTP_RESPONSE_CODE_307 = 4 - end - end - - # Files served directly to the user for a given URL, such as images, CSS - # stylesheets, or JavaScript source files. Static file handlers describe which - # files in the application directory are static files, and which URLs serve - # them. - # @!attribute [rw] path - # @return [::String] - # Path to the static files matched by the URL pattern, from the - # application root directory. The path can refer to text matched in groupings - # in the URL pattern. - # @!attribute [rw] upload_path_regex - # @return [::String] - # Regular expression that matches the file paths for all files that should be - # referenced by this handler. - # @!attribute [rw] http_headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # HTTP headers to use for all responses from these URLs. - # @!attribute [rw] mime_type - # @return [::String] - # MIME type used to serve all files served by this handler. - # - # Defaults to file-specific MIME types, which are derived from each file's - # filename extension. - # @!attribute [rw] expiration - # @return [::Google::Protobuf::Duration] - # Time a static file served by this handler should be cached - # by web proxies and browsers. - # @!attribute [rw] require_matching_file - # @return [::Boolean] - # Whether this handler should match the request if the file - # referenced by the handler does not exist. - # @!attribute [rw] application_readable - # @return [::Boolean] - # Whether files should also be uploaded as code data. By default, files - # declared in static file handlers are uploaded as static - # data and are only served to end users; they cannot be read by the - # application. If enabled, uploads are charged against both your code and - # static data storage resource quotas. - class StaticFilesHandler - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class HttpHeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Executes a script to handle the request that matches the URL pattern. - # @!attribute [rw] script_path - # @return [::String] - # Path to the script from the application root directory. - class ScriptHandler - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Uses Google Cloud Endpoints to handle requests. - # @!attribute [rw] script_path - # @return [::String] - # Path to the script from the application root directory. - class ApiEndpointHandler - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Health checking configuration for VM instances. Unhealthy instances - # are killed and replaced with new instances. Only applicable for - # instances in App Engine flexible environment. - # @!attribute [rw] disable_health_check - # @return [::Boolean] - # Whether to explicitly disable health checks for this instance. - # @!attribute [rw] host - # @return [::String] - # Host header to send when performing an HTTP health check. - # Example: "myapp.appspot.com" - # @!attribute [rw] healthy_threshold - # @return [::Integer] - # Number of consecutive successful health checks required before receiving - # traffic. - # @!attribute [rw] unhealthy_threshold - # @return [::Integer] - # Number of consecutive failed health checks required before removing - # traffic. - # @!attribute [rw] restart_threshold - # @return [::Integer] - # Number of consecutive failed health checks required before an instance is - # restarted. - # @!attribute [rw] check_interval - # @return [::Google::Protobuf::Duration] - # Interval between health checks. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Time before the health check is considered failed. - class HealthCheck - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Readiness checking configuration for VM instances. Unhealthy instances - # are removed from traffic rotation. - # @!attribute [rw] path - # @return [::String] - # The request path. - # @!attribute [rw] host - # @return [::String] - # Host header to send when performing a HTTP Readiness check. - # Example: "myapp.appspot.com" - # @!attribute [rw] failure_threshold - # @return [::Integer] - # Number of consecutive failed checks required before removing - # traffic. - # @!attribute [rw] success_threshold - # @return [::Integer] - # Number of consecutive successful checks required before receiving - # traffic. - # @!attribute [rw] check_interval - # @return [::Google::Protobuf::Duration] - # Interval between health checks. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Time before the check is considered failed. - # @!attribute [rw] app_start_timeout - # @return [::Google::Protobuf::Duration] - # A maximum time limit on application initialization, measured from moment - # the application successfully replies to a healthcheck until it is ready to - # serve traffic. - class ReadinessCheck - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Health checking configuration for VM instances. Unhealthy instances - # are killed and replaced with new instances. - # @!attribute [rw] path - # @return [::String] - # The request path. - # @!attribute [rw] host - # @return [::String] - # Host header to send when performing a HTTP Liveness check. - # Example: "myapp.appspot.com" - # @!attribute [rw] failure_threshold - # @return [::Integer] - # Number of consecutive failed checks required before considering the - # VM unhealthy. - # @!attribute [rw] success_threshold - # @return [::Integer] - # Number of consecutive successful checks required before considering - # the VM healthy. - # @!attribute [rw] check_interval - # @return [::Google::Protobuf::Duration] - # Interval between health checks. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Time before the check is considered failed. - # @!attribute [rw] initial_delay - # @return [::Google::Protobuf::Duration] - # The initial delay before starting to execute the checks. - class LivenessCheck - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Third-party Python runtime library that is required by the application. - # @!attribute [rw] name - # @return [::String] - # Name of the library. Example: "django". - # @!attribute [rw] version - # @return [::String] - # Version of the library to select, or "latest". - class Library - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Actions to take when the user is not logged in. - module AuthFailAction - # Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed. - AUTH_FAIL_ACTION_UNSPECIFIED = 0 - - # Redirects user to "accounts.google.com". The user is redirected back to the - # application URL after signing in or creating an account. - AUTH_FAIL_ACTION_REDIRECT = 1 - - # Rejects request with a `401` HTTP status code and an error - # message. - AUTH_FAIL_ACTION_UNAUTHORIZED = 2 - end - - # Methods to restrict access to a URL based on login status. - module LoginRequirement - # Not specified. `LOGIN_OPTIONAL` is assumed. - LOGIN_UNSPECIFIED = 0 - - # Does not require that the user is signed in. - LOGIN_OPTIONAL = 1 - - # If the user is not signed in, the `auth_fail_action` is taken. - # In addition, if the user is not an administrator for the - # application, they are given an error message regardless of - # `auth_fail_action`. If the user is an administrator, the handler - # proceeds. - LOGIN_ADMIN = 2 - - # If the user has signed in, the handler proceeds normally. Otherwise, the - # auth_fail_action is taken. - LOGIN_REQUIRED = 3 - end - - # Methods to enforce security (HTTPS) on a URL. - module SecurityLevel - # Not specified. - SECURE_UNSPECIFIED = 0 - - # Both HTTP and HTTPS requests with URLs that match the handler succeed - # without redirects. The application can examine the request to determine - # which protocol was used, and respond accordingly. - SECURE_DEFAULT = 0 - - # Requests for a URL that match this handler that use HTTPS are automatically - # redirected to the HTTP equivalent URL. - SECURE_NEVER = 1 - - # Both HTTP and HTTPS requests with URLs that match the handler succeed - # without redirects. The application can examine the request to determine - # which protocol was used and respond accordingly. - SECURE_OPTIONAL = 2 - - # Requests for a URL that match this handler that do not use HTTPS are - # automatically redirected to the HTTPS URL with the same path. Query - # parameters are reserved for the redirect. - SECURE_ALWAYS = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/appengine.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/appengine.rb deleted file mode 100644 index a75c2b72ccb0..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/appengine.rb +++ /dev/null @@ -1,639 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # Request message for `Applications.GetApplication`. - # @!attribute [rw] name - # @return [::String] - # Name of the Application resource to get. Example: `apps/myapp`. - class GetApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Applications.CreateApplication`. - # @!attribute [rw] application - # @return [::Google::Cloud::AppEngine::V1::Application] - # Application configuration. - class CreateApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Applications.UpdateApplication`. - # @!attribute [rw] name - # @return [::String] - # Name of the Application resource to update. Example: `apps/myapp`. - # @!attribute [rw] application - # @return [::Google::Cloud::AppEngine::V1::Application] - # An Application containing the updated resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Standard field mask for the set of fields to be updated. - class UpdateApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for 'Applications.RepairApplication'. - # @!attribute [rw] name - # @return [::String] - # Name of the application to repair. Example: `apps/myapp` - class RepairApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Services.ListServices`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum results to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `Services.ListServices`. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::AppEngine::V1::Service>] - # The services belonging to the requested application. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Services.GetService`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: `apps/myapp/services/default`. - class GetServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Services.UpdateService`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource to update. Example: `apps/myapp/services/default`. - # @!attribute [rw] service - # @return [::Google::Cloud::AppEngine::V1::Service] - # A Service resource containing the updated service. Only fields set in the - # field mask will be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Standard field mask for the set of fields to be updated. - # @!attribute [rw] migrate_traffic - # @return [::Boolean] - # Set to `true` to gradually shift traffic to one or more versions that you - # specify. By default, traffic is shifted immediately. - # For gradual traffic migration, the target versions - # must be located within instances that are configured for both - # [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) - # and - # [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). - # You must specify the - # [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) - # field in the Service resource. Gradual traffic migration is not - # supported in the App Engine flexible environment. For examples, see - # [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). - class UpdateServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Services.DeleteService`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: `apps/myapp/services/default`. - class DeleteServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Versions.ListVersions`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent Service resource. Example: - # `apps/myapp/services/default`. - # @!attribute [rw] view - # @return [::Google::Cloud::AppEngine::V1::VersionView] - # Controls the set of fields returned in the `List` response. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum results to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `Versions.ListVersions`. - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::AppEngine::V1::Version>] - # The versions belonging to the requested service. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Versions.GetVersion`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1`. - # @!attribute [rw] view - # @return [::Google::Cloud::AppEngine::V1::VersionView] - # Controls the set of fields returned in the `Get` response. - class GetVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Versions.CreateVersion`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent resource to create this version under. Example: - # `apps/myapp/services/default`. - # @!attribute [rw] version - # @return [::Google::Cloud::AppEngine::V1::Version] - # Application deployment configuration. - class CreateVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Versions.UpdateVersion`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource to update. Example: - # `apps/myapp/services/default/versions/1`. - # @!attribute [rw] version - # @return [::Google::Cloud::AppEngine::V1::Version] - # A Version containing the updated resource. Only fields set in the field - # mask will be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. - class UpdateVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Versions.DeleteVersion`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1`. - class DeleteVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Instances.ListInstances`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent Version resource. Example: - # `apps/myapp/services/default/versions/v1`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum results to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListInstancesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `Instances.ListInstances`. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::AppEngine::V1::Instance>] - # The instances belonging to the requested version. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListInstancesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Instances.GetInstance`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Instances.DeleteInstance`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - class DeleteInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Instances.DebugInstance`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: - # `apps/myapp/services/default/versions/v1/instances/instance-1`. - # @!attribute [rw] ssh_key - # @return [::String] - # Public SSH key to add to the instance. Examples: - # - # * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]` - # * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}` - # - # For more information, see - # [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). - class DebugInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Firewall.ListIngressRules`. - # @!attribute [rw] parent - # @return [::String] - # Name of the Firewall collection to retrieve. - # Example: `apps/myapp/firewall/ingressRules`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum results to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Continuation token for fetching the next page of results. - # @!attribute [rw] matching_address - # @return [::String] - # A valid IP Address. If set, only rules matching this address will be - # returned. The first returned rule will be the rule that fires on requests - # from this IP. - class ListIngressRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `Firewall.ListIngressRules`. - # @!attribute [rw] ingress_rules - # @return [::Array<::Google::Cloud::AppEngine::V1::FirewallRule>] - # The ingress FirewallRules for this application. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListIngressRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Firewall.BatchUpdateIngressRules`. - # @!attribute [rw] name - # @return [::String] - # Name of the Firewall collection to set. - # Example: `apps/myapp/firewall/ingressRules`. - # @!attribute [rw] ingress_rules - # @return [::Array<::Google::Cloud::AppEngine::V1::FirewallRule>] - # A list of FirewallRules to replace the existing set. - class BatchUpdateIngressRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `Firewall.UpdateAllIngressRules`. - # @!attribute [rw] ingress_rules - # @return [::Array<::Google::Cloud::AppEngine::V1::FirewallRule>] - # The full list of ingress FirewallRules for this application. - class BatchUpdateIngressRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Firewall.CreateIngressRule`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent Firewall collection in which to create a new rule. - # Example: `apps/myapp/firewall/ingressRules`. - # @!attribute [rw] rule - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # A FirewallRule containing the new resource. - # - # The user may optionally provide a position at which the new rule will be - # placed. The positions define a sequential list starting at 1. If a rule - # already exists at the given position, rules greater than the provided - # position will be moved forward by one. - # - # If no position is provided, the server will place the rule as the second to - # last rule in the sequence before the required default allow-all or deny-all - # rule. - class CreateIngressRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Firewall.GetIngressRule`. - # @!attribute [rw] name - # @return [::String] - # Name of the Firewall resource to retrieve. - # Example: `apps/myapp/firewall/ingressRules/100`. - class GetIngressRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Firewall.UpdateIngressRule`. - # @!attribute [rw] name - # @return [::String] - # Name of the Firewall resource to update. - # Example: `apps/myapp/firewall/ingressRules/100`. - # @!attribute [rw] rule - # @return [::Google::Cloud::AppEngine::V1::FirewallRule] - # A FirewallRule containing the updated resource - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. - class UpdateIngressRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `Firewall.DeleteIngressRule`. - # @!attribute [rw] name - # @return [::String] - # Name of the Firewall resource to delete. - # Example: `apps/myapp/firewall/ingressRules/100`. - class DeleteIngressRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `AuthorizedDomains.ListAuthorizedDomains`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum results to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListAuthorizedDomainsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `AuthorizedDomains.ListAuthorizedDomains`. - # @!attribute [rw] domains - # @return [::Array<::Google::Cloud::AppEngine::V1::AuthorizedDomain>] - # The authorized domains belonging to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListAuthorizedDomainsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `AuthorizedCertificates.ListAuthorizedCertificates`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent `Application` resource. Example: `apps/myapp`. - # @!attribute [rw] view - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] - # Controls the set of fields returned in the `LIST` response. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum results to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListAuthorizedCertificatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `AuthorizedCertificates.ListAuthorizedCertificates`. - # @!attribute [rw] certificates - # @return [::Array<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>] - # The SSL certificates the user is authorized to administer. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListAuthorizedCertificatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `AuthorizedCertificates.GetAuthorizedCertificate`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: - # `apps/myapp/authorizedCertificates/12345`. - # @!attribute [rw] view - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView] - # Controls the set of fields returned in the `GET` response. - class GetAuthorizedCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent `Application` resource. Example: `apps/myapp`. - # @!attribute [rw] certificate - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # SSL certificate data. - class CreateAuthorizedCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource to update. Example: - # `apps/myapp/authorizedCertificates/12345`. - # @!attribute [rw] certificate - # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate] - # An `AuthorizedCertificate` containing the updated resource. Only fields set - # in the field mask will be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. Updates are only - # supported on the `certificate_raw_data` and `display_name` fields. - class UpdateAuthorizedCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource to delete. Example: - # `apps/myapp/authorizedCertificates/12345`. - class DeleteAuthorizedCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `DomainMappings.ListDomainMappings`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum results to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListDomainMappingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `DomainMappings.ListDomainMappings`. - # @!attribute [rw] domain_mappings - # @return [::Array<::Google::Cloud::AppEngine::V1::DomainMapping>] - # The domain mappings for the application. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token for fetching the next page of results. - class ListDomainMappingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `DomainMappings.GetDomainMapping`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource requested. Example: - # `apps/myapp/domainMappings/example.com`. - class GetDomainMappingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `DomainMappings.CreateDomainMapping`. - # @!attribute [rw] parent - # @return [::String] - # Name of the parent Application resource. Example: `apps/myapp`. - # @!attribute [rw] domain_mapping - # @return [::Google::Cloud::AppEngine::V1::DomainMapping] - # Domain mapping configuration. - # @!attribute [rw] override_strategy - # @return [::Google::Cloud::AppEngine::V1::DomainOverrideStrategy] - # Whether the domain creation should override any existing mappings for this - # domain. By default, overrides are rejected. - class CreateDomainMappingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `DomainMappings.UpdateDomainMapping`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource to update. Example: - # `apps/myapp/domainMappings/example.com`. - # @!attribute [rw] domain_mapping - # @return [::Google::Cloud::AppEngine::V1::DomainMapping] - # A domain mapping containing the updated resource. Only fields set - # in the field mask will be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Standard field mask for the set of fields to be updated. - class UpdateDomainMappingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `DomainMappings.DeleteDomainMapping`. - # @!attribute [rw] name - # @return [::String] - # Name of the resource to delete. Example: - # `apps/myapp/domainMappings/example.com`. - class DeleteDomainMappingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields that should be returned when {::Google::Cloud::AppEngine::V1::Version Version} resources - # are retrieved. - module VersionView - # Basic version information including scaling and inbound services, - # but not detailed deployment information. - BASIC = 0 - - # The information from `BASIC`, plus detailed information about the - # deployment. This format is required when creating resources, but - # is not returned in `Get` or `List` by default. - FULL = 1 - end - - # Fields that should be returned when an AuthorizedCertificate resource is - # retrieved. - module AuthorizedCertificateView - # Basic certificate information, including applicable domains and expiration - # date. - BASIC_CERTIFICATE = 0 - - # The information from `BASIC_CERTIFICATE`, plus detailed information on the - # domain mappings that have this certificate mapped. - FULL_CERTIFICATE = 1 - end - - # Override strategy for mutating an existing mapping. - module DomainOverrideStrategy - # Strategy unspecified. Defaults to `STRICT`. - UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY = 0 - - # Overrides not allowed. If a mapping already exists for the - # specified domain, the request will return an ALREADY_EXISTS (409). - STRICT = 1 - - # Overrides allowed. If a mapping already exists for the specified domain, - # the request will overwrite it. Note that this might stop another - # Google product from serving. For example, if the domain is - # mapped to another App Engine application, that app will no - # longer serve from that domain. - OVERRIDE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/application.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/application.rb deleted file mode 100644 index 0ddf979e0ff5..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/application.rb +++ /dev/null @@ -1,197 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # An Application resource contains the top-level configuration of an App - # Engine application. - # @!attribute [rw] name - # @return [::String] - # Full path to the Application resource in the API. - # Example: `apps/myapp`. - # @!attribute [rw] id - # @return [::String] - # Identifier of the Application resource. This identifier is equivalent - # to the project ID of the Google Cloud Platform project where you want to - # deploy your application. - # Example: `myapp`. - # @!attribute [rw] dispatch_rules - # @return [::Array<::Google::Cloud::AppEngine::V1::UrlDispatchRule>] - # HTTP path dispatch rules for requests to the application that do not - # explicitly target a service or version. Rules are order-dependent. - # Up to 20 dispatch rules can be supported. - # @!attribute [rw] auth_domain - # @return [::String] - # Google Apps authentication domain that controls which users can access - # this application. - # - # Defaults to open access for any Google Account. - # @!attribute [rw] location_id - # @return [::String] - # Location from which this application runs. Application instances - # run out of the data centers in the specified location, which is also where - # all of the application's end user content is stored. - # - # Defaults to `us-central`. - # - # View the list of - # [supported locations](https://cloud.google.com/appengine/docs/locations). - # @!attribute [rw] code_bucket - # @return [::String] - # Google Cloud Storage bucket that can be used for storing files - # associated with this application. This bucket is associated with the - # application and can be used by the gcloud deployment commands. - # @!attribute [rw] default_cookie_expiration - # @return [::Google::Protobuf::Duration] - # Cookie expiration policy for this application. - # @!attribute [rw] serving_status - # @return [::Google::Cloud::AppEngine::V1::Application::ServingStatus] - # Serving status of this application. - # @!attribute [rw] default_hostname - # @return [::String] - # Hostname used to reach this application, as resolved by App Engine. - # @!attribute [rw] default_bucket - # @return [::String] - # Google Cloud Storage bucket that can be used by this application to store - # content. - # @!attribute [rw] service_account - # @return [::String] - # The service account associated with the application. - # This is the app-level default identity. If no identity provided during - # create version, Admin API will fallback to this one. - # @!attribute [rw] iap - # @return [::Google::Cloud::AppEngine::V1::Application::IdentityAwareProxy] - # @!attribute [rw] gcr_domain - # @return [::String] - # The Google Container Registry domain used for storing managed build docker - # images for this application. - # @!attribute [rw] database_type - # @return [::Google::Cloud::AppEngine::V1::Application::DatabaseType] - # The type of the Cloud Firestore or Cloud Datastore database associated with - # this application. - # @!attribute [rw] feature_settings - # @return [::Google::Cloud::AppEngine::V1::Application::FeatureSettings] - # The feature specific settings to be used in the application. - class Application - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Identity-Aware Proxy - # @!attribute [rw] enabled - # @return [::Boolean] - # Whether the serving infrastructure will authenticate and - # authorize all incoming requests. - # - # If true, the `oauth2_client_id` and `oauth2_client_secret` - # fields must be non-empty. - # @!attribute [rw] oauth2_client_id - # @return [::String] - # OAuth2 client ID to use for the authentication flow. - # @!attribute [rw] oauth2_client_secret - # @return [::String] - # OAuth2 client secret to use for the authentication flow. - # - # For security reasons, this value cannot be retrieved via the API. - # Instead, the SHA-256 hash of the value is returned in the - # `oauth2_client_secret_sha256` field. - # @!attribute [rw] oauth2_client_secret_sha256 - # @return [::String] - # Hex-encoded SHA-256 hash of the client secret. - class IdentityAwareProxy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The feature specific settings to be used in the application. These define - # behaviors that are user configurable. - # @!attribute [rw] split_health_checks - # @return [::Boolean] - # Boolean value indicating if split health checks should be used instead - # of the legacy health checks. At an app.yaml level, this means defaulting - # to 'readiness_check' and 'liveness_check' values instead of - # 'health_check' ones. Once the legacy 'health_check' behavior is - # deprecated, and this value is always true, this setting can - # be removed. - # @!attribute [rw] use_container_optimized_os - # @return [::Boolean] - # If true, use [Container-Optimized OS](https://cloud.google.com/container-optimized-os/) - # base image for VMs, rather than a base Debian image. - class FeatureSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module ServingStatus - # Serving status is unspecified. - UNSPECIFIED = 0 - - # Application is serving. - SERVING = 1 - - # Application has been disabled by the user. - USER_DISABLED = 2 - - # Application has been disabled by the system. - SYSTEM_DISABLED = 3 - end - - module DatabaseType - # Database type is unspecified. - DATABASE_TYPE_UNSPECIFIED = 0 - - # Cloud Datastore - CLOUD_DATASTORE = 1 - - # Cloud Firestore Native - CLOUD_FIRESTORE = 2 - - # Cloud Firestore in Datastore Mode - CLOUD_DATASTORE_COMPATIBILITY = 3 - end - end - - # Rules to match an HTTP request and dispatch that request to a service. - # @!attribute [rw] domain - # @return [::String] - # Domain name to match against. The wildcard "`*`" is supported if - # specified before a period: "`*.`". - # - # Defaults to matching all domains: "`*`". - # @!attribute [rw] path - # @return [::String] - # Pathname within the host. Must start with a "`/`". A - # single "`*`" can be included at the end of the path. - # - # The sum of the lengths of the domain and path may not - # exceed 100 characters. - # @!attribute [rw] service - # @return [::String] - # Resource ID of a service in this application that should - # serve the matched request. The service must already - # exist. Example: `default`. - class UrlDispatchRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/audit_data.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/audit_data.rb deleted file mode 100644 index 1d081c031ecd..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/audit_data.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! - - -module Google - module Cloud - module AppEngine - module V1 - # App Engine admin service audit log. - # @!attribute [rw] update_service - # @return [::Google::Cloud::AppEngine::V1::UpdateServiceMethod] - # Detailed information about UpdateService call. - # - # Note: The following fields are mutually exclusive: `update_service`, `create_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_version - # @return [::Google::Cloud::AppEngine::V1::CreateVersionMethod] - # Detailed information about CreateVersion call. - # - # Note: The following fields are mutually exclusive: `create_version`, `update_service`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AuditData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detailed information about UpdateService call. - # @!attribute [rw] request - # @return [::Google::Cloud::AppEngine::V1::UpdateServiceRequest] - # Update service request. - class UpdateServiceMethod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detailed information about CreateVersion call. - # @!attribute [rw] request - # @return [::Google::Cloud::AppEngine::V1::CreateVersionRequest] - # Create version request. - class CreateVersionMethod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/certificate.rb deleted file mode 100644 index 93453db57d1d..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/certificate.rb +++ /dev/null @@ -1,161 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # An SSL certificate that a user has been authorized to administer. A user - # is authorized to administer any certificate that applies to one of their - # authorized domains. - # @!attribute [rw] name - # @return [::String] - # Full path to the `AuthorizedCertificate` resource in the API. Example: - # `apps/myapp/authorizedCertificates/12345`. - # @!attribute [rw] id - # @return [::String] - # Relative name of the certificate. This is a unique value autogenerated - # on `AuthorizedCertificate` resource creation. Example: `12345`. - # @!attribute [rw] display_name - # @return [::String] - # The user-specified display name of the certificate. This is not - # guaranteed to be unique. Example: `My Certificate`. - # @!attribute [rw] domain_names - # @return [::Array<::String>] - # Topmost applicable domains of this certificate. This certificate - # applies to these domains and their subdomains. Example: `example.com`. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # The time when this certificate expires. To update the renewal time on this - # certificate, upload an SSL certificate with a different expiration time - # using [`AuthorizedCertificates.UpdateAuthorizedCertificate`](). - # @!attribute [rw] certificate_raw_data - # @return [::Google::Cloud::AppEngine::V1::CertificateRawData] - # The SSL certificate serving the `AuthorizedCertificate` resource. This - # must be obtained independently from a certificate authority. - # @!attribute [rw] managed_certificate - # @return [::Google::Cloud::AppEngine::V1::ManagedCertificate] - # Only applicable if this certificate is managed by App Engine. Managed - # certificates are tied to the lifecycle of a `DomainMapping` and cannot be - # updated or deleted via the `AuthorizedCertificates` API. If this - # certificate is manually administered by the user, this field will be empty. - # @!attribute [rw] visible_domain_mappings - # @return [::Array<::String>] - # The full paths to user visible Domain Mapping resources that have this - # certificate mapped. Example: `apps/myapp/domainMappings/example.com`. - # - # This may not represent the full list of mapped domain mappings if the user - # does not have `VIEWER` permissions on all of the applications that have - # this certificate mapped. See `domain_mappings_count` for a complete count. - # - # Only returned by `GET` or `LIST` requests when specifically requested by - # the `view=FULL_CERTIFICATE` option. - # @!attribute [rw] domain_mappings_count - # @return [::Integer] - # Aggregate count of the domain mappings with this certificate mapped. This - # count includes domain mappings on applications for which the user does not - # have `VIEWER` permissions. - # - # Only returned by `GET` or `LIST` requests when specifically requested by - # the `view=FULL_CERTIFICATE` option. - class AuthorizedCertificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An SSL certificate obtained from a certificate authority. - # @!attribute [rw] public_certificate - # @return [::String] - # PEM encoded x.509 public key certificate. This field is set once on - # certificate creation. Must include the header and footer. Example: - #
-        #     -----BEGIN CERTIFICATE-----
-        #     
-        #     -----END CERTIFICATE-----
-        #     
- # @!attribute [rw] private_key - # @return [::String] - # Unencrypted PEM encoded RSA private key. This field is set once on - # certificate creation and then encrypted. The key size must be 2048 - # bits or fewer. Must include the header and footer. Example: - #
-        #     -----BEGIN RSA PRIVATE KEY-----
-        #     
-        #     -----END RSA PRIVATE KEY-----
-        #     
- class CertificateRawData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A certificate managed by App Engine. - # @!attribute [rw] last_renewal_time - # @return [::Google::Protobuf::Timestamp] - # Time at which the certificate was last renewed. The renewal process is - # fully managed. Certificate renewal will automatically occur before the - # certificate expires. Renewal errors can be tracked via `ManagementStatus`. - # @!attribute [rw] status - # @return [::Google::Cloud::AppEngine::V1::ManagementStatus] - # Status of certificate management. Refers to the most recent certificate - # acquisition or renewal attempt. - class ManagedCertificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of certificate management. Refers to the most recent certificate - # acquisition or renewal attempt. - module ManagementStatus - MANAGEMENT_STATUS_UNSPECIFIED = 0 - - # Certificate was successfully obtained and inserted into the serving - # system. - OK = 1 - - # Certificate is under active attempts to acquire or renew. - PENDING = 2 - - # Most recent renewal failed due to an invalid DNS setup and will be - # retried. Renewal attempts will continue to fail until the certificate - # domain's DNS configuration is fixed. The last successfully provisioned - # certificate may still be serving. - FAILED_RETRYING_NOT_VISIBLE = 4 - - # All renewal attempts have been exhausted, likely due to an invalid DNS - # setup. - FAILED_PERMANENT = 6 - - # Most recent renewal failed due to an explicit CAA record that does not - # include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will - # continue to fail until the CAA is reconfigured. The last successfully - # provisioned certificate may still be serving. - FAILED_RETRYING_CAA_FORBIDDEN = 7 - - # Most recent renewal failed due to a CAA retrieval failure. This means that - # the domain's DNS provider does not properly handle CAA records, failing - # requests for CAA records when no CAA records are defined. Renewals will - # continue to fail until the DNS provider is changed or a CAA record is - # added for the given domain. The last successfully provisioned certificate - # may still be serving. - FAILED_RETRYING_CAA_CHECKING = 8 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/deploy.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/deploy.rb deleted file mode 100644 index d0ed79f568df..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/deploy.rb +++ /dev/null @@ -1,130 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # Code and application artifacts used to deploy a version to App Engine. - # @!attribute [rw] files - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AppEngine::V1::FileInfo}] - # Manifest of the files stored in Google Cloud Storage that are included - # as part of this version. All files must be readable using the - # credentials supplied with this call. - # @!attribute [rw] container - # @return [::Google::Cloud::AppEngine::V1::ContainerInfo] - # The Docker image for the container that runs the version. - # Only applicable for instances running in the App Engine flexible environment. - # @!attribute [rw] zip - # @return [::Google::Cloud::AppEngine::V1::ZipInfo] - # The zip file for this deployment, if this is a zip deployment. - # @!attribute [rw] cloud_build_options - # @return [::Google::Cloud::AppEngine::V1::CloudBuildOptions] - # Options for any Google Cloud Build builds created as a part of this - # deployment. - # - # These options will only be used if a new build is created, such as when - # deploying to the App Engine flexible environment using files or zip. - class Deployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AppEngine::V1::FileInfo] - class FilesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Single source file that is part of the version to be deployed. Each source - # file that is deployed must be specified separately. - # @!attribute [rw] source_url - # @return [::String] - # URL source to use to fetch this file. Must be a URL to a resource in - # Google Cloud Storage in the form - # 'http(s)://storage.googleapis.com/\/\'. - # @!attribute [rw] sha1_sum - # @return [::String] - # The SHA1 hash of the file, in hex. - # @!attribute [rw] mime_type - # @return [::String] - # The MIME type of the file. - # - # Defaults to the value from Google Cloud Storage. - class FileInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Docker image that is used to create a container and start a VM instance for - # the version that you deploy. Only applicable for instances running in the App - # Engine flexible environment. - # @!attribute [rw] image - # @return [::String] - # URI to the hosted container image in Google Container Registry. The URI - # must be fully qualified and include a tag or digest. - # Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" - class ContainerInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for the build operations performed as a part of the version - # deployment. Only applicable for App Engine flexible environment when creating - # a version using source code directly. - # @!attribute [rw] app_yaml_path - # @return [::String] - # Path to the yaml file used in deployment, used to determine runtime - # configuration details. - # - # Required for flexible environment builds. - # - # See https://cloud.google.com/appengine/docs/standard/python/config/appref - # for more details. - # @!attribute [rw] cloud_build_timeout - # @return [::Google::Protobuf::Duration] - # The Cloud Build timeout used as part of any dependent builds performed by - # version creation. Defaults to 10 minutes. - class CloudBuildOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The zip file information for a zip deployment. - # @!attribute [rw] source_url - # @return [::String] - # URL of the zip file to deploy from. Must be a URL to a resource in - # Google Cloud Storage in the form - # 'http(s)://storage.googleapis.com/\/\'. - # @!attribute [rw] files_count - # @return [::Integer] - # An estimate of the number of files in a zip for a zip deployment. - # If set, must be greater than or equal to the actual number of files. - # Used for optimizing performance; if not provided, deployment may be slow. - class ZipInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain.rb deleted file mode 100644 index 8fd2fddc232b..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # A domain that a user has been authorized to administer. To authorize use - # of a domain, verify ownership via - # [Search Console](https://search.google.com/search-console/welcome). - # @!attribute [rw] name - # @return [::String] - # Full path to the `AuthorizedDomain` resource in the API. Example: - # `apps/myapp/authorizedDomains/example.com`. - # @!attribute [rw] id - # @return [::String] - # Fully qualified domain name of the domain authorized for use. Example: - # `example.com`. - class AuthorizedDomain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain_mapping.rb deleted file mode 100644 index a78b09f03a18..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/domain_mapping.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # A domain serving an App Engine application. - # @!attribute [rw] name - # @return [::String] - # Full path to the `DomainMapping` resource in the API. Example: - # `apps/myapp/domainMapping/example.com`. - # @!attribute [rw] id - # @return [::String] - # Relative name of the domain serving the application. Example: - # `example.com`. - # @!attribute [rw] ssl_settings - # @return [::Google::Cloud::AppEngine::V1::SslSettings] - # SSL configuration for this domain. If unconfigured, this domain will not - # serve with SSL. - # @!attribute [rw] resource_records - # @return [::Array<::Google::Cloud::AppEngine::V1::ResourceRecord>] - # The resource records required to configure this domain mapping. These - # records must be added to the domain's DNS configuration in order to - # serve the application via this domain mapping. - class DomainMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SSL configuration for a `DomainMapping` resource. - # @!attribute [rw] certificate_id - # @return [::String] - # ID of the `AuthorizedCertificate` resource configuring SSL for the - # application. Clearing this field will remove SSL support. - # - # By default, a managed certificate is automatically created for every - # domain mapping. To omit SSL support or to configure SSL manually, specify - # `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must - # be authorized to administer the `AuthorizedCertificate` resource to - # manually map it to a `DomainMapping` resource. - # Example: `12345`. - # @!attribute [rw] ssl_management_type - # @return [::Google::Cloud::AppEngine::V1::SslSettings::SslManagementType] - # SSL management type for this domain. If `AUTOMATIC`, a managed certificate - # is automatically provisioned. If `MANUAL`, `certificate_id` must be - # manually specified in order to configure SSL for this domain. - # @!attribute [rw] pending_managed_certificate_id - # @return [::String] - # ID of the managed `AuthorizedCertificate` resource currently being - # provisioned, if applicable. Until the new managed certificate has been - # successfully provisioned, the previous SSL state will be preserved. Once - # the provisioning process completes, the `certificate_id` field will reflect - # the new managed certificate and this field will be left empty. To remove - # SSL support while there is still a pending managed certificate, clear the - # `certificate_id` field with an `UpdateDomainMappingRequest`. - class SslSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The SSL management type for this domain. - module SslManagementType - # Defaults to `AUTOMATIC`. - SSL_MANAGEMENT_TYPE_UNSPECIFIED = 0 - - # SSL support for this domain is configured automatically. The mapped SSL - # certificate will be automatically renewed. - AUTOMATIC = 1 - - # SSL support for this domain is configured manually by the user. Either - # the domain has no SSL support or a user-obtained SSL certificate has been - # explictly mapped to this domain. - MANUAL = 2 - end - end - - # A DNS resource record. - # @!attribute [rw] name - # @return [::String] - # Relative name of the object affected by this record. Only applicable for - # `CNAME` records. Example: 'www'. - # @!attribute [rw] rrdata - # @return [::String] - # Data for this record. Values vary by record type, as defined in RFC 1035 - # (section 5) and RFC 1034 (section 3.6.1). - # @!attribute [rw] type - # @return [::Google::Cloud::AppEngine::V1::ResourceRecord::RecordType] - # Resource record type. Example: `AAAA`. - class ResourceRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A resource record type. - module RecordType - # An unknown resource record. - RECORD_TYPE_UNSPECIFIED = 0 - - # An A resource record. Data is an IPv4 address. - A = 1 - - # An AAAA resource record. Data is an IPv6 address. - AAAA = 2 - - # A CNAME resource record. Data is a domain name to be aliased. - CNAME = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/firewall.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/firewall.rb deleted file mode 100644 index 7ec535b28263..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/firewall.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # A single firewall rule that is evaluated against incoming traffic - # and provides an action to take on matched requests. - # @!attribute [rw] priority - # @return [::Integer] - # A positive integer between [1, Int32.MaxValue-1] that defines the order of - # rule evaluation. Rules with the lowest priority are evaluated first. - # - # A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic - # when no previous rule matches. Only the action of this rule can be modified - # by the user. - # @!attribute [rw] action - # @return [::Google::Cloud::AppEngine::V1::FirewallRule::Action] - # The action to take on matched requests. - # @!attribute [rw] source_range - # @return [::String] - # IP address or range, defined using CIDR notation, of requests that this - # rule applies to. You can use the wildcard character "*" to match all IPs - # equivalent to "0/0" and "::/0" together. - # Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` - # or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. - # - # - #

Truncation will be silently performed on addresses which are not - # properly truncated. For example, `1.2.3.4/24` is accepted as the same - # address as `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` is accepted - # as the same address as `2001:db8::/32`. - # @!attribute [rw] description - # @return [::String] - # An optional string description of this rule. - # This field has a maximum length of 100 characters. - class FirewallRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Available actions to take on matching requests. - module Action - UNSPECIFIED_ACTION = 0 - - # Matching requests are allowed. - ALLOW = 1 - - # Matching requests are denied. - DENY = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/instance.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/instance.rb deleted file mode 100644 index 68a656bd90ea..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/instance.rb +++ /dev/null @@ -1,137 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # An Instance resource is the computing unit that App Engine uses to - # automatically scale an application. - # @!attribute [r] name - # @return [::String] - # Output only. Full path to the Instance resource in the API. - # Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. - # @!attribute [r] id - # @return [::String] - # Output only. Relative name of the instance within the version. - # Example: `instance-1`. - # @!attribute [r] app_engine_release - # @return [::String] - # Output only. App Engine release this instance is running on. - # @!attribute [r] availability - # @return [::Google::Cloud::AppEngine::V1::Instance::Availability] - # Output only. Availability of the instance. - # @!attribute [r] vm_name - # @return [::String] - # Output only. Name of the virtual machine where this instance lives. Only applicable - # for instances in App Engine flexible environment. - # @!attribute [r] vm_zone_name - # @return [::String] - # Output only. Zone where the virtual machine is located. Only applicable for instances - # in App Engine flexible environment. - # @!attribute [r] vm_id - # @return [::String] - # Output only. Virtual machine ID of this instance. Only applicable for instances in - # App Engine flexible environment. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time that this instance was started. - # @!attribute [r] requests - # @return [::Integer] - # Output only. Number of requests since this instance was started. - # @!attribute [r] errors - # @return [::Integer] - # Output only. Number of errors since this instance was started. - # @!attribute [r] qps - # @return [::Float] - # Output only. Average queries per second (QPS) over the last minute. - # @!attribute [r] average_latency - # @return [::Integer] - # Output only. Average latency (ms) over the last minute. - # @!attribute [r] memory_usage - # @return [::Integer] - # Output only. Total memory in use (bytes). - # @!attribute [r] vm_status - # @return [::String] - # Output only. Status of the virtual machine where this instance lives. Only applicable - # for instances in App Engine flexible environment. - # @!attribute [r] vm_debug_enabled - # @return [::Boolean] - # Output only. Whether this instance is in debug mode. Only applicable for instances in - # App Engine flexible environment. - # @!attribute [r] vm_ip - # @return [::String] - # Output only. The IP address of this instance. Only applicable for instances in App - # Engine flexible environment. - # @!attribute [r] vm_liveness - # @return [::Google::Cloud::AppEngine::V1::Instance::Liveness::LivenessState] - # Output only. The liveness health check of this instance. Only applicable for instances - # in App Engine flexible environment. - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Wrapper for LivenessState enum. - class Liveness - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Liveness health check status for Flex instances. - module LivenessState - # There is no liveness health check for the instance. Only applicable for - # instances in App Engine standard environment. - LIVENESS_STATE_UNSPECIFIED = 0 - - # The health checking system is aware of the instance but its health is - # not known at the moment. - UNKNOWN = 1 - - # The instance is reachable i.e. a connection to the application health - # checking endpoint can be established, and conforms to the requirements - # defined by the health check. - HEALTHY = 2 - - # The instance is reachable, but does not conform to the requirements - # defined by the health check. - UNHEALTHY = 3 - - # The instance is being drained. The existing connections to the instance - # have time to complete, but the new ones are being refused. - DRAINING = 4 - - # The instance is unreachable i.e. a connection to the application health - # checking endpoint cannot be established, or the server does not respond - # within the specified timeout. - TIMEOUT = 5 - end - end - - # Availability of the instance. - module Availability - UNSPECIFIED = 0 - - RESIDENT = 1 - - DYNAMIC = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/location.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/location.rb deleted file mode 100644 index 2df709d7a157..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/location.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # Metadata for the given [google.cloud.location.Location][google.cloud.location.Location]. - # @!attribute [rw] standard_environment_available - # @return [::Boolean] - # App Engine standard environment is available in the given location. - # @!attribute [rw] flexible_environment_available - # @return [::Boolean] - # App Engine flexible environment is available in the given location. - # @!attribute [r] search_api_available - # @return [::Boolean] - # Output only. [Search API](https://cloud.google.com/appengine/docs/standard/python/search) - # is available in the given location. - class LocationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/network_settings.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/network_settings.rb deleted file mode 100644 index c93962639ddf..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/network_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! - - -module Google - module Cloud - module AppEngine - module V1 - # A NetworkSettings resource is a container for ingress settings for a version - # or service. - # @!attribute [rw] ingress_traffic_allowed - # @return [::Google::Cloud::AppEngine::V1::NetworkSettings::IngressTrafficAllowed] - # The ingress settings for version or service. - class NetworkSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # If unspecified, INGRESS_TRAFFIC_ALLOWED_ALL will be used. - module IngressTrafficAllowed - # Unspecified - INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED = 0 - - # Allow HTTP traffic from public and private sources. - INGRESS_TRAFFIC_ALLOWED_ALL = 1 - - # Allow HTTP traffic from only private VPC sources. - INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY = 2 - - # Allow HTTP traffic from private VPC sources and through load balancers. - INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/operation.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/operation.rb deleted file mode 100644 index 7111bfba671a..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/operation.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # Metadata for the given {::Google::Longrunning::Operation google.longrunning.Operation}. - # @!attribute [rw] method - # @return [::String] - # API method that initiated this operation. Example: - # `google.appengine.v1.Versions.CreateVersion`. - # @!attribute [rw] insert_time - # @return [::Google::Protobuf::Timestamp] - # Time that this operation was created. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Time that this operation completed. - # @!attribute [rw] user - # @return [::String] - # User who requested this operation. - # @!attribute [rw] target - # @return [::String] - # Name of the resource that this operation is acting on. Example: - # `apps/myapp/services/default`. - # @!attribute [rw] ephemeral_message - # @return [::String] - # Ephemeral message that may change every time the operation is polled. - # @!attribute [rw] warning - # @return [::Array<::String>] - # Durable messages that persist on every operation poll. - # @!attribute [rw] create_version_metadata - # @return [::Google::Cloud::AppEngine::V1::CreateVersionMetadataV1] - class OperationMetadataV1 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the given {::Google::Longrunning::Operation google.longrunning.Operation} during a - # {::Google::Cloud::AppEngine::V1::CreateVersionRequest google.appengine.v1.CreateVersionRequest}. - # @!attribute [rw] cloud_build_id - # @return [::String] - # The Cloud Build ID if one was created as part of the version create. - class CreateVersionMetadataV1 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/service.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/service.rb deleted file mode 100644 index 75a885008de1..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/service.rb +++ /dev/null @@ -1,125 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # A Service resource is a logical component of an application that can share - # state and communicate in a secure fashion with other services. - # For example, an application that handles customer requests might - # include separate services to handle tasks such as backend data - # analysis or API requests from mobile devices. Each service has a - # collection of versions that define a specific set of code used to - # implement the functionality of that service. - # @!attribute [rw] name - # @return [::String] - # Full path to the Service resource in the API. - # Example: `apps/myapp/services/default`. - # @!attribute [rw] id - # @return [::String] - # Relative name of the service within the application. - # Example: `default`. - # @!attribute [rw] split - # @return [::Google::Cloud::AppEngine::V1::TrafficSplit] - # Mapping that defines fractional HTTP traffic diversion to - # different versions within the service. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # A set of labels to apply to this service. Labels are key/value pairs that - # describe the service and all resources that belong to it (e.g., - # versions). The labels can be used to search and group resources, and are - # propagated to the usage and billing reports, enabling fine-grain analysis - # of costs. An example of using labels is to tag resources belonging to - # different environments (e.g., "env=prod", "env=qa"). - # - #

Label keys and values can be no longer than 63 characters and can only - # contain lowercase letters, numeric characters, underscores, dashes, and - # international characters. Label keys must start with a lowercase letter - # or an international character. Each service can have at most 32 labels. - # @!attribute [rw] network_settings - # @return [::Google::Cloud::AppEngine::V1::NetworkSettings] - # Ingress settings for this service. Will apply to all versions. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Traffic routing configuration for versions within a single service. Traffic - # splits define how traffic directed to the service is assigned to versions. - # @!attribute [rw] shard_by - # @return [::Google::Cloud::AppEngine::V1::TrafficSplit::ShardBy] - # Mechanism used to determine which version a request is sent to. - # The traffic selection algorithm will - # be stable for either type until allocations are changed. - # @!attribute [rw] allocations - # @return [::Google::Protobuf::Map{::String => ::Float}] - # Mapping from version IDs within the service to fractional - # (0.000, 1] allocations of traffic for that version. Each version can - # be specified only once, but some versions in the service may not - # have any traffic allocation. Services that have traffic allocated - # cannot be deleted until either the service is deleted or - # their traffic allocation is removed. Allocations must sum to 1. - # Up to two decimal place precision is supported for IP-based splits and - # up to three decimal places is supported for cookie-based splits. - class TrafficSplit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Float] - class AllocationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Available sharding mechanisms. - module ShardBy - # Diversion method unspecified. - UNSPECIFIED = 0 - - # Diversion based on a specially named cookie, "GOOGAPPUID." The cookie - # must be set by the application itself or no diversion will occur. - COOKIE = 1 - - # Diversion based on applying the modulus operation to a fingerprint - # of the IP address. - IP = 2 - - # Diversion based on weighted random assignment. An incoming request is - # randomly routed to a version in the traffic split, with probability - # proportional to the version's traffic share. - RANDOM = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/version.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/version.rb deleted file mode 100644 index fd1ab9f2a613..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/appengine/v1/version.rb +++ /dev/null @@ -1,650 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppEngine - module V1 - # A Version resource is a specific set of source code and configuration files - # that are deployed into a service. - # @!attribute [rw] name - # @return [::String] - # Full path to the Version resource in the API. Example: - # `apps/myapp/services/default/versions/v1`. - # @!attribute [rw] id - # @return [::String] - # Relative name of the version within the service. Example: `v1`. - # Version names can contain only lowercase letters, numbers, or hyphens. - # Reserved names: "default", "latest", and any name with the prefix "ah-". - # @!attribute [rw] automatic_scaling - # @return [::Google::Cloud::AppEngine::V1::AutomaticScaling] - # Automatic scaling is based on request rate, response latencies, and other - # application metrics. Instances are dynamically created and destroyed as - # needed in order to handle traffic. - # - # Note: The following fields are mutually exclusive: `automatic_scaling`, `basic_scaling`, `manual_scaling`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] basic_scaling - # @return [::Google::Cloud::AppEngine::V1::BasicScaling] - # A service with basic scaling will create an instance when the application - # receives a request. The instance will be turned down when the app becomes - # idle. Basic scaling is ideal for work that is intermittent or driven by - # user activity. - # - # Note: The following fields are mutually exclusive: `basic_scaling`, `automatic_scaling`, `manual_scaling`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] manual_scaling - # @return [::Google::Cloud::AppEngine::V1::ManualScaling] - # A service with manual scaling runs continuously, allowing you to perform - # complex initialization and rely on the state of its memory over time. - # Manually scaled versions are sometimes referred to as "backends". - # - # Note: The following fields are mutually exclusive: `manual_scaling`, `automatic_scaling`, `basic_scaling`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] inbound_services - # @return [::Array<::Google::Cloud::AppEngine::V1::InboundServiceType>] - # Before an application can receive email or XMPP messages, the application - # must be configured to enable the service. - # @!attribute [rw] instance_class - # @return [::String] - # Instance class that is used to run this version. Valid values are: - # - # * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G` - # * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G` - # - # Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or - # BasicScaling. - # @!attribute [rw] network - # @return [::Google::Cloud::AppEngine::V1::Network] - # Extra network settings. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] zones - # @return [::Array<::String>] - # The Google Compute Engine zones that are supported by this version in the - # App Engine flexible environment. Deprecated. - # @!attribute [rw] resources - # @return [::Google::Cloud::AppEngine::V1::Resources] - # Machine resources for this version. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] runtime - # @return [::String] - # Desired runtime. Example: `python27`. - # @!attribute [rw] runtime_channel - # @return [::String] - # The channel of the runtime to use. Only available for some - # runtimes. Defaults to the `default` channel. - # @!attribute [rw] threadsafe - # @return [::Boolean] - # Whether multiple requests can be dispatched to this version at once. - # @!attribute [rw] vm - # @return [::Boolean] - # Whether to deploy this version in a container on a virtual machine. - # @!attribute [rw] app_engine_apis - # @return [::Boolean] - # Allows App Engine second generation runtimes to access the legacy bundled - # services. - # @!attribute [rw] beta_settings - # @return [::Google::Protobuf::Map{::String => ::String}] - # Metadata settings that are supplied to this version to enable - # beta runtime features. - # @!attribute [rw] env - # @return [::String] - # App Engine execution environment for this version. - # - # Defaults to `standard`. - # @!attribute [rw] serving_status - # @return [::Google::Cloud::AppEngine::V1::ServingStatus] - # Current serving status of this version. Only the versions with a - # `SERVING` status create instances and can be billed. - # - # `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`. - # @!attribute [rw] created_by - # @return [::String] - # Email address of the user who created this version. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time that this version was created. - # @!attribute [rw] disk_usage_bytes - # @return [::Integer] - # Total size in bytes of all the files that are included in this version - # and currently hosted on the App Engine disk. - # @!attribute [rw] runtime_api_version - # @return [::String] - # The version of the API in the given runtime environment. Please see the - # app.yaml reference for valid values at - # https://cloud.google.com/appengine/docs/standard//config/appref - # @!attribute [rw] runtime_main_executable_path - # @return [::String] - # The path or name of the app's main executable. - # @!attribute [rw] service_account - # @return [::String] - # The identity that the deployed version will run as. - # Admin API will use the App Engine Appspot service account as default if - # this field is neither provided in app.yaml file nor through CLI flag. - # @!attribute [rw] handlers - # @return [::Array<::Google::Cloud::AppEngine::V1::UrlMap>] - # An ordered list of URL-matching patterns that should be applied to incoming - # requests. The first matching URL handles the request and other request - # handlers are not attempted. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] error_handlers - # @return [::Array<::Google::Cloud::AppEngine::V1::ErrorHandler>] - # Custom static error pages. Limited to 10KB per page. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] libraries - # @return [::Array<::Google::Cloud::AppEngine::V1::Library>] - # Configuration for third-party Python runtime libraries that are required - # by the application. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] api_config - # @return [::Google::Cloud::AppEngine::V1::ApiConfigHandler] - # Serving configuration for - # [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/). - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] env_variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # Environment variables available to the application. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] build_env_variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # Environment variables available to the build environment. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] default_expiration - # @return [::Google::Protobuf::Duration] - # Duration that static files should be cached by web proxies and browsers. - # Only applicable if the corresponding - # [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler) - # does not specify its own expiration time. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] health_check - # @return [::Google::Cloud::AppEngine::V1::HealthCheck] - # Configures health checking for instances. Unhealthy instances are - # stopped and replaced with new instances. - # Only applicable in the App Engine flexible environment. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] readiness_check - # @return [::Google::Cloud::AppEngine::V1::ReadinessCheck] - # Configures readiness health checking for instances. - # Unhealthy instances are not put into the backend traffic rotation. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] liveness_check - # @return [::Google::Cloud::AppEngine::V1::LivenessCheck] - # Configures liveness health checking for instances. - # Unhealthy instances are stopped and replaced with new instances - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] nobuild_files_regex - # @return [::String] - # Files that match this pattern will not be built into this version. - # Only applicable for Go runtimes. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] deployment - # @return [::Google::Cloud::AppEngine::V1::Deployment] - # Code and application artifacts that make up this version. - # - # Only returned in `GET` requests if `view=FULL` is set. - # @!attribute [rw] version_url - # @return [::String] - # Serving URL for this version. Example: - # "https://myversion-dot-myservice-dot-myapp.appspot.com" - # @!attribute [rw] endpoints_api_service - # @return [::Google::Cloud::AppEngine::V1::EndpointsApiService] - # Cloud Endpoints configuration. - # - # If endpoints_api_service is set, the Cloud Endpoints Extensible Service - # Proxy will be provided to serve the API implemented by the app. - # @!attribute [rw] entrypoint - # @return [::Google::Cloud::AppEngine::V1::Entrypoint] - # The entrypoint for the application. - # @!attribute [rw] vpc_access_connector - # @return [::Google::Cloud::AppEngine::V1::VpcAccessConnector] - # Enables VPC connectivity for standard apps. - class Version - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class BetaSettingsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class EnvVariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class BuildEnvVariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # [Cloud Endpoints](https://cloud.google.com/endpoints) configuration. - # The Endpoints API Service provides tooling for serving Open API and gRPC - # endpoints via an NGINX proxy. Only valid for App Engine Flexible environment - # deployments. - # - # The fields here refer to the name and configuration ID of a "service" - # resource in the [Service Management API](https://cloud.google.com/service-management/overview). - # @!attribute [rw] name - # @return [::String] - # Endpoints service name which is the name of the "service" resource in the - # Service Management API. For example "myapi.endpoints.myproject.cloud.goog" - # @!attribute [rw] config_id - # @return [::String] - # Endpoints service configuration ID as specified by the Service Management - # API. For example "2016-09-19r1". - # - # By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`. - # This means that Endpoints starts up with a particular configuration ID. - # When a new configuration is rolled out, Endpoints must be given the new - # configuration ID. The `config_id` field is used to give the configuration - # ID and is required in this case. - # - # Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`. - # When using this, Endpoints fetches the latest configuration and does not - # need the configuration ID. In this case, `config_id` must be omitted. - # @!attribute [rw] rollout_strategy - # @return [::Google::Cloud::AppEngine::V1::EndpointsApiService::RolloutStrategy] - # Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If - # `MANAGED`, `config_id` must be omitted. - # @!attribute [rw] disable_trace_sampling - # @return [::Boolean] - # Enable or disable trace sampling. By default, this is set to false for - # enabled. - class EndpointsApiService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Available rollout strategies. - module RolloutStrategy - # Not specified. Defaults to `FIXED`. - UNSPECIFIED_ROLLOUT_STRATEGY = 0 - - # Endpoints service configuration ID will be fixed to the configuration ID - # specified by `config_id`. - FIXED = 1 - - # Endpoints service configuration ID will be updated with each rollout. - MANAGED = 2 - end - end - - # Automatic scaling is based on request rate, response latencies, and other - # application metrics. - # @!attribute [rw] cool_down_period - # @return [::Google::Protobuf::Duration] - # The time period that the - # [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/) - # should wait before it starts collecting information from a new instance. - # This prevents the autoscaler from collecting information when the instance - # is initializing, during which the collected usage would not be reliable. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] cpu_utilization - # @return [::Google::Cloud::AppEngine::V1::CpuUtilization] - # Target scaling by CPU usage. - # @!attribute [rw] max_concurrent_requests - # @return [::Integer] - # Number of concurrent requests an automatic scaling instance can accept - # before the scheduler spawns a new instance. - # - # Defaults to a runtime-specific value. - # @!attribute [rw] max_idle_instances - # @return [::Integer] - # Maximum number of idle instances that should be maintained for this - # version. - # @!attribute [rw] max_total_instances - # @return [::Integer] - # Maximum number of instances that should be started to handle requests for - # this version. - # @!attribute [rw] max_pending_latency - # @return [::Google::Protobuf::Duration] - # Maximum amount of time that a request should wait in the pending queue - # before starting a new instance to handle it. - # @!attribute [rw] min_idle_instances - # @return [::Integer] - # Minimum number of idle instances that should be maintained for - # this version. Only applicable for the default version of a service. - # @!attribute [rw] min_total_instances - # @return [::Integer] - # Minimum number of running instances that should be maintained for this - # version. - # @!attribute [rw] min_pending_latency - # @return [::Google::Protobuf::Duration] - # Minimum amount of time a request should wait in the pending queue before - # starting a new instance to handle it. - # @!attribute [rw] request_utilization - # @return [::Google::Cloud::AppEngine::V1::RequestUtilization] - # Target scaling by request utilization. - # @!attribute [rw] disk_utilization - # @return [::Google::Cloud::AppEngine::V1::DiskUtilization] - # Target scaling by disk usage. - # @!attribute [rw] network_utilization - # @return [::Google::Cloud::AppEngine::V1::NetworkUtilization] - # Target scaling by network usage. - # @!attribute [rw] standard_scheduler_settings - # @return [::Google::Cloud::AppEngine::V1::StandardSchedulerSettings] - # Scheduler settings for standard environment. - class AutomaticScaling - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A service with basic scaling will create an instance when the application - # receives a request. The instance will be turned down when the app becomes - # idle. Basic scaling is ideal for work that is intermittent or driven by - # user activity. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Duration of time after the last request that an instance must wait before - # the instance is shut down. - # @!attribute [rw] max_instances - # @return [::Integer] - # Maximum number of instances to create for this version. - class BasicScaling - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A service with manual scaling runs continuously, allowing you to perform - # complex initialization and rely on the state of its memory over time. - # @!attribute [rw] instances - # @return [::Integer] - # Number of instances to assign to the service at the start. This number - # can later be altered by using the - # [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions) - # `set_num_instances()` function. - class ManualScaling - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target scaling by CPU usage. - # @!attribute [rw] aggregation_window_length - # @return [::Google::Protobuf::Duration] - # Period of time over which CPU utilization is calculated. - # @!attribute [rw] target_utilization - # @return [::Float] - # Target CPU utilization ratio to maintain when scaling. Must be between 0 - # and 1. - class CpuUtilization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target scaling by request utilization. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] target_request_count_per_second - # @return [::Integer] - # Target requests per second. - # @!attribute [rw] target_concurrent_requests - # @return [::Integer] - # Target number of concurrent requests. - class RequestUtilization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target scaling by disk usage. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] target_write_bytes_per_second - # @return [::Integer] - # Target bytes written per second. - # @!attribute [rw] target_write_ops_per_second - # @return [::Integer] - # Target ops written per second. - # @!attribute [rw] target_read_bytes_per_second - # @return [::Integer] - # Target bytes read per second. - # @!attribute [rw] target_read_ops_per_second - # @return [::Integer] - # Target ops read per seconds. - class DiskUtilization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target scaling by network usage. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] target_sent_bytes_per_second - # @return [::Integer] - # Target bytes sent per second. - # @!attribute [rw] target_sent_packets_per_second - # @return [::Integer] - # Target packets sent per second. - # @!attribute [rw] target_received_bytes_per_second - # @return [::Integer] - # Target bytes received per second. - # @!attribute [rw] target_received_packets_per_second - # @return [::Integer] - # Target packets received per second. - class NetworkUtilization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Scheduler settings for standard environment. - # @!attribute [rw] target_cpu_utilization - # @return [::Float] - # Target CPU utilization ratio to maintain when scaling. - # @!attribute [rw] target_throughput_utilization - # @return [::Float] - # Target throughput utilization ratio to maintain when scaling - # @!attribute [rw] min_instances - # @return [::Integer] - # Minimum number of instances to run for this version. Set to zero to disable - # `min_instances` configuration. - # @!attribute [rw] max_instances - # @return [::Integer] - # Maximum number of instances to run for this version. Set to zero to disable - # `max_instances` configuration. - class StandardSchedulerSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Extra network settings. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] forwarded_ports - # @return [::Array<::String>] - # List of ports, or port pairs, to forward from the virtual machine to the - # application container. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] instance_tag - # @return [::String] - # Tag to apply to the instance during creation. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] name - # @return [::String] - # Google Compute Engine network where the virtual machines are created. - # Specify the short name, not the resource path. - # - # Defaults to `default`. - # @!attribute [rw] subnetwork_name - # @return [::String] - # Google Cloud Platform sub-network where the virtual machines are created. - # Specify the short name, not the resource path. - # - # If a subnetwork name is specified, a network name will also be required - # unless it is for the default network. - # - # * If the network that the instance is being created in is a Legacy network, - # then the IP address is allocated from the IPv4Range. - # * If the network that the instance is being created in is an auto Subnet - # Mode Network, then only network name should be specified (not the - # subnetwork_name) and the IP address is created from the IPCidrRange of the - # subnetwork that exists in that zone for that network. - # * If the network that the instance is being created in is a custom Subnet - # Mode Network, then the subnetwork_name must be specified and the - # IP address is created from the IPCidrRange of the subnetwork. - # - # If specified, the subnetwork must exist in the same region as the - # App Engine flexible environment application. - # @!attribute [rw] session_affinity - # @return [::Boolean] - # Enable session affinity. - # Only applicable in the App Engine flexible environment. - class Network - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Volumes mounted within the app container. - # Only applicable in the App Engine flexible environment. - # @!attribute [rw] name - # @return [::String] - # Unique name for the volume. - # @!attribute [rw] volume_type - # @return [::String] - # Underlying volume type, e.g. 'tmpfs'. - # @!attribute [rw] size_gb - # @return [::Float] - # Volume size in gigabytes. - class Volume - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Machine resources for a version. - # @!attribute [rw] cpu - # @return [::Float] - # Number of CPU cores needed. - # @!attribute [rw] disk_gb - # @return [::Float] - # Disk size (GB) needed. - # @!attribute [rw] memory_gb - # @return [::Float] - # Memory (GB) needed. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::AppEngine::V1::Volume>] - # User specified volumes. - # @!attribute [rw] kms_key_reference - # @return [::String] - # The name of the encryption key that is stored in Google Cloud KMS. - # Only should be used by Cloud Composer to encrypt the vm disk - class Resources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # VPC access connector specification. - # @!attribute [rw] name - # @return [::String] - # Full Serverless VPC Access Connector name e.g. - # /projects/my-project/locations/us-central1/connectors/c1. - # @!attribute [rw] egress_setting - # @return [::Google::Cloud::AppEngine::V1::VpcAccessConnector::EgressSetting] - # The egress setting for the connector, controlling what traffic is diverted - # through it. - class VpcAccessConnector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Available egress settings. - # - # This controls what traffic is diverted through the VPC Access Connector - # resource. By default PRIVATE_IP_RANGES will be used. - module EgressSetting - EGRESS_SETTING_UNSPECIFIED = 0 - - # Force the use of VPC Access for all egress traffic from the function. - ALL_TRAFFIC = 1 - - # Use the VPC Access Connector for private IP space from RFC1918. - PRIVATE_IP_RANGES = 2 - end - end - - # The entrypoint for the application. - # @!attribute [rw] shell - # @return [::String] - # The format should be a shell command that can be fed to `bash -c`. - class Entrypoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Available inbound services. - module InboundServiceType - # Not specified. - INBOUND_SERVICE_UNSPECIFIED = 0 - - # Allows an application to receive mail. - INBOUND_SERVICE_MAIL = 1 - - # Allows an application to receive email-bound notifications. - INBOUND_SERVICE_MAIL_BOUNCE = 2 - - # Allows an application to receive error stanzas. - INBOUND_SERVICE_XMPP_ERROR = 3 - - # Allows an application to receive instant messages. - INBOUND_SERVICE_XMPP_MESSAGE = 4 - - # Allows an application to receive user subscription POSTs. - INBOUND_SERVICE_XMPP_SUBSCRIBE = 5 - - # Allows an application to receive a user's chat presence. - INBOUND_SERVICE_XMPP_PRESENCE = 6 - - # Registers an application for notifications when a client connects or - # disconnects from a channel. - INBOUND_SERVICE_CHANNEL_PRESENCE = 7 - - # Enables warmup requests. - INBOUND_SERVICE_WARMUP = 9 - end - - # Run states of a version. - module ServingStatus - # Not specified. - SERVING_STATUS_UNSPECIFIED = 0 - - # Currently serving. Instances are created according to the - # scaling settings of the version. - SERVING = 1 - - # Disabled. No instances will be created and the scaling - # settings are ignored until the state of the version changes - # to `SERVING`. - STOPPED = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-app_engine-v1/snippets/Gemfile deleted file mode 100644 index af9ca78a8bcc..000000000000 --- a/owl-bot-staging/google-cloud-app_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-cloud-app_engine-v1", path: "../" -else - gem "google-cloud-app_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-cloud-app_engine-v1/snippets/applications/create_application.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/create_application.rb deleted file mode 100644 index 34253e8ab9a5..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/create_application.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Applications_CreateApplication_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the create_application call in the Applications service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Applications::Client#create_application. -# -def create_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Applications::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::CreateApplicationRequest.new - - # Call the create_application method. - result = client.create_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Applications_CreateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/get_application.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/get_application.rb deleted file mode 100644 index 01fe38687b89..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/get_application.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Applications_GetApplication_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the get_application call in the Applications service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Applications::Client#get_application. -# -def get_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Applications::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::GetApplicationRequest.new - - # Call the get_application method. - result = client.get_application request - - # The returned object is of type Google::Cloud::AppEngine::V1::Application. - p result -end -# [END appengine_v1_generated_Applications_GetApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/repair_application.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/repair_application.rb deleted file mode 100644 index bb0fa4afc030..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/repair_application.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Applications_RepairApplication_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the repair_application call in the Applications service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Applications::Client#repair_application. -# -def repair_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Applications::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::RepairApplicationRequest.new - - # Call the repair_application method. - result = client.repair_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Applications_RepairApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/update_application.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/update_application.rb deleted file mode 100644 index 00d97371c546..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/applications/update_application.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Applications_UpdateApplication_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the update_application call in the Applications service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Applications::Client#update_application. -# -def update_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Applications::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new - - # Call the update_application method. - result = client.update_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Applications_UpdateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/create_authorized_certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/create_authorized_certificate.rb deleted file mode 100644 index 42ef74ed5958..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/create_authorized_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the create_authorized_certificate call in the AuthorizedCertificates service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#create_authorized_certificate. -# -def create_authorized_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new - - # Call the create_authorized_certificate method. - result = client.create_authorized_certificate request - - # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - p result -end -# [END appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/delete_authorized_certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/delete_authorized_certificate.rb deleted file mode 100644 index 111a44c0a7b1..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/delete_authorized_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the delete_authorized_certificate call in the AuthorizedCertificates service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#delete_authorized_certificate. -# -def delete_authorized_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new - - # Call the delete_authorized_certificate method. - result = client.delete_authorized_certificate request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/get_authorized_certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/get_authorized_certificate.rb deleted file mode 100644 index 2242af0affaf..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/get_authorized_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the get_authorized_certificate call in the AuthorizedCertificates service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#get_authorized_certificate. -# -def get_authorized_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new - - # Call the get_authorized_certificate method. - result = client.get_authorized_certificate request - - # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - p result -end -# [END appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/list_authorized_certificates.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/list_authorized_certificates.rb deleted file mode 100644 index 77701b481d42..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/list_authorized_certificates.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the list_authorized_certificates call in the AuthorizedCertificates service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#list_authorized_certificates. -# -def list_authorized_certificates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new - - # Call the list_authorized_certificates method. - result = client.list_authorized_certificates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedCertificate. - p item - end -end -# [END appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/update_authorized_certificate.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/update_authorized_certificate.rb deleted file mode 100644 index 209b245eda50..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_certificates/update_authorized_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the update_authorized_certificate call in the AuthorizedCertificates service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#update_authorized_certificate. -# -def update_authorized_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new - - # Call the update_authorized_certificate method. - result = client.update_authorized_certificate request - - # The returned object is of type Google::Cloud::AppEngine::V1::AuthorizedCertificate. - p result -end -# [END appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_domains/list_authorized_domains.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_domains/list_authorized_domains.rb deleted file mode 100644 index af471202d318..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/authorized_domains/list_authorized_domains.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the list_authorized_domains call in the AuthorizedDomains service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::AuthorizedDomains::Client#list_authorized_domains. -# -def list_authorized_domains - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new - - # Call the list_authorized_domains method. - result = client.list_authorized_domains request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppEngine::V1::AuthorizedDomain. - p item - end -end -# [END appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/create_domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/create_domain_mapping.rb deleted file mode 100644 index 8ec21b02322f..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/create_domain_mapping.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_DomainMappings_CreateDomainMapping_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the create_domain_mapping call in the DomainMappings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::DomainMappings::Client#create_domain_mapping. -# -def create_domain_mapping - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new - - # Call the create_domain_mapping method. - result = client.create_domain_mapping request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_DomainMappings_CreateDomainMapping_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/delete_domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/delete_domain_mapping.rb deleted file mode 100644 index 61682f243205..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/delete_domain_mapping.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_DomainMappings_DeleteDomainMapping_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the delete_domain_mapping call in the DomainMappings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::DomainMappings::Client#delete_domain_mapping. -# -def delete_domain_mapping - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new - - # Call the delete_domain_mapping method. - result = client.delete_domain_mapping request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_DomainMappings_DeleteDomainMapping_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/get_domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/get_domain_mapping.rb deleted file mode 100644 index 8c2a29dc9265..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/get_domain_mapping.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_DomainMappings_GetDomainMapping_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the get_domain_mapping call in the DomainMappings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::DomainMappings::Client#get_domain_mapping. -# -def get_domain_mapping - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new - - # Call the get_domain_mapping method. - result = client.get_domain_mapping request - - # The returned object is of type Google::Cloud::AppEngine::V1::DomainMapping. - p result -end -# [END appengine_v1_generated_DomainMappings_GetDomainMapping_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/list_domain_mappings.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/list_domain_mappings.rb deleted file mode 100644 index cdad0dc0d30c..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/list_domain_mappings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_DomainMappings_ListDomainMappings_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the list_domain_mappings call in the DomainMappings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::DomainMappings::Client#list_domain_mappings. -# -def list_domain_mappings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new - - # Call the list_domain_mappings method. - result = client.list_domain_mappings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppEngine::V1::DomainMapping. - p item - end -end -# [END appengine_v1_generated_DomainMappings_ListDomainMappings_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/update_domain_mapping.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/update_domain_mapping.rb deleted file mode 100644 index 7adfc81daaf7..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/domain_mappings/update_domain_mapping.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_DomainMappings_UpdateDomainMapping_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the update_domain_mapping call in the DomainMappings service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::DomainMappings::Client#update_domain_mapping. -# -def update_domain_mapping - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::DomainMappings::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new - - # Call the update_domain_mapping method. - result = client.update_domain_mapping request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_DomainMappings_UpdateDomainMapping_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/batch_update_ingress_rules.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/batch_update_ingress_rules.rb deleted file mode 100644 index 8a6c4c3bc7da..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/batch_update_ingress_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 appengine_v1_generated_Firewall_BatchUpdateIngressRules_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the batch_update_ingress_rules call in the Firewall service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Firewall::Client#batch_update_ingress_rules. -# -def batch_update_ingress_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Firewall::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new - - # Call the batch_update_ingress_rules method. - result = client.batch_update_ingress_rules request - - # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse. - p result -end -# [END appengine_v1_generated_Firewall_BatchUpdateIngressRules_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/create_ingress_rule.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/create_ingress_rule.rb deleted file mode 100644 index e8a820fb1151..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/create_ingress_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Firewall_CreateIngressRule_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the create_ingress_rule call in the Firewall service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Firewall::Client#create_ingress_rule. -# -def create_ingress_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Firewall::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new - - # Call the create_ingress_rule method. - result = client.create_ingress_rule request - - # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - p result -end -# [END appengine_v1_generated_Firewall_CreateIngressRule_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/delete_ingress_rule.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/delete_ingress_rule.rb deleted file mode 100644 index 21d407dbf16b..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/delete_ingress_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Firewall_DeleteIngressRule_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the delete_ingress_rule call in the Firewall service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Firewall::Client#delete_ingress_rule. -# -def delete_ingress_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Firewall::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new - - # Call the delete_ingress_rule method. - result = client.delete_ingress_rule request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END appengine_v1_generated_Firewall_DeleteIngressRule_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/get_ingress_rule.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/get_ingress_rule.rb deleted file mode 100644 index 864191b6e8f4..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/get_ingress_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Firewall_GetIngressRule_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the get_ingress_rule call in the Firewall service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Firewall::Client#get_ingress_rule. -# -def get_ingress_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Firewall::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new - - # Call the get_ingress_rule method. - result = client.get_ingress_rule request - - # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - p result -end -# [END appengine_v1_generated_Firewall_GetIngressRule_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/list_ingress_rules.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/list_ingress_rules.rb deleted file mode 100644 index d099128ed3a4..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/list_ingress_rules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Firewall_ListIngressRules_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the list_ingress_rules call in the Firewall service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Firewall::Client#list_ingress_rules. -# -def list_ingress_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Firewall::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new - - # Call the list_ingress_rules method. - result = client.list_ingress_rules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule. - p item - end -end -# [END appengine_v1_generated_Firewall_ListIngressRules_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/update_ingress_rule.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/update_ingress_rule.rb deleted file mode 100644 index 12aa8c2a058e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/firewall/update_ingress_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Firewall_UpdateIngressRule_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the update_ingress_rule call in the Firewall service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Firewall::Client#update_ingress_rule. -# -def update_ingress_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Firewall::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new - - # Call the update_ingress_rule method. - result = client.update_ingress_rule request - - # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule. - p result -end -# [END appengine_v1_generated_Firewall_UpdateIngressRule_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/debug_instance.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/debug_instance.rb deleted file mode 100644 index 51310960cbc4..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/debug_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Instances_DebugInstance_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the debug_instance call in the Instances service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Instances::Client#debug_instance. -# -def debug_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Instances::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::DebugInstanceRequest.new - - # Call the debug_instance method. - result = client.debug_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Instances_DebugInstance_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/delete_instance.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/delete_instance.rb deleted file mode 100644 index 75e366470e95..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/delete_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Instances_DeleteInstance_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the delete_instance call in the Instances service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Instances::Client#delete_instance. -# -def delete_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Instances::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new - - # Call the delete_instance method. - result = client.delete_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Instances_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/get_instance.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/get_instance.rb deleted file mode 100644 index bd844d902a50..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/get_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Instances_GetInstance_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the get_instance call in the Instances service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Instances::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Instances::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::AppEngine::V1::Instance. - p result -end -# [END appengine_v1_generated_Instances_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/list_instances.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/list_instances.rb deleted file mode 100644 index 039ac22d025d..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/instances/list_instances.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Instances_ListInstances_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the list_instances call in the Instances service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Instances::Client#list_instances. -# -def list_instances - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Instances::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::ListInstancesRequest.new - - # Call the list_instances method. - result = client.list_instances request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppEngine::V1::Instance. - p item - end -end -# [END appengine_v1_generated_Instances_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/delete_service.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/delete_service.rb deleted file mode 100644 index d09396b6c9f3..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/delete_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Services_DeleteService_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the delete_service call in the Services service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Services::Client#delete_service. -# -def delete_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Services::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::DeleteServiceRequest.new - - # Call the delete_service method. - result = client.delete_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Services_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/get_service.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/get_service.rb deleted file mode 100644 index 10a9a71431b0..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/get_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Services_GetService_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the get_service call in the Services service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Services::Client#get_service. -# -def get_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Services::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::GetServiceRequest.new - - # Call the get_service method. - result = client.get_service request - - # The returned object is of type Google::Cloud::AppEngine::V1::Service. - p result -end -# [END appengine_v1_generated_Services_GetService_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/list_services.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/list_services.rb deleted file mode 100644 index 015ba27a87fb..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/list_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Services_ListServices_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the list_services call in the Services service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Services::Client#list_services. -# -def list_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Services::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::ListServicesRequest.new - - # Call the list_services method. - result = client.list_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppEngine::V1::Service. - p item - end -end -# [END appengine_v1_generated_Services_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/update_service.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/update_service.rb deleted file mode 100644 index c4cfc4436b80..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/services/update_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Services_UpdateService_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the update_service call in the Services service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Services::Client#update_service. -# -def update_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Services::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::UpdateServiceRequest.new - - # Call the update_service method. - result = client.update_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Services_UpdateService_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/snippet_metadata_google.appengine.v1.json b/owl-bot-staging/google-cloud-app_engine-v1/snippets/snippet_metadata_google.appengine.v1.json deleted file mode 100644 index 37c320912e93..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/snippet_metadata_google.appengine.v1.json +++ /dev/null @@ -1,1375 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-app_engine-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.appengine.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "appengine_v1_generated_Applications_GetApplication_sync", - "title": "Snippet for the get_application call in the Applications service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Applications::Client#get_application.", - "file": "applications/get_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_application", - "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client#get_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::GetApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::Application", - "client": { - "short_name": "Applications::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client" - }, - "method": { - "short_name": "GetApplication", - "full_name": "google.appengine.v1.Applications.GetApplication", - "service": { - "short_name": "Applications", - "full_name": "google.appengine.v1.Applications" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Applications_CreateApplication_sync", - "title": "Snippet for the create_application call in the Applications service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Applications::Client#create_application.", - "file": "applications/create_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_application", - "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client#create_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::CreateApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Applications::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client" - }, - "method": { - "short_name": "CreateApplication", - "full_name": "google.appengine.v1.Applications.CreateApplication", - "service": { - "short_name": "Applications", - "full_name": "google.appengine.v1.Applications" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Applications_UpdateApplication_sync", - "title": "Snippet for the update_application call in the Applications service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Applications::Client#update_application.", - "file": "applications/update_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_application", - "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client#update_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::UpdateApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Applications::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client" - }, - "method": { - "short_name": "UpdateApplication", - "full_name": "google.appengine.v1.Applications.UpdateApplication", - "service": { - "short_name": "Applications", - "full_name": "google.appengine.v1.Applications" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Applications_RepairApplication_sync", - "title": "Snippet for the repair_application call in the Applications service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Applications::Client#repair_application.", - "file": "applications/repair_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "repair_application", - "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client#repair_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::RepairApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Applications::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Applications::Client" - }, - "method": { - "short_name": "RepairApplication", - "full_name": "google.appengine.v1.Applications.RepairApplication", - "service": { - "short_name": "Applications", - "full_name": "google.appengine.v1.Applications" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Services_ListServices_sync", - "title": "Snippet for the list_services call in the Services service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Services::Client#list_services.", - "file": "services/list_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_services", - "full_name": "::Google::Cloud::AppEngine::V1::Services::Client#list_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::ListServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::ListServicesResponse", - "client": { - "short_name": "Services::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Services::Client" - }, - "method": { - "short_name": "ListServices", - "full_name": "google.appengine.v1.Services.ListServices", - "service": { - "short_name": "Services", - "full_name": "google.appengine.v1.Services" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Services_GetService_sync", - "title": "Snippet for the get_service call in the Services service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Services::Client#get_service.", - "file": "services/get_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service", - "full_name": "::Google::Cloud::AppEngine::V1::Services::Client#get_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::GetServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::Service", - "client": { - "short_name": "Services::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Services::Client" - }, - "method": { - "short_name": "GetService", - "full_name": "google.appengine.v1.Services.GetService", - "service": { - "short_name": "Services", - "full_name": "google.appengine.v1.Services" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Services_UpdateService_sync", - "title": "Snippet for the update_service call in the Services service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Services::Client#update_service.", - "file": "services/update_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service", - "full_name": "::Google::Cloud::AppEngine::V1::Services::Client#update_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::UpdateServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Services::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Services::Client" - }, - "method": { - "short_name": "UpdateService", - "full_name": "google.appengine.v1.Services.UpdateService", - "service": { - "short_name": "Services", - "full_name": "google.appengine.v1.Services" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Services_DeleteService_sync", - "title": "Snippet for the delete_service call in the Services service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Services::Client#delete_service.", - "file": "services/delete_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service", - "full_name": "::Google::Cloud::AppEngine::V1::Services::Client#delete_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::DeleteServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Services::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Services::Client" - }, - "method": { - "short_name": "DeleteService", - "full_name": "google.appengine.v1.Services.DeleteService", - "service": { - "short_name": "Services", - "full_name": "google.appengine.v1.Services" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Versions_ListVersions_sync", - "title": "Snippet for the list_versions call in the Versions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#list_versions.", - "file": "versions/list_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_versions", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#list_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::ListVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::ListVersionsResponse", - "client": { - "short_name": "Versions::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" - }, - "method": { - "short_name": "ListVersions", - "full_name": "google.appengine.v1.Versions.ListVersions", - "service": { - "short_name": "Versions", - "full_name": "google.appengine.v1.Versions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Versions_GetVersion_sync", - "title": "Snippet for the get_version call in the Versions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#get_version.", - "file": "versions/get_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_version", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#get_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::GetVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::Version", - "client": { - "short_name": "Versions::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" - }, - "method": { - "short_name": "GetVersion", - "full_name": "google.appengine.v1.Versions.GetVersion", - "service": { - "short_name": "Versions", - "full_name": "google.appengine.v1.Versions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Versions_CreateVersion_sync", - "title": "Snippet for the create_version call in the Versions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#create_version.", - "file": "versions/create_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_version", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#create_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::CreateVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Versions::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" - }, - "method": { - "short_name": "CreateVersion", - "full_name": "google.appengine.v1.Versions.CreateVersion", - "service": { - "short_name": "Versions", - "full_name": "google.appengine.v1.Versions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Versions_UpdateVersion_sync", - "title": "Snippet for the update_version call in the Versions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#update_version.", - "file": "versions/update_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_version", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#update_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::UpdateVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Versions::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" - }, - "method": { - "short_name": "UpdateVersion", - "full_name": "google.appengine.v1.Versions.UpdateVersion", - "service": { - "short_name": "Versions", - "full_name": "google.appengine.v1.Versions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Versions_DeleteVersion_sync", - "title": "Snippet for the delete_version call in the Versions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Versions::Client#delete_version.", - "file": "versions/delete_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_version", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client#delete_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::DeleteVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Versions::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Versions::Client" - }, - "method": { - "short_name": "DeleteVersion", - "full_name": "google.appengine.v1.Versions.DeleteVersion", - "service": { - "short_name": "Versions", - "full_name": "google.appengine.v1.Versions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Instances_ListInstances_sync", - "title": "Snippet for the list_instances call in the Instances service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Instances::Client#list_instances.", - "file": "instances/list_instances.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instances", - "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client#list_instances", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::ListInstancesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::ListInstancesResponse", - "client": { - "short_name": "Instances::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client" - }, - "method": { - "short_name": "ListInstances", - "full_name": "google.appengine.v1.Instances.ListInstances", - "service": { - "short_name": "Instances", - "full_name": "google.appengine.v1.Instances" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Instances_GetInstance_sync", - "title": "Snippet for the get_instance call in the Instances service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Instances::Client#get_instance.", - "file": "instances/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::Instance", - "client": { - "short_name": "Instances::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.appengine.v1.Instances.GetInstance", - "service": { - "short_name": "Instances", - "full_name": "google.appengine.v1.Instances" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Instances_DeleteInstance_sync", - "title": "Snippet for the delete_instance call in the Instances service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Instances::Client#delete_instance.", - "file": "instances/delete_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance", - "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client#delete_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::DeleteInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Instances::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client" - }, - "method": { - "short_name": "DeleteInstance", - "full_name": "google.appengine.v1.Instances.DeleteInstance", - "service": { - "short_name": "Instances", - "full_name": "google.appengine.v1.Instances" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Instances_DebugInstance_sync", - "title": "Snippet for the debug_instance call in the Instances service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Instances::Client#debug_instance.", - "file": "instances/debug_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "debug_instance", - "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client#debug_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::DebugInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Instances::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Instances::Client" - }, - "method": { - "short_name": "DebugInstance", - "full_name": "google.appengine.v1.Instances.DebugInstance", - "service": { - "short_name": "Instances", - "full_name": "google.appengine.v1.Instances" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Firewall_ListIngressRules_sync", - "title": "Snippet for the list_ingress_rules call in the Firewall service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#list_ingress_rules.", - "file": "firewall/list_ingress_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_ingress_rules", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#list_ingress_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::ListIngressRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::ListIngressRulesResponse", - "client": { - "short_name": "Firewall::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" - }, - "method": { - "short_name": "ListIngressRules", - "full_name": "google.appengine.v1.Firewall.ListIngressRules", - "service": { - "short_name": "Firewall", - "full_name": "google.appengine.v1.Firewall" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Firewall_BatchUpdateIngressRules_sync", - "title": "Snippet for the batch_update_ingress_rules call in the Firewall service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#batch_update_ingress_rules.", - "file": "firewall/batch_update_ingress_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_update_ingress_rules", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#batch_update_ingress_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse", - "client": { - "short_name": "Firewall::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" - }, - "method": { - "short_name": "BatchUpdateIngressRules", - "full_name": "google.appengine.v1.Firewall.BatchUpdateIngressRules", - "service": { - "short_name": "Firewall", - "full_name": "google.appengine.v1.Firewall" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Firewall_CreateIngressRule_sync", - "title": "Snippet for the create_ingress_rule call in the Firewall service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#create_ingress_rule.", - "file": "firewall/create_ingress_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_ingress_rule", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#create_ingress_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::FirewallRule", - "client": { - "short_name": "Firewall::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" - }, - "method": { - "short_name": "CreateIngressRule", - "full_name": "google.appengine.v1.Firewall.CreateIngressRule", - "service": { - "short_name": "Firewall", - "full_name": "google.appengine.v1.Firewall" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Firewall_GetIngressRule_sync", - "title": "Snippet for the get_ingress_rule call in the Firewall service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#get_ingress_rule.", - "file": "firewall/get_ingress_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_ingress_rule", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#get_ingress_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::GetIngressRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::FirewallRule", - "client": { - "short_name": "Firewall::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" - }, - "method": { - "short_name": "GetIngressRule", - "full_name": "google.appengine.v1.Firewall.GetIngressRule", - "service": { - "short_name": "Firewall", - "full_name": "google.appengine.v1.Firewall" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Firewall_UpdateIngressRule_sync", - "title": "Snippet for the update_ingress_rule call in the Firewall service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#update_ingress_rule.", - "file": "firewall/update_ingress_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_ingress_rule", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#update_ingress_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::FirewallRule", - "client": { - "short_name": "Firewall::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" - }, - "method": { - "short_name": "UpdateIngressRule", - "full_name": "google.appengine.v1.Firewall.UpdateIngressRule", - "service": { - "short_name": "Firewall", - "full_name": "google.appengine.v1.Firewall" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_Firewall_DeleteIngressRule_sync", - "title": "Snippet for the delete_ingress_rule call in the Firewall service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::Firewall::Client#delete_ingress_rule.", - "file": "firewall/delete_ingress_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_ingress_rule", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client#delete_ingress_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Firewall::Client", - "full_name": "::Google::Cloud::AppEngine::V1::Firewall::Client" - }, - "method": { - "short_name": "DeleteIngressRule", - "full_name": "google.appengine.v1.Firewall.DeleteIngressRule", - "service": { - "short_name": "Firewall", - "full_name": "google.appengine.v1.Firewall" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_sync", - "title": "Snippet for the list_authorized_domains call in the AuthorizedDomains service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedDomains::Client#list_authorized_domains.", - "file": "authorized_domains/list_authorized_domains.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_authorized_domains", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client#list_authorized_domains", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse", - "client": { - "short_name": "AuthorizedDomains::Client", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client" - }, - "method": { - "short_name": "ListAuthorizedDomains", - "full_name": "google.appengine.v1.AuthorizedDomains.ListAuthorizedDomains", - "service": { - "short_name": "AuthorizedDomains", - "full_name": "google.appengine.v1.AuthorizedDomains" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_sync", - "title": "Snippet for the list_authorized_certificates call in the AuthorizedCertificates service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#list_authorized_certificates.", - "file": "authorized_certificates/list_authorized_certificates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_authorized_certificates", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#list_authorized_certificates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse", - "client": { - "short_name": "AuthorizedCertificates::Client", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" - }, - "method": { - "short_name": "ListAuthorizedCertificates", - "full_name": "google.appengine.v1.AuthorizedCertificates.ListAuthorizedCertificates", - "service": { - "short_name": "AuthorizedCertificates", - "full_name": "google.appengine.v1.AuthorizedCertificates" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_sync", - "title": "Snippet for the get_authorized_certificate call in the AuthorizedCertificates service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#get_authorized_certificate.", - "file": "authorized_certificates/get_authorized_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_authorized_certificate", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#get_authorized_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::AuthorizedCertificate", - "client": { - "short_name": "AuthorizedCertificates::Client", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" - }, - "method": { - "short_name": "GetAuthorizedCertificate", - "full_name": "google.appengine.v1.AuthorizedCertificates.GetAuthorizedCertificate", - "service": { - "short_name": "AuthorizedCertificates", - "full_name": "google.appengine.v1.AuthorizedCertificates" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_sync", - "title": "Snippet for the create_authorized_certificate call in the AuthorizedCertificates service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#create_authorized_certificate.", - "file": "authorized_certificates/create_authorized_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_authorized_certificate", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#create_authorized_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::AuthorizedCertificate", - "client": { - "short_name": "AuthorizedCertificates::Client", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" - }, - "method": { - "short_name": "CreateAuthorizedCertificate", - "full_name": "google.appengine.v1.AuthorizedCertificates.CreateAuthorizedCertificate", - "service": { - "short_name": "AuthorizedCertificates", - "full_name": "google.appengine.v1.AuthorizedCertificates" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_sync", - "title": "Snippet for the update_authorized_certificate call in the AuthorizedCertificates service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#update_authorized_certificate.", - "file": "authorized_certificates/update_authorized_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_authorized_certificate", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#update_authorized_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::AuthorizedCertificate", - "client": { - "short_name": "AuthorizedCertificates::Client", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" - }, - "method": { - "short_name": "UpdateAuthorizedCertificate", - "full_name": "google.appengine.v1.AuthorizedCertificates.UpdateAuthorizedCertificate", - "service": { - "short_name": "AuthorizedCertificates", - "full_name": "google.appengine.v1.AuthorizedCertificates" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_sync", - "title": "Snippet for the delete_authorized_certificate call in the AuthorizedCertificates service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#delete_authorized_certificate.", - "file": "authorized_certificates/delete_authorized_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_authorized_certificate", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client#delete_authorized_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AuthorizedCertificates::Client", - "full_name": "::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client" - }, - "method": { - "short_name": "DeleteAuthorizedCertificate", - "full_name": "google.appengine.v1.AuthorizedCertificates.DeleteAuthorizedCertificate", - "service": { - "short_name": "AuthorizedCertificates", - "full_name": "google.appengine.v1.AuthorizedCertificates" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_DomainMappings_ListDomainMappings_sync", - "title": "Snippet for the list_domain_mappings call in the DomainMappings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#list_domain_mappings.", - "file": "domain_mappings/list_domain_mappings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_domain_mappings", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#list_domain_mappings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse", - "client": { - "short_name": "DomainMappings::Client", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" - }, - "method": { - "short_name": "ListDomainMappings", - "full_name": "google.appengine.v1.DomainMappings.ListDomainMappings", - "service": { - "short_name": "DomainMappings", - "full_name": "google.appengine.v1.DomainMappings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_DomainMappings_GetDomainMapping_sync", - "title": "Snippet for the get_domain_mapping call in the DomainMappings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#get_domain_mapping.", - "file": "domain_mappings/get_domain_mapping.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_domain_mapping", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#get_domain_mapping", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::GetDomainMappingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppEngine::V1::DomainMapping", - "client": { - "short_name": "DomainMappings::Client", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" - }, - "method": { - "short_name": "GetDomainMapping", - "full_name": "google.appengine.v1.DomainMappings.GetDomainMapping", - "service": { - "short_name": "DomainMappings", - "full_name": "google.appengine.v1.DomainMappings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_DomainMappings_CreateDomainMapping_sync", - "title": "Snippet for the create_domain_mapping call in the DomainMappings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#create_domain_mapping.", - "file": "domain_mappings/create_domain_mapping.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_domain_mapping", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#create_domain_mapping", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DomainMappings::Client", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" - }, - "method": { - "short_name": "CreateDomainMapping", - "full_name": "google.appengine.v1.DomainMappings.CreateDomainMapping", - "service": { - "short_name": "DomainMappings", - "full_name": "google.appengine.v1.DomainMappings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_DomainMappings_UpdateDomainMapping_sync", - "title": "Snippet for the update_domain_mapping call in the DomainMappings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#update_domain_mapping.", - "file": "domain_mappings/update_domain_mapping.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_domain_mapping", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#update_domain_mapping", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DomainMappings::Client", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" - }, - "method": { - "short_name": "UpdateDomainMapping", - "full_name": "google.appengine.v1.DomainMappings.UpdateDomainMapping", - "service": { - "short_name": "DomainMappings", - "full_name": "google.appengine.v1.DomainMappings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "appengine_v1_generated_DomainMappings_DeleteDomainMapping_sync", - "title": "Snippet for the delete_domain_mapping call in the DomainMappings service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppEngine::V1::DomainMappings::Client#delete_domain_mapping.", - "file": "domain_mappings/delete_domain_mapping.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_domain_mapping", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client#delete_domain_mapping", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DomainMappings::Client", - "full_name": "::Google::Cloud::AppEngine::V1::DomainMappings::Client" - }, - "method": { - "short_name": "DeleteDomainMapping", - "full_name": "google.appengine.v1.DomainMappings.DeleteDomainMapping", - "service": { - "short_name": "DomainMappings", - "full_name": "google.appengine.v1.DomainMappings" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/create_version.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/create_version.rb deleted file mode 100644 index 33f2d7a1a3f4..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/create_version.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Versions_CreateVersion_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the create_version call in the Versions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Versions::Client#create_version. -# -def create_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Versions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::CreateVersionRequest.new - - # Call the create_version method. - result = client.create_version request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Versions_CreateVersion_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/delete_version.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/delete_version.rb deleted file mode 100644 index 4684dac48690..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/delete_version.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Versions_DeleteVersion_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the delete_version call in the Versions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Versions::Client#delete_version. -# -def delete_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Versions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::DeleteVersionRequest.new - - # Call the delete_version method. - result = client.delete_version request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Versions_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/get_version.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/get_version.rb deleted file mode 100644 index 134b446057e4..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/get_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Versions_GetVersion_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the get_version call in the Versions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Versions::Client#get_version. -# -def get_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Versions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::GetVersionRequest.new - - # Call the get_version method. - result = client.get_version request - - # The returned object is of type Google::Cloud::AppEngine::V1::Version. - p result -end -# [END appengine_v1_generated_Versions_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/list_versions.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/list_versions.rb deleted file mode 100644 index f915863a909a..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/list_versions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Versions_ListVersions_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the list_versions call in the Versions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Versions::Client#list_versions. -# -def list_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Versions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::ListVersionsRequest.new - - # Call the list_versions method. - result = client.list_versions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppEngine::V1::Version. - p item - end -end -# [END appengine_v1_generated_Versions_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/update_version.rb b/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/update_version.rb deleted file mode 100644 index 24fdf281baad..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/snippets/versions/update_version.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START appengine_v1_generated_Versions_UpdateVersion_sync] -require "google/cloud/app_engine/v1" - -## -# Snippet for the update_version call in the Versions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppEngine::V1::Versions::Client#update_version. -# -def update_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppEngine::V1::Versions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppEngine::V1::UpdateVersionRequest.new - - # Call the update_version method. - result = client.update_version request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END appengine_v1_generated_Versions_UpdateVersion_sync] diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_operations_test.rb deleted file mode 100644 index 154cce585189..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_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/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" -require "google/cloud/app_engine/v1/applications" - -class ::Google::Cloud::AppEngine::V1::Applications::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::Applications::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::AppEngine::V1::Applications::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_rest_test.rb deleted file mode 100644 index 837f0e0c5dfd..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/applications/rest" - - -class ::Google::Cloud::AppEngine::V1::Applications::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_application - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::Application.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.stub :transcode_get_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_application_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_application({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_application name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_application ::Google::Cloud::AppEngine::V1::GetApplicationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_application({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_application(::Google::Cloud::AppEngine::V1::GetApplicationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_application_client_stub.call_count - end - end - end - - def test_create_application - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - application = {} - - create_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.stub :transcode_create_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_application_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_application({ application: application }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_application application: application do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_application ::Google::Cloud::AppEngine::V1::CreateApplicationRequest.new(application: application) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_application({ application: application }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_application(::Google::Cloud::AppEngine::V1::CreateApplicationRequest.new(application: application), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_application_client_stub.call_count - end - end - end - - def test_update_application - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - application = {} - update_mask = {} - - update_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.stub :transcode_update_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_application_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_application({ name: name, application: application, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_application name: name, application: application, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_application ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new(name: name, application: application, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_application({ name: name, application: application, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_application(::Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new(name: name, application: application, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_application_client_stub.call_count - end - end - end - - def test_repair_application - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - repair_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.stub :transcode_repair_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, repair_application_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.repair_application({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.repair_application name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.repair_application ::Google::Cloud::AppEngine::V1::RepairApplicationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.repair_application({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.repair_application(::Google::Cloud::AppEngine::V1::RepairApplicationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, repair_application_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::Applications::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::AppEngine::V1::Applications::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.rb deleted file mode 100644 index 4c03cac1d8c4..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/applications_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/applications" - -class ::Google::Cloud::AppEngine::V1::Applications::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - 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_application - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::Application.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_application, name - assert_kind_of ::Google::Cloud::AppEngine::V1::GetApplicationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_application_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_application({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_application name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_application ::Google::Cloud::AppEngine::V1::GetApplicationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_application({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_application(::Google::Cloud::AppEngine::V1::GetApplicationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_application_client_stub.call_rpc_count - end - end - - def test_create_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - application = {} - - create_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_application, name - assert_kind_of ::Google::Cloud::AppEngine::V1::CreateApplicationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Application), request["application"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_application_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_application({ application: application }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_application application: application do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_application ::Google::Cloud::AppEngine::V1::CreateApplicationRequest.new(application: application) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_application({ application: application }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_application(::Google::Cloud::AppEngine::V1::CreateApplicationRequest.new(application: application), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_application_client_stub.call_rpc_count - end - end - - def test_update_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - application = {} - update_mask = {} - - update_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_application, name - assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Application), request["application"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_application_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_application({ name: name, application: application, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_application name: name, application: application, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_application ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new(name: name, application: application, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_application({ name: name, application: application, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_application(::Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new(name: name, application: application, 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_application_client_stub.call_rpc_count - end - end - - def test_repair_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - repair_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :repair_application, name - assert_kind_of ::Google::Cloud::AppEngine::V1::RepairApplicationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, repair_application_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.repair_application({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.repair_application name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.repair_application ::Google::Cloud::AppEngine::V1::RepairApplicationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.repair_application({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.repair_application(::Google::Cloud::AppEngine::V1::RepairApplicationRequest.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, repair_application_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config| - 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::AppEngine::V1::Applications::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::AppEngine::V1::Applications::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppEngine::V1::Applications::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::AppEngine::V1::Applications::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AppEngine::V1::Applications::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_rest_test.rb deleted file mode 100644 index c1d656c35d6b..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/authorized_certificates/rest" - - -class ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::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_authorized_certificates - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :BASIC_CERTIFICATE - page_size = 42 - page_token = "hello world" - - list_authorized_certificates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_list_authorized_certificates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_authorized_certificates_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_authorized_certificates({ parent: parent, view: view, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_authorized_certificates parent: parent, view: view, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_authorized_certificates ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_authorized_certificates({ parent: parent, view: view, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_authorized_certificates(::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new(parent: parent, view: view, page_size: page_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_authorized_certificates_client_stub.call_count - end - end - end - - def test_get_authorized_certificate - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BASIC_CERTIFICATE - - get_authorized_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_get_authorized_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_authorized_certificate_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_authorized_certificate({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_authorized_certificate name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_authorized_certificate ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_authorized_certificate({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_authorized_certificate(::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.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_authorized_certificate_client_stub.call_count - end - end - end - - def test_create_authorized_certificate - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate = {} - - create_authorized_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_create_authorized_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_authorized_certificate_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_authorized_certificate({ parent: parent, certificate: certificate }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_authorized_certificate parent: parent, certificate: certificate do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_authorized_certificate ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new(parent: parent, certificate: certificate) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_authorized_certificate({ parent: parent, certificate: certificate }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_authorized_certificate(::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new(parent: parent, certificate: certificate), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_authorized_certificate_client_stub.call_count - end - end - end - - def test_update_authorized_certificate - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - certificate = {} - update_mask = {} - - update_authorized_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_update_authorized_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_authorized_certificate_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_authorized_certificate({ name: name, certificate: certificate, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_authorized_certificate name: name, certificate: certificate, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_authorized_certificate ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new(name: name, certificate: certificate, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_authorized_certificate({ name: name, certificate: certificate, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_authorized_certificate(::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new(name: name, certificate: certificate, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_authorized_certificate_client_stub.call_count - end - end - end - - def test_delete_authorized_certificate - # 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_authorized_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.stub :transcode_delete_authorized_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_authorized_certificate_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_authorized_certificate({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_authorized_certificate name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_authorized_certificate ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_authorized_certificate({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_authorized_certificate(::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_authorized_certificate_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::AppEngine::V1::AuthorizedCertificates::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::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb deleted file mode 100644 index cc45d01aca9f..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_certificates_test.rb +++ /dev/null @@ -1,413 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/authorized_certificates" - -class ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_authorized_certificates - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :BASIC_CERTIFICATE - page_size = 42 - page_token = "hello world" - - list_authorized_certificates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_authorized_certificates, name - assert_kind_of ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, request - assert_equal "hello world", request["parent"] - assert_equal :BASIC_CERTIFICATE, request["view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_authorized_certificates_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_authorized_certificates({ parent: parent, view: view, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_authorized_certificates parent: parent, view: view, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_authorized_certificates ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_authorized_certificates({ parent: parent, view: view, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_authorized_certificates(::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_authorized_certificates_client_stub.call_rpc_count - end - end - - def test_get_authorized_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = :BASIC_CERTIFICATE - - get_authorized_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_authorized_certificate, name - assert_kind_of ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, request - assert_equal "hello world", request["name"] - assert_equal :BASIC_CERTIFICATE, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_authorized_certificate_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_authorized_certificate({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_authorized_certificate name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_authorized_certificate ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_authorized_certificate({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_authorized_certificate(::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest.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_authorized_certificate_client_stub.call_rpc_count - end - end - - def test_create_authorized_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate = {} - - create_authorized_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_authorized_certificate, name - assert_kind_of ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::AuthorizedCertificate), request["certificate"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_authorized_certificate_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_authorized_certificate({ parent: parent, certificate: certificate }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_authorized_certificate parent: parent, certificate: certificate do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_authorized_certificate ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new(parent: parent, certificate: certificate) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_authorized_certificate({ parent: parent, certificate: certificate }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_authorized_certificate(::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest.new(parent: parent, certificate: certificate), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_authorized_certificate_client_stub.call_rpc_count - end - end - - def test_update_authorized_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::AuthorizedCertificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - certificate = {} - update_mask = {} - - update_authorized_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_authorized_certificate, name - assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::AuthorizedCertificate), request["certificate"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_authorized_certificate_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_authorized_certificate({ name: name, certificate: certificate, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_authorized_certificate name: name, certificate: certificate, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_authorized_certificate ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new(name: name, certificate: certificate, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_authorized_certificate({ name: name, certificate: certificate, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_authorized_certificate(::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest.new(name: name, certificate: certificate, 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_authorized_certificate_client_stub.call_rpc_count - end - end - - def test_delete_authorized_certificate - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_authorized_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_authorized_certificate, name - assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_authorized_certificate_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_authorized_certificate({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_authorized_certificate name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_authorized_certificate ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_authorized_certificate({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_authorized_certificate(::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest.new(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_authorized_certificate_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - 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::AppEngine::V1::AuthorizedCertificates::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::AppEngine::V1::AuthorizedCertificates::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_rest_test.rb deleted file mode 100644 index 9bc723155cdc..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/authorized_domains/rest" - - -class ::Google::Cloud::AppEngine::V1::AuthorizedDomains::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_authorized_domains - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse.new - http_response = OpenStruct.new 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_authorized_domains_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::ServiceStub.stub :transcode_list_authorized_domains_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_authorized_domains_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_authorized_domains({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_authorized_domains parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_authorized_domains ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_authorized_domains({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_authorized_domains(::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.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_authorized_domains_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::AppEngine::V1::AuthorizedDomains::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::AppEngine::V1::AuthorizedDomains::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_test.rb deleted file mode 100644 index 903c80f56daa..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/authorized_domains_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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/authorized_domains" - -class ::Google::Cloud::AppEngine::V1::AuthorizedDomains::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_authorized_domains - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_authorized_domains_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_authorized_domains, name - assert_kind_of ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest, 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_authorized_domains_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_authorized_domains({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_authorized_domains parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_authorized_domains ::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_authorized_domains({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_authorized_domains(::Google::Cloud::AppEngine::V1::ListAuthorizedDomainsRequest.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_authorized_domains_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::AuthorizedDomains::Client.new do |config| - 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::AppEngine::V1::AuthorizedDomains::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::AppEngine::V1::AuthorizedDomains::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppEngine::V1::AuthorizedDomains::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_operations_test.rb deleted file mode 100644 index 5b308e85d12e..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_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/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" -require "google/cloud/app_engine/v1/domain_mappings" - -class ::Google::Cloud::AppEngine::V1::DomainMappings::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::DomainMappings::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::AppEngine::V1::DomainMappings::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_rest_test.rb deleted file mode 100644 index 480534c2e320..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_rest_test.rb +++ /dev/null @@ -1,375 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/domain_mappings/rest" - - -class ::Google::Cloud::AppEngine::V1::DomainMappings::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_domain_mappings - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse.new - http_response = OpenStruct.new 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_domain_mappings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_list_domain_mappings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_domain_mappings_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_domain_mappings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_domain_mappings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_domain_mappings ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_domain_mappings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_domain_mappings(::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.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_domain_mappings_client_stub.call_count - end - end - end - - def test_get_domain_mapping - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::DomainMapping.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_domain_mapping_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_get_domain_mapping_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_domain_mapping_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_domain_mapping({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_domain_mapping name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_domain_mapping ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_domain_mapping({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_domain_mapping(::Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_domain_mapping_client_stub.call_count - end - end - end - - def test_create_domain_mapping - # Create test objects. - 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" - domain_mapping = {} - override_strategy = :UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY - - create_domain_mapping_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_create_domain_mapping_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_domain_mapping_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_domain_mapping({ parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_domain_mapping parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_domain_mapping ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new(parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_domain_mapping({ parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_domain_mapping(::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new(parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_domain_mapping_client_stub.call_count - end - end - end - - def test_update_domain_mapping - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - domain_mapping = {} - update_mask = {} - - update_domain_mapping_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_update_domain_mapping_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_domain_mapping_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_domain_mapping({ name: name, domain_mapping: domain_mapping, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_domain_mapping name: name, domain_mapping: domain_mapping, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_domain_mapping ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new(name: name, domain_mapping: domain_mapping, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_domain_mapping({ name: name, domain_mapping: domain_mapping, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_domain_mapping(::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new(name: name, domain_mapping: domain_mapping, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_domain_mapping_client_stub.call_count - end - end - end - - def test_delete_domain_mapping - # Create test objects. - client_result = ::Google::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_domain_mapping_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::ServiceStub.stub :transcode_delete_domain_mapping_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_domain_mapping_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_domain_mapping({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_domain_mapping name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_domain_mapping ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_domain_mapping({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_domain_mapping(::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_domain_mapping_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::AppEngine::V1::DomainMappings::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::AppEngine::V1::DomainMappings::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb deleted file mode 100644 index 00401ff6a52a..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/domain_mappings_test.rb +++ /dev/null @@ -1,440 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/domain_mappings" - -class ::Google::Cloud::AppEngine::V1::DomainMappings::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_domain_mappings - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::ListDomainMappingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_domain_mappings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_domain_mappings, name - assert_kind_of ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest, 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_domain_mappings_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_domain_mappings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_domain_mappings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_domain_mappings ::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_domain_mappings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_domain_mappings(::Google::Cloud::AppEngine::V1::ListDomainMappingsRequest.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_domain_mappings_client_stub.call_rpc_count - end - end - - def test_get_domain_mapping - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::DomainMapping.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_domain_mapping_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_domain_mapping, name - assert_kind_of ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_domain_mapping_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_domain_mapping({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_domain_mapping name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_domain_mapping ::Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_domain_mapping({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_domain_mapping(::Google::Cloud::AppEngine::V1::GetDomainMappingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_domain_mapping_client_stub.call_rpc_count - end - end - - def test_create_domain_mapping - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - domain_mapping = {} - override_strategy = :UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY - - create_domain_mapping_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_domain_mapping, name - assert_kind_of ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::DomainMapping), request["domain_mapping"] - assert_equal :UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY, request["override_strategy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_domain_mapping_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_domain_mapping({ parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_domain_mapping parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_domain_mapping ::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new(parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_domain_mapping({ parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_domain_mapping(::Google::Cloud::AppEngine::V1::CreateDomainMappingRequest.new(parent: parent, domain_mapping: domain_mapping, override_strategy: override_strategy), grpc_options) do |response, operation| - assert_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_domain_mapping_client_stub.call_rpc_count - end - end - - def test_update_domain_mapping - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - domain_mapping = {} - update_mask = {} - - update_domain_mapping_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_domain_mapping, name - assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::DomainMapping), request["domain_mapping"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_domain_mapping_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_domain_mapping({ name: name, domain_mapping: domain_mapping, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_domain_mapping name: name, domain_mapping: domain_mapping, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_domain_mapping ::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new(name: name, domain_mapping: domain_mapping, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_domain_mapping({ name: name, domain_mapping: domain_mapping, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_domain_mapping(::Google::Cloud::AppEngine::V1::UpdateDomainMappingRequest.new(name: name, domain_mapping: domain_mapping, 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_domain_mapping_client_stub.call_rpc_count - end - end - - def test_delete_domain_mapping - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_domain_mapping_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_domain_mapping, name - assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_domain_mapping_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::DomainMappings::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_domain_mapping({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_domain_mapping name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_domain_mapping ::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_domain_mapping({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_domain_mapping(::Google::Cloud::AppEngine::V1::DeleteDomainMappingRequest.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_domain_mapping_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::DomainMappings::Client.new do |config| - 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::AppEngine::V1::DomainMappings::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::AppEngine::V1::DomainMappings::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppEngine::V1::DomainMappings::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::AppEngine::V1::DomainMappings::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AppEngine::V1::DomainMappings::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_rest_test.rb deleted file mode 100644 index 45a5a928a77a..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_rest_test.rb +++ /dev/null @@ -1,430 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/firewall/rest" - - -class ::Google::Cloud::AppEngine::V1::Firewall::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_ingress_rules - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::ListIngressRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - matching_address = "hello world" - - list_ingress_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::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_list_ingress_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_ingress_rules_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_ingress_rules({ parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_ingress_rules parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_ingress_rules ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_ingress_rules({ parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_ingress_rules(::Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_ingress_rules_client_stub.call_count - end - end - end - - def test_batch_update_ingress_rules - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - ingress_rules = [{}] - - batch_update_ingress_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::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_batch_update_ingress_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_update_ingress_rules_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_update_ingress_rules({ name: name, ingress_rules: ingress_rules }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_update_ingress_rules name: name, ingress_rules: ingress_rules do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_update_ingress_rules ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new(name: name, ingress_rules: ingress_rules) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_update_ingress_rules({ name: name, ingress_rules: ingress_rules }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_update_ingress_rules(::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new(name: name, ingress_rules: ingress_rules), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_update_ingress_rules_client_stub.call_count - end - end - end - - def test_create_ingress_rule - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::FirewallRule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule = {} - - create_ingress_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_create_ingress_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_ingress_rule_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_ingress_rule({ parent: parent, rule: rule }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_ingress_rule parent: parent, rule: rule do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_ingress_rule ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new(parent: parent, rule: rule) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_ingress_rule({ parent: parent, rule: rule }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_ingress_rule(::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new(parent: parent, rule: rule), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_ingress_rule_client_stub.call_count - end - end - end - - def test_get_ingress_rule - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::FirewallRule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_ingress_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_get_ingress_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_ingress_rule_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_ingress_rule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_ingress_rule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_ingress_rule ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_ingress_rule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_ingress_rule(::Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_ingress_rule_client_stub.call_count - end - end - end - - def test_update_ingress_rule - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::FirewallRule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - rule = {} - update_mask = {} - - update_ingress_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_update_ingress_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_ingress_rule_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_ingress_rule({ name: name, rule: rule, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_ingress_rule name: name, rule: rule, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_ingress_rule ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new(name: name, rule: rule, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_ingress_rule({ name: name, rule: rule, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_ingress_rule(::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new(name: name, rule: rule, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_ingress_rule_client_stub.call_count - end - end - end - - def test_delete_ingress_rule - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_ingress_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Firewall::Rest::ServiceStub.stub :transcode_delete_ingress_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_ingress_rule_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_ingress_rule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_ingress_rule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_ingress_rule ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_ingress_rule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_ingress_rule(::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_ingress_rule_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::AppEngine::V1::Firewall::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::AppEngine::V1::Firewall::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb deleted file mode 100644 index c564e8b9bc45..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/firewall_test.rb +++ /dev/null @@ -1,471 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/firewall" - -class ::Google::Cloud::AppEngine::V1::Firewall::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_ingress_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::ListIngressRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - matching_address = "hello world" - - list_ingress_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_ingress_rules, name - assert_kind_of ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest, 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["matching_address"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_ingress_rules_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_ingress_rules({ parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_ingress_rules parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_ingress_rules ::Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_ingress_rules({ parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_ingress_rules(::Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, matching_address: matching_address), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_ingress_rules_client_stub.call_rpc_count - end - end - - def test_batch_update_ingress_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - ingress_rules = [{}] - - batch_update_ingress_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_update_ingress_rules, name - assert_kind_of ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest, request - assert_equal "hello world", request["name"] - assert_kind_of ::Google::Cloud::AppEngine::V1::FirewallRule, request["ingress_rules"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_update_ingress_rules_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_update_ingress_rules({ name: name, ingress_rules: ingress_rules }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_update_ingress_rules name: name, ingress_rules: ingress_rules do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_update_ingress_rules ::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new(name: name, ingress_rules: ingress_rules) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_update_ingress_rules({ name: name, ingress_rules: ingress_rules }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_update_ingress_rules(::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new(name: name, ingress_rules: ingress_rules), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_update_ingress_rules_client_stub.call_rpc_count - end - end - - def test_create_ingress_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::FirewallRule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = {} - - create_ingress_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_ingress_rule, name - assert_kind_of ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::FirewallRule), request["rule"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_ingress_rule_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_ingress_rule({ parent: parent, rule: rule }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_ingress_rule parent: parent, rule: rule do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_ingress_rule ::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new(parent: parent, rule: rule) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_ingress_rule({ parent: parent, rule: rule }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_ingress_rule(::Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new(parent: parent, rule: rule), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_ingress_rule_client_stub.call_rpc_count - end - end - - def test_get_ingress_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::FirewallRule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_ingress_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_ingress_rule, name - assert_kind_of ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_ingress_rule_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_ingress_rule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_ingress_rule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_ingress_rule ::Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_ingress_rule({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_ingress_rule(::Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_ingress_rule_client_stub.call_rpc_count - end - end - - def test_update_ingress_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::FirewallRule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - rule = {} - update_mask = {} - - update_ingress_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_ingress_rule, name - assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::FirewallRule), request["rule"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_ingress_rule_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_ingress_rule({ name: name, rule: rule, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_ingress_rule name: name, rule: rule, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_ingress_rule ::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new(name: name, rule: rule, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_ingress_rule({ name: name, rule: rule, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_ingress_rule(::Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new(name: name, rule: rule, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_ingress_rule_client_stub.call_rpc_count - end - end - - def test_delete_ingress_rule - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_ingress_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_ingress_rule, name - assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_ingress_rule_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_ingress_rule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_ingress_rule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_ingress_rule ::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_ingress_rule({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_ingress_rule(::Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new(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_ingress_rule_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::Firewall::Client.new do |config| - 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::AppEngine::V1::Firewall::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::AppEngine::V1::Firewall::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppEngine::V1::Firewall::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_operations_test.rb deleted file mode 100644 index 16f535d2413c..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_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/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" -require "google/cloud/app_engine/v1/instances" - -class ::Google::Cloud::AppEngine::V1::Instances::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::Instances::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::AppEngine::V1::Instances::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_rest_test.rb deleted file mode 100644 index 95add7466c4c..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/instances/rest" - - -class ::Google::Cloud::AppEngine::V1::Instances::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_instances - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::ListInstancesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_instances parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_instances ::Google::Cloud::AppEngine::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_instances(::Google::Cloud::AppEngine::V1::ListInstancesRequest.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_instances_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::AppEngine::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::AppEngine::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_count - end - end - end - - def test_delete_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_instance ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_instance(::Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_count - end - end - end - - def test_debug_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - ssh_key = "hello world" - - debug_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Instances::Rest::ServiceStub.stub :transcode_debug_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, debug_instance_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.debug_instance({ name: name, ssh_key: ssh_key }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.debug_instance name: name, ssh_key: ssh_key do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.debug_instance ::Google::Cloud::AppEngine::V1::DebugInstanceRequest.new(name: name, ssh_key: ssh_key) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.debug_instance({ name: name, ssh_key: ssh_key }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.debug_instance(::Google::Cloud::AppEngine::V1::DebugInstanceRequest.new(name: name, ssh_key: ssh_key), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, debug_instance_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::Instances::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::AppEngine::V1::Instances::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb deleted file mode 100644 index f3faa6a77d00..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/instances_test.rb +++ /dev/null @@ -1,371 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/instances" - -class ::Google::Cloud::AppEngine::V1::Instances::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_instances - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::ListInstancesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instances, name - assert_kind_of ::Google::Cloud::AppEngine::V1::ListInstancesRequest, 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_instances_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_instances parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_instances ::Google::Cloud::AppEngine::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_instances(::Google::Cloud::AppEngine::V1::ListInstancesRequest.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_instances_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::AppEngine::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_instance ::Google::Cloud::AppEngine::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_instance({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::AppEngine::V1::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_rpc_count - end - end - - def test_delete_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance, name - assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_instance({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_instance name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_instance ::Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_instance({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_instance(::Google::Cloud::AppEngine::V1::DeleteInstanceRequest.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_instance_client_stub.call_rpc_count - end - end - - def test_debug_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - ssh_key = "hello world" - - debug_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :debug_instance, name - assert_kind_of ::Google::Cloud::AppEngine::V1::DebugInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["ssh_key"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, debug_instance_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.debug_instance({ name: name, ssh_key: ssh_key }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.debug_instance name: name, ssh_key: ssh_key do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.debug_instance ::Google::Cloud::AppEngine::V1::DebugInstanceRequest.new(name: name, ssh_key: ssh_key) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.debug_instance({ name: name, ssh_key: ssh_key }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.debug_instance(::Google::Cloud::AppEngine::V1::DebugInstanceRequest.new(name: name, ssh_key: ssh_key), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, debug_instance_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config| - 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::AppEngine::V1::Instances::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::AppEngine::V1::Instances::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppEngine::V1::Instances::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::AppEngine::V1::Instances::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AppEngine::V1::Instances::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_operations_test.rb deleted file mode 100644 index 937a6436d6a0..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_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/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" -require "google/cloud/app_engine/v1/services" - -class ::Google::Cloud::AppEngine::V1::Services::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::Services::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::AppEngine::V1::Services::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_rest_test.rb deleted file mode 100644 index f44e66e69a91..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/services/rest" - - -class ::Google::Cloud::AppEngine::V1::Services::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_services - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::ListServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_services_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_services({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_services parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_services ::Google::Cloud::AppEngine::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_services({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_services(::Google::Cloud::AppEngine::V1::ListServicesRequest.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_services_client_stub.call_count - end - end - end - - def test_get_service - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_service ::Google::Cloud::AppEngine::V1::GetServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_service(::Google::Cloud::AppEngine::V1::GetServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_count - end - end - end - - def test_update_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - service = {} - update_mask = {} - migrate_traffic = true - - update_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.stub :transcode_update_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_service({ name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_service name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_service ::Google::Cloud::AppEngine::V1::UpdateServiceRequest.new(name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_service({ name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_service(::Google::Cloud::AppEngine::V1::UpdateServiceRequest.new(name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_client_stub.call_count - end - end - end - - def test_delete_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Services::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_service ::Google::Cloud::AppEngine::V1::DeleteServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_service(::Google::Cloud::AppEngine::V1::DeleteServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_client_stub.call_count - end - end - end - - def test_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::AppEngine::V1::Services::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::AppEngine::V1::Services::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb deleted file mode 100644 index 7e0ea18a6da8..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/services_test.rb +++ /dev/null @@ -1,375 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/services" - -class ::Google::Cloud::AppEngine::V1::Services::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::ListServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_services, name - assert_kind_of ::Google::Cloud::AppEngine::V1::ListServicesRequest, 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_services_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_services({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_services parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_services ::Google::Cloud::AppEngine::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_services({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_services(::Google::Cloud::AppEngine::V1::ListServicesRequest.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_services_client_stub.call_rpc_count - end - end - - def test_get_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service, name - assert_kind_of ::Google::Cloud::AppEngine::V1::GetServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_service ::Google::Cloud::AppEngine::V1::GetServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_service(::Google::Cloud::AppEngine::V1::GetServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_rpc_count - end - end - - def test_update_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - service = {} - update_mask = {} - migrate_traffic = true - - update_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service, name - assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Service), request["service"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["migrate_traffic"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_service({ name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_service name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_service ::Google::Cloud::AppEngine::V1::UpdateServiceRequest.new(name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_service({ name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_service(::Google::Cloud::AppEngine::V1::UpdateServiceRequest.new(name: name, service: service, update_mask: update_mask, migrate_traffic: migrate_traffic), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_service_client_stub.call_rpc_count - end - end - - def test_delete_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service, name - assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_service({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_service name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_service ::Google::Cloud::AppEngine::V1::DeleteServiceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_service({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_service(::Google::Cloud::AppEngine::V1::DeleteServiceRequest.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_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::Services::Client.new do |config| - 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::AppEngine::V1::Services::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::AppEngine::V1::Services::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppEngine::V1::Services::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::AppEngine::V1::Services::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AppEngine::V1::Services::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_operations_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_operations_test.rb deleted file mode 100644 index e5a4962e73ed..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_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/appengine/v1/appengine_pb" -require "google/appengine/v1/appengine_services_pb" -require "google/cloud/app_engine/v1/versions" - -class ::Google::Cloud::AppEngine::V1::Versions::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppEngine::V1::Versions::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::AppEngine::V1::Versions::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_rest_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_rest_test.rb deleted file mode 100644 index f5ec58b2fc07..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/versions/rest" - - -class ::Google::Cloud::AppEngine::V1::Versions::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_versions - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::ListVersionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :BASIC - page_size = 42 - page_token = "hello world" - - list_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_versions({ parent: parent, view: view, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_versions parent: parent, view: view, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_versions ::Google::Cloud::AppEngine::V1::ListVersionsRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_versions({ parent: parent, view: view, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_versions(::Google::Cloud::AppEngine::V1::ListVersionsRequest.new(parent: parent, view: view, page_size: page_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_versions_client_stub.call_count - end - end - end - - def test_get_version - # Create test objects. - client_result = ::Google::Cloud::AppEngine::V1::Version.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BASIC - - get_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_version_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_version({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_version name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_version ::Google::Cloud::AppEngine::V1::GetVersionRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_version({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_version(::Google::Cloud::AppEngine::V1::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_count - end - end - end - - def test_create_version - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - version = {} - - create_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_create_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_version_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_version({ parent: parent, version: version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_version parent: parent, version: version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_version ::Google::Cloud::AppEngine::V1::CreateVersionRequest.new(parent: parent, version: version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_version({ parent: parent, version: version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_version(::Google::Cloud::AppEngine::V1::CreateVersionRequest.new(parent: parent, version: version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_version_client_stub.call_count - end - end - end - - def test_update_version - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - version = {} - update_mask = {} - - update_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_update_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_version_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_version({ name: name, version: version, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_version name: name, version: version, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_version ::Google::Cloud::AppEngine::V1::UpdateVersionRequest.new(name: name, version: version, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_version({ name: name, version: version, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_version(::Google::Cloud::AppEngine::V1::UpdateVersionRequest.new(name: name, version: version, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_version_client_stub.call_count - end - end - end - - def test_delete_version - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppEngine::V1::Versions::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_version ::Google::Cloud::AppEngine::V1::DeleteVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_version(::Google::Cloud::AppEngine::V1::DeleteVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_version_client_stub.call_count - end - end - end - - def test_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::AppEngine::V1::Versions::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::AppEngine::V1::Versions::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_test.rb deleted file mode 100644 index f30069053164..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/google/cloud/app_engine/v1/versions_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/appengine/v1/appengine_pb" -require "google/cloud/app_engine/v1/versions" - -class ::Google::Cloud::AppEngine::V1::Versions::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::ListVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :BASIC - page_size = 42 - page_token = "hello world" - - list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_versions, name - assert_kind_of ::Google::Cloud::AppEngine::V1::ListVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal :BASIC, request["view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_versions_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_versions({ parent: parent, view: view, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_versions parent: parent, view: view, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_versions ::Google::Cloud::AppEngine::V1::ListVersionsRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_versions({ parent: parent, view: view, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_versions(::Google::Cloud::AppEngine::V1::ListVersionsRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_versions_client_stub.call_rpc_count - end - end - - def test_get_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppEngine::V1::Version.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BASIC - - get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_version, name - assert_kind_of ::Google::Cloud::AppEngine::V1::GetVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal :BASIC, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_version_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_version({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_version name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_version ::Google::Cloud::AppEngine::V1::GetVersionRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_version({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_version(::Google::Cloud::AppEngine::V1::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_rpc_count - end - end - - def test_create_version - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - version = {} - - create_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_version, name - assert_kind_of ::Google::Cloud::AppEngine::V1::CreateVersionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Version), request["version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_version_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_version({ parent: parent, version: version }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_version parent: parent, version: version do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_version ::Google::Cloud::AppEngine::V1::CreateVersionRequest.new(parent: parent, version: version) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_version({ parent: parent, version: version }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_version(::Google::Cloud::AppEngine::V1::CreateVersionRequest.new(parent: parent, version: version), grpc_options) do |response, operation| - assert_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_version_client_stub.call_rpc_count - end - end - - def test_update_version - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - version = {} - update_mask = {} - - update_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_version, name - assert_kind_of ::Google::Cloud::AppEngine::V1::UpdateVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppEngine::V1::Version), request["version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_version_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_version({ name: name, version: version, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_version name: name, version: version, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_version ::Google::Cloud::AppEngine::V1::UpdateVersionRequest.new(name: name, version: version, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_version({ name: name, version: version, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_version(::Google::Cloud::AppEngine::V1::UpdateVersionRequest.new(name: name, version: version, 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_version_client_stub.call_rpc_count - end - end - - def test_delete_version - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_version, name - assert_kind_of ::Google::Cloud::AppEngine::V1::DeleteVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_version_client_stub do - # Create client - client = ::Google::Cloud::AppEngine::V1::Versions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_version({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_version name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_version ::Google::Cloud::AppEngine::V1::DeleteVersionRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_version({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_version(::Google::Cloud::AppEngine::V1::DeleteVersionRequest.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_version_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::AppEngine::V1::Versions::Client.new do |config| - 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::AppEngine::V1::Versions::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::AppEngine::V1::Versions::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppEngine::V1::Versions::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::AppEngine::V1::Versions::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AppEngine::V1::Versions::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-app_engine-v1/test/helper.rb b/owl-bot-staging/google-cloud-app_engine-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-app_engine-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.gitignore b/owl-bot-staging/google-cloud-app_hub-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json deleted file mode 100644 index 118640b1b4b6..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "apphub.googleapis.com", - "api_shortname": "apphub", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest", - "distribution_name": "google-cloud-app_hub-v1", - "is_cloud": true, - "language": "ruby", - "name": "apphub", - "name_pretty": "App Hub V1 API", - "product_documentation": "https://cloud.google.com/app-hub/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. Note that google-cloud-app_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_hub instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/app-hub/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml deleted file mode 100644 index aac5e1a2d3f1..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-app_hub-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-app_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/.yardopts b/owl-bot-staging/google-cloud-app_hub-v1/.yardopts deleted file mode 100644 index 47c312defbe7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="App Hub V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md deleted file mode 100644 index 56078e3eba52..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-app_hub-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-app_hub-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/app_hub/v1" - -client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/app_hub/v1" - -::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AppHub::V1::AppHub::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-app_hub-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/app_hub/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AppHub::V1::AppHub::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-app_hub-v1/Gemfile b/owl-bot-staging/google-cloud-app_hub-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-app_hub-v1/README.md b/owl-bot-staging/google-cloud-app_hub-v1/README.md deleted file mode 100644 index 6f98ef04dcba..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the App Hub V1 API - -API Client library for the App Hub V1 API - -google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the App Hub V1 API. Most users should consider using -the main client gem, -[google-cloud-app_hub](https://rubygems.org/gems/google-cloud-app_hub). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-app_hub-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/apphub.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/app_hub/v1" - -client = ::Google::Cloud::AppHub::V1::AppHub::Client.new -request = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new # (request fields as keyword arguments...) -response = client.lookup_service_project_attachment request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-app_hub-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/app-hub/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/app_hub/v1" -require "logger" - -client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-app_hub`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-app_hub-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-app_hub`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-app_hub-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-app_hub-v1/Rakefile b/owl-bot-staging/google-cloud-app_hub-v1/Rakefile deleted file mode 100644 index 6f86b00de1d7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-app_hub-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/app_hub/v1/app_hub/credentials" - ::Google::Cloud::AppHub::V1::AppHub::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-app_hub-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-app_hub-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-app_hub-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-app_hub-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-app_hub-v1" - header "google-cloud-app_hub-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-app_hub-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-app_hub-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-app_hub-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-app_hub-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json deleted file mode 100644 index b9d4fe1df12e..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/gapic_metadata.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.apphub.v1", - "libraryPackage": "::Google::Cloud::AppHub::V1", - "services": { - "AppHub": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AppHub::V1::AppHub::Client", - "rpcs": { - "LookupServiceProjectAttachment": { - "methods": [ - "lookup_service_project_attachment" - ] - }, - "ListServiceProjectAttachments": { - "methods": [ - "list_service_project_attachments" - ] - }, - "CreateServiceProjectAttachment": { - "methods": [ - "create_service_project_attachment" - ] - }, - "GetServiceProjectAttachment": { - "methods": [ - "get_service_project_attachment" - ] - }, - "DeleteServiceProjectAttachment": { - "methods": [ - "delete_service_project_attachment" - ] - }, - "DetachServiceProjectAttachment": { - "methods": [ - "detach_service_project_attachment" - ] - }, - "ListDiscoveredServices": { - "methods": [ - "list_discovered_services" - ] - }, - "GetDiscoveredService": { - "methods": [ - "get_discovered_service" - ] - }, - "LookupDiscoveredService": { - "methods": [ - "lookup_discovered_service" - ] - }, - "ListServices": { - "methods": [ - "list_services" - ] - }, - "CreateService": { - "methods": [ - "create_service" - ] - }, - "GetService": { - "methods": [ - "get_service" - ] - }, - "UpdateService": { - "methods": [ - "update_service" - ] - }, - "DeleteService": { - "methods": [ - "delete_service" - ] - }, - "ListDiscoveredWorkloads": { - "methods": [ - "list_discovered_workloads" - ] - }, - "GetDiscoveredWorkload": { - "methods": [ - "get_discovered_workload" - ] - }, - "LookupDiscoveredWorkload": { - "methods": [ - "lookup_discovered_workload" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - }, - "CreateWorkload": { - "methods": [ - "create_workload" - ] - }, - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "UpdateWorkload": { - "methods": [ - "update_workload" - ] - }, - "DeleteWorkload": { - "methods": [ - "delete_workload" - ] - }, - "ListApplications": { - "methods": [ - "list_applications" - ] - }, - "CreateApplication": { - "methods": [ - "create_application" - ] - }, - "GetApplication": { - "methods": [ - "get_application" - ] - }, - "UpdateApplication": { - "methods": [ - "update_application" - ] - }, - "DeleteApplication": { - "methods": [ - "delete_application" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec b/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec deleted file mode 100644 index 0052cff0081d..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/google-cloud-app_hub-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/app_hub/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-app_hub-v1" - gem.version = Google::Cloud::AppHub::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-app_hub-v1 is the official client library for the App Hub V1 API. Note that google-cloud-app_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-app_hub instead. See the readme for more details." - gem.summary = "API Client library for the App Hub V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb deleted file mode 100644 index 2bd20cb40c59..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google-cloud-app_hub-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/app_hub/v1" diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb deleted file mode 100644 index ebab4dae51e0..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/app_hub/v1/app_hub" -require "google/cloud/app_hub/v1/version" - -module Google - module Cloud - module AppHub - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/app_hub/v1" - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/app_hub/v1" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/app_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb deleted file mode 100644 index 8fa01251c081..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_hub/v1/version" - -require "google/cloud/app_hub/v1/app_hub/credentials" -require "google/cloud/app_hub/v1/app_hub/paths" -require "google/cloud/app_hub/v1/app_hub/operations" -require "google/cloud/app_hub/v1/app_hub/client" -require "google/cloud/app_hub/v1/app_hub/rest" - -module Google - module Cloud - module AppHub - module V1 - ## - # The App Hub API allows you to manage App Hub resources. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/app_hub/v1/app_hub" - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/app_hub/v1/app_hub/rest" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module AppHub - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_hub", "helpers.rb" -require "google/cloud/app_hub/v1/app_hub/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb deleted file mode 100644 index ba386c45603d..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/client.rb +++ /dev/null @@ -1,3468 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apphub/v1/apphub_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - ## - # Client for the AppHub service. - # - # The App Hub API allows you to manage App Hub resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_hub_stub - - ## - # Configure the AppHub Client class. - # - # See {::Google::Cloud::AppHub::V1::AppHub::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppHub clients - # ::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppHub", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.lookup_service_project_attachment.timeout = 60.0 - default_config.rpcs.lookup_service_project_attachment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_service_project_attachments.timeout = 60.0 - default_config.rpcs.list_service_project_attachments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_service_project_attachment.timeout = 60.0 - - default_config.rpcs.get_service_project_attachment.timeout = 60.0 - default_config.rpcs.get_service_project_attachment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_service_project_attachment.timeout = 60.0 - - default_config.rpcs.detach_service_project_attachment.timeout = 60.0 - - default_config.rpcs.list_discovered_services.timeout = 60.0 - default_config.rpcs.list_discovered_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_discovered_service.timeout = 60.0 - default_config.rpcs.get_discovered_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_discovered_service.timeout = 60.0 - default_config.rpcs.lookup_discovered_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_services.timeout = 60.0 - default_config.rpcs.list_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_service.timeout = 60.0 - - default_config.rpcs.get_service.timeout = 60.0 - default_config.rpcs.get_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_service.timeout = 60.0 - - default_config.rpcs.delete_service.timeout = 60.0 - - default_config.rpcs.list_discovered_workloads.timeout = 60.0 - default_config.rpcs.list_discovered_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_discovered_workload.timeout = 60.0 - default_config.rpcs.get_discovered_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_discovered_workload.timeout = 60.0 - default_config.rpcs.lookup_discovered_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - - default_config.rpcs.list_applications.timeout = 60.0 - default_config.rpcs.list_applications.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_application.timeout = 60.0 - - default_config.rpcs.get_application.timeout = 60.0 - default_config.rpcs.get_application.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_application.timeout = 60.0 - - default_config.rpcs.delete_application.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AppHub Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppHub::V1::AppHub::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @app_hub_stub.universe_domain - end - - ## - # Create a new AppHub client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppHub client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/apphub/v1/apphub_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @app_hub_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AppHub::V1::AppHub::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @app_hub_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_hub_stub.endpoint - config.universe_domain = @app_hub_stub.universe_domain - config.logger = @app_hub_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_hub_stub.endpoint - config.universe_domain = @app_hub_stub.universe_domain - config.logger = @app_hub_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppHub::V1::AppHub::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @app_hub_stub.logger - end - - # Service calls - - ## - # Lists a service project attachment for a given service project. You can - # call this API from any project to find if it is attached to a host project. - # - # @overload lookup_service_project_attachment(request, options = nil) - # Pass arguments to `lookup_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_service_project_attachment(name: nil) - # Pass arguments to `lookup_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Service project ID and location to lookup service project - # attachment for. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new - # - # # Call the lookup_service_project_attachment method. - # result = client.lookup_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. - # p result - # - def lookup_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :lookup_service_project_attachment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists service projects attached to the host project. - # - # @overload list_service_project_attachments(request, options = nil) - # Pass arguments to `list_service_project_attachments` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_service_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_service_project_attachments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to list service project attachments. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new - # - # # Call the list_service_project_attachments method. - # result = client.list_service_project_attachments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. - # p item - # end - # - def list_service_project_attachments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_service_project_attachments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_service_project_attachments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_project_attachments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_service_project_attachments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Attaches a service project to the host project. - # - # @overload create_service_project_attachment(request, options = nil) - # Pass arguments to `create_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) - # Pass arguments to `create_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to which service project is being - # attached. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @param service_project_attachment_id [::String] - # Required. The service project attachment identifier must contain the - # project id of the service project specified in the - # service_project_attachment.service_project field. - # @param service_project_attachment [::Google::Cloud::AppHub::V1::ServiceProjectAttachment, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new - # - # # Call the create_service_project_attachment method. - # result = client.create_service_project_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_service_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :create_service_project_attachment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a service project attachment. - # - # @overload get_service_project_attachment(request, options = nil) - # Pass arguments to `get_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service_project_attachment(name: nil) - # Pass arguments to `get_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the service project attachment to - # retrieve. Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new - # - # # Call the get_service_project_attachment method. - # result = client.get_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. - # p result - # - def get_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_service_project_attachment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a service project attachment. - # - # @overload delete_service_project_attachment(request, options = nil) - # Pass arguments to `delete_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_service_project_attachment(name: nil, request_id: nil) - # Pass arguments to `delete_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the service project attachment to delete. - # Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new - # - # # Call the delete_service_project_attachment method. - # result = client.delete_service_project_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_service_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :delete_service_project_attachment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detaches a service project from a host project. - # You can call this API from any service project without needing access to - # the host project that it is attached to. - # - # @overload detach_service_project_attachment(request, options = nil) - # Pass arguments to `detach_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload detach_service_project_attachment(name: nil) - # Pass arguments to `detach_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Service project id and location to detach from a host project. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new - # - # # Call the detach_service_project_attachment method. - # result = client.detach_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. - # p result - # - def detach_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.detach_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :detach_service_project_attachment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Discovered Services that can be added to an Application in a host - # project and location. - # - # @overload list_discovered_services(request, options = nil) - # Pass arguments to `list_discovered_services` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_discovered_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Discovered Services on. - # Expected format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new - # - # # Call the list_discovered_services method. - # result = client.list_discovered_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredService. - # p item - # end - # - def list_discovered_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_discovered_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_discovered_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_discovered_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Discovered Service in a host project and location. - # - # @overload get_discovered_service(request, options = nil) - # Pass arguments to `get_discovered_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_discovered_service(name: nil) - # Pass arguments to `get_discovered_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Discovered Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::DiscoveredService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new - # - # # Call the get_discovered_service method. - # result = client.get_discovered_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. - # p result - # - def get_discovered_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_discovered_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_discovered_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_discovered_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a Discovered Service in a host project and location, with a - # given resource URI. - # - # @overload lookup_discovered_service(request, options = nil) - # Pass arguments to `lookup_discovered_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_discovered_service(parent: nil, uri: nil) - # Pass arguments to `lookup_discovered_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to lookup Discovered Service in. - # Expected format: `projects/{project}/locations/{location}`. - # @param uri [::String] - # Required. Resource URI to find DiscoveredService for. - # Accepts both project number and project ID and does translation when - # needed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new - # - # # Call the lookup_discovered_service method. - # result = client.lookup_discovered_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. - # p result - # - def lookup_discovered_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_discovered_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_discovered_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :lookup_discovered_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Services in an Application. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the parent Application to list Services - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Service in an Application. - # - # @overload create_service(request, options = nil) - # Pass arguments to `create_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service(parent: nil, service_id: nil, service: nil, request_id: nil) - # Pass arguments to `create_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the parent Application to create the - # Service in. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param service_id [::String] - # Required. The Service identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateServiceRequest.new - # - # # Call the create_service method. - # result = client.create_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :create_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Service in an Application. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service(name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Service in an Application. - # - # @overload update_service(request, options = nil) - # Pass arguments to `update_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_service(update_mask: nil, service: nil, request_id: nil) - # Pass arguments to `update_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Service resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new - # - # # Call the update_service method. - # result = client.update_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service&.name - header_params["service.name"] = request.service.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :update_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Service from an Application. - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_service(name: nil, request_id: nil) - # Pass arguments to `delete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Service to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteServiceRequest.new - # - # # Call the delete_service method. - # result = client.delete_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :delete_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Discovered Workloads that can be added to an Application in a host - # project and location. - # - # @overload list_discovered_workloads(request, options = nil) - # Pass arguments to `list_discovered_workloads` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_discovered_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Discovered Workloads on. - # Expected format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new - # - # # Call the list_discovered_workloads method. - # result = client.list_discovered_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. - # p item - # end - # - def list_discovered_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_discovered_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_discovered_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_discovered_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Discovered Workload in a host project and location. - # - # @overload get_discovered_workload(request, options = nil) - # Pass arguments to `get_discovered_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_discovered_workload(name: nil) - # Pass arguments to `get_discovered_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Discovered Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new - # - # # Call the get_discovered_workload method. - # result = client.get_discovered_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. - # p result - # - def get_discovered_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_discovered_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_discovered_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_discovered_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a Discovered Workload in a host project and location, with a - # given resource URI. - # - # @overload lookup_discovered_workload(request, options = nil) - # Pass arguments to `lookup_discovered_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_discovered_workload(parent: nil, uri: nil) - # Pass arguments to `lookup_discovered_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to lookup Discovered Workload in. - # Expected format: `projects/{project}/locations/{location}`. - # @param uri [::String] - # Required. Resource URI to find Discovered Workload for. - # Accepts both project number and project ID and does translation when - # needed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new - # - # # Call the lookup_discovered_workload method. - # result = client.lookup_discovered_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. - # p result - # - def lookup_discovered_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_discovered_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :lookup_discovered_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Workloads in an Application. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the parent Application to list Workloads - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Workload in an Application. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the Application to create Workload in. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param workload_id [::String] - # Required. The Workload identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :create_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Workload in an Application. - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Workload in an Application. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workload(update_mask: nil, workload: nil, request_id: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Workload resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workload&.name - header_params["workload.name"] = request.workload.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :update_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Workload from an Application. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workload(name: nil, request_id: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Workload to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :delete_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Applications in a host project and location. - # - # @overload list_applications(request, options = nil) - # Pass arguments to `list_applications` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListApplicationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListApplicationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_applications` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Applications on. - # Expected format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new - # - # # Call the list_applications method. - # result = client.list_applications request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Application. - # p item - # end - # - def list_applications request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListApplicationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_applications.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_applications.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_applications.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :list_applications, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_applications, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an Application in a host project and location. - # - # @overload create_application(request, options = nil) - # Pass arguments to `create_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil) - # Pass arguments to `create_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to create Application in. - # Expected format: `projects/{project}/locations/{location}`. - # @param application_id [::String] - # Required. The Application identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new - # - # # Call the create_application method. - # result = client.create_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :create_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Application in a host project and location. - # - # @overload get_application(request, options = nil) - # Pass arguments to `get_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_application(name: nil) - # Pass arguments to `get_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Application to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AppHub::V1::Application] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AppHub::V1::Application] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetApplicationRequest.new - # - # # Call the get_application method. - # result = client.get_application request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Application. - # p result - # - def get_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :get_application, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an Application in a host project and location. - # - # @overload update_application(request, options = nil) - # Pass arguments to `update_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_application(update_mask: nil, application: nil, request_id: nil) - # Pass arguments to `update_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Application resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new - # - # # Call the update_application method. - # result = client.update_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.application&.name - header_params["application.name"] = request.application.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :update_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an Application in a host project and location. - # - # @overload delete_application(request, options = nil) - # Pass arguments to `delete_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_application(name: nil, request_id: nil) - # Pass arguments to `delete_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Application to delete. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new - # - # # Call the delete_application method. - # result = client.delete_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_application.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.call_rpc :delete_application, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AppHub API. - # - # This class represents the configuration for AppHub, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppHub::V1::AppHub::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # lookup_service_project_attachment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppHub::V1::AppHub::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.lookup_service_project_attachment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.lookup_service_project_attachment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apphub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AppHub API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `lookup_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_service_project_attachment - ## - # RPC-specific configuration for `list_service_project_attachments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_project_attachments - ## - # RPC-specific configuration for `create_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_project_attachment - ## - # RPC-specific configuration for `get_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_project_attachment - ## - # RPC-specific configuration for `delete_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_project_attachment - ## - # RPC-specific configuration for `detach_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :detach_service_project_attachment - ## - # RPC-specific configuration for `list_discovered_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovered_services - ## - # RPC-specific configuration for `get_discovered_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovered_service - ## - # RPC-specific configuration for `lookup_discovered_service` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_discovered_service - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `create_service` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `update_service` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service - ## - # RPC-specific configuration for `delete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service - ## - # RPC-specific configuration for `list_discovered_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovered_workloads - ## - # RPC-specific configuration for `get_discovered_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovered_workload - ## - # RPC-specific configuration for `lookup_discovered_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_discovered_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `list_applications` - # @return [::Gapic::Config::Method] - # - attr_reader :list_applications - ## - # RPC-specific configuration for `create_application` - # @return [::Gapic::Config::Method] - # - attr_reader :create_application - ## - # RPC-specific configuration for `get_application` - # @return [::Gapic::Config::Method] - # - attr_reader :get_application - ## - # RPC-specific configuration for `update_application` - # @return [::Gapic::Config::Method] - # - attr_reader :update_application - ## - # RPC-specific configuration for `delete_application` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_application - - # @private - def initialize parent_rpcs = nil - lookup_service_project_attachment_config = parent_rpcs.lookup_service_project_attachment if parent_rpcs.respond_to? :lookup_service_project_attachment - @lookup_service_project_attachment = ::Gapic::Config::Method.new lookup_service_project_attachment_config - list_service_project_attachments_config = parent_rpcs.list_service_project_attachments if parent_rpcs.respond_to? :list_service_project_attachments - @list_service_project_attachments = ::Gapic::Config::Method.new list_service_project_attachments_config - create_service_project_attachment_config = parent_rpcs.create_service_project_attachment if parent_rpcs.respond_to? :create_service_project_attachment - @create_service_project_attachment = ::Gapic::Config::Method.new create_service_project_attachment_config - get_service_project_attachment_config = parent_rpcs.get_service_project_attachment if parent_rpcs.respond_to? :get_service_project_attachment - @get_service_project_attachment = ::Gapic::Config::Method.new get_service_project_attachment_config - delete_service_project_attachment_config = parent_rpcs.delete_service_project_attachment if parent_rpcs.respond_to? :delete_service_project_attachment - @delete_service_project_attachment = ::Gapic::Config::Method.new delete_service_project_attachment_config - detach_service_project_attachment_config = parent_rpcs.detach_service_project_attachment if parent_rpcs.respond_to? :detach_service_project_attachment - @detach_service_project_attachment = ::Gapic::Config::Method.new detach_service_project_attachment_config - list_discovered_services_config = parent_rpcs.list_discovered_services if parent_rpcs.respond_to? :list_discovered_services - @list_discovered_services = ::Gapic::Config::Method.new list_discovered_services_config - get_discovered_service_config = parent_rpcs.get_discovered_service if parent_rpcs.respond_to? :get_discovered_service - @get_discovered_service = ::Gapic::Config::Method.new get_discovered_service_config - lookup_discovered_service_config = parent_rpcs.lookup_discovered_service if parent_rpcs.respond_to? :lookup_discovered_service - @lookup_discovered_service = ::Gapic::Config::Method.new lookup_discovered_service_config - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service - @create_service = ::Gapic::Config::Method.new create_service_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service - @update_service = ::Gapic::Config::Method.new update_service_config - delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service - @delete_service = ::Gapic::Config::Method.new delete_service_config - list_discovered_workloads_config = parent_rpcs.list_discovered_workloads if parent_rpcs.respond_to? :list_discovered_workloads - @list_discovered_workloads = ::Gapic::Config::Method.new list_discovered_workloads_config - get_discovered_workload_config = parent_rpcs.get_discovered_workload if parent_rpcs.respond_to? :get_discovered_workload - @get_discovered_workload = ::Gapic::Config::Method.new get_discovered_workload_config - lookup_discovered_workload_config = parent_rpcs.lookup_discovered_workload if parent_rpcs.respond_to? :lookup_discovered_workload - @lookup_discovered_workload = ::Gapic::Config::Method.new lookup_discovered_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications - @list_applications = ::Gapic::Config::Method.new list_applications_config - create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application - @create_application = ::Gapic::Config::Method.new create_application_config - get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application - @get_application = ::Gapic::Config::Method.new get_application_config - update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application - @update_application = ::Gapic::Config::Method.new update_application_config - delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application - @delete_application = ::Gapic::Config::Method.new delete_application_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb deleted file mode 100644 index 541dcc24d08f..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - # Credentials for the AppHub API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb deleted file mode 100644 index 97cefaaa2312..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppHub Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AppHub Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apphub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb deleted file mode 100644 index de11b2b871b2..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/paths.rb +++ /dev/null @@ -1,182 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - module AppHub - # Path helper methods for the AppHub API. - module Paths - ## - # Create a fully-qualified Application resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/applications/{application}` - # - # @param project [String] - # @param location [String] - # @param application [String] - # - # @return [::String] - def application_path project:, location:, application: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/applications/#{application}" - end - - ## - # Create a fully-qualified DiscoveredService resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/discoveredServices/{discovered_service}` - # - # @param project [String] - # @param location [String] - # @param discovered_service [String] - # - # @return [::String] - def discovered_service_path project:, location:, discovered_service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/discoveredServices/#{discovered_service}" - end - - ## - # Create a fully-qualified DiscoveredWorkload resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/discoveredWorkloads/{discovered_workload}` - # - # @param project [String] - # @param location [String] - # @param discovered_workload [String] - # - # @return [::String] - def discovered_workload_path project:, location:, discovered_workload: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/discoveredWorkloads/#{discovered_workload}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/applications/{application}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param application [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, application:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "application cannot contain /" if application.to_s.include? "/" - - "projects/#{project}/locations/#{location}/applications/#{application}/services/#{service}" - end - - ## - # Create a fully-qualified ServiceProjectAttachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serviceProjectAttachments/{service_project_attachment}` - # - # @param project [String] - # @param location [String] - # @param service_project_attachment [String] - # - # @return [::String] - def service_project_attachment_path project:, location:, service_project_attachment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serviceProjectAttachments/#{service_project_attachment}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}` - # - # @param project [String] - # @param location [String] - # @param application [String] - # @param workload [String] - # - # @return [::String] - def workload_path project:, location:, application:, workload: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "application cannot contain /" if application.to_s.include? "/" - - "projects/#{project}/locations/#{location}/applications/#{application}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb deleted file mode 100644 index 41025e868601..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/app_hub/v1/version" -require "google/cloud/app_hub/v1/bindings_override" - -require "google/cloud/app_hub/v1/app_hub/credentials" -require "google/cloud/app_hub/v1/app_hub/paths" -require "google/cloud/app_hub/v1/app_hub/rest/operations" -require "google/cloud/app_hub/v1/app_hub/rest/client" - -module Google - module Cloud - module AppHub - module V1 - ## - # The App Hub API allows you to manage App Hub resources. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/app_hub/v1/app_hub/rest" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module AppHub - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/app_hub/v1/app_hub/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb deleted file mode 100644 index b44d6b6228db..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb +++ /dev/null @@ -1,3245 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apphub/v1/apphub_service_pb" -require "google/cloud/app_hub/v1/app_hub/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - module Rest - ## - # REST client for the AppHub service. - # - # The App Hub API allows you to manage App Hub resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_hub_stub - - ## - # Configure the AppHub Client class. - # - # See {::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppHub clients - # ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppHub", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.lookup_service_project_attachment.timeout = 60.0 - default_config.rpcs.lookup_service_project_attachment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_service_project_attachments.timeout = 60.0 - default_config.rpcs.list_service_project_attachments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_service_project_attachment.timeout = 60.0 - - default_config.rpcs.get_service_project_attachment.timeout = 60.0 - default_config.rpcs.get_service_project_attachment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_service_project_attachment.timeout = 60.0 - - default_config.rpcs.detach_service_project_attachment.timeout = 60.0 - - default_config.rpcs.list_discovered_services.timeout = 60.0 - default_config.rpcs.list_discovered_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_discovered_service.timeout = 60.0 - default_config.rpcs.get_discovered_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_discovered_service.timeout = 60.0 - default_config.rpcs.lookup_discovered_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_services.timeout = 60.0 - default_config.rpcs.list_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_service.timeout = 60.0 - - default_config.rpcs.get_service.timeout = 60.0 - default_config.rpcs.get_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_service.timeout = 60.0 - - default_config.rpcs.delete_service.timeout = 60.0 - - default_config.rpcs.list_discovered_workloads.timeout = 60.0 - default_config.rpcs.list_discovered_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_discovered_workload.timeout = 60.0 - default_config.rpcs.get_discovered_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_discovered_workload.timeout = 60.0 - default_config.rpcs.lookup_discovered_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - - default_config.rpcs.list_applications.timeout = 60.0 - default_config.rpcs.list_applications.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_application.timeout = 60.0 - - default_config.rpcs.get_application.timeout = 60.0 - default_config.rpcs.get_application.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_application.timeout = 60.0 - - default_config.rpcs.delete_application.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AppHub Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @app_hub_stub.universe_domain - end - - ## - # Create a new AppHub REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppHub client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @app_hub_stub = ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @app_hub_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_hub_stub.endpoint - config.universe_domain = @app_hub_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @app_hub_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_hub_stub.endpoint - config.universe_domain = @app_hub_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @app_hub_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AppHub::V1::AppHub::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @app_hub_stub.logger - end - - # Service calls - - ## - # Lists a service project attachment for a given service project. You can - # call this API from any project to find if it is attached to a host project. - # - # @overload lookup_service_project_attachment(request, options = nil) - # Pass arguments to `lookup_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_service_project_attachment(name: nil) - # Pass arguments to `lookup_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Service project ID and location to lookup service project - # attachment for. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new - # - # # Call the lookup_service_project_attachment method. - # result = client.lookup_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. - # p result - # - def lookup_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.lookup_service_project_attachment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists service projects attached to the host project. - # - # @overload list_service_project_attachments(request, options = nil) - # Pass arguments to `list_service_project_attachments` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_service_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_service_project_attachments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to list service project attachments. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new - # - # # Call the list_service_project_attachments method. - # result = client.list_service_project_attachments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. - # p item - # end - # - def list_service_project_attachments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_service_project_attachments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_service_project_attachments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_project_attachments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_service_project_attachments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, "service_project_attachments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Attaches a service project to the host project. - # - # @overload create_service_project_attachment(request, options = nil) - # Pass arguments to `create_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service_project_attachment(parent: nil, service_project_attachment_id: nil, service_project_attachment: nil, request_id: nil) - # Pass arguments to `create_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to which service project is being - # attached. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @param service_project_attachment_id [::String] - # Required. The service project attachment identifier must contain the - # project id of the service project specified in the - # service_project_attachment.service_project field. - # @param service_project_attachment [::Google::Cloud::AppHub::V1::ServiceProjectAttachment, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new - # - # # Call the create_service_project_attachment method. - # result = client.create_service_project_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.create_service_project_attachment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a service project attachment. - # - # @overload get_service_project_attachment(request, options = nil) - # Pass arguments to `get_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service_project_attachment(name: nil) - # Pass arguments to `get_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the service project attachment to - # retrieve. Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new - # - # # Call the get_service_project_attachment method. - # result = client.get_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. - # p result - # - def get_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_service_project_attachment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a service project attachment. - # - # @overload delete_service_project_attachment(request, options = nil) - # Pass arguments to `delete_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_service_project_attachment(name: nil, request_id: nil) - # Pass arguments to `delete_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the service project attachment to delete. - # Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new - # - # # Call the delete_service_project_attachment method. - # result = client.delete_service_project_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_service_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.delete_service_project_attachment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detaches a service project from a host project. - # You can call this API from any service project without needing access to - # the host project that it is attached to. - # - # @overload detach_service_project_attachment(request, options = nil) - # Pass arguments to `detach_service_project_attachment` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload detach_service_project_attachment(name: nil) - # Pass arguments to `detach_service_project_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Service project id and location to detach from a host project. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new - # - # # Call the detach_service_project_attachment method. - # result = client.detach_service_project_attachment request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. - # p result - # - def detach_service_project_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.detach_service_project_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.detach_service_project_attachment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Discovered Services that can be added to an Application in a host - # project and location. - # - # @overload list_discovered_services(request, options = nil) - # Pass arguments to `list_discovered_services` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_discovered_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_discovered_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Discovered Services on. - # Expected format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredService>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new - # - # # Call the list_discovered_services method. - # result = client.list_discovered_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredService. - # p item - # end - # - def list_discovered_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_discovered_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_discovered_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_discovered_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_discovered_services, "discovered_services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Discovered Service in a host project and location. - # - # @overload get_discovered_service(request, options = nil) - # Pass arguments to `get_discovered_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_discovered_service(name: nil) - # Pass arguments to `get_discovered_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Discovered Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new - # - # # Call the get_discovered_service method. - # result = client.get_discovered_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. - # p result - # - def get_discovered_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_discovered_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_discovered_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_discovered_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a Discovered Service in a host project and location, with a - # given resource URI. - # - # @overload lookup_discovered_service(request, options = nil) - # Pass arguments to `lookup_discovered_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_discovered_service(parent: nil, uri: nil) - # Pass arguments to `lookup_discovered_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to lookup Discovered Service in. - # Expected format: `projects/{project}/locations/{location}`. - # @param uri [::String] - # Required. Resource URI to find DiscoveredService for. - # Accepts both project number and project ID and does translation when - # needed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new - # - # # Call the lookup_discovered_service method. - # result = client.lookup_discovered_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. - # p result - # - def lookup_discovered_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_discovered_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_discovered_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.lookup_discovered_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Services in an Application. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the parent Application to list Services - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_services, "services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Service in an Application. - # - # @overload create_service(request, options = nil) - # Pass arguments to `create_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service(parent: nil, service_id: nil, service: nil, request_id: nil) - # Pass arguments to `create_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the parent Application to create the - # Service in. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param service_id [::String] - # Required. The Service identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateServiceRequest.new - # - # # Call the create_service method. - # result = client.create_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.create_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Service in an Application. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service(name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Service in an Application. - # - # @overload update_service(request, options = nil) - # Pass arguments to `update_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_service(update_mask: nil, service: nil, request_id: nil) - # Pass arguments to `update_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Service resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param service [::Google::Cloud::AppHub::V1::Service, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new - # - # # Call the update_service method. - # result = client.update_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.update_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Service from an Application. - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_service(name: nil, request_id: nil) - # Pass arguments to `delete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Service to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteServiceRequest.new - # - # # Call the delete_service method. - # result = client.delete_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.delete_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Discovered Workloads that can be added to an Application in a host - # project and location. - # - # @overload list_discovered_workloads(request, options = nil) - # Pass arguments to `list_discovered_workloads` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_discovered_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_discovered_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Discovered Workloads on. - # Expected format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new - # - # # Call the list_discovered_workloads method. - # result = client.list_discovered_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. - # p item - # end - # - def list_discovered_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_discovered_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_discovered_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_discovered_workloads request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, "discovered_workloads", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Discovered Workload in a host project and location. - # - # @overload get_discovered_workload(request, options = nil) - # Pass arguments to `get_discovered_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_discovered_workload(name: nil) - # Pass arguments to `get_discovered_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Discovered Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new - # - # # Call the get_discovered_workload method. - # result = client.get_discovered_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. - # p result - # - def get_discovered_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_discovered_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_discovered_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_discovered_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a Discovered Workload in a host project and location, with a - # given resource URI. - # - # @overload lookup_discovered_workload(request, options = nil) - # Pass arguments to `lookup_discovered_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_discovered_workload(parent: nil, uri: nil) - # Pass arguments to `lookup_discovered_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Host project ID and location to lookup Discovered Workload in. - # Expected format: `projects/{project}/locations/{location}`. - # @param uri [::String] - # Required. Resource URI to find Discovered Workload for. - # Accepts both project number and project ID and does translation when - # needed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new - # - # # Call the lookup_discovered_workload method. - # result = client.lookup_discovered_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. - # p result - # - def lookup_discovered_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_discovered_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.lookup_discovered_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Workloads in an Application. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the parent Application to list Workloads - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_workloads request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_workloads, "workloads", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Workload in an Application. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workload(parent: nil, workload_id: nil, workload: nil, request_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Fully qualified name of the Application to create Workload in. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param workload_id [::String] - # Required. The Workload identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.create_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a Workload in an Application. - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Workload in an Application. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workload(update_mask: nil, workload: nil, request_id: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Workload resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param workload [::Google::Cloud::AppHub::V1::Workload, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.update_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Workload from an Application. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workload(name: nil, request_id: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Workload to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.delete_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Applications in a host project and location. - # - # @overload list_applications(request, options = nil) - # Pass arguments to `list_applications` via a request object, either of type - # {::Google::Cloud::AppHub::V1::ListApplicationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::ListApplicationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_applications` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to list Applications on. - # Expected format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppHub::V1::Application>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new - # - # # Call the list_applications method. - # result = client.list_applications request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AppHub::V1::Application. - # p item - # end - # - def list_applications request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::ListApplicationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_applications.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_applications.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_applications.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.list_applications request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @app_hub_stub, :list_applications, "applications", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an Application in a host project and location. - # - # @overload create_application(request, options = nil) - # Pass arguments to `create_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::CreateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::CreateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil) - # Pass arguments to `create_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project and location to create Application in. - # Expected format: `projects/{project}/locations/{location}`. - # @param application_id [::String] - # Required. The Application identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new - # - # # Call the create_application method. - # result = client.create_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::CreateApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.create_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Application in a host project and location. - # - # @overload get_application(request, options = nil) - # Pass arguments to `get_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::GetApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::GetApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_application(name: nil) - # Pass arguments to `get_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Application to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Application] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Application] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::GetApplicationRequest.new - # - # # Call the get_application method. - # result = client.get_application request - # - # # The returned object is of type Google::Cloud::AppHub::V1::Application. - # p result - # - def get_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::GetApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.get_application request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an Application in a host project and location. - # - # @overload update_application(request, options = nil) - # Pass arguments to `update_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::UpdateApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::UpdateApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_application(update_mask: nil, application: nil, request_id: nil) - # Pass arguments to `update_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Application resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @param application [::Google::Cloud::AppHub::V1::Application, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new - # - # # Call the update_application method. - # result = client.update_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::UpdateApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.update_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an Application in a host project and location. - # - # @overload delete_application(request, options = nil) - # Pass arguments to `delete_application` via a request object, either of type - # {::Google::Cloud::AppHub::V1::DeleteApplicationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AppHub::V1::DeleteApplicationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_application(name: nil, request_id: nil) - # Pass arguments to `delete_application` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified name of the Application to delete. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/app_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new - # - # # Call the delete_application method. - # result = client.delete_application request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_application request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppHub::V1::DeleteApplicationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_application.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_application.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_application.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_hub_stub.delete_application request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AppHub REST API. - # - # This class represents the configuration for AppHub REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # lookup_service_project_attachment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.lookup_service_project_attachment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.lookup_service_project_attachment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apphub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AppHub API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `lookup_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_service_project_attachment - ## - # RPC-specific configuration for `list_service_project_attachments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_project_attachments - ## - # RPC-specific configuration for `create_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_project_attachment - ## - # RPC-specific configuration for `get_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_project_attachment - ## - # RPC-specific configuration for `delete_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_project_attachment - ## - # RPC-specific configuration for `detach_service_project_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :detach_service_project_attachment - ## - # RPC-specific configuration for `list_discovered_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovered_services - ## - # RPC-specific configuration for `get_discovered_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovered_service - ## - # RPC-specific configuration for `lookup_discovered_service` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_discovered_service - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `create_service` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `update_service` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service - ## - # RPC-specific configuration for `delete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service - ## - # RPC-specific configuration for `list_discovered_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovered_workloads - ## - # RPC-specific configuration for `get_discovered_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovered_workload - ## - # RPC-specific configuration for `lookup_discovered_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_discovered_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `list_applications` - # @return [::Gapic::Config::Method] - # - attr_reader :list_applications - ## - # RPC-specific configuration for `create_application` - # @return [::Gapic::Config::Method] - # - attr_reader :create_application - ## - # RPC-specific configuration for `get_application` - # @return [::Gapic::Config::Method] - # - attr_reader :get_application - ## - # RPC-specific configuration for `update_application` - # @return [::Gapic::Config::Method] - # - attr_reader :update_application - ## - # RPC-specific configuration for `delete_application` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_application - - # @private - def initialize parent_rpcs = nil - lookup_service_project_attachment_config = parent_rpcs.lookup_service_project_attachment if parent_rpcs.respond_to? :lookup_service_project_attachment - @lookup_service_project_attachment = ::Gapic::Config::Method.new lookup_service_project_attachment_config - list_service_project_attachments_config = parent_rpcs.list_service_project_attachments if parent_rpcs.respond_to? :list_service_project_attachments - @list_service_project_attachments = ::Gapic::Config::Method.new list_service_project_attachments_config - create_service_project_attachment_config = parent_rpcs.create_service_project_attachment if parent_rpcs.respond_to? :create_service_project_attachment - @create_service_project_attachment = ::Gapic::Config::Method.new create_service_project_attachment_config - get_service_project_attachment_config = parent_rpcs.get_service_project_attachment if parent_rpcs.respond_to? :get_service_project_attachment - @get_service_project_attachment = ::Gapic::Config::Method.new get_service_project_attachment_config - delete_service_project_attachment_config = parent_rpcs.delete_service_project_attachment if parent_rpcs.respond_to? :delete_service_project_attachment - @delete_service_project_attachment = ::Gapic::Config::Method.new delete_service_project_attachment_config - detach_service_project_attachment_config = parent_rpcs.detach_service_project_attachment if parent_rpcs.respond_to? :detach_service_project_attachment - @detach_service_project_attachment = ::Gapic::Config::Method.new detach_service_project_attachment_config - list_discovered_services_config = parent_rpcs.list_discovered_services if parent_rpcs.respond_to? :list_discovered_services - @list_discovered_services = ::Gapic::Config::Method.new list_discovered_services_config - get_discovered_service_config = parent_rpcs.get_discovered_service if parent_rpcs.respond_to? :get_discovered_service - @get_discovered_service = ::Gapic::Config::Method.new get_discovered_service_config - lookup_discovered_service_config = parent_rpcs.lookup_discovered_service if parent_rpcs.respond_to? :lookup_discovered_service - @lookup_discovered_service = ::Gapic::Config::Method.new lookup_discovered_service_config - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service - @create_service = ::Gapic::Config::Method.new create_service_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service - @update_service = ::Gapic::Config::Method.new update_service_config - delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service - @delete_service = ::Gapic::Config::Method.new delete_service_config - list_discovered_workloads_config = parent_rpcs.list_discovered_workloads if parent_rpcs.respond_to? :list_discovered_workloads - @list_discovered_workloads = ::Gapic::Config::Method.new list_discovered_workloads_config - get_discovered_workload_config = parent_rpcs.get_discovered_workload if parent_rpcs.respond_to? :get_discovered_workload - @get_discovered_workload = ::Gapic::Config::Method.new get_discovered_workload_config - lookup_discovered_workload_config = parent_rpcs.lookup_discovered_workload if parent_rpcs.respond_to? :lookup_discovered_workload - @lookup_discovered_workload = ::Gapic::Config::Method.new lookup_discovered_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications - @list_applications = ::Gapic::Config::Method.new list_applications_config - create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application - @create_application = ::Gapic::Config::Method.new create_application_config - get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application - @get_application = ::Gapic::Config::Method.new get_application_config - update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application - @update_application = ::Gapic::Config::Method.new update_application_config - delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application - @delete_application = ::Gapic::Config::Method.new delete_application_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb deleted file mode 100644 index 58bf92c3e26d..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppHub Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AppHub Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AppHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apphub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb deleted file mode 100644 index 8c21b329cfc6..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb +++ /dev/null @@ -1,1736 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apphub/v1/apphub_service_pb" - -module Google - module Cloud - module AppHub - module V1 - module AppHub - module Rest - ## - # REST service stub for the AppHub service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the lookup_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse] - # A result object deserialized from the server's reply - def lookup_service_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "lookup_service_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_project_attachments REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse] - # A result object deserialized from the server's reply - def list_service_project_attachments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_project_attachments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_service_project_attachments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_service_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_service_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # A result object deserialized from the server's reply - def get_service_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_service_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_service_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the detach_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse] - # A result object deserialized from the server's reply - def detach_service_project_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_detach_service_project_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "detach_service_project_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_discovered_services REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse] - # A result object deserialized from the server's reply - def list_discovered_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_discovered_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_discovered_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_discovered_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredService] - # A result object deserialized from the server's reply - def get_discovered_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_discovered_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_discovered_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::DiscoveredService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the lookup_discovered_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse] - # A result object deserialized from the server's reply - def lookup_discovered_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_discovered_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "lookup_discovered_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_services REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListServicesResponse] - # A result object deserialized from the server's reply - def list_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Service] - # A result object deserialized from the server's reply - def get_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_discovered_workloads REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse] - # A result object deserialized from the server's reply - def list_discovered_workloads request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_discovered_workloads_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_discovered_workloads", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_discovered_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # A result object deserialized from the server's reply - def get_discovered_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_discovered_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_discovered_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the lookup_discovered_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse] - # A result object deserialized from the server's reply - def lookup_discovered_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_discovered_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "lookup_discovered_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListWorkloadsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListWorkloadsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListWorkloadsResponse] - # A result object deserialized from the server's reply - def list_workloads request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_workloads", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Workload] - # A result object deserialized from the server's reply - def get_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::Workload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_applications REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListApplicationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::ListApplicationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::ListApplicationsResponse] - # A result object deserialized from the server's reply - def list_applications request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_applications_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_applications", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AppHub::V1::Application] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AppHub::V1::Application] - # A result object deserialized from the server's reply - def get_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AppHub::V1::Application.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteApplicationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_application request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_application_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_application", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_service_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:lookupServiceProjectAttachment", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_project_attachments REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_service_project_attachments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/serviceProjectAttachments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_service_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/serviceProjectAttachments", - body: "service_project_attachment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_service_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the detach_service_project_attachment REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_detach_service_project_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:detachServiceProjectAttachment", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_discovered_services REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_discovered_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/discoveredServices", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_discovered_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_discovered_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/discoveredServices/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_discovered_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_discovered_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/discoveredServices:lookup", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_services REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/services", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/services", - body: "service", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{service.name}", - body: "service", - matches: [ - ["service.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_discovered_workloads REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_discovered_workloads_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/discoveredWorkloads", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_discovered_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_discovered_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/discoveredWorkloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_discovered_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_discovered_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/discoveredWorkloads:lookup", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListWorkloadsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workloads_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workloads", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workloads", - body: "workload", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{workload.name}", - body: "workload", - matches: [ - ["workload.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_applications REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::ListApplicationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_applications_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/applications", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::CreateApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/applications", - body: "application", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::GetApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::UpdateApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{application.name}", - body: "application", - matches: [ - ["application.name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_application REST call - # - # @param request_pb [::Google::Cloud::AppHub::V1::DeleteApplicationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_application_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb deleted file mode 100644 index 126149ab3449..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/bindings_override.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module AppHub - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/app_hub/v1/rest" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AppHub"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/applications/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb deleted file mode 100644 index 722942549fd1..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/app_hub/v1/app_hub/rest" -require "google/cloud/app_hub/v1/bindings_override" -require "google/cloud/app_hub/v1/version" - -module Google - module Cloud - module AppHub - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/app_hub/v1/rest" - # client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb deleted file mode 100644 index 471b04475c54..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/app_hub/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb b/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb deleted file mode 100644 index 12080e3972e6..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/lib/google/cloud/apphub/v1/apphub_service_pb.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/apphub/v1/apphub_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/apphub/v1/application_pb' -require 'google/cloud/apphub/v1/service_pb' -require 'google/cloud/apphub/v1/service_project_attachment_pb' -require 'google/cloud/apphub/v1/workload_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n+google/cloud/apphub/v1/apphub_service.proto\x12\x16google.cloud.apphub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/apphub/v1/application.proto\x1a$google/cloud/apphub/v1/service.proto\x1a\x37google/cloud/apphub/v1/service_project_attachment.proto\x1a%google/cloud/apphub/v1/workload.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"`\n%LookupServiceProjectAttachmentRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"~\n&LookupServiceProjectAttachmentResponse\x12T\n\x1aservice_project_attachment\x18\x01 \x01(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachment\"\xcb\x01\n$ListServiceProjectAttachmentsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.apphub.googleapis.com/ServiceProjectAttachment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n%ListServiceProjectAttachmentsResponse\x12U\n\x1bservice_project_attachments\x18\x01 \x03(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8f\x02\n%CreateServiceProjectAttachmentRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.apphub.googleapis.com/ServiceProjectAttachment\x12*\n\x1dservice_project_attachment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x1aservice_project_attachment\x18\x03 \x01(\x0b\x32\x30.google.cloud.apphub.v1.ServiceProjectAttachmentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\"GetServiceProjectAttachmentRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.apphub.googleapis.com/ServiceProjectAttachment\"\x86\x01\n%DeleteServiceProjectAttachmentRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.apphub.googleapis.com/ServiceProjectAttachment\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"`\n%DetachServiceProjectAttachmentRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"(\n&DetachServiceProjectAttachmentResponse\"\xa9\x01\n\x13ListServicesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x61pphub.googleapis.com/Service\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"w\n\x14ListServicesResponse\x12\x31\n\x08services\x18\x01 \x03(\x0b\x32\x1f.google.cloud.apphub.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x1dListDiscoveredServicesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'apphub.googleapis.com/DiscoveredService\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1eListDiscoveredServicesResponse\x12\x46\n\x13\x64iscovered_services\x18\x01 \x03(\x0b\x32).google.cloud.apphub.v1.DiscoveredService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xb6\x01\n\x14\x43reateServiceRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x61pphub.googleapis.com/Service\x12\x17\n\nservice_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x07service\x18\x03 \x01(\x0b\x32\x1f.google.cloud.apphub.v1.ServiceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"H\n\x11GetServiceRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61pphub.googleapis.com/Service\"\\\n\x1bGetDiscoveredServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'apphub.googleapis.com/DiscoveredService\"s\n\x1eLookupDiscoveredServiceRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'apphub.googleapis.com/DiscoveredService\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"h\n\x1fLookupDiscoveredServiceResponse\x12\x45\n\x12\x64iscovered_service\x18\x01 \x01(\x0b\x32).google.cloud.apphub.v1.DiscoveredService\"\x9c\x01\n\x14UpdateServiceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x07service\x18\x02 \x01(\x0b\x32\x1f.google.cloud.apphub.v1.ServiceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"d\n\x14\x44\x65leteServiceRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61pphub.googleapis.com/Service\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb1\x01\n\x17ListApplicationsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!apphub.googleapis.com/Application\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x18ListApplicationsResponse\x12\x39\n\x0c\x61pplications\x18\x01 \x03(\x0b\x32#.google.cloud.apphub.v1.Application\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xca\x01\n\x18\x43reateApplicationRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!apphub.googleapis.com/Application\x12\x1b\n\x0e\x61pplication_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x0b\x61pplication\x18\x03 \x01(\x0b\x32#.google.cloud.apphub.v1.ApplicationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"P\n\x15GetApplicationRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/Application\"\xa8\x01\n\x18UpdateApplicationRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12=\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32#.google.cloud.apphub.v1.ApplicationB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"l\n\x18\x44\x65leteApplicationRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!apphub.googleapis.com/Application\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x14ListWorkloadsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x61pphub.googleapis.com/Workload\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x15ListWorkloadsResponse\x12\x33\n\tworkloads\x18\x01 \x03(\x0b\x32 .google.cloud.apphub.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbf\x01\n\x1eListDiscoveredWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apphub.googleapis.com/DiscoveredWorkload\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n\x1fListDiscoveredWorkloadsResponse\x12H\n\x14\x64iscovered_workloads\x18\x01 \x03(\x0b\x32*.google.cloud.apphub.v1.DiscoveredWorkload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbb\x01\n\x15\x43reateWorkloadRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x61pphub.googleapis.com/Workload\x12\x18\n\x0bworkload_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x08workload\x18\x03 \x01(\x0b\x32 .google.cloud.apphub.v1.WorkloadB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"J\n\x12GetWorkloadRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61pphub.googleapis.com/Workload\"^\n\x1cGetDiscoveredWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apphub.googleapis.com/DiscoveredWorkload\"u\n\x1fLookupDiscoveredWorkloadRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apphub.googleapis.com/DiscoveredWorkload\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\"k\n LookupDiscoveredWorkloadResponse\x12G\n\x13\x64iscovered_workload\x18\x01 \x01(\x0b\x32*.google.cloud.apphub.v1.DiscoveredWorkload\"\x9f\x01\n\x15UpdateWorkloadRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x08workload\x18\x02 \x01(\x0b\x32 .google.cloud.apphub.v1.WorkloadB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x15\x44\x65leteWorkloadRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x61pphub.googleapis.com/Workload\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xa7/\n\x06\x41ppHub\x12\xf0\x01\n\x1eLookupServiceProjectAttachment\x12=.google.cloud.apphub.v1.LookupServiceProjectAttachmentRequest\x1a>.google.cloud.apphub.v1.LookupServiceProjectAttachmentResponse\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*}:lookupServiceProjectAttachment\x12\xec\x01\n\x1dListServiceProjectAttachments\x12<.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest\x1a=.google.cloud.apphub.v1.ListServiceProjectAttachmentsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/serviceProjectAttachments\x12\xd4\x02\n\x1e\x43reateServiceProjectAttachment\x12=.google.cloud.apphub.v1.CreateServiceProjectAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\xd3\x01\xca\x41-\n\x18ServiceProjectAttachment\x12\x11OperationMetadata\xda\x41?parent,service_project_attachment,service_project_attachment_id\x82\xd3\xe4\x93\x02[\"=/v1/{parent=projects/*/locations/*}/serviceProjectAttachments:\x1aservice_project_attachment\x12\xd9\x01\n\x1bGetServiceProjectAttachment\x12:.google.cloud.apphub.v1.GetServiceProjectAttachmentRequest\x1a\x30.google.cloud.apphub.v1.ServiceProjectAttachment\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}\x12\xf9\x01\n\x1e\x44\x65leteServiceProjectAttachment\x12=.google.cloud.apphub.v1.DeleteServiceProjectAttachmentRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}\x12\xf3\x01\n\x1e\x44\x65tachServiceProjectAttachment\x12=.google.cloud.apphub.v1.DetachServiceProjectAttachmentRequest\x1a>.google.cloud.apphub.v1.DetachServiceProjectAttachmentResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\"@/v1/{name=projects/*/locations/*}:detachServiceProjectAttachment:\x01*\x12\xd0\x01\n\x16ListDiscoveredServices\x12\x35.google.cloud.apphub.v1.ListDiscoveredServicesRequest\x1a\x36.google.cloud.apphub.v1.ListDiscoveredServicesResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/discoveredServices\x12\xbd\x01\n\x14GetDiscoveredService\x12\x33.google.cloud.apphub.v1.GetDiscoveredServiceRequest\x1a).google.cloud.apphub.v1.DiscoveredService\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/discoveredServices/*}\x12\xde\x01\n\x17LookupDiscoveredService\x12\x36.google.cloud.apphub.v1.LookupDiscoveredServiceRequest\x1a\x37.google.cloud.apphub.v1.LookupDiscoveredServiceResponse\"R\xda\x41\nparent,uri\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*}/discoveredServices:lookup\x12\xb7\x01\n\x0cListServices\x12+.google.cloud.apphub.v1.ListServicesRequest\x1a,.google.cloud.apphub.v1.ListServicesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/applications/*}/services\x12\xe6\x01\n\rCreateService\x12,.google.cloud.apphub.v1.CreateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1c\n\x07Service\x12\x11OperationMetadata\xda\x41\x19parent,service,service_id\x82\xd3\xe4\x93\x02\x46\";/v1/{parent=projects/*/locations/*/applications/*}/services:\x07service\x12\xa4\x01\n\nGetService\x12).google.cloud.apphub.v1.GetServiceRequest\x1a\x1f.google.cloud.apphub.v1.Service\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/applications/*/services/*}\x12\xe8\x01\n\rUpdateService\x12,.google.cloud.apphub.v1.UpdateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1c\n\x07Service\x12\x11OperationMetadata\xda\x41\x13service,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{service.name=projects/*/locations/*/applications/*/services/*}:\x07service\x12\xd5\x01\n\rDeleteService\x12,.google.cloud.apphub.v1.DeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/applications/*/services/*}\x12\xd4\x01\n\x17ListDiscoveredWorkloads\x12\x36.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest\x1a\x37.google.cloud.apphub.v1.ListDiscoveredWorkloadsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/discoveredWorkloads\x12\xc1\x01\n\x15GetDiscoveredWorkload\x12\x34.google.cloud.apphub.v1.GetDiscoveredWorkloadRequest\x1a*.google.cloud.apphub.v1.DiscoveredWorkload\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/discoveredWorkloads/*}\x12\xe2\x01\n\x18LookupDiscoveredWorkload\x12\x37.google.cloud.apphub.v1.LookupDiscoveredWorkloadRequest\x1a\x38.google.cloud.apphub.v1.LookupDiscoveredWorkloadResponse\"S\xda\x41\nparent,uri\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*}/discoveredWorkloads:lookup\x12\xbb\x01\n\rListWorkloads\x12,.google.cloud.apphub.v1.ListWorkloadsRequest\x1a-.google.cloud.apphub.v1.ListWorkloadsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12*] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb deleted file mode 100644 index 1b34c270e2f9..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/apphub_service.rb +++ /dev/null @@ -1,787 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # Request for LookupServiceProjectAttachment. - # @!attribute [rw] name - # @return [::String] - # Required. Service project ID and location to lookup service project - # attachment for. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - class LookupServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for LookupServiceProjectAttachment. - # @!attribute [rw] service_project_attachment - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # Service project attachment for a project if exists, empty otherwise. - class LookupServiceProjectAttachmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListServiceProjectAttachments. - # @!attribute [rw] parent - # @return [::String] - # Required. Host project ID and location to list service project attachments. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListServiceProjectAttachmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListServiceProjectAttachments. - # @!attribute [rw] service_project_attachments - # @return [::Array<::Google::Cloud::AppHub::V1::ServiceProjectAttachment>] - # List of service project attachments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListServiceProjectAttachmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateServiceProjectAttachment. - # @!attribute [rw] parent - # @return [::String] - # Required. Host project ID and location to which service project is being - # attached. Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] service_project_attachment_id - # @return [::String] - # Required. The service project attachment identifier must contain the - # project id of the service project specified in the - # service_project_attachment.service_project field. - # @!attribute [rw] service_project_attachment - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetServiceProjectAttachment. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the service project attachment to - # retrieve. Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - class GetServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteServiceProjectAttachment. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the service project attachment to delete. - # Expected format: - # `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DetachServiceProjectAttachment. - # @!attribute [rw] name - # @return [::String] - # Required. Service project id and location to detach from a host project. - # Only global location is supported. Expected format: - # `projects/{project}/locations/{location}`. - class DetachServiceProjectAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for DetachServiceProjectAttachment. - class DetachServiceProjectAttachmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListServices. - # @!attribute [rw] parent - # @return [::String] - # Required. Fully qualified name of the parent Application to list Services - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListServices. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::AppHub::V1::Service>] - # List of Services. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListDiscoveredServices. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location to list Discovered Services on. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListDiscoveredServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListDiscoveredServices. - # @!attribute [rw] discovered_services - # @return [::Array<::Google::Cloud::AppHub::V1::DiscoveredService>] - # List of Discovered Services. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDiscoveredServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateService. - # @!attribute [rw] parent - # @return [::String] - # Required. Fully qualified name of the parent Application to create the - # Service in. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!attribute [rw] service_id - # @return [::String] - # Required. The Service identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @!attribute [rw] service - # @return [::Google::Cloud::AppHub::V1::Service] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetService. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - class GetServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetDiscoveredService. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Discovered Service to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. - class GetDiscoveredServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for LookupDiscoveredService. - # @!attribute [rw] parent - # @return [::String] - # Required. Host project ID and location to lookup Discovered Service in. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] uri - # @return [::String] - # Required. Resource URI to find DiscoveredService for. - # Accepts both project number and project ID and does translation when - # needed. - class LookupDiscoveredServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for LookupDiscoveredService. - # @!attribute [rw] discovered_service - # @return [::Google::Cloud::AppHub::V1::DiscoveredService] - # Discovered Service if exists, empty otherwise. - class LookupDiscoveredServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for UpdateService. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Service resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @!attribute [rw] service - # @return [::Google::Cloud::AppHub::V1::Service] - # Required. The resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteService. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Service to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListApplications. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location to list Applications on. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListApplicationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListApplications. - # @!attribute [rw] applications - # @return [::Array<::Google::Cloud::AppHub::V1::Application>] - # List of Applications. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListApplicationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateApplication. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location to create Application in. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] application_id - # @return [::String] - # Required. The Application identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @!attribute [rw] application - # @return [::Google::Cloud::AppHub::V1::Application] - # Required. The resource being created - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetApplication. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Application to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - class GetApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for UpdateApplication. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Application resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @!attribute [rw] application - # @return [::Google::Cloud::AppHub::V1::Application] - # Required. The resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteApplication. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Application to delete. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteApplicationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListWorkloads. - # @!attribute [rw] parent - # @return [::String] - # Required. Fully qualified name of the parent Application to list Workloads - # for. Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListWorkloads. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::AppHub::V1::Workload>] - # List of Workloads. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListDiscoveredWorkloads. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location to list Discovered Workloads on. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListDiscoveredWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListDiscoveredWorkloads. - # @!attribute [rw] discovered_workloads - # @return [::Array<::Google::Cloud::AppHub::V1::DiscoveredWorkload>] - # List of Discovered Workloads. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDiscoveredWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateWorkload. - # @!attribute [rw] parent - # @return [::String] - # Required. Fully qualified name of the Application to create Workload in. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}`. - # @!attribute [rw] workload_id - # @return [::String] - # Required. The Workload identifier. - # Must contain only lowercase letters, numbers - # or hyphens, with the first character a letter, the last a letter or a - # number, and a 63 character maximum. - # @!attribute [rw] workload - # @return [::Google::Cloud::AppHub::V1::Workload] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetWorkload. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetDiscoveredWorkload. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Discovered Workload to fetch. - # Expected format: - # `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. - class GetDiscoveredWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for LookupDiscoveredWorkload. - # @!attribute [rw] parent - # @return [::String] - # Required. Host project ID and location to lookup Discovered Workload in. - # Expected format: `projects/{project}/locations/{location}`. - # @!attribute [rw] uri - # @return [::String] - # Required. Resource URI to find Discovered Workload for. - # Accepts both project number and project ID and does translation when - # needed. - class LookupDiscoveredWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for LookupDiscoveredWorkload. - # @!attribute [rw] discovered_workload - # @return [::Google::Cloud::AppHub::V1::DiscoveredWorkload] - # Discovered Workload if exists, empty otherwise. - class LookupDiscoveredWorkloadResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for UpdateWorkload. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Workload resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. - # The API changes the values of the fields as specified in the update_mask. - # The API ignores the values of all fields not covered by the update_mask. - # You can also unset a field by not specifying it in the updated message, but - # adding the field to the mask. This clears whatever value the field - # previously had. - # @!attribute [rw] workload - # @return [::Google::Cloud::AppHub::V1::Workload] - # Required. The resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteWorkload. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified name of the Workload to delete from an - # Application. Expected format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb deleted file mode 100644 index e67a1568db65..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/application.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # Application defines the governance boundary for App Hub entities that - # perform a logical end-to-end business function. - # App Hub supports application level IAM permission to align with governance - # requirements. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of an Application. Format: - # `"projects/{host-project-id}/locations/{location}/applications/{application-id}"` - # @!attribute [rw] display_name - # @return [::String] - # Optional. User-defined name for the Application. - # Can have a maximum length of 63 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User-defined description of an Application. - # Can have a maximum length of 2048 characters. - # @!attribute [rw] attributes - # @return [::Google::Cloud::AppHub::V1::Attributes] - # Optional. Consumer provided attributes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update time. - # @!attribute [rw] scope - # @return [::Google::Cloud::AppHub::V1::Scope] - # Required. Immutable. Defines what data can be included into this - # Application. Limits which Services and Workloads can be registered. - # @!attribute [r] uid - # @return [::String] - # Output only. A universally unique identifier (in UUID4 format) for the - # `Application`. - # @!attribute [r] state - # @return [::Google::Cloud::AppHub::V1::Application::State] - # Output only. Application state. - class Application - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Application state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The Application is being created. - CREATING = 1 - - # The Application is ready to register Services and Workloads. - ACTIVE = 2 - - # The Application is being deleted. - DELETING = 3 - end - end - - # Scope of an application. - # @!attribute [rw] type - # @return [::Google::Cloud::AppHub::V1::Scope::Type] - # Required. Scope Type. - class Scope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Scope Type. - module Type - # Unspecified type. - TYPE_UNSPECIFIED = 0 - - # Regional type. - REGIONAL = 1 - - # Global type. - GLOBAL = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb deleted file mode 100644 index 841a166336a3..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/attributes.rb +++ /dev/null @@ -1,115 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # Consumer provided attributes. - # @!attribute [rw] criticality - # @return [::Google::Cloud::AppHub::V1::Criticality] - # Optional. User-defined criticality information. - # @!attribute [rw] environment - # @return [::Google::Cloud::AppHub::V1::Environment] - # Optional. User-defined environment information. - # @!attribute [rw] developer_owners - # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] - # Optional. Developer team that owns development and coding. - # @!attribute [rw] operator_owners - # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] - # Optional. Operator team that ensures runtime and operations. - # @!attribute [rw] business_owners - # @return [::Array<::Google::Cloud::AppHub::V1::ContactInfo>] - # Optional. Business team that ensures user needs are met and value is - # delivered - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Criticality of the Application, Service, or Workload - # @!attribute [rw] type - # @return [::Google::Cloud::AppHub::V1::Criticality::Type] - # Required. Criticality Type. - class Criticality - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Criticality Type. - module Type - # Unspecified type. - TYPE_UNSPECIFIED = 0 - - # Mission critical service, application or workload. - MISSION_CRITICAL = 1 - - # High impact. - HIGH = 2 - - # Medium impact. - MEDIUM = 3 - - # Low impact. - LOW = 4 - end - end - - # Environment of the Application, Service, or Workload - # @!attribute [rw] type - # @return [::Google::Cloud::AppHub::V1::Environment::Type] - # Required. Environment Type. - class Environment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Environment Type. - module Type - # Unspecified type. - TYPE_UNSPECIFIED = 0 - - # Production environment. - PRODUCTION = 1 - - # Staging environment. - STAGING = 2 - - # Test environment. - TEST = 3 - - # Development environment. - DEVELOPMENT = 4 - end - end - - # Contact information of stakeholders. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Contact's name. - # Can have a maximum length of 63 characters. - # @!attribute [rw] email - # @return [::String] - # Required. Email address of the contacts. - class ContactInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb deleted file mode 100644 index 78a43787310d..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service.rb +++ /dev/null @@ -1,139 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # Service is an App Hub data model that contains a discovered service, which - # represents a network or API interface that exposes some functionality to - # clients for consumption over the network. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of a Service. Format: - # `"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}"` - # @!attribute [rw] display_name - # @return [::String] - # Optional. User-defined name for the Service. - # Can have a maximum length of 63 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User-defined description of a Service. - # Can have a maximum length of 2048 characters. - # @!attribute [r] service_reference - # @return [::Google::Cloud::AppHub::V1::ServiceReference] - # Output only. Reference to an underlying networking resource that can - # comprise a Service. These are immutable. - # @!attribute [r] service_properties - # @return [::Google::Cloud::AppHub::V1::ServiceProperties] - # Output only. Properties of an underlying compute resource that can comprise - # a Service. These are immutable. - # @!attribute [rw] attributes - # @return [::Google::Cloud::AppHub::V1::Attributes] - # Optional. Consumer provided attributes. - # @!attribute [rw] discovered_service - # @return [::String] - # Required. Immutable. The resource name of the original discovered service. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update time. - # @!attribute [r] uid - # @return [::String] - # Output only. A universally unique identifier (UUID) for the `Service` in - # the UUID4 format. - # @!attribute [r] state - # @return [::Google::Cloud::AppHub::V1::Service::State] - # Output only. Service state. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Service state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The service is being created. - CREATING = 1 - - # The service is ready. - ACTIVE = 2 - - # The service is being deleted. - DELETING = 3 - - # The underlying networking resources have been deleted. - DETACHED = 4 - end - end - - # Reference to an underlying networking resource that can comprise a Service. - # @!attribute [r] uri - # @return [::String] - # Output only. The underlying resource URI. For example, URI of Forwarding - # Rule, URL Map, and Backend Service. - class ServiceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of an underlying cloud resource that can comprise a Service. - # @!attribute [r] gcp_project - # @return [::String] - # Output only. The service project identifier that the underlying cloud - # resource resides in. - # @!attribute [r] location - # @return [::String] - # Output only. The location that the underlying resource resides in, for - # example, us-west1. - # @!attribute [r] zone - # @return [::String] - # Output only. The location that the underlying resource resides in if it is - # zonal, for example, us-west1-a). - class ServiceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DiscoveredService is a network or API interface that exposes some - # functionality to clients for consumption over the network. A discovered - # service can be registered to a App Hub service. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the discovered service. Format: - # `"projects/{host-project-id}/locations/{location}/discoveredServices/{uuid}"` - # @!attribute [r] service_reference - # @return [::Google::Cloud::AppHub::V1::ServiceReference] - # Output only. Reference to an underlying networking resource that can - # comprise a Service. These are immutable. - # @!attribute [r] service_properties - # @return [::Google::Cloud::AppHub::V1::ServiceProperties] - # Output only. Properties of an underlying compute resource that can comprise - # a Service. These are immutable. - class DiscoveredService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb deleted file mode 100644 index 2da9f70c19b1..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/service_project_attachment.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # ServiceProjectAttachment represents an attachment from a service project to a - # host project. Service projects contain the underlying cloud - # infrastructure resources, and expose these resources to the host project - # through a ServiceProjectAttachment. With the attachments, the host project - # can provide an aggregated view of resources across all service projects. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of a ServiceProjectAttachment. Format: - # `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."` - # @!attribute [rw] service_project - # @return [::String] - # Required. Immutable. Service project name in the format: `"projects/abc"` - # or `"projects/123"`. As input, project name with either project id or - # number are accepted. As output, this field will contain project number. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time. - # @!attribute [r] uid - # @return [::String] - # Output only. A globally unique identifier (in UUID4 format) for the - # `ServiceProjectAttachment`. - # @!attribute [r] state - # @return [::Google::Cloud::AppHub::V1::ServiceProjectAttachment::State] - # Output only. ServiceProjectAttachment state. - class ServiceProjectAttachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # ServiceProjectAttachment state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The ServiceProjectAttachment is being created. - CREATING = 1 - - # The ServiceProjectAttachment is ready. - # This means Services and Workloads under the corresponding - # ServiceProjectAttachment is ready for registration. - ACTIVE = 2 - - # The ServiceProjectAttachment is being deleted. - DELETING = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb deleted file mode 100644 index 9d71177bf824..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/cloud/apphub/v1/workload.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AppHub - module V1 - # Workload is an App Hub data model that contains a discovered workload, which - # represents a binary deployment (such as managed instance groups (MIGs) and - # GKE deployments) that performs the smallest logical subset of business - # functionality. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the Workload. Format: - # `"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"` - # @!attribute [rw] display_name - # @return [::String] - # Optional. User-defined name for the Workload. - # Can have a maximum length of 63 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User-defined description of a Workload. - # Can have a maximum length of 2048 characters. - # @!attribute [r] workload_reference - # @return [::Google::Cloud::AppHub::V1::WorkloadReference] - # Output only. Reference of an underlying compute resource represented by the - # Workload. These are immutable. - # @!attribute [r] workload_properties - # @return [::Google::Cloud::AppHub::V1::WorkloadProperties] - # Output only. Properties of an underlying compute resource represented by - # the Workload. These are immutable. - # @!attribute [rw] discovered_workload - # @return [::String] - # Required. Immutable. The resource name of the original discovered workload. - # @!attribute [rw] attributes - # @return [::Google::Cloud::AppHub::V1::Attributes] - # Optional. Consumer provided attributes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update time. - # @!attribute [r] uid - # @return [::String] - # Output only. A universally unique identifier (UUID) for the `Workload` in - # the UUID4 format. - # @!attribute [r] state - # @return [::Google::Cloud::AppHub::V1::Workload::State] - # Output only. Workload state. - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Workload state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The Workload is being created. - CREATING = 1 - - # The Workload is ready. - ACTIVE = 2 - - # The Workload is being deleted. - DELETING = 3 - - # The underlying compute resources have been deleted. - DETACHED = 4 - end - end - - # Reference of an underlying compute resource represented by the Workload. - # @!attribute [r] uri - # @return [::String] - # Output only. The underlying compute resource uri. - class WorkloadReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of an underlying compute resource represented by the Workload. - # @!attribute [r] gcp_project - # @return [::String] - # Output only. The service project identifier that the underlying cloud - # resource resides in. Empty for non-cloud resources. - # @!attribute [r] location - # @return [::String] - # Output only. The location that the underlying compute resource resides in - # (for example, us-west1). - # @!attribute [r] zone - # @return [::String] - # Output only. The location that the underlying compute resource resides in - # if it is zonal (for example, us-west1-a). - class WorkloadProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DiscoveredWorkload is a binary deployment (such as managed instance groups - # (MIGs) and GKE deployments) that performs the smallest logical subset of - # business functionality. A discovered workload can be registered to an App Hub - # Workload. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the discovered workload. Format: - # `"projects/{host-project-id}/locations/{location}/discoveredWorkloads/{uuid}"` - # @!attribute [r] workload_reference - # @return [::Google::Cloud::AppHub::V1::WorkloadReference] - # Output only. Reference of an underlying compute resource represented by the - # Workload. These are immutable. - # @!attribute [r] workload_properties - # @return [::Google::Cloud::AppHub::V1::WorkloadProperties] - # Output only. Properties of an underlying compute resource represented by - # the Workload. These are immutable. - class DiscoveredWorkload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile deleted file mode 100644 index 01e4ee88000f..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-app_hub-v1", path: "../" -else - gem "google-cloud-app_hub-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb deleted file mode 100644 index ecb6729ae83a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_application.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_CreateApplication_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the create_application call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#create_application. -# -def create_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::CreateApplicationRequest.new - - # Call the create_application method. - result = client.create_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_CreateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb deleted file mode 100644 index 909a8e44c897..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_CreateService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the create_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#create_service. -# -def create_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::CreateServiceRequest.new - - # Call the create_service method. - result = client.create_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_CreateService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb deleted file mode 100644 index bef16146076a..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_service_project_attachment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the create_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment. -# -def create_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new - - # Call the create_service_project_attachment method. - result = client.create_service_project_attachment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb deleted file mode 100644 index 09e9695fc333..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/create_workload.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_CreateWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the create_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#create_workload. -# -def create_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::CreateWorkloadRequest.new - - # Call the create_workload method. - result = client.create_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb deleted file mode 100644 index 246fde1039c5..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_application.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_DeleteApplication_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the delete_application call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#delete_application. -# -def delete_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DeleteApplicationRequest.new - - # Call the delete_application method. - result = client.delete_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_DeleteApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb deleted file mode 100644 index 96f1cd39b61c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_DeleteService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the delete_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#delete_service. -# -def delete_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DeleteServiceRequest.new - - # Call the delete_service method. - result = client.delete_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb deleted file mode 100644 index 76b3adb08c91..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_service_project_attachment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the delete_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment. -# -def delete_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new - - # Call the delete_service_project_attachment method. - result = client.delete_service_project_attachment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb deleted file mode 100644 index 438e272456a7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/delete_workload.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_DeleteWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the delete_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#delete_workload. -# -def delete_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new - - # Call the delete_workload method. - result = client.delete_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb deleted file mode 100644 index fd0a2727844c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/detach_service_project_attachment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the detach_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment. -# -def detach_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new - - # Call the detach_service_project_attachment method. - result = client.detach_service_project_attachment request - - # The returned object is of type Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse. - p result -end -# [END apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb deleted file mode 100644 index b24e9656c575..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_application.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetApplication_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_application call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_application. -# -def get_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetApplicationRequest.new - - # Call the get_application method. - result = client.get_application request - - # The returned object is of type Google::Cloud::AppHub::V1::Application. - p result -end -# [END apphub_v1_generated_AppHub_GetApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb deleted file mode 100644 index 8d6b3faca3aa..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetDiscoveredService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_discovered_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service. -# -def get_discovered_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new - - # Call the get_discovered_service method. - result = client.get_discovered_service request - - # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredService. - p result -end -# [END apphub_v1_generated_AppHub_GetDiscoveredService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb deleted file mode 100644 index d5a7376701be..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_discovered_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_discovered_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload. -# -def get_discovered_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new - - # Call the get_discovered_workload method. - result = client.get_discovered_workload request - - # The returned object is of type Google::Cloud::AppHub::V1::DiscoveredWorkload. - p result -end -# [END apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb deleted file mode 100644 index cf9240d27574..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_service. -# -def get_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetServiceRequest.new - - # Call the get_service method. - result = client.get_service request - - # The returned object is of type Google::Cloud::AppHub::V1::Service. - p result -end -# [END apphub_v1_generated_AppHub_GetService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb deleted file mode 100644 index d913e0dd0077..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_service_project_attachment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment. -# -def get_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new - - # Call the get_service_project_attachment method. - result = client.get_service_project_attachment request - - # The returned object is of type Google::Cloud::AppHub::V1::ServiceProjectAttachment. - p result -end -# [END apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb deleted file mode 100644 index 981d5001c644..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/get_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_GetWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the get_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#get_workload. -# -def get_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::GetWorkloadRequest.new - - # Call the get_workload method. - result = client.get_workload request - - # The returned object is of type Google::Cloud::AppHub::V1::Workload. - p result -end -# [END apphub_v1_generated_AppHub_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb deleted file mode 100644 index a0c9e9dc43c5..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_applications.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_ListApplications_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_applications call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_applications. -# -def list_applications - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListApplicationsRequest.new - - # Call the list_applications method. - result = client.list_applications request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::Application. - p item - end -end -# [END apphub_v1_generated_AppHub_ListApplications_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb deleted file mode 100644 index 16595dffd427..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_ListDiscoveredServices_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_discovered_services call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services. -# -def list_discovered_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new - - # Call the list_discovered_services method. - result = client.list_discovered_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredService. - p item - end -end -# [END apphub_v1_generated_AppHub_ListDiscoveredServices_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb deleted file mode 100644 index 8af6d5b9a9e5..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_discovered_workloads.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_discovered_workloads call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads. -# -def list_discovered_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new - - # Call the list_discovered_workloads method. - result = client.list_discovered_workloads request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::DiscoveredWorkload. - p item - end -end -# [END apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb deleted file mode 100644 index c9dc10bc0854..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_service_project_attachments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_service_project_attachments call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments. -# -def list_service_project_attachments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new - - # Call the list_service_project_attachments method. - result = client.list_service_project_attachments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::ServiceProjectAttachment. - p item - end -end -# [END apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb deleted file mode 100644 index f63e8b919d25..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_ListServices_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_services call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_services. -# -def list_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListServicesRequest.new - - # Call the list_services method. - result = client.list_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::Service. - p item - end -end -# [END apphub_v1_generated_AppHub_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb deleted file mode 100644 index 98bee1c64a09..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/list_workloads.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_ListWorkloads_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the list_workloads call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#list_workloads. -# -def list_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::ListWorkloadsRequest.new - - # Call the list_workloads method. - result = client.list_workloads request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AppHub::V1::Workload. - p item - end -end -# [END apphub_v1_generated_AppHub_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb deleted file mode 100644 index 70e65424d4a7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_LookupDiscoveredService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the lookup_discovered_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service. -# -def lookup_discovered_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new - - # Call the lookup_discovered_service method. - result = client.lookup_discovered_service request - - # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse. - p result -end -# [END apphub_v1_generated_AppHub_LookupDiscoveredService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb deleted file mode 100644 index d1d638e8c7dc..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_discovered_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the lookup_discovered_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload. -# -def lookup_discovered_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new - - # Call the lookup_discovered_workload method. - result = client.lookup_discovered_workload request - - # The returned object is of type Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse. - p result -end -# [END apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb deleted file mode 100644 index 86dc1e535b27..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/lookup_service_project_attachment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the lookup_service_project_attachment call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment. -# -def lookup_service_project_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new - - # Call the lookup_service_project_attachment method. - result = client.lookup_service_project_attachment request - - # The returned object is of type Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse. - p result -end -# [END apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb deleted file mode 100644 index b2ddfd7fe664..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_application.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_UpdateApplication_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the update_application call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#update_application. -# -def update_application - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::UpdateApplicationRequest.new - - # Call the update_application method. - result = client.update_application request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_UpdateApplication_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb deleted file mode 100644 index e0a74c946803..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_UpdateService_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the update_service call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#update_service. -# -def update_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::UpdateServiceRequest.new - - # Call the update_service method. - result = client.update_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_UpdateService_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb b/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb deleted file mode 100644 index fc6d58bbc083..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/app_hub/update_workload.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apphub_v1_generated_AppHub_UpdateWorkload_sync] -require "google/cloud/app_hub/v1" - -## -# Snippet for the update_workload call in the AppHub service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AppHub::V1::AppHub::Client#update_workload. -# -def update_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AppHub::V1::AppHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new - - # Call the update_workload method. - result = client.update_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apphub_v1_generated_AppHub_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json b/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json deleted file mode 100644 index 43c82a87d67c..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/snippets/snippet_metadata_google.cloud.apphub.v1.json +++ /dev/null @@ -1,1095 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-app_hub-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.apphub.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "apphub_v1_generated_AppHub_LookupServiceProjectAttachment_sync", - "title": "Snippet for the lookup_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment.", - "file": "app_hub/lookup_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "LookupServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.LookupServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListServiceProjectAttachments_sync", - "title": "Snippet for the list_service_project_attachments call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments.", - "file": "app_hub/list_service_project_attachments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_project_attachments", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_service_project_attachments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListServiceProjectAttachments", - "full_name": "google.cloud.apphub.v1.AppHub.ListServiceProjectAttachments", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_CreateServiceProjectAttachment_sync", - "title": "Snippet for the create_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment.", - "file": "app_hub/create_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "CreateServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.CreateServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetServiceProjectAttachment_sync", - "title": "Snippet for the get_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment.", - "file": "app_hub/get_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ServiceProjectAttachment", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.GetServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DeleteServiceProjectAttachment_sync", - "title": "Snippet for the delete_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment.", - "file": "app_hub/delete_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DeleteServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.DeleteServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DetachServiceProjectAttachment_sync", - "title": "Snippet for the detach_service_project_attachment call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment.", - "file": "app_hub/detach_service_project_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "detach_service_project_attachment", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#detach_service_project_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DetachServiceProjectAttachment", - "full_name": "google.cloud.apphub.v1.AppHub.DetachServiceProjectAttachment", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListDiscoveredServices_sync", - "title": "Snippet for the list_discovered_services call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services.", - "file": "app_hub/list_discovered_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_discovered_services", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListDiscoveredServices", - "full_name": "google.cloud.apphub.v1.AppHub.ListDiscoveredServices", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetDiscoveredService_sync", - "title": "Snippet for the get_discovered_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service.", - "file": "app_hub/get_discovered_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_discovered_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::DiscoveredService", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetDiscoveredService", - "full_name": "google.cloud.apphub.v1.AppHub.GetDiscoveredService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_LookupDiscoveredService_sync", - "title": "Snippet for the lookup_discovered_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service.", - "file": "app_hub/lookup_discovered_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_discovered_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "LookupDiscoveredService", - "full_name": "google.cloud.apphub.v1.AppHub.LookupDiscoveredService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListServices_sync", - "title": "Snippet for the list_services call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_services.", - "file": "app_hub/list_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_services", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListServicesResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListServices", - "full_name": "google.cloud.apphub.v1.AppHub.ListServices", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_CreateService_sync", - "title": "Snippet for the create_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_service.", - "file": "app_hub/create_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::CreateServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "CreateService", - "full_name": "google.cloud.apphub.v1.AppHub.CreateService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetService_sync", - "title": "Snippet for the get_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_service.", - "file": "app_hub/get_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::Service", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetService", - "full_name": "google.cloud.apphub.v1.AppHub.GetService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_UpdateService_sync", - "title": "Snippet for the update_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_service.", - "file": "app_hub/update_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::UpdateServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "UpdateService", - "full_name": "google.cloud.apphub.v1.AppHub.UpdateService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DeleteService_sync", - "title": "Snippet for the delete_service call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_service.", - "file": "app_hub/delete_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DeleteServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DeleteService", - "full_name": "google.cloud.apphub.v1.AppHub.DeleteService", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListDiscoveredWorkloads_sync", - "title": "Snippet for the list_discovered_workloads call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads.", - "file": "app_hub/list_discovered_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_discovered_workloads", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_discovered_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListDiscoveredWorkloads", - "full_name": "google.cloud.apphub.v1.AppHub.ListDiscoveredWorkloads", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetDiscoveredWorkload_sync", - "title": "Snippet for the get_discovered_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload.", - "file": "app_hub/get_discovered_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_discovered_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_discovered_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::DiscoveredWorkload", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetDiscoveredWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.GetDiscoveredWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_LookupDiscoveredWorkload_sync", - "title": "Snippet for the lookup_discovered_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload.", - "file": "app_hub/lookup_discovered_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_discovered_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#lookup_discovered_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "LookupDiscoveredWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.LookupDiscoveredWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListWorkloads_sync", - "title": "Snippet for the list_workloads call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_workloads.", - "file": "app_hub/list_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workloads", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListWorkloadsResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListWorkloads", - "full_name": "google.cloud.apphub.v1.AppHub.ListWorkloads", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_CreateWorkload_sync", - "title": "Snippet for the create_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_workload.", - "file": "app_hub/create_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::CreateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "CreateWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.CreateWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetWorkload_sync", - "title": "Snippet for the get_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_workload.", - "file": "app_hub/get_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::Workload", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.GetWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_UpdateWorkload_sync", - "title": "Snippet for the update_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_workload.", - "file": "app_hub/update_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::UpdateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "UpdateWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.UpdateWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DeleteWorkload_sync", - "title": "Snippet for the delete_workload call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_workload.", - "file": "app_hub/delete_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workload", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DeleteWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DeleteWorkload", - "full_name": "google.cloud.apphub.v1.AppHub.DeleteWorkload", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_ListApplications_sync", - "title": "Snippet for the list_applications call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#list_applications.", - "file": "app_hub/list_applications.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_applications", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#list_applications", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::ListApplicationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::ListApplicationsResponse", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "ListApplications", - "full_name": "google.cloud.apphub.v1.AppHub.ListApplications", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_CreateApplication_sync", - "title": "Snippet for the create_application call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#create_application.", - "file": "app_hub/create_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_application", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#create_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::CreateApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "CreateApplication", - "full_name": "google.cloud.apphub.v1.AppHub.CreateApplication", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_GetApplication_sync", - "title": "Snippet for the get_application call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#get_application.", - "file": "app_hub/get_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_application", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#get_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::GetApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AppHub::V1::Application", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "GetApplication", - "full_name": "google.cloud.apphub.v1.AppHub.GetApplication", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_UpdateApplication_sync", - "title": "Snippet for the update_application call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#update_application.", - "file": "app_hub/update_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_application", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#update_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::UpdateApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "UpdateApplication", - "full_name": "google.cloud.apphub.v1.AppHub.UpdateApplication", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apphub_v1_generated_AppHub_DeleteApplication_sync", - "title": "Snippet for the delete_application call in the AppHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AppHub::V1::AppHub::Client#delete_application.", - "file": "app_hub/delete_application.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_application", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client#delete_application", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AppHub::V1::DeleteApplicationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppHub::Client", - "full_name": "::Google::Cloud::AppHub::V1::AppHub::Client" - }, - "method": { - "short_name": "DeleteApplication", - "full_name": "google.cloud.apphub.v1.AppHub.DeleteApplication", - "service": { - "short_name": "AppHub", - "full_name": "google.cloud.apphub.v1.AppHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb deleted file mode 100644 index 89c1203c023d..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apphub/v1/apphub_service_pb" -require "google/cloud/apphub/v1/apphub_service_services_pb" -require "google/cloud/app_hub/v1/app_hub" - -class ::Google::Cloud::AppHub::V1::AppHub::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppHub::V1::AppHub::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb deleted file mode 100644 index 546a7a4d6b65..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_paths_test.rb +++ /dev/null @@ -1,139 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/app_hub/v1/app_hub" - -class ::Google::Cloud::AppHub::V1::AppHub::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_application_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.application_path project: "value0", location: "value1", application: "value2" - assert_equal "projects/value0/locations/value1/applications/value2", path - end - end - - def test_discovered_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.discovered_service_path project: "value0", location: "value1", discovered_service: "value2" - assert_equal "projects/value0/locations/value1/discoveredServices/value2", path - end - end - - def test_discovered_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.discovered_workload_path project: "value0", location: "value1", discovered_workload: "value2" - assert_equal "projects/value0/locations/value1/discoveredWorkloads/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", application: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/applications/value2/services/value3", path - end - end - - def test_service_project_attachment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_project_attachment_path project: "value0", location: "value1", service_project_attachment: "value2" - assert_equal "projects/value0/locations/value1/serviceProjectAttachments/value2", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path project: "value0", location: "value1", application: "value2", workload: "value3" - assert_equal "projects/value0/locations/value1/applications/value2/workloads/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb deleted file mode 100644 index 56aebc59c755..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_rest_test.rb +++ /dev/null @@ -1,1605 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/apphub/v1/apphub_service_pb" -require "google/cloud/app_hub/v1/app_hub/rest" - - -class ::Google::Cloud::AppHub::V1::AppHub::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_lookup_service_project_attachment - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - lookup_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.lookup_service_project_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.lookup_service_project_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.lookup_service_project_attachment ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.lookup_service_project_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.lookup_service_project_attachment(::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_service_project_attachment_client_stub.call_count - end - end - end - - def test_list_service_project_attachments - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_service_project_attachments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_service_project_attachments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_project_attachments_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_service_project_attachments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_service_project_attachments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_service_project_attachments ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_service_project_attachments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_service_project_attachments(::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_service_project_attachments_client_stub.call_count - end - end - end - - def test_create_service_project_attachment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_project_attachment_id = "hello world" - service_project_attachment = {} - request_id = "hello world" - - create_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_service_project_attachment parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_service_project_attachment ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_service_project_attachment(::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_project_attachment_client_stub.call_count - end - end - end - - def test_get_service_project_attachment - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_service_project_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_service_project_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_service_project_attachment ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_service_project_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_service_project_attachment(::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_project_attachment_client_stub.call_count - end - end - end - - def test_delete_service_project_attachment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_service_project_attachment({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_service_project_attachment name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_service_project_attachment ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_service_project_attachment({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_service_project_attachment(::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_project_attachment_client_stub.call_count - end - end - end - - def test_detach_service_project_attachment - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - detach_service_project_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_detach_service_project_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, detach_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.detach_service_project_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.detach_service_project_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.detach_service_project_attachment ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.detach_service_project_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.detach_service_project_attachment(::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, detach_service_project_attachment_client_stub.call_count - end - end - end - - def test_list_discovered_services - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_discovered_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_discovered_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_discovered_services_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_discovered_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_discovered_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_discovered_services ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_discovered_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_discovered_services(::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_discovered_services_client_stub.call_count - end - end - end - - def test_get_discovered_service - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::DiscoveredService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovered_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_discovered_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_discovered_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_discovered_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_discovered_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_discovered_service ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_discovered_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_discovered_service(::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_discovered_service_client_stub.call_count - end - end - end - - def test_lookup_discovered_service - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - uri = "hello world" - - lookup_discovered_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_discovered_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_discovered_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.lookup_discovered_service({ parent: parent, uri: uri }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.lookup_discovered_service parent: parent, uri: uri do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.lookup_discovered_service ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.lookup_discovered_service({ parent: parent, uri: uri }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.lookup_discovered_service(::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_discovered_service_client_stub.call_count - end - end - end - - def test_list_services - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_services_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_services ::Google::Cloud::AppHub::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_services(::Google::Cloud::AppHub::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_count - end - end - end - - def test_create_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_id = "hello world" - service = {} - request_id = "hello world" - - create_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_service parent: parent, service_id: service_id, service: service, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_service ::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_service(::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_client_stub.call_count - end - end - end - - def test_get_service - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_service ::Google::Cloud::AppHub::V1::GetServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_service(::Google::Cloud::AppHub::V1::GetServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_count - end - end - end - - def test_update_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - service = {} - request_id = "hello world" - - update_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_service({ update_mask: update_mask, service: service, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_service update_mask: update_mask, service: service, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_service ::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_service({ update_mask: update_mask, service: service, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_service(::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_client_stub.call_count - end - end - end - - def test_delete_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_service({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_service name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_service ::Google::Cloud::AppHub::V1::DeleteServiceRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_service({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_service(::Google::Cloud::AppHub::V1::DeleteServiceRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_client_stub.call_count - end - end - end - - def test_list_discovered_workloads - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_discovered_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_discovered_workloads_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_discovered_workloads_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_discovered_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_discovered_workloads ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_discovered_workloads(::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_discovered_workloads_client_stub.call_count - end - end - end - - def test_get_discovered_workload - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovered_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_discovered_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_discovered_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_discovered_workload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_discovered_workload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_discovered_workload ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_discovered_workload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_discovered_workload(::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_discovered_workload_client_stub.call_count - end - end - end - - def test_lookup_discovered_workload - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - uri = "hello world" - - lookup_discovered_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_lookup_discovered_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_discovered_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.lookup_discovered_workload({ parent: parent, uri: uri }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.lookup_discovered_workload parent: parent, uri: uri do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.lookup_discovered_workload ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.lookup_discovered_workload({ parent: parent, uri: uri }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.lookup_discovered_workload(::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_discovered_workload_client_stub.call_count - end - end - end - - def test_list_workloads - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workloads ::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workloads(::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_workloads_client_stub.call_count - end - end - end - - def test_create_workload - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload_id = "hello world" - workload = {} - request_id = "hello world" - - create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workload parent: parent, workload_id: workload_id, workload: workload, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workload ::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workload(::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_count - end - end - end - - def test_get_workload - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::Workload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workload ::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workload(::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_count - end - end - end - - def test_update_workload - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - workload = {} - request_id = "hello world" - - update_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workload update_mask: update_mask, workload: workload, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workload ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workload(::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workload_client_stub.call_count - end - end - end - - def test_delete_workload - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workload({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workload name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workload ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workload({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workload(::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workload_client_stub.call_count - end - end - end - - def test_list_applications - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_applications_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_list_applications_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_applications_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_applications({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_applications parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_applications ::Google::Cloud::AppHub::V1::ListApplicationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_applications({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_applications(::Google::Cloud::AppHub::V1::ListApplicationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_applications_client_stub.call_count - end - end - end - - def test_create_application - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - application_id = "hello world" - application = {} - request_id = "hello world" - - create_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_create_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_application_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_application parent: parent, application_id: application_id, application: application, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_application ::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_application(::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_application_client_stub.call_count - end - end - end - - def test_get_application - # Create test objects. - client_result = ::Google::Cloud::AppHub::V1::Application.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_get_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_application_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_application({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_application name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_application ::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_application({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_application(::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_application_client_stub.call_count - end - end - end - - def test_update_application - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - application = {} - request_id = "hello world" - - update_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_update_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_application_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_application({ update_mask: update_mask, application: application, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_application update_mask: update_mask, application: application, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_application ::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_application({ update_mask: update_mask, application: application, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_application(::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_application_client_stub.call_count - end - end - end - - def test_delete_application - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_application_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AppHub::V1::AppHub::Rest::ServiceStub.stub :transcode_delete_application_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_application_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_application({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_application name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_application ::Google::Cloud::AppHub::V1::DeleteApplicationRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_application({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_application(::Google::Cloud::AppHub::V1::DeleteApplicationRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_application_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppHub::V1::AppHub::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb deleted file mode 100644 index f3ff5043e655..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/google/cloud/app_hub/v1/app_hub_test.rb +++ /dev/null @@ -1,1865 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apphub/v1/apphub_service_pb" -require "google/cloud/app_hub/v1/app_hub" - -class ::Google::Cloud::AppHub::V1::AppHub::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_lookup_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - lookup_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.lookup_service_project_attachment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.lookup_service_project_attachment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.lookup_service_project_attachment ::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.lookup_service_project_attachment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.lookup_service_project_attachment(::Google::Cloud::AppHub::V1::LookupServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_list_service_project_attachments - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_service_project_attachments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_project_attachments, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_service_project_attachments_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_service_project_attachments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_service_project_attachments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_service_project_attachments ::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_service_project_attachments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_service_project_attachments(::Google::Cloud::AppHub::V1::ListServiceProjectAttachmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_service_project_attachments_client_stub.call_rpc_count - end - end - - def test_create_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_project_attachment_id = "hello world" - service_project_attachment = {} - request_id = "hello world" - - create_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_project_attachment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::ServiceProjectAttachment), request["service_project_attachment"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_service_project_attachment parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_service_project_attachment ::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_service_project_attachment({ parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_service_project_attachment(::Google::Cloud::AppHub::V1::CreateServiceProjectAttachmentRequest.new(parent: parent, service_project_attachment_id: service_project_attachment_id, service_project_attachment: service_project_attachment, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_get_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ServiceProjectAttachment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_service_project_attachment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_service_project_attachment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_service_project_attachment ::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_service_project_attachment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_service_project_attachment(::Google::Cloud::AppHub::V1::GetServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_delete_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_service_project_attachment({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_service_project_attachment name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_service_project_attachment ::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_service_project_attachment({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_service_project_attachment(::Google::Cloud::AppHub::V1::DeleteServiceProjectAttachmentRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_detach_service_project_attachment - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - detach_service_project_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :detach_service_project_attachment, name - assert_kind_of ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, detach_service_project_attachment_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.detach_service_project_attachment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.detach_service_project_attachment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.detach_service_project_attachment ::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.detach_service_project_attachment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.detach_service_project_attachment(::Google::Cloud::AppHub::V1::DetachServiceProjectAttachmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, detach_service_project_attachment_client_stub.call_rpc_count - end - end - - def test_list_discovered_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListDiscoveredServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_discovered_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_discovered_services, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_discovered_services_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_discovered_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_discovered_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_discovered_services ::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_discovered_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_discovered_services(::Google::Cloud::AppHub::V1::ListDiscoveredServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_discovered_services_client_stub.call_rpc_count - end - end - - def test_get_discovered_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::DiscoveredService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovered_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_discovered_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_discovered_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_discovered_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_discovered_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_discovered_service ::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_discovered_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_discovered_service(::Google::Cloud::AppHub::V1::GetDiscoveredServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_discovered_service_client_stub.call_rpc_count - end - end - - def test_lookup_discovered_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - uri = "hello world" - - lookup_discovered_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_discovered_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["uri"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_discovered_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.lookup_discovered_service({ parent: parent, uri: uri }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.lookup_discovered_service parent: parent, uri: uri do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.lookup_discovered_service ::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.lookup_discovered_service({ parent: parent, uri: uri }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.lookup_discovered_service(::Google::Cloud::AppHub::V1::LookupDiscoveredServiceRequest.new(parent: parent, uri: uri), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_discovered_service_client_stub.call_rpc_count - end - end - - def test_list_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_services, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListServicesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_services_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_services ::Google::Cloud::AppHub::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_services(::Google::Cloud::AppHub::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_rpc_count - end - end - - def test_create_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_id = "hello world" - service = {} - request_id = "hello world" - - create_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::CreateServiceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Service), request["service"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_service parent: parent, service_id: service_id, service: service, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_service ::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_service({ parent: parent, service_id: service_id, service: service, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_service(::Google::Cloud::AppHub::V1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_service_client_stub.call_rpc_count - end - end - - def test_get_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_service ::Google::Cloud::AppHub::V1::GetServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_service(::Google::Cloud::AppHub::V1::GetServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_rpc_count - end - end - - def test_update_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - service = {} - request_id = "hello world" - - update_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::UpdateServiceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Service), request["service"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_service({ update_mask: update_mask, service: service, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_service update_mask: update_mask, service: service, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_service ::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_service({ update_mask: update_mask, service: service, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_service(::Google::Cloud::AppHub::V1::UpdateServiceRequest.new(update_mask: update_mask, service: service, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_service_client_stub.call_rpc_count - end - end - - def test_delete_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service, name - assert_kind_of ::Google::Cloud::AppHub::V1::DeleteServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_service({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_service name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_service ::Google::Cloud::AppHub::V1::DeleteServiceRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_service({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_service(::Google::Cloud::AppHub::V1::DeleteServiceRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_service_client_stub.call_rpc_count - end - end - - def test_list_discovered_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_discovered_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_discovered_workloads, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_discovered_workloads_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_discovered_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_discovered_workloads ::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_discovered_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_discovered_workloads(::Google::Cloud::AppHub::V1::ListDiscoveredWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_discovered_workloads_client_stub.call_rpc_count - end - end - - def test_get_discovered_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::DiscoveredWorkload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovered_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_discovered_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_discovered_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_discovered_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_discovered_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_discovered_workload ::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_discovered_workload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_discovered_workload(::Google::Cloud::AppHub::V1::GetDiscoveredWorkloadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_discovered_workload_client_stub.call_rpc_count - end - end - - def test_lookup_discovered_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - uri = "hello world" - - lookup_discovered_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_discovered_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["uri"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_discovered_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.lookup_discovered_workload({ parent: parent, uri: uri }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.lookup_discovered_workload parent: parent, uri: uri do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.lookup_discovered_workload ::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.lookup_discovered_workload({ parent: parent, uri: uri }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.lookup_discovered_workload(::Google::Cloud::AppHub::V1::LookupDiscoveredWorkloadRequest.new(parent: parent, uri: uri), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_discovered_workload_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListWorkloadsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workloads_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workloads ::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workloads(::Google::Cloud::AppHub::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_workloads_client_stub.call_rpc_count - end - end - - def test_create_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload_id = "hello world" - workload = {} - request_id = "hello world" - - create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::CreateWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["workload_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Workload), request["workload"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workload parent: parent, workload_id: workload_id, workload: workload, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workload ::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workload({ parent: parent, workload_id: workload_id, workload: workload, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workload(::Google::Cloud::AppHub::V1::CreateWorkloadRequest.new(parent: parent, workload_id: workload_id, workload: workload, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_rpc_count - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workload ::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workload(::Google::Cloud::AppHub::V1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_rpc_count - end - end - - def test_update_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - workload = {} - request_id = "hello world" - - update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Workload), request["workload"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_workload update_mask: update_mask, workload: workload, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_workload ::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_workload({ update_mask: update_mask, workload: workload, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_workload(::Google::Cloud::AppHub::V1::UpdateWorkloadRequest.new(update_mask: update_mask, workload: workload, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_workload_client_stub.call_rpc_count - end - end - - def test_delete_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workload, name - assert_kind_of ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workload_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workload({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workload name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workload ::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workload({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workload(::Google::Cloud::AppHub::V1::DeleteWorkloadRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_workload_client_stub.call_rpc_count - end - end - - def test_list_applications - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::ListApplicationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_applications_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_applications, name - assert_kind_of ::Google::Cloud::AppHub::V1::ListApplicationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_applications_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_applications({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_applications parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_applications ::Google::Cloud::AppHub::V1::ListApplicationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_applications({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_applications(::Google::Cloud::AppHub::V1::ListApplicationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_applications_client_stub.call_rpc_count - end - end - - def test_create_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - application_id = "hello world" - application = {} - request_id = "hello world" - - create_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_application, name - assert_kind_of ::Google::Cloud::AppHub::V1::CreateApplicationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["application_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Application), request["application"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_application_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_application parent: parent, application_id: application_id, application: application, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_application ::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_application({ parent: parent, application_id: application_id, application: application, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_application(::Google::Cloud::AppHub::V1::CreateApplicationRequest.new(parent: parent, application_id: application_id, application: application, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_application_client_stub.call_rpc_count - end - end - - def test_get_application - # Create GRPC objects. - grpc_response = ::Google::Cloud::AppHub::V1::Application.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_application, name - assert_kind_of ::Google::Cloud::AppHub::V1::GetApplicationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_application_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_application({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_application name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_application ::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_application({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_application(::Google::Cloud::AppHub::V1::GetApplicationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_application_client_stub.call_rpc_count - end - end - - def test_update_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - application = {} - request_id = "hello world" - - update_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_application, name - assert_kind_of ::Google::Cloud::AppHub::V1::UpdateApplicationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AppHub::V1::Application), request["application"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_application_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_application({ update_mask: update_mask, application: application, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_application update_mask: update_mask, application: application, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_application ::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_application({ update_mask: update_mask, application: application, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_application(::Google::Cloud::AppHub::V1::UpdateApplicationRequest.new(update_mask: update_mask, application: application, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_application_client_stub.call_rpc_count - end - end - - def test_delete_application - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_application_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_application, name - assert_kind_of ::Google::Cloud::AppHub::V1::DeleteApplicationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_application_client_stub do - # Create client - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_application({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_application name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_application ::Google::Cloud::AppHub::V1::DeleteApplicationRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_application({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_application(::Google::Cloud::AppHub::V1::DeleteApplicationRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_application_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AppHub::V1::AppHub::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-app_hub-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore b/owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json deleted file mode 100644 index b7c7a7f45d14..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "artifactregistry.googleapis.com", - "api_shortname": "artifactregistry", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest", - "distribution_name": "google-cloud-artifact_registry-v1", - "is_cloud": true, - "language": "ruby", - "name": "artifactregistry", - "name_pretty": "Artifact Registry V1 API", - "product_documentation": "https://cloud.google.com/artifact-registry/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ARTIFACT_REGISTRY", - "ruby-cloud-product-url": "https://cloud.google.com/artifact-registry/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml b/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml deleted file mode 100644 index de96e2618870..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-artifact_registry-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-artifact_registry-v1.rb" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts b/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts deleted file mode 100644 index 79e1614b4868..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Artifact Registry V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md deleted file mode 100644 index 1ae5019e3c04..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-artifact_registry-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-artifact_registry-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/artifact_registry/v1" - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/artifact_registry/v1" - -::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-artifact_registry-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/artifact_registry/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md b/owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1/README.md deleted file mode 100644 index e782a263370f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Artifact Registry V1 API - -Store and manage build artifacts in a scalable and integrated service built on Google infrastructure. - -Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Artifact Registry V1 API. Most users should consider using -the main client gem, -[google-cloud-artifact_registry](https://rubygems.org/gems/google-cloud-artifact_registry). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-artifact_registry-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/artifact_registry/v1" - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new -request = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new # (request fields as keyword arguments...) -response = client.list_docker_images request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/artifact-registry/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/artifact_registry/v1" -require "logger" - -client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-artifact_registry`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-artifact_registry-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-artifact_registry`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-artifact_registry-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile b/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile deleted file mode 100644 index 4148fa14709c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-artifact_registry-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ARTIFACT_REGISTRY_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ARTIFACT_REGISTRY_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ARTIFACT_REGISTRY_TEST_PROJECT=test123 ARTIFACT_REGISTRY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/artifact_registry/v1/artifact_registry/credentials" - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ARTIFACT_REGISTRY_PROJECT"] = project - ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] = project - ENV["ARTIFACT_REGISTRY_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-artifact_registry-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-artifact_registry-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-artifact_registry-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-artifact_registry-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-artifact_registry-v1" - header "google-cloud-artifact_registry-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-artifact_registry-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-artifact_registry-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-artifact_registry-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-artifact_registry-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json deleted file mode 100644 index 02e8cf3c04bd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/gapic_metadata.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.devtools.artifactregistry.v1", - "libraryPackage": "::Google::Cloud::ArtifactRegistry::V1", - "services": { - "ArtifactRegistry": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client", - "rpcs": { - "ListDockerImages": { - "methods": [ - "list_docker_images" - ] - }, - "GetDockerImage": { - "methods": [ - "get_docker_image" - ] - }, - "ListMavenArtifacts": { - "methods": [ - "list_maven_artifacts" - ] - }, - "GetMavenArtifact": { - "methods": [ - "get_maven_artifact" - ] - }, - "ListNpmPackages": { - "methods": [ - "list_npm_packages" - ] - }, - "GetNpmPackage": { - "methods": [ - "get_npm_package" - ] - }, - "ListPythonPackages": { - "methods": [ - "list_python_packages" - ] - }, - "GetPythonPackage": { - "methods": [ - "get_python_package" - ] - }, - "ImportAptArtifacts": { - "methods": [ - "import_apt_artifacts" - ] - }, - "ImportYumArtifacts": { - "methods": [ - "import_yum_artifacts" - ] - }, - "ListRepositories": { - "methods": [ - "list_repositories" - ] - }, - "GetRepository": { - "methods": [ - "get_repository" - ] - }, - "CreateRepository": { - "methods": [ - "create_repository" - ] - }, - "UpdateRepository": { - "methods": [ - "update_repository" - ] - }, - "DeleteRepository": { - "methods": [ - "delete_repository" - ] - }, - "ListPackages": { - "methods": [ - "list_packages" - ] - }, - "GetPackage": { - "methods": [ - "get_package" - ] - }, - "DeletePackage": { - "methods": [ - "delete_package" - ] - }, - "ListVersions": { - "methods": [ - "list_versions" - ] - }, - "GetVersion": { - "methods": [ - "get_version" - ] - }, - "DeleteVersion": { - "methods": [ - "delete_version" - ] - }, - "BatchDeleteVersions": { - "methods": [ - "batch_delete_versions" - ] - }, - "UpdateVersion": { - "methods": [ - "update_version" - ] - }, - "ListFiles": { - "methods": [ - "list_files" - ] - }, - "GetFile": { - "methods": [ - "get_file" - ] - }, - "DeleteFile": { - "methods": [ - "delete_file" - ] - }, - "UpdateFile": { - "methods": [ - "update_file" - ] - }, - "ListTags": { - "methods": [ - "list_tags" - ] - }, - "GetTag": { - "methods": [ - "get_tag" - ] - }, - "CreateTag": { - "methods": [ - "create_tag" - ] - }, - "UpdateTag": { - "methods": [ - "update_tag" - ] - }, - "DeleteTag": { - "methods": [ - "delete_tag" - ] - }, - "CreateRule": { - "methods": [ - "create_rule" - ] - }, - "ListRules": { - "methods": [ - "list_rules" - ] - }, - "GetRule": { - "methods": [ - "get_rule" - ] - }, - "UpdateRule": { - "methods": [ - "update_rule" - ] - }, - "DeleteRule": { - "methods": [ - "delete_rule" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "GetProjectSettings": { - "methods": [ - "get_project_settings" - ] - }, - "UpdateProjectSettings": { - "methods": [ - "update_project_settings" - ] - }, - "GetVPCSCConfig": { - "methods": [ - "get_vpcsc_config" - ] - }, - "UpdateVPCSCConfig": { - "methods": [ - "update_vpcsc_config" - ] - }, - "UpdatePackage": { - "methods": [ - "update_package" - ] - }, - "ListAttachments": { - "methods": [ - "list_attachments" - ] - }, - "GetAttachment": { - "methods": [ - "get_attachment" - ] - }, - "CreateAttachment": { - "methods": [ - "create_attachment" - ] - }, - "DeleteAttachment": { - "methods": [ - "delete_attachment" - ] - }, - "ExportArtifact": { - "methods": [ - "export_artifact" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec b/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec deleted file mode 100644 index 4b8e2a65e5ce..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/google-cloud-artifact_registry-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/artifact_registry/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-artifact_registry-v1" - gem.version = Google::Cloud::ArtifactRegistry::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details." - gem.summary = "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb deleted file mode 100644 index 81605be80ce5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google-cloud-artifact_registry-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/artifact_registry/v1" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb deleted file mode 100644 index 0fa4b7bfbe28..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/artifact_registry/v1/artifact_registry" -require "google/cloud/artifact_registry/v1/version" - -module Google - module Cloud - module ArtifactRegistry - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/artifact_registry/v1" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/artifact_registry/v1" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/artifact_registry/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb deleted file mode 100644 index ee43fe7eedff..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/artifact_registry/v1/version" - -require "google/cloud/artifact_registry/v1/artifact_registry/credentials" -require "google/cloud/artifact_registry/v1/artifact_registry/paths" -require "google/cloud/artifact_registry/v1/artifact_registry/operations" -require "google/cloud/artifact_registry/v1/artifact_registry/client" -require "google/cloud/artifact_registry/v1/artifact_registry/rest" - -module Google - module Cloud - module ArtifactRegistry - module V1 - ## - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/artifact_registry/v1/artifact_registry" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/artifact_registry/v1/artifact_registry/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module ArtifactRegistry - end - end - end - end -end - -helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb" -require "google/cloud/artifact_registry/v1/artifact_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb deleted file mode 100644 index 2973415f04dd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +++ /dev/null @@ -1,5572 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/devtools/artifactregistry/v1/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - ## - # Client for the ArtifactRegistry service. - # - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :artifact_registry_stub - - ## - # Configure the ArtifactRegistry Client class. - # - # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ArtifactRegistry clients - # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ArtifactRegistry", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @artifact_registry_stub.universe_domain - end - - ## - # Create a new ArtifactRegistry client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ArtifactRegistry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/devtools/artifactregistry/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @artifact_registry_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @artifact_registry_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @artifact_registry_stub.endpoint - config.universe_domain = @artifact_registry_stub.universe_domain - config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @artifact_registry_stub.logger - end - - # Service calls - - ## - # Lists docker images. - # - # @overload list_docker_images(request, options = nil) - # Pass arguments to `list_docker_images` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_docker_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose docker images will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param order_by [::String] - # The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new - # - # # Call the list_docker_images method. - # result = client.list_docker_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. - # p item - # end - # - def list_docker_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_docker_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_docker_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a docker image. - # - # @overload get_docker_image(request, options = nil) - # Pass arguments to `get_docker_image` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_docker_image(name: nil) - # Pass arguments to `get_docker_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the docker images. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new - # - # # Call the get_docker_image method. - # result = client.get_docker_image request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. - # p result - # - def get_docker_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_docker_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_docker_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_docker_image, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists maven artifacts. - # - # @overload list_maven_artifacts(request, options = nil) - # Pass arguments to `list_maven_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose maven artifacts will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new - # - # # Call the list_maven_artifacts method. - # result = client.list_maven_artifacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - # p item - # end - # - def list_maven_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_maven_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_maven_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_maven_artifacts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a maven artifact. - # - # @overload get_maven_artifact(request, options = nil) - # Pass arguments to `get_maven_artifact` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_maven_artifact(name: nil) - # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the maven artifact. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new - # - # # Call the get_maven_artifact method. - # result = client.get_maven_artifact request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - # p result - # - def get_maven_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_maven_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_maven_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_maven_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists npm packages. - # - # @overload list_npm_packages(request, options = nil) - # Pass arguments to `list_npm_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_npm_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose npm packages will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new - # - # # Call the list_npm_packages method. - # result = client.list_npm_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. - # p item - # end - # - def list_npm_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_npm_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_npm_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_npm_packages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a npm package. - # - # @overload get_npm_package(request, options = nil) - # Pass arguments to `get_npm_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_npm_package(name: nil) - # Pass arguments to `get_npm_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the npm package. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new - # - # # Call the get_npm_package method. - # result = client.get_npm_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. - # p result - # - def get_npm_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_npm_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_npm_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_npm_package, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists python packages. - # - # @overload list_python_packages(request, options = nil) - # Pass arguments to `list_python_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_python_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose python packages will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new - # - # # Call the list_python_packages method. - # result = client.list_python_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. - # p item - # end - # - def list_python_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_python_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_python_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_python_packages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a python package. - # - # @overload get_python_package(request, options = nil) - # Pass arguments to `get_python_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_python_package(name: nil) - # Pass arguments to `get_python_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the python package. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new - # - # # Call the get_python_package method. - # result = client.get_python_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. - # p result - # - def get_python_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_python_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_python_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_python_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_python_package, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_apt_artifacts(request, options = nil) - # Pass arguments to `import_apt_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_apt_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new - # - # # Call the import_apt_artifacts method. - # result = client.import_apt_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_apt_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_apt_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_apt_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_yum_artifacts(request, options = nil) - # Pass arguments to `import_yum_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_yum_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new - # - # # Call the import_yum_artifacts method. - # result = client.import_yum_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_yum_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_yum_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_yum_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists repositories. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose repositories will be - # listed. - # @param page_size [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # - # Examples of using a filter: - # - # To filter the results of your request to repositories with the name - # `my-repo` in project `my-project` in the `us-central` region, append the - # following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - # @param order_by [::String] - # Optional. The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new - # - # # Call the list_repositories method. - # result = client.list_repositories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Repository. - # p item - # end - # - def list_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_repositories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_repositories, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - # p result - # - def get_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_repository, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_repository(parent: nil, repository_id: nil, repository: nil) - # Pass arguments to `create_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the repository will be - # created. - # @param repository_id [::String] - # Required. The repository id to use for this repository. - # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] - # Required. The repository to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new - # - # # Call the create_repository method. - # result = client.create_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_repository, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_repository(repository: nil, update_mask: nil) - # Pass arguments to `update_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] - # The repository that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - # p result - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.repository&.name - header_params["repository.name"] = request.repository.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_repository, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_repository(name: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new - # - # # Call the delete_repository method. - # result = client.delete_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_repository, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists packages. - # - # @overload list_packages(request, options = nil) - # Pass arguments to `list_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose packages will be listed. - # @param page_size [::Integer] - # The maximum number of packages to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to packages with the name - # `my-package` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - # - # To filter the results of your request to packages with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request": - # - # * `"annotations.external_link:external_link_value"` - # - # To filter the results just for a specific annotation key `external_link`, - # append the following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to packages with the annotation key-value pair - # [`external.link`:`https://example.com/my-package`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-package`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @param order_by [::String] - # Optional. The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new - # - # # Call the list_packages method. - # result = client.list_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. - # p item - # end - # - def list_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_packages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a package. - # - # @overload get_package(request, options = nil) - # Pass arguments to `get_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_package(name: nil) - # Pass arguments to `get_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the package to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new - # - # # Call the get_package method. - # result = client.get_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - # p result - # - def get_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_package, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - # - # @overload delete_package(request, options = nil) - # Pass arguments to `delete_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_package(name: nil) - # Pass arguments to `delete_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the package to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new - # - # # Call the delete_package method. - # result = client.delete_package request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists versions. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil) - # Pass arguments to `list_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose versions will be listed. - # @param page_size [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # @param order_by [::String] - # Optional. The field to order the results by. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to versions with the name - # `my-version` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - # - # To filter the results of your request to versions with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to versions with the annotation key-value pair - # [`external.link`:`https://example.com/my-version`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-version`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a version - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the version to retrieve. - # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_version(name: nil, force: nil) - # Pass arguments to `delete_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the version to delete. - # @param force [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes multiple versions across a repository. The returned operation will - # complete once the versions have been deleted. - # - # @overload batch_delete_versions(request, options = nil) - # Pass arguments to `batch_delete_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_delete_versions(parent: nil, names: nil, validate_only: nil) - # Pass arguments to `batch_delete_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the repository holding all requested versions. - # @param names [::Array<::String>] - # Required. The names of the versions to delete. - # The maximum number of versions deleted per batch is determined by the - # service and is dependent on the available resources in the region. - # @param validate_only [::Boolean] - # If true, the request is performed without deleting data, following AIP-163. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new - # - # # Call the batch_delete_versions method. - # result = client.batch_delete_versions request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_delete_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_delete_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_delete_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_delete_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :batch_delete_versions, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a version. - # - # @overload update_version(request, options = nil) - # Pass arguments to `update_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_version(version: nil, update_mask: nil) - # Pass arguments to `update_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash] - # Required. The Version that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new - # - # # Call the update_version method. - # result = client.update_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - # p result - # - def update_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.version&.name - header_params["version.name"] = request.version.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists files. - # - # @overload list_files(request, options = nil) - # Pass arguments to `list_files` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the repository whose files will be listed. For - # example: "projects/p1/locations/us-central1/repositories/repo1 - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to files with the name `my_file.txt` - # in project `my-project` in the `us-central` region, in repository - # `my-repo`, append the following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - # - # To filter the results of your request to files owned by the version `1.0` - # in package `pkg1`, append the following filter expression to your request: - # - # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # - # To filter the results of your request to files with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to files with the annotation key-value pair - # [`external.link`:`https://example.com/my-file`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-file`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @param page_size [::Integer] - # The maximum number of files to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param order_by [::String] - # The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new - # - # # Call the list_files method. - # result = client.list_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. - # p item - # end - # - def list_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_files.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a file. - # - # @overload get_file(request, options = nil) - # Pass arguments to `get_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_file(name: nil) - # Pass arguments to `get_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the file to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new - # - # # Call the get_file method. - # result = client.get_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - # p result - # - def get_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_file, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a file and all of its content. It is only allowed on generic - # repositories. The returned operation will complete once the file has been - # deleted. - # - # @overload delete_file(request, options = nil) - # Pass arguments to `delete_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_file(name: nil) - # Pass arguments to `delete_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the file to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new - # - # # Call the delete_file method. - # result = client.delete_file request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_file, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a file. - # - # @overload update_file(request, options = nil) - # Pass arguments to `update_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_file(file: nil, update_mask: nil) - # Pass arguments to `update_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash] - # Required. The File that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new - # - # # Call the update_file method. - # result = client.update_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - # p result - # - def update_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.file&.name - header_params["file.name"] = request.file.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_file, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tags. - # - # @overload list_tags(request, options = nil) - # Pass arguments to `list_tags` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tags` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent package whose tags will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `version` - # - # Examples of using a filter: - # - # To filter the results of your request to tags with the name `my-tag` in - # package `my-package` in repository `my-repo` in project "`y-project` in - # the us-central region, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - # - # To filter the results of your request to tags applied to the version - # `1.0` in package `my-package`, append the following filter expression to - # your request: - # - # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # @param page_size [::Integer] - # The maximum number of tags to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new - # - # # Call the list_tags method. - # result = client.list_tags request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. - # p item - # end - # - def list_tags request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tags.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tags.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tags.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a tag. - # - # @overload get_tag(request, options = nil) - # Pass arguments to `get_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_tag(name: nil) - # Pass arguments to `get_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new - # - # # Call the get_tag method. - # result = client.get_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def get_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_tag, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a tag. - # - # @overload create_tag(request, options = nil) - # Pass arguments to `create_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_tag(parent: nil, tag_id: nil, tag: nil) - # Pass arguments to `create_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource where the tag will be created. - # @param tag_id [::String] - # The tag id to use for this repository. - # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] - # The tag to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new - # - # # Call the create_tag method. - # result = client.create_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def create_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_tag, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a tag. - # - # @overload update_tag(request, options = nil) - # Pass arguments to `update_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_tag(tag: nil, update_mask: nil) - # Pass arguments to `update_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] - # The tag that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new - # - # # Call the update_tag method. - # result = client.update_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def update_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.tag&.name - header_params["tag.name"] = request.tag.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_tag, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a tag. - # - # @overload delete_tag(request, options = nil) - # Pass arguments to `delete_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_tag(name: nil) - # Pass arguments to `delete_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new - # - # # Call the delete_tag method. - # result = client.delete_tag request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_tag, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_rule(parent: nil, rule_id: nil, rule: nil) - # Pass arguments to `create_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the rule will be created. - # @param rule_id [::String] - # The rule id to use for this repository. - # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] - # The rule to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_rules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent repository whose rules will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1`. - # @param page_size [::Integer] - # The maximum number of rules to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_rules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_rules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_rule(name: nil) - # Pass arguments to `get_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] - # The rule that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.rule&.name - header_params["rule.name"] = request.rule.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_rule(name: nil) - # Pass arguments to `delete_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the IAM policy for a given resource. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for a given resource. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Tests if the caller has a list of permissions on a resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the Settings for the Project. - # - # @overload get_project_settings(request, options = nil) - # Pass arguments to `get_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_project_settings(name: nil) - # Pass arguments to `get_project_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the projectSettings resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new - # - # # Call the get_project_settings method. - # result = client.get_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - # p result - # - def get_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_project_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Settings for the Project. - # - # @overload update_project_settings(request, options = nil) - # Pass arguments to `update_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_project_settings(project_settings: nil, update_mask: nil) - # Pass arguments to `update_project_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash] - # The project settings. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new - # - # # Call the update_project_settings method. - # result = client.update_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - # p result - # - def update_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_project_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.project_settings&.name - header_params["project_settings.name"] = request.project_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the VPCSC Config for the Project. - # - # @overload get_vpcsc_config(request, options = nil) - # Pass arguments to `get_vpcsc_config` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vpcsc_config(name: nil) - # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the VPCSCConfig resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new - # - # # Call the get_vpcsc_config method. - # result = client.get_vpcsc_config request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - # p result - # - def get_vpcsc_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vpcsc_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vpcsc_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_vpcsc_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the VPCSC Config for the Project. - # - # @overload update_vpcsc_config(request, options = nil) - # Pass arguments to `update_vpcsc_config` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil) - # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash] - # The project config. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new - # - # # Call the update_vpcsc_config method. - # result = client.update_vpcsc_config request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - # p result - # - def update_vpcsc_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_vpcsc_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.vpcsc_config&.name - header_params["vpcsc_config.name"] = request.vpcsc_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vpcsc_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_vpcsc_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a package. - # - # @overload update_package(request, options = nil) - # Pass arguments to `update_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_package(package: nil, update_mask: nil) - # Pass arguments to `update_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash] - # The package that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new - # - # # Call the update_package method. - # result = client.update_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - # p result - # - def update_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.package&.name - header_params["package.name"] = request.package.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_package, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists attachments. - # - # @overload list_attachments(request, options = nil) - # Pass arguments to `list_attachments` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attachments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose attachments will be listed. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `target` - # * `type` - # * `attachment_namespace` - # @param page_size [::Integer] - # The maximum number of attachments to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new - # - # # Call the list_attachments method. - # result = client.list_attachments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. - # p item - # end - # - def list_attachments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_attachments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_attachments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_attachments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_attachments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_attachments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an attachment. - # - # @overload get_attachment(request, options = nil) - # Pass arguments to `get_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_attachment(name: nil) - # Pass arguments to `get_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the attachment to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new - # - # # Call the get_attachment method. - # result = client.get_attachment request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. - # p result - # - def get_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_attachment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an attachment. The returned Operation will finish once the - # attachment has been created. Its response will be the created attachment. - # - # @overload create_attachment(request, options = nil) - # Pass arguments to `create_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil) - # Pass arguments to `create_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the attachment will be - # created. - # @param attachment_id [::String] - # Required. The attachment id to use for this attachment. - # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash] - # Required. The attachment to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new - # - # # Call the create_attachment method. - # result = client.create_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_attachment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an attachment. The returned Operation will - # finish once the attachments has been deleted. It will not have any - # Operation metadata and will return a `google.protobuf.Empty` response. - # - # @overload delete_attachment(request, options = nil) - # Pass arguments to `delete_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_attachment(name: nil) - # Pass arguments to `delete_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the attachment to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new - # - # # Call the delete_attachment method. - # result = client.delete_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_attachment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_attachment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports an artifact to a Cloud Storage bucket. - # - # @overload export_artifact(request, options = nil) - # Pass arguments to `export_artifact` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_artifact(source_version: nil, source_tag: nil, gcs_path: nil, repository: nil) - # Pass arguments to `export_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source_version [::String] - # The artifact version to export. - # Format: - # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} - # - # Note: The following parameters are mutually exclusive: `source_version`, `source_tag`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param source_tag [::String] - # The artifact tag to export. - # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} - # - # Note: The following parameters are mutually exclusive: `source_tag`, `source_version`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param gcs_path [::String] - # The Cloud Storage path to export the artifact to. Should start with the - # bucket name, and optionally have a directory path. Examples: - # `dst_bucket`, `dst_bucket/sub_dir`. - # Existing objects with the same path will be overwritten. - # @param repository [::String] - # Required. The repository of the artifact to export. - # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new - # - # # Call the export_artifact method. - # result = client.export_artifact request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.repository - header_params["repository"] = request.repository - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :export_artifact, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ArtifactRegistry API. - # - # This class represents the configuration for ArtifactRegistry, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_docker_images to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_docker_images.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_docker_images.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ArtifactRegistry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_docker_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_docker_images - ## - # RPC-specific configuration for `get_docker_image` - # @return [::Gapic::Config::Method] - # - attr_reader :get_docker_image - ## - # RPC-specific configuration for `list_maven_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_maven_artifacts - ## - # RPC-specific configuration for `get_maven_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_maven_artifact - ## - # RPC-specific configuration for `list_npm_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_npm_packages - ## - # RPC-specific configuration for `get_npm_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_npm_package - ## - # RPC-specific configuration for `list_python_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_python_packages - ## - # RPC-specific configuration for `get_python_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_python_package - ## - # RPC-specific configuration for `import_apt_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_apt_artifacts - ## - # RPC-specific configuration for `import_yum_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_yum_artifacts - ## - # RPC-specific configuration for `list_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_repositories - ## - # RPC-specific configuration for `get_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :get_repository - ## - # RPC-specific configuration for `create_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :create_repository - ## - # RPC-specific configuration for `update_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :update_repository - ## - # RPC-specific configuration for `delete_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_repository - ## - # RPC-specific configuration for `list_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_packages - ## - # RPC-specific configuration for `get_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_package - ## - # RPC-specific configuration for `delete_package` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_package - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - ## - # RPC-specific configuration for `batch_delete_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_versions - ## - # RPC-specific configuration for `update_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_version - ## - # RPC-specific configuration for `list_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_files - ## - # RPC-specific configuration for `get_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file - ## - # RPC-specific configuration for `delete_file` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_file - ## - # RPC-specific configuration for `update_file` - # @return [::Gapic::Config::Method] - # - attr_reader :update_file - ## - # RPC-specific configuration for `list_tags` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tags - ## - # RPC-specific configuration for `get_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tag - ## - # RPC-specific configuration for `create_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tag - ## - # RPC-specific configuration for `update_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tag - ## - # RPC-specific configuration for `delete_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tag - ## - # RPC-specific configuration for `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `get_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_settings - ## - # RPC-specific configuration for `update_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_settings - ## - # RPC-specific configuration for `get_vpcsc_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vpcsc_config - ## - # RPC-specific configuration for `update_vpcsc_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vpcsc_config - ## - # RPC-specific configuration for `update_package` - # @return [::Gapic::Config::Method] - # - attr_reader :update_package - ## - # RPC-specific configuration for `list_attachments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attachments - ## - # RPC-specific configuration for `get_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attachment - ## - # RPC-specific configuration for `create_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attachment - ## - # RPC-specific configuration for `delete_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attachment - ## - # RPC-specific configuration for `export_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :export_artifact - - # @private - def initialize parent_rpcs = nil - list_docker_images_config = parent_rpcs.list_docker_images if parent_rpcs.respond_to? :list_docker_images - @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config - get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image - @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config - list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts - @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config - get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact - @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config - list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages - @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config - get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package - @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config - list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages - @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config - get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package - @get_python_package = ::Gapic::Config::Method.new get_python_package_config - import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts - @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config - import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts - @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config - list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories - @list_repositories = ::Gapic::Config::Method.new list_repositories_config - get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository - @get_repository = ::Gapic::Config::Method.new get_repository_config - create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository - @create_repository = ::Gapic::Config::Method.new create_repository_config - update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository - @update_repository = ::Gapic::Config::Method.new update_repository_config - delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository - @delete_repository = ::Gapic::Config::Method.new delete_repository_config - list_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages - @list_packages = ::Gapic::Config::Method.new list_packages_config - get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package - @get_package = ::Gapic::Config::Method.new get_package_config - delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package - @delete_package = ::Gapic::Config::Method.new delete_package_config - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions - @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config - update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version - @update_version = ::Gapic::Config::Method.new update_version_config - list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files - @list_files = ::Gapic::Config::Method.new list_files_config - get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file - @get_file = ::Gapic::Config::Method.new get_file_config - delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file - @delete_file = ::Gapic::Config::Method.new delete_file_config - update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file - @update_file = ::Gapic::Config::Method.new update_file_config - list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags - @list_tags = ::Gapic::Config::Method.new list_tags_config - get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag - @get_tag = ::Gapic::Config::Method.new get_tag_config - create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag - @create_tag = ::Gapic::Config::Method.new create_tag_config - update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag - @update_tag = ::Gapic::Config::Method.new update_tag_config - delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag - @delete_tag = ::Gapic::Config::Method.new delete_tag_config - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings - @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config - update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings - @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config - get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config - @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config - update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config - @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config - update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package - @update_package = ::Gapic::Config::Method.new update_package_config - list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments - @list_attachments = ::Gapic::Config::Method.new list_attachments_config - get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment - @get_attachment = ::Gapic::Config::Method.new get_attachment_config - create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment - @create_attachment = ::Gapic::Config::Method.new create_attachment_config - delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment - @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config - export_artifact_config = parent_rpcs.export_artifact if parent_rpcs.respond_to? :export_artifact - @export_artifact = ::Gapic::Config::Method.new export_artifact_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb deleted file mode 100644 index 808d2715f8ee..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/credentials.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - # Credentials for the ArtifactRegistry API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "ARTIFACT_REGISTRY_CREDENTIALS", - "ARTIFACT_REGISTRY_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ARTIFACT_REGISTRY_CREDENTIALS_JSON", - "ARTIFACT_REGISTRY_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb deleted file mode 100644 index 9daad577067b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ArtifactRegistry Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb deleted file mode 100644 index 624a366f2e6a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +++ /dev/null @@ -1,333 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - # Path helper methods for the ArtifactRegistry API. - module Paths - ## - # Create a fully-qualified Attachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param attachment [String] - # - # @return [::String] - def attachment_path project:, location:, repository:, attachment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/attachments/#{attachment}" - end - - ## - # Create a fully-qualified DockerImage resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param docker_image [String] - # - # @return [::String] - def docker_image_path project:, location:, repository:, docker_image: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/dockerImages/#{docker_image}" - end - - ## - # Create a fully-qualified File resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/files/{file}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param file [String] - # - # @return [::String] - def file_path project:, location:, repository:, file: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/files/#{file}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified MavenArtifact resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param maven_artifact [String] - # - # @return [::String] - def maven_artifact_path project:, location:, repository:, maven_artifact: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/mavenArtifacts/#{maven_artifact}" - end - - ## - # Create a fully-qualified NpmPackage resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param npm_package [String] - # - # @return [::String] - def npm_package_path project:, location:, repository:, npm_package: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/npmPackages/#{npm_package}" - end - - ## - # Create a fully-qualified Package resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param package [String] - # - # @return [::String] - def package_path project:, location:, repository:, package: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}" - end - - ## - # Create a fully-qualified ProjectSettings resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/projectSettings` - # - # @param project [String] - # - # @return [::String] - def project_settings_path project: - "projects/#{project}/projectSettings" - end - - ## - # Create a fully-qualified PythonPackage resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param python_package [String] - # - # @return [::String] - def python_package_path project:, location:, repository:, python_package: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/pythonPackages/#{python_package}" - end - - ## - # Create a fully-qualified Repository resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # - # @return [::String] - def repository_path project:, location:, repository: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}" - end - - ## - # Create a fully-qualified Rule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/rules/{rule}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param rule [String] - # - # @return [::String] - def rule_path project:, location:, repository:, rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/rules/#{rule}" - end - - ## - # Create a fully-qualified SecretVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}/versions/{secret_version}` - # - # @param project [String] - # @param secret [String] - # @param secret_version [String] - # - # @return [::String] - def secret_version_path project:, secret:, secret_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" - end - - ## - # Create a fully-qualified Tag resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param package [String] - # @param tag [String] - # - # @return [::String] - def tag_path project:, location:, repository:, package:, tag: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}" - end - - ## - # Create a fully-qualified Version resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param package [String] - # @param version [String] - # - # @return [::String] - def version_path project:, location:, repository:, package:, version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/versions/#{version}" - end - - ## - # Create a fully-qualified VpcscConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/vpcscConfig` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def vpcsc_config_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/vpcscConfig" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb deleted file mode 100644 index 64924d2a2ee7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/artifact_registry/v1/version" -require "google/cloud/artifact_registry/v1/bindings_override" - -require "google/cloud/artifact_registry/v1/artifact_registry/credentials" -require "google/cloud/artifact_registry/v1/artifact_registry/paths" -require "google/cloud/artifact_registry/v1/artifact_registry/rest/operations" -require "google/cloud/artifact_registry/v1/artifact_registry/rest/client" - -module Google - module Cloud - module ArtifactRegistry - module V1 - ## - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/artifact_registry/v1/artifact_registry/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module ArtifactRegistry - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/artifact_registry/v1/artifact_registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb deleted file mode 100644 index 3324eebda0a5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +++ /dev/null @@ -1,5187 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/devtools/artifactregistry/v1/service_pb" -require "google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - module Rest - ## - # REST client for the ArtifactRegistry service. - # - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :artifact_registry_stub - - ## - # Configure the ArtifactRegistry Client class. - # - # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ArtifactRegistry clients - # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ArtifactRegistry", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @artifact_registry_stub.universe_domain - end - - ## - # Create a new ArtifactRegistry REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ArtifactRegistry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @artifact_registry_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @artifact_registry_stub.endpoint - config.universe_domain = @artifact_registry_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @artifact_registry_stub.logger - end - - # Service calls - - ## - # Lists docker images. - # - # @overload list_docker_images(request, options = nil) - # Pass arguments to `list_docker_images` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_docker_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose docker images will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param order_by [::String] - # The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new - # - # # Call the list_docker_images method. - # result = client.list_docker_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. - # p item - # end - # - def list_docker_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_docker_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_docker_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_docker_images request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, "docker_images", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a docker image. - # - # @overload get_docker_image(request, options = nil) - # Pass arguments to `get_docker_image` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_docker_image(name: nil) - # Pass arguments to `get_docker_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the docker images. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new - # - # # Call the get_docker_image method. - # result = client.get_docker_image request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. - # p result - # - def get_docker_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_docker_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_docker_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_docker_image request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists maven artifacts. - # - # @overload list_maven_artifacts(request, options = nil) - # Pass arguments to `list_maven_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose maven artifacts will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new - # - # # Call the list_maven_artifacts method. - # result = client.list_maven_artifacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - # p item - # end - # - def list_maven_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_maven_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_maven_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_maven_artifacts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, "maven_artifacts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a maven artifact. - # - # @overload get_maven_artifact(request, options = nil) - # Pass arguments to `get_maven_artifact` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_maven_artifact(name: nil) - # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the maven artifact. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new - # - # # Call the get_maven_artifact method. - # result = client.get_maven_artifact request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - # p result - # - def get_maven_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_maven_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_maven_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_maven_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists npm packages. - # - # @overload list_npm_packages(request, options = nil) - # Pass arguments to `list_npm_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_npm_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose npm packages will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new - # - # # Call the list_npm_packages method. - # result = client.list_npm_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. - # p item - # end - # - def list_npm_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_npm_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_npm_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_npm_packages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, "npm_packages", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a npm package. - # - # @overload get_npm_package(request, options = nil) - # Pass arguments to `get_npm_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_npm_package(name: nil) - # Pass arguments to `get_npm_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the npm package. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new - # - # # Call the get_npm_package method. - # result = client.get_npm_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. - # p result - # - def get_npm_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_npm_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_npm_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_npm_package request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists python packages. - # - # @overload list_python_packages(request, options = nil) - # Pass arguments to `list_python_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_python_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose python packages will be - # listed. - # @param page_size [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new - # - # # Call the list_python_packages method. - # result = client.list_python_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. - # p item - # end - # - def list_python_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_python_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_python_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_python_packages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, "python_packages", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a python package. - # - # @overload get_python_package(request, options = nil) - # Pass arguments to `get_python_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_python_package(name: nil) - # Pass arguments to `get_python_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the python package. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new - # - # # Call the get_python_package method. - # result = client.get_python_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. - # p result - # - def get_python_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_python_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_python_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_python_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_python_package request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_apt_artifacts(request, options = nil) - # Pass arguments to `import_apt_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_apt_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new - # - # # Call the import_apt_artifacts method. - # result = client.import_apt_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_apt_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_apt_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.import_apt_artifacts request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_yum_artifacts(request, options = nil) - # Pass arguments to `import_yum_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_yum_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new - # - # # Call the import_yum_artifacts method. - # result = client.import_yum_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_yum_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_yum_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.import_yum_artifacts request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists repositories. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose repositories will be - # listed. - # @param page_size [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # - # Examples of using a filter: - # - # To filter the results of your request to repositories with the name - # `my-repo` in project `my-project` in the `us-central` region, append the - # following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - # @param order_by [::String] - # Optional. The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new - # - # # Call the list_repositories method. - # result = client.list_repositories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Repository. - # p item - # end - # - def list_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_repositories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_repositories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_repositories, "repositories", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - # p result - # - def get_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_repository request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_repository(parent: nil, repository_id: nil, repository: nil) - # Pass arguments to `create_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the repository will be - # created. - # @param repository_id [::String] - # Required. The repository id to use for this repository. - # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] - # Required. The repository to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new - # - # # Call the create_repository method. - # result = client.create_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_repository request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_repository(repository: nil, update_mask: nil) - # Pass arguments to `update_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash] - # The repository that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - # p result - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_repository request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_repository(name: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new - # - # # Call the delete_repository method. - # result = client.delete_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_repository request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists packages. - # - # @overload list_packages(request, options = nil) - # Pass arguments to `list_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose packages will be listed. - # @param page_size [::Integer] - # The maximum number of packages to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to packages with the name - # `my-package` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - # - # To filter the results of your request to packages with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request": - # - # * `"annotations.external_link:external_link_value"` - # - # To filter the results just for a specific annotation key `external_link`, - # append the following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to packages with the annotation key-value pair - # [`external.link`:`https://example.com/my-package`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-package`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @param order_by [::String] - # Optional. The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new - # - # # Call the list_packages method. - # result = client.list_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. - # p item - # end - # - def list_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_packages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_packages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a package. - # - # @overload get_package(request, options = nil) - # Pass arguments to `get_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_package(name: nil) - # Pass arguments to `get_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the package to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new - # - # # Call the get_package method. - # result = client.get_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - # p result - # - def get_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_package request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - # - # @overload delete_package(request, options = nil) - # Pass arguments to `delete_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_package(name: nil) - # Pass arguments to `delete_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the package to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new - # - # # Call the delete_package method. - # result = client.delete_package request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_package request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists versions. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil) - # Pass arguments to `list_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose versions will be listed. - # @param page_size [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # @param order_by [::String] - # Optional. The field to order the results by. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to versions with the name - # `my-version` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - # - # To filter the results of your request to versions with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to versions with the annotation key-value pair - # [`external.link`:`https://example.com/my-version`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-version`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_versions, "versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a version - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the version to retrieve. - # @param view [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_version(name: nil, force: nil) - # Pass arguments to `delete_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the version to delete. - # @param force [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes multiple versions across a repository. The returned operation will - # complete once the versions have been deleted. - # - # @overload batch_delete_versions(request, options = nil) - # Pass arguments to `batch_delete_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_delete_versions(parent: nil, names: nil, validate_only: nil) - # Pass arguments to `batch_delete_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the repository holding all requested versions. - # @param names [::Array<::String>] - # Required. The names of the versions to delete. - # The maximum number of versions deleted per batch is determined by the - # service and is dependent on the available resources in the region. - # @param validate_only [::Boolean] - # If true, the request is performed without deleting data, following AIP-163. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new - # - # # Call the batch_delete_versions method. - # result = client.batch_delete_versions request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_delete_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_delete_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_delete_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_delete_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.batch_delete_versions request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a version. - # - # @overload update_version(request, options = nil) - # Pass arguments to `update_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_version(version: nil, update_mask: nil) - # Pass arguments to `update_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash] - # Required. The Version that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new - # - # # Call the update_version method. - # result = client.update_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - # p result - # - def update_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists files. - # - # @overload list_files(request, options = nil) - # Pass arguments to `list_files` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the repository whose files will be listed. For - # example: "projects/p1/locations/us-central1/repositories/repo1 - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to files with the name `my_file.txt` - # in project `my-project` in the `us-central` region, in repository - # `my-repo`, append the following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - # - # To filter the results of your request to files owned by the version `1.0` - # in package `pkg1`, append the following filter expression to your request: - # - # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # - # To filter the results of your request to files with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to files with the annotation key-value pair - # [`external.link`:`https://example.com/my-file`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-file`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @param page_size [::Integer] - # The maximum number of files to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param order_by [::String] - # The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::File>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new - # - # # Call the list_files method. - # result = client.list_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. - # p item - # end - # - def list_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_files.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_files request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a file. - # - # @overload get_file(request, options = nil) - # Pass arguments to `get_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_file(name: nil) - # Pass arguments to `get_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the file to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new - # - # # Call the get_file method. - # result = client.get_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - # p result - # - def get_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_file request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a file and all of its content. It is only allowed on generic - # repositories. The returned operation will complete once the file has been - # deleted. - # - # @overload delete_file(request, options = nil) - # Pass arguments to `delete_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_file(name: nil) - # Pass arguments to `delete_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the file to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new - # - # # Call the delete_file method. - # result = client.delete_file request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_file request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a file. - # - # @overload update_file(request, options = nil) - # Pass arguments to `update_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_file(file: nil, update_mask: nil) - # Pass arguments to `update_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash] - # Required. The File that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new - # - # # Call the update_file method. - # result = client.update_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - # p result - # - def update_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_file request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tags. - # - # @overload list_tags(request, options = nil) - # Pass arguments to `list_tags` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tags` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent package whose tags will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `version` - # - # Examples of using a filter: - # - # To filter the results of your request to tags with the name `my-tag` in - # package `my-package` in repository `my-repo` in project "`y-project` in - # the us-central region, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - # - # To filter the results of your request to tags applied to the version - # `1.0` in package `my-package`, append the following filter expression to - # your request: - # - # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # @param page_size [::Integer] - # The maximum number of tags to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new - # - # # Call the list_tags method. - # result = client.list_tags request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. - # p item - # end - # - def list_tags request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tags.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tags.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tags.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_tags request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a tag. - # - # @overload get_tag(request, options = nil) - # Pass arguments to `get_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_tag(name: nil) - # Pass arguments to `get_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new - # - # # Call the get_tag method. - # result = client.get_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def get_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_tag request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a tag. - # - # @overload create_tag(request, options = nil) - # Pass arguments to `create_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_tag(parent: nil, tag_id: nil, tag: nil) - # Pass arguments to `create_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource where the tag will be created. - # @param tag_id [::String] - # The tag id to use for this repository. - # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] - # The tag to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new - # - # # Call the create_tag method. - # result = client.create_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def create_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_tag request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a tag. - # - # @overload update_tag(request, options = nil) - # Pass arguments to `update_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_tag(tag: nil, update_mask: nil) - # Pass arguments to `update_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash] - # The tag that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new - # - # # Call the update_tag method. - # result = client.update_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - # p result - # - def update_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_tag request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a tag. - # - # @overload delete_tag(request, options = nil) - # Pass arguments to `delete_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_tag(name: nil) - # Pass arguments to `delete_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new - # - # # Call the delete_tag method. - # result = client.delete_tag request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_tag request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_rule(parent: nil, rule_id: nil, rule: nil) - # Pass arguments to `create_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the rule will be created. - # @param rule_id [::String] - # The rule id to use for this repository. - # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] - # The rule to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_rules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent repository whose rules will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1`. - # @param page_size [::Integer] - # The maximum number of rules to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_rules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_rules, "rules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_rule(name: nil) - # Pass arguments to `get_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash] - # The rule that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_rule(name: nil) - # Pass arguments to `delete_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the IAM policy for a given resource. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for a given resource. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Tests if the caller has a list of permissions on a resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the Settings for the Project. - # - # @overload get_project_settings(request, options = nil) - # Pass arguments to `get_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_project_settings(name: nil) - # Pass arguments to `get_project_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the projectSettings resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new - # - # # Call the get_project_settings method. - # result = client.get_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - # p result - # - def get_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_project_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_project_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Settings for the Project. - # - # @overload update_project_settings(request, options = nil) - # Pass arguments to `update_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_project_settings(project_settings: nil, update_mask: nil) - # Pass arguments to `update_project_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash] - # The project settings. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new - # - # # Call the update_project_settings method. - # result = client.update_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - # p result - # - def update_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_project_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_project_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the VPCSC Config for the Project. - # - # @overload get_vpcsc_config(request, options = nil) - # Pass arguments to `get_vpcsc_config` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_vpcsc_config(name: nil) - # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the VPCSCConfig resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new - # - # # Call the get_vpcsc_config method. - # result = client.get_vpcsc_config request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - # p result - # - def get_vpcsc_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_vpcsc_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_vpcsc_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_vpcsc_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the VPCSC Config for the Project. - # - # @overload update_vpcsc_config(request, options = nil) - # Pass arguments to `update_vpcsc_config` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil) - # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash] - # The project config. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new - # - # # Call the update_vpcsc_config method. - # result = client.update_vpcsc_config request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - # p result - # - def update_vpcsc_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_vpcsc_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vpcsc_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_vpcsc_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a package. - # - # @overload update_package(request, options = nil) - # Pass arguments to `update_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_package(package: nil, update_mask: nil) - # Pass arguments to `update_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash] - # The package that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new - # - # # Call the update_package method. - # result = client.update_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - # p result - # - def update_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_package request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists attachments. - # - # @overload list_attachments(request, options = nil) - # Pass arguments to `list_attachments` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attachments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose attachments will be listed. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `target` - # * `type` - # * `attachment_namespace` - # @param page_size [::Integer] - # The maximum number of attachments to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new - # - # # Call the list_attachments method. - # result = client.list_attachments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. - # p item - # end - # - def list_attachments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_attachments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_attachments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_attachments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_attachments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_attachments, "attachments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an attachment. - # - # @overload get_attachment(request, options = nil) - # Pass arguments to `get_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_attachment(name: nil) - # Pass arguments to `get_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the attachment to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new - # - # # Call the get_attachment method. - # result = client.get_attachment request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. - # p result - # - def get_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_attachment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an attachment. The returned Operation will finish once the - # attachment has been created. Its response will be the created attachment. - # - # @overload create_attachment(request, options = nil) - # Pass arguments to `create_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil) - # Pass arguments to `create_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the attachment will be - # created. - # @param attachment_id [::String] - # Required. The attachment id to use for this attachment. - # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash] - # Required. The attachment to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new - # - # # Call the create_attachment method. - # result = client.create_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_attachment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an attachment. The returned Operation will - # finish once the attachments has been deleted. It will not have any - # Operation metadata and will return a `google.protobuf.Empty` response. - # - # @overload delete_attachment(request, options = nil) - # Pass arguments to `delete_attachment` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_attachment(name: nil) - # Pass arguments to `delete_attachment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the attachment to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new - # - # # Call the delete_attachment method. - # result = client.delete_attachment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_attachment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_attachment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_attachment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_attachment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_attachment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports an artifact to a Cloud Storage bucket. - # - # @overload export_artifact(request, options = nil) - # Pass arguments to `export_artifact` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_artifact(source_version: nil, source_tag: nil, gcs_path: nil, repository: nil) - # Pass arguments to `export_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source_version [::String] - # The artifact version to export. - # Format: - # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} - # - # Note: The following parameters are mutually exclusive: `source_version`, `source_tag`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param source_tag [::String] - # The artifact tag to export. - # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} - # - # Note: The following parameters are mutually exclusive: `source_tag`, `source_version`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param gcs_path [::String] - # The Cloud Storage path to export the artifact to. Should start with the - # bucket name, and optionally have a directory path. Examples: - # `dst_bucket`, `dst_bucket/sub_dir`. - # Existing objects with the same path will be overwritten. - # @param repository [::String] - # Required. The repository of the artifact to export. - # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new - # - # # Call the export_artifact method. - # result = client.export_artifact request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.export_artifact request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ArtifactRegistry REST API. - # - # This class represents the configuration for ArtifactRegistry REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_docker_images to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_docker_images.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_docker_images.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ArtifactRegistry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_docker_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_docker_images - ## - # RPC-specific configuration for `get_docker_image` - # @return [::Gapic::Config::Method] - # - attr_reader :get_docker_image - ## - # RPC-specific configuration for `list_maven_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_maven_artifacts - ## - # RPC-specific configuration for `get_maven_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_maven_artifact - ## - # RPC-specific configuration for `list_npm_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_npm_packages - ## - # RPC-specific configuration for `get_npm_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_npm_package - ## - # RPC-specific configuration for `list_python_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_python_packages - ## - # RPC-specific configuration for `get_python_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_python_package - ## - # RPC-specific configuration for `import_apt_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_apt_artifacts - ## - # RPC-specific configuration for `import_yum_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_yum_artifacts - ## - # RPC-specific configuration for `list_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_repositories - ## - # RPC-specific configuration for `get_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :get_repository - ## - # RPC-specific configuration for `create_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :create_repository - ## - # RPC-specific configuration for `update_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :update_repository - ## - # RPC-specific configuration for `delete_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_repository - ## - # RPC-specific configuration for `list_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_packages - ## - # RPC-specific configuration for `get_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_package - ## - # RPC-specific configuration for `delete_package` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_package - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - ## - # RPC-specific configuration for `batch_delete_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_versions - ## - # RPC-specific configuration for `update_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_version - ## - # RPC-specific configuration for `list_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_files - ## - # RPC-specific configuration for `get_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file - ## - # RPC-specific configuration for `delete_file` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_file - ## - # RPC-specific configuration for `update_file` - # @return [::Gapic::Config::Method] - # - attr_reader :update_file - ## - # RPC-specific configuration for `list_tags` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tags - ## - # RPC-specific configuration for `get_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tag - ## - # RPC-specific configuration for `create_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tag - ## - # RPC-specific configuration for `update_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tag - ## - # RPC-specific configuration for `delete_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tag - ## - # RPC-specific configuration for `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `get_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_settings - ## - # RPC-specific configuration for `update_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_settings - ## - # RPC-specific configuration for `get_vpcsc_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vpcsc_config - ## - # RPC-specific configuration for `update_vpcsc_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vpcsc_config - ## - # RPC-specific configuration for `update_package` - # @return [::Gapic::Config::Method] - # - attr_reader :update_package - ## - # RPC-specific configuration for `list_attachments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attachments - ## - # RPC-specific configuration for `get_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attachment - ## - # RPC-specific configuration for `create_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attachment - ## - # RPC-specific configuration for `delete_attachment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attachment - ## - # RPC-specific configuration for `export_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :export_artifact - - # @private - def initialize parent_rpcs = nil - list_docker_images_config = parent_rpcs.list_docker_images if parent_rpcs.respond_to? :list_docker_images - @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config - get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image - @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config - list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts - @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config - get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact - @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config - list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages - @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config - get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package - @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config - list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages - @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config - get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package - @get_python_package = ::Gapic::Config::Method.new get_python_package_config - import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts - @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config - import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts - @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config - list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories - @list_repositories = ::Gapic::Config::Method.new list_repositories_config - get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository - @get_repository = ::Gapic::Config::Method.new get_repository_config - create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository - @create_repository = ::Gapic::Config::Method.new create_repository_config - update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository - @update_repository = ::Gapic::Config::Method.new update_repository_config - delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository - @delete_repository = ::Gapic::Config::Method.new delete_repository_config - list_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages - @list_packages = ::Gapic::Config::Method.new list_packages_config - get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package - @get_package = ::Gapic::Config::Method.new get_package_config - delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package - @delete_package = ::Gapic::Config::Method.new delete_package_config - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions - @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config - update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version - @update_version = ::Gapic::Config::Method.new update_version_config - list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files - @list_files = ::Gapic::Config::Method.new list_files_config - get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file - @get_file = ::Gapic::Config::Method.new get_file_config - delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file - @delete_file = ::Gapic::Config::Method.new delete_file_config - update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file - @update_file = ::Gapic::Config::Method.new update_file_config - list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags - @list_tags = ::Gapic::Config::Method.new list_tags_config - get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag - @get_tag = ::Gapic::Config::Method.new get_tag_config - create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag - @create_tag = ::Gapic::Config::Method.new create_tag_config - update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag - @update_tag = ::Gapic::Config::Method.new update_tag_config - delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag - @delete_tag = ::Gapic::Config::Method.new delete_tag_config - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings - @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config - update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings - @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config - get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config - @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config - update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config - @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config - update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package - @update_package = ::Gapic::Config::Method.new update_package_config - list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments - @list_attachments = ::Gapic::Config::Method.new list_attachments_config - get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment - @get_attachment = ::Gapic::Config::Method.new get_attachment_config - create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment - @create_attachment = ::Gapic::Config::Method.new create_attachment_config - delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment - @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config - export_artifact_config = parent_rpcs.export_artifact if parent_rpcs.respond_to? :export_artifact - @export_artifact = ::Gapic::Config::Method.new export_artifact_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb deleted file mode 100644 index 4c61fedb3bfd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ArtifactRegistry Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb deleted file mode 100644 index 715fb81776d2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +++ /dev/null @@ -1,3149 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/devtools/artifactregistry/v1/service_pb" - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - module Rest - ## - # REST service stub for the ArtifactRegistry service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_docker_images REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse] - # A result object deserialized from the server's reply - def list_docker_images request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_docker_images_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_docker_images", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_docker_image REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage] - # A result object deserialized from the server's reply - def get_docker_image request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_docker_image_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_docker_image", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_maven_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse] - # A result object deserialized from the server's reply - def list_maven_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_maven_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_maven_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_maven_artifact REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact] - # A result object deserialized from the server's reply - def get_maven_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_maven_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_maven_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_npm_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse] - # A result object deserialized from the server's reply - def list_npm_packages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_npm_packages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_npm_packages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_npm_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage] - # A result object deserialized from the server's reply - def get_npm_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_npm_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_npm_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_python_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse] - # A result object deserialized from the server's reply - def list_python_packages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_python_packages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_python_packages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_python_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage] - # A result object deserialized from the server's reply - def get_python_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_python_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_python_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_apt_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_apt_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_apt_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_apt_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_yum_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_yum_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_yum_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_yum_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_repositories REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse] - # A result object deserialized from the server's reply - def list_repositories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_repositories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # A result object deserialized from the server's reply - def get_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Repository.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # A result object deserialized from the server's reply - def update_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Repository.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse] - # A result object deserialized from the server's reply - def list_packages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_packages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_packages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # A result object deserialized from the server's reply - def get_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Package.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse] - # A result object deserialized from the server's reply - def list_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # A result object deserialized from the server's reply - def get_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Version.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_delete_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_delete_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_delete_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # A result object deserialized from the server's reply - def update_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Version.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_files REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse] - # A result object deserialized from the server's reply - def list_files request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_files_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_files", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # A result object deserialized from the server's reply - def get_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::File.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # A result object deserialized from the server's reply - def update_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::File.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tags REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse] - # A result object deserialized from the server's reply - def list_tags request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tags_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tags", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # A result object deserialized from the server's reply - def get_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # A result object deserialized from the server's reply - def create_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # A result object deserialized from the server's reply - def update_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # A result object deserialized from the server's reply - def create_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_rules REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse] - # A result object deserialized from the server's reply - def list_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # A result object deserialized from the server's reply - def get_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # A result object deserialized from the server's reply - def update_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Rule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # A result object deserialized from the server's reply - def get_project_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_project_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_project_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # A result object deserialized from the server's reply - def update_project_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_project_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_project_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_vpcsc_config REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # A result object deserialized from the server's reply - def get_vpcsc_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_vpcsc_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_vpcsc_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_vpcsc_config REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # A result object deserialized from the server's reply - def update_vpcsc_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vpcsc_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_vpcsc_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # A result object deserialized from the server's reply - def update_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Package.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_attachments REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse] - # A result object deserialized from the server's reply - def list_attachments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_attachments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_attachments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # A result object deserialized from the server's reply - def get_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1::Attachment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_attachment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_attachment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_attachment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_artifact REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_docker_images REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_docker_images_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dockerImages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_docker_image REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_docker_image_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/dockerImages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_maven_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_maven_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/mavenArtifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_maven_artifact REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_maven_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/mavenArtifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_npm_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_npm_packages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/npmPackages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_npm_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_npm_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/npmPackages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_python_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_python_packages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/pythonPackages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_python_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_python_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pythonPackages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_apt_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_apt_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/aptArtifacts:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_yum_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_yum_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/yumArtifacts:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_repositories REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_repositories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/repositories", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/repositories", - body: "repository", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{repository.name}", - body: "repository", - matches: [ - ["repository.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_packages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/packages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_delete_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_delete_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/versions:batchDelete", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{version.name}", - body: "version", - matches: [ - ["version.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_files REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_files_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/files", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetFileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{file.name}", - body: "file", - matches: [ - ["file.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tags REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tags_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tags", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tags", - body: "tag", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{tag.name}", - body: "tag", - matches: [ - ["tag.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/rules", - body: "rule", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rules REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rule.name}", - body: "rule", - matches: [ - ["rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_rule REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_project_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/projectSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_project_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{project_settings.name}", - body: "project_settings", - matches: [ - ["project_settings.name", %r{^projects/[^/]+/projectSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_vpcsc_config REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_vpcsc_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/vpcscConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vpcsc_config REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_vpcsc_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{vpcsc_config.name}", - body: "vpcsc_config", - matches: [ - ["vpcsc_config.name", %r{^projects/[^/]+/locations/[^/]+/vpcscConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{package.name}", - body: "package", - matches: [ - ["package.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attachments REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_attachments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attachments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/attachments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/attachments", - body: "attachment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_attachment REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_attachment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/attachments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_artifact REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{repository}:exportArtifact", - body: "*", - matches: [ - ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb deleted file mode 100644 index 5cb15289f659..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module ArtifactRegistry - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/artifact_registry/v1/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ArtifactRegistry"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb deleted file mode 100644 index d0a4958ba59d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/artifact_registry/v1/artifact_registry/rest" -require "google/cloud/artifact_registry/v1/bindings_override" -require "google/cloud/artifact_registry/v1/version" - -module Google - module Cloud - module ArtifactRegistry - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/artifact_registry/v1/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb deleted file mode 100644 index e60f17647d63..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb deleted file mode 100644 index d52d7db02386..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/apt_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1/apt_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xba\x03\n\x0b\x41ptArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x0cpackage_type\x18\x03 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.AptArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcomponent\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ontrol_file\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/AptArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}\"B\n\x1bImportAptArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x8d\x01\n\x19ImportAptArtifactsRequest\x12V\n\ngcs_source\x18\x02 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa2\x01\n\x1bImportAptArtifactsErrorInfo\x12V\n\ngcs_source\x18\x01 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xb7\x01\n\x1aImportAptArtifactsResponse\x12G\n\rapt_artifacts\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.AptArtifact\x12P\n\x06\x65rrors\x18\x02 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo\"\x1c\n\x1aImportAptArtifactsMetadataB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10\x41ptArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - AptArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.AptArtifact").msgclass - AptArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.AptArtifact.PackageType").enummodule - ImportAptArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource").msgclass - ImportAptArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsRequest").msgclass - ImportAptArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo").msgclass - ImportAptArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsResponse").msgclass - ImportAptArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb deleted file mode 100644 index 37a131ac39a5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/devtools/artifactregistry/v1/artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x04\n\x0b\x44ockerImage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\x18\n\x10image_size_bytes\x18\x04 \x01(\x03\x12/\n\x0bupload_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nmedia_type\x18\x06 \x01(\t\x12.\n\nbuild_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\rartifact_type\x18\t \x01(\t\x12P\n\x0fimage_manifests\x18\x0b \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.ImageManifestB\x03\xe0\x41\x01:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/DockerImage\x12]projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}\"\xb2\x01\n\rImageManifest\x12\x19\n\x0c\x61rchitecture\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x0f\n\x02os\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x64igest\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmedia_type\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nos_version\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bos_features\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07variant\x18\x07 \x01(\tB\x03\xe0\x41\x01\"g\n\x17ListDockerImagesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\"|\n\x18ListDockerImagesResponse\x12G\n\rdocker_images\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.DockerImage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15GetDockerImageRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+artifactregistry.googleapis.com/DockerImage\"\xf5\x02\n\rMavenArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07pom_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08group_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61rtifact_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x96\x01\xea\x41\x92\x01\n-artifactregistry.googleapis.com/MavenArtifact\x12\x61projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}\"\x89\x01\n\x19ListMavenArtifactsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-artifactregistry.googleapis.com/MavenArtifact\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1aListMavenArtifactsResponse\x12K\n\x0fmaven_artifacts\x18\x01 \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.MavenArtifact\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17GetMavenArtifactRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-artifactregistry.googleapis.com/MavenArtifact\"\xd0\x02\n\nNpmPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cpackage_name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x0c\n\x04tags\x18\x05 \x03(\t\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x8d\x01\xea\x41\x89\x01\n*artifactregistry.googleapis.com/NpmPackage\x12[projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}\"\x83\x01\n\x16ListNpmPackagesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/NpmPackage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListNpmPackagesResponse\x12\x45\n\x0cnpm_packages\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.NpmPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetNpmPackageRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/NpmPackage\"\xe0\x02\n\rPythonPackage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cpackage_name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x96\x01\xea\x41\x92\x01\n-artifactregistry.googleapis.com/PythonPackage\x12\x61projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}\"\x89\x01\n\x19ListPythonPackagesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-artifactregistry.googleapis.com/PythonPackage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1aListPythonPackagesResponse\x12K\n\x0fpython_packages\x18\x01 \x03(\x0b\x32\x32.google.devtools.artifactregistry.v1.PythonPackage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17GetPythonPackageRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-artifactregistry.googleapis.com/PythonPackageB\xf8\x01\n\'com.google.devtools.artifactregistry.v1B\rArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - DockerImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DockerImage").msgclass - ImageManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImageManifest").msgclass - ListDockerImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListDockerImagesRequest").msgclass - ListDockerImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListDockerImagesResponse").msgclass - GetDockerImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetDockerImageRequest").msgclass - MavenArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.MavenArtifact").msgclass - ListMavenArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListMavenArtifactsRequest").msgclass - ListMavenArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListMavenArtifactsResponse").msgclass - GetMavenArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetMavenArtifactRequest").msgclass - NpmPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.NpmPackage").msgclass - ListNpmPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListNpmPackagesRequest").msgclass - ListNpmPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListNpmPackagesResponse").msgclass - GetNpmPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetNpmPackageRequest").msgclass - PythonPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.PythonPackage").msgclass - ListPythonPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPythonPackagesRequest").msgclass - ListPythonPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPythonPackagesResponse").msgclass - GetPythonPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetPythonPackageRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb deleted file mode 100644 index 704480588aca..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/attachment.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/devtools/artifactregistry/v1/attachment.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x04\n\nAttachment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x1c\n\x14\x61ttachment_namespace\x18\x04 \x01(\t\x12Z\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.Attachment.AnnotationsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x05\x66iles\x18\x08 \x03(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\x12\x1d\n\x10oci_version_name\x18\t \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8c\x01\xea\x41\x88\x01\n*artifactregistry.googleapis.com/Attachment\x12Zprojects/{project}/locations/{location}/repositories/{repository}/attachments/{attachment}\"\x98\x01\n\x16ListAttachmentsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Attachment\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"x\n\x17ListAttachmentsResponse\x12\x44\n\x0b\x61ttachments\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Attachment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetAttachmentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Attachment\"\xc3\x01\n\x17\x43reateAttachmentRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Attachment\x12\x1a\n\rattachment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\nattachment\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.AttachmentB\x03\xe0\x41\x02\"[\n\x17\x44\x65leteAttachmentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/AttachmentB\xfa\x01\n\'com.google.devtools.artifactregistry.v1B\x0f\x41ttachmentProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Attachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Attachment").msgclass - ListAttachmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListAttachmentsRequest").msgclass - ListAttachmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListAttachmentsResponse").msgclass - GetAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetAttachmentRequest").msgclass - CreateAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateAttachmentRequest").msgclass - DeleteAttachmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteAttachmentRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb deleted file mode 100644 index 314b552fdc62..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/export.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/devtools/artifactregistry/v1/file_pb' -require 'google/devtools/artifactregistry/v1/version_pb' - - -descriptor_data = "\n0google/devtools/artifactregistry/v1/export.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a\x31google/devtools/artifactregistry/v1/version.proto\"\x9d\x02\n\x15\x45xportArtifactRequest\x12\x46\n\x0esource_version\x18\x02 \x01(\tB,\xfa\x41)\n\'artifactregistry.googleapis.com/VersionH\x00\x12>\n\nsource_tag\x18\x04 \x01(\tB(\xfa\x41%\n#artifactregistry.googleapis.com/TagH\x00\x12\x12\n\x08gcs_path\x18\x03 \x01(\tH\x01\x12\x46\n\nrepository\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\x11\n\x0fsource_artifactB\r\n\x0b\x64\x65stination\"`\n\x16\x45xportArtifactResponse\x12\x46\n\x10\x65xported_version\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.Version\"\xa9\x02\n\x16\x45xportArtifactMetadata\x12`\n\x0e\x65xported_files\x18\x01 \x03(\x0b\x32H.google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile\x1a\xac\x01\n\x0c\x45xportedFile\x12\x19\n\x0fgcs_object_path\x18\x02 \x01(\tH\x00\x12\x37\n\x04name\x18\x01 \x01(\tB)\xfa\x41&\n$artifactregistry.googleapis.com/File\x12\x39\n\x06hashes\x18\x03 \x03(\x0b\x32).google.devtools.artifactregistry.v1.HashB\r\n\x0b\x64\x65stinationB\xf6\x01\n\'com.google.devtools.artifactregistry.v1B\x0b\x45xportProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - ExportArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactRequest").msgclass - ExportArtifactResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactResponse").msgclass - ExportArtifactMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactMetadata").msgclass - ExportArtifactMetadata::ExportedFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ExportArtifactMetadata.ExportedFile").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb deleted file mode 100644 index 18141ebfddc3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/file.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/devtools/artifactregistry/v1/file.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x01\n\x04Hash\x12@\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.devtools.artifactregistry.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\"M\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\x12\x11\n\rDIRSUM_SHA256\x10\x03\"\x98\x04\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\x12\x39\n\x06hashes\x18\x04 \x03(\x0b\x32).google.devtools.artifactregistry.v1.Hash\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\r\n\x05owner\x18\x07 \x01(\t\x12\x33\n\nfetch_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x0b\x61nnotations\x18\t \x03(\x0b\x32:.google.devtools.artifactregistry.v1.File.AnnotationsEntryB\x03\xe0\x41\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:y\xea\x41v\n$artifactregistry.googleapis.com/File\x12Nprojects/{project}/locations/{location}/repositories/{repository}/files/{file}\"\x99\x01\n\x10ListFilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/File\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"f\n\x11ListFilesResponse\x12\x38\n\x05\x66iles\x18\x01 \x03(\x0b\x32).google.devtools.artifactregistry.v1.File\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x0eGetFileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\"O\n\x11\x44\x65leteFileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/File\"\x87\x01\n\x11UpdateFileRequest\x12<\n\x04\x66ile\x18\x01 \x01(\x0b\x32).google.devtools.artifactregistry.v1.FileB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x42\xf4\x01\n\'com.google.devtools.artifactregistry.v1B\tFileProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Hash").msgclass - Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Hash.HashType").enummodule - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.File").msgclass - ListFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListFilesRequest").msgclass - ListFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListFilesResponse").msgclass - GetFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetFileRequest").msgclass - DeleteFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteFileRequest").msgclass - UpdateFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateFileRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb deleted file mode 100644 index 4834b13eda56..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/generic.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/devtools/artifactregistry/v1/generic.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x02\n\x0fGenericArtifact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x9c\x01\xea\x41\x98\x01\n/artifactregistry.googleapis.com/GenericArtifact\x12\x65projects/{project}/locations/{location}/repositories/{repository}/genericArtifacts/{generic_artifact}B\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cGenericProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - GenericArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GenericArtifact").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb deleted file mode 100644 index a68f52f8871f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/go.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/devtools/artifactregistry/v1/go.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x02\n\x08GoModule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x87\x01\xea\x41\x83\x01\n(artifactregistry.googleapis.com/GoModule\x12Wprojects/{project}/locations/{location}/repositories/{repository}/goModules/{go_module}B\xf2\x01\n\'com.google.devtools.artifactregistry.v1B\x07GoProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - GoModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GoModule").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb deleted file mode 100644 index dfa39a394c4e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/kfp_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1/kfp_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc4\x01\n\x0bKfpArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07version\x18\x02 \x01(\t:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/KfpArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/kfpArtifacts/{kfp_artifact}B\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10KfpArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - KfpArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.KfpArtifact").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb deleted file mode 100644 index 40d4e366eaf5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/package.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/devtools/artifactregistry/v1/package.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x03\n\x07Package\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12W\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32=.google.devtools.artifactregistry.v1.Package.AnnotationsEntryB\x03\xe0\x41\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x82\x01\xea\x41\x7f\n\'artifactregistry.googleapis.com/Package\x12Tprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}\"\xa9\x01\n\x13ListPackagesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'artifactregistry.googleapis.com/Package\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"o\n\x14ListPackagesResponse\x12>\n\x08packages\x18\x01 \x03(\x0b\x32,.google.devtools.artifactregistry.v1.Package\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x11GetPackageRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Package\"U\n\x14\x44\x65letePackageRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Package\"\x86\x01\n\x14UpdatePackageRequest\x12=\n\x07package\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.Package\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cPackageProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Package").msgclass - ListPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPackagesRequest").msgclass - ListPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListPackagesResponse").msgclass - GetPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetPackageRequest").msgclass - DeletePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeletePackageRequest").msgclass - UpdatePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdatePackageRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb deleted file mode 100644 index a2d3a43bb3f2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/repository.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/devtools/artifactregistry/v1/repository.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"s\n\x0eUpstreamPolicy\x12\n\n\x02id\x18\x01 \x01(\t\x12\x43\n\nrepository\x18\x02 \x01(\tB/\xfa\x41,\n*artifactregistry.googleapis.com/Repository\x12\x10\n\x08priority\x18\x03 \x01(\x05\"\xa8\x03\n\x16\x43leanupPolicyCondition\x12\\\n\ttag_state\x18\x02 \x01(\x0e\x32\x44.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagStateH\x00\x88\x01\x01\x12\x14\n\x0ctag_prefixes\x18\x03 \x03(\t\x12\x1d\n\x15version_name_prefixes\x18\x04 \x03(\t\x12\x1d\n\x15package_name_prefixes\x18\x05 \x03(\t\x12\x32\n\nolder_than\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationH\x01\x88\x01\x01\x12\x32\n\nnewer_than\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationH\x02\x88\x01\x01\"H\n\x08TagState\x12\x19\n\x15TAG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06TAGGED\x10\x01\x12\x0c\n\x08UNTAGGED\x10\x02\x12\x07\n\x03\x41NY\x10\x03\x42\x0c\n\n_tag_stateB\r\n\x0b_older_thanB\r\n\x0b_newer_than\"h\n\x1f\x43leanupPolicyMostRecentVersions\x12\x1d\n\x15package_name_prefixes\x18\x01 \x03(\t\x12\x17\n\nkeep_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\r\n\x0b_keep_count\"\xe8\x02\n\rCleanupPolicy\x12P\n\tcondition\x18\x02 \x01(\x0b\x32;.google.devtools.artifactregistry.v1.CleanupPolicyConditionH\x00\x12\x64\n\x14most_recent_versions\x18\x04 \x01(\x0b\x32\x44.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsH\x00\x12\n\n\x02id\x18\x01 \x01(\t\x12I\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x39.google.devtools.artifactregistry.v1.CleanupPolicy.Action\"6\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04KEEP\x10\x02\x42\x10\n\x0e\x63ondition_type\"i\n\x17VirtualRepositoryConfig\x12N\n\x11upstream_policies\x18\x01 \x03(\x0b\x32\x33.google.devtools.artifactregistry.v1.UpstreamPolicy\"\xcd\x1f\n\x16RemoteRepositoryConfig\x12i\n\x11\x64ocker_repository\x18\x02 \x01(\x0b\x32L.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryH\x00\x12g\n\x10maven_repository\x18\x03 \x01(\x0b\x32K.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryH\x00\x12\x63\n\x0enpm_repository\x18\x04 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryH\x00\x12i\n\x11python_repository\x18\x05 \x01(\x0b\x32L.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryH\x00\x12\x63\n\x0e\x61pt_repository\x18\x06 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryH\x00\x12\x63\n\x0eyum_repository\x18\x07 \x01(\x0b\x32I.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryH\x00\x12o\n\x11\x63ommon_repository\x18\x0e \x01(\x0b\x32R.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepositoryH\x00\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12r\n\x14upstream_credentials\x18\t \x01(\x0b\x32O.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentialsB\x03\xe0\x41\x01\x12(\n\x1b\x64isable_upstream_validation\x18\x0c \x01(\x08\x42\x03\xe0\x41\x04\x1a\xbf\x02\n\x13UpstreamCredentials\x12\x94\x01\n\x1dusername_password_credentials\x18\x01 \x01(\x0b\x32k.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentialsH\x00\x1a\x81\x01\n\x1bUsernamePasswordCredentials\x12\x10\n\x08username\x18\x01 \x01(\t\x12P\n\x17password_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionB\r\n\x0b\x63redentials\x1a\xfe\x02\n\x10\x44ockerRepository\x12z\n\x11public_repository\x18\x01 \x01(\x0e\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepositoryH\x00\x12z\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"E\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x0e\n\nDOCKER_HUB\x10\x01\x42\n\n\x08upstream\x1a\xfe\x02\n\x0fMavenRepository\x12y\n\x11public_repository\x18\x01 \x01(\x0e\x32\\.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepositoryH\x00\x12y\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32\\.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"H\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x11\n\rMAVEN_CENTRAL\x10\x01\x42\n\n\x08upstream\x1a\xf0\x02\n\rNpmRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0e\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"@\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\t\n\x05NPMJS\x10\x01\x42\n\n\x08upstream\x1a\xf8\x02\n\x10PythonRepository\x12z\n\x11public_repository\x18\x01 \x01(\x0e\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepositoryH\x00\x12z\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32].google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepositoryH\x00\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\t\"?\n\x10PublicRepository\x12!\n\x1dPUBLIC_REPOSITORY_UNSPECIFIED\x10\x00\x12\x08\n\x04PYPI\x10\x01\x42\n\n\x08upstream\x1a\xc1\x04\n\rAptRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepositoryH\x00\x1a\x90\x02\n\x10PublicRepository\x12\x82\x01\n\x0frepository_base\x18\x01 \x01(\x0e\x32i.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase\x12\x17\n\x0frepository_path\x18\x02 \x01(\t\"^\n\x0eRepositoryBase\x12\x1f\n\x1bREPOSITORY_BASE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45\x42IAN\x10\x01\x12\n\n\x06UBUNTU\x10\x02\x12\x13\n\x0f\x44\x45\x42IAN_SNAPSHOT\x10\x03\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\tB\n\n\x08upstream\x1a\xed\x04\n\rYumRepository\x12w\n\x11public_repository\x18\x01 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepositoryH\x00\x12w\n\x11\x63ustom_repository\x18\x03 \x01(\x0b\x32Z.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepositoryH\x00\x1a\xbc\x02\n\x10PublicRepository\x12\x82\x01\n\x0frepository_base\x18\x01 \x01(\x0e\x32i.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase\x12\x17\n\x0frepository_path\x18\x02 \x01(\t\"\x89\x01\n\x0eRepositoryBase\x12\x1f\n\x1bREPOSITORY_BASE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43\x45NTOS\x10\x01\x12\x10\n\x0c\x43\x45NTOS_DEBUG\x10\x02\x12\x10\n\x0c\x43\x45NTOS_VAULT\x10\x03\x12\x11\n\rCENTOS_STREAM\x10\x04\x12\t\n\x05ROCKY\x10\x05\x12\x08\n\x04\x45PEL\x10\x06\x1a\x1f\n\x10\x43ustomRepository\x12\x0b\n\x03uri\x18\x01 \x01(\tB\n\n\x08upstream\x1a*\n\x16\x43ommonRemoteRepository\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0f\n\rremote_source\"\xbf\x14\n\nRepository\x12]\n\x0cmaven_config\x18\t \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigH\x00\x12_\n\rdocker_config\x18\x11 \x01(\x0b\x32\x46.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigH\x00\x12\x61\n\x19virtual_repository_config\x18\x0e \x01(\x0b\x32<.google.devtools.artifactregistry.v1.VirtualRepositoryConfigH\x01\x12_\n\x18remote_repository_config\x18\x0f \x01(\x0b\x32;.google.devtools.artifactregistry.v1.RemoteRepositoryConfigH\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x36.google.devtools.artifactregistry.v1.Repository.FormatB\x03\xe0\x41\x01\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12K\n\x06labels\x18\x04 \x03(\x0b\x32;.google.devtools.artifactregistry.v1.Repository.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x12G\n\x04mode\x18\n \x01(\x0e\x32\x34.google.devtools.artifactregistry.v1.Repository.ModeB\x03\xe0\x41\x01\x12\x63\n\x10\x63leanup_policies\x18\x0c \x03(\x0b\x32\x44.google.devtools.artifactregistry.v1.Repository.CleanupPoliciesEntryB\x03\xe0\x41\x01\x12\x17\n\nsize_bytes\x18\r \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12#\n\x16\x63leanup_policy_dry_run\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\x1dvulnerability_scanning_config\x18\x13 \x01(\x0b\x32K.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfigB\x03\xe0\x41\x01\x12&\n\x19\x64isallow_unspecified_mode\x18\x15 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzi\x18\x16 \x01(\x08\x42\x03\xe0\x41\x03\x12\x19\n\x0cregistry_uri\x18\x1a \x01(\tB\x03\xe0\x41\x03\x1a\xf3\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12k\n\x0eversion_policy\x18\x02 \x01(\x0e\x32S.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a\x30\n\x16\x44ockerRepositoryConfig\x12\x16\n\x0eimmutable_tags\x18\x01 \x01(\x08\x1a\xc7\x04\n\x1bVulnerabilityScanningConfig\x12|\n\x11\x65nablement_config\x18\x01 \x01(\x0e\x32\\.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfigB\x03\xe0\x41\x01\x12\x39\n\x10last_enable_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12z\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32[.google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementStateB\x03\xe0\x41\x03\x12$\n\x17\x65nablement_state_reason\x18\x04 \x01(\tB\x03\xe0\x41\x03\"R\n\x10\x45nablementConfig\x12!\n\x1d\x45NABLEMENT_CONFIG_UNSPECIFIED\x10\x00\x12\r\n\tINHERITED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"y\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14SCANNING_UNSUPPORTED\x10\x01\x12\x15\n\x11SCANNING_DISABLED\x10\x02\x12\x13\n\x0fSCANNING_ACTIVE\x10\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aj\n\x14\x43leanupPoliciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.devtools.artifactregistry.v1.CleanupPolicy:\x02\x38\x01\"\x86\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08\x12\x07\n\x03KFP\x10\t\x12\x06\n\x02GO\x10\n\x12\x0b\n\x07GENERIC\x10\x0b\x12\x08\n\x04RUBY\x10\x0c\"d\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13STANDARD_REPOSITORY\x10\x01\x12\x16\n\x12VIRTUAL_REPOSITORY\x10\x02\x12\x15\n\x11REMOTE_REPOSITORY\x10\x03:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_configB\r\n\x0bmode_config\"\xb0\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x18ListRepositoriesResponse\x12\x45\n\x0crepositories\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xc3\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x1a\n\rrepository_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\nrepository\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.RepositoryB\x03\xe0\x41\x02\"\x8f\x01\n\x17UpdateRepositoryRequest\x12\x43\n\nrepository\x18\x01 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\xe7\x03\n\'com.google.devtools.artifactregistry.v1B\x0fRepositoryProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - UpstreamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpstreamPolicy").msgclass - CleanupPolicyCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyCondition").msgclass - CleanupPolicyCondition::TagState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState").enummodule - CleanupPolicyMostRecentVersions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions").msgclass - CleanupPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicy").msgclass - CleanupPolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CleanupPolicy.Action").enummodule - VirtualRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VirtualRepositoryConfig").msgclass - RemoteRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig").msgclass - RemoteRepositoryConfig::UpstreamCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials").msgclass - RemoteRepositoryConfig::UpstreamCredentials::UsernamePasswordCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials").msgclass - RemoteRepositoryConfig::DockerRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository").msgclass - RemoteRepositoryConfig::DockerRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.CustomRepository").msgclass - RemoteRepositoryConfig::DockerRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository").enummodule - RemoteRepositoryConfig::MavenRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository").msgclass - RemoteRepositoryConfig::MavenRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.CustomRepository").msgclass - RemoteRepositoryConfig::MavenRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository").enummodule - RemoteRepositoryConfig::NpmRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository").msgclass - RemoteRepositoryConfig::NpmRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.CustomRepository").msgclass - RemoteRepositoryConfig::NpmRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository").enummodule - RemoteRepositoryConfig::PythonRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository").msgclass - RemoteRepositoryConfig::PythonRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.CustomRepository").msgclass - RemoteRepositoryConfig::PythonRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository").enummodule - RemoteRepositoryConfig::AptRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository").msgclass - RemoteRepositoryConfig::AptRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository").msgclass - RemoteRepositoryConfig::AptRepository::PublicRepository::RepositoryBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase").enummodule - RemoteRepositoryConfig::AptRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.CustomRepository").msgclass - RemoteRepositoryConfig::YumRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository").msgclass - RemoteRepositoryConfig::YumRepository::PublicRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository").msgclass - RemoteRepositoryConfig::YumRepository::PublicRepository::RepositoryBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase").enummodule - RemoteRepositoryConfig::YumRepository::CustomRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.CustomRepository").msgclass - RemoteRepositoryConfig::CommonRemoteRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.RemoteRepositoryConfig.CommonRemoteRepository").msgclass - Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository").msgclass - Repository::MavenRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig").msgclass - Repository::MavenRepositoryConfig::VersionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy").enummodule - Repository::DockerRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig").msgclass - Repository::VulnerabilityScanningConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig").msgclass - Repository::VulnerabilityScanningConfig::EnablementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementConfig").enummodule - Repository::VulnerabilityScanningConfig::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.VulnerabilityScanningConfig.EnablementState").enummodule - Repository::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.Format").enummodule - Repository::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Repository.Mode").enummodule - ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRepositoriesRequest").msgclass - ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRepositoriesResponse").msgclass - GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetRepositoryRequest").msgclass - CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateRepositoryRequest").msgclass - UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateRepositoryRequest").msgclass - DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteRepositoryRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb deleted file mode 100644 index 4bac0fc5a283..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/rule.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n.google/devtools/artifactregistry/v1/rule.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\"\xc5\x03\n\x04Rule\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.Rule.Action\x12\x46\n\toperation\x18\x03 \x01(\x0e\x32\x33.google.devtools.artifactregistry.v1.Rule.Operation\x12)\n\tcondition\x18\x04 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x12\n\npackage_id\x18\x05 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\"4\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44OWNLOAD\x10\x01:y\xea\x41v\n$artifactregistry.googleapis.com/Rule\x12Nprojects/{project}/locations/{location}/repositories/{repository}/rules/{rule}\"w\n\x10ListRulesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"f\n\x11ListRulesResponse\x12\x38\n\x05rules\x18\x01 \x03(\x0b\x32).google.devtools.artifactregistry.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x0eGetRuleRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/Rule\"\x9b\x01\n\x11\x43reateRuleRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$artifactregistry.googleapis.com/Rule\x12\x0f\n\x07rule_id\x18\x02 \x01(\t\x12\x37\n\x04rule\x18\x03 \x01(\x0b\x32).google.devtools.artifactregistry.v1.Rule\"}\n\x11UpdateRuleRequest\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.devtools.artifactregistry.v1.Rule\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"O\n\x11\x44\x65leteRuleRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$artifactregistry.googleapis.com/RuleB\xf4\x01\n\'com.google.devtools.artifactregistry.v1B\tRuleProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule").msgclass - Rule::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule.Action").enummodule - Rule::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Rule.Operation").enummodule - ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRulesRequest").msgclass - ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListRulesResponse").msgclass - GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetRuleRequest").msgclass - CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateRuleRequest").msgclass - UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateRuleRequest").msgclass - DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteRuleRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb deleted file mode 100644 index ac3659b2f1e1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/devtools/artifactregistry/v1/apt_artifact_pb' -require 'google/devtools/artifactregistry/v1/artifact_pb' -require 'google/devtools/artifactregistry/v1/attachment_pb' -require 'google/devtools/artifactregistry/v1/export_pb' -require 'google/devtools/artifactregistry/v1/file_pb' -require 'google/devtools/artifactregistry/v1/package_pb' -require 'google/devtools/artifactregistry/v1/repository_pb' -require 'google/devtools/artifactregistry/v1/rule_pb' -require 'google/devtools/artifactregistry/v1/settings_pb' -require 'google/devtools/artifactregistry/v1/tag_pb' -require 'google/devtools/artifactregistry/v1/version_pb' -require 'google/devtools/artifactregistry/v1/vpcsc_config_pb' -require 'google/devtools/artifactregistry/v1/yum_artifact_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n1google/devtools/artifactregistry/v1/service.proto\x12#google.devtools.artifactregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x36google/devtools/artifactregistry/v1/apt_artifact.proto\x1a\x32google/devtools/artifactregistry/v1/artifact.proto\x1a\x34google/devtools/artifactregistry/v1/attachment.proto\x1a\x30google/devtools/artifactregistry/v1/export.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a\x31google/devtools/artifactregistry/v1/package.proto\x1a\x34google/devtools/artifactregistry/v1/repository.proto\x1a.google/devtools/artifactregistry/v1/rule.proto\x1a\x32google/devtools/artifactregistry/v1/settings.proto\x1a-google/devtools/artifactregistry/v1/tag.proto\x1a\x31google/devtools/artifactregistry/v1/version.proto\x1a\x36google/devtools/artifactregistry/v1/vpcsc_config.proto\x1a\x36google/devtools/artifactregistry/v1/yum_artifact.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x13\n\x11OperationMetadata2\xa6Z\n\x10\x41rtifactRegistry\x12\xe1\x01\n\x10ListDockerImages\x12<.google.devtools.artifactregistry.v1.ListDockerImagesRequest\x1a=.google.devtools.artifactregistry.v1.ListDockerImagesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages\x12\xce\x01\n\x0eGetDockerImage\x12:.google.devtools.artifactregistry.v1.GetDockerImageRequest\x1a\x30.google.devtools.artifactregistry.v1.DockerImage\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}\x12\xe9\x01\n\x12ListMavenArtifacts\x12>.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest\x1a?.google.devtools.artifactregistry.v1.ListMavenArtifactsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts\x12\xd6\x01\n\x10GetMavenArtifact\x12<.google.devtools.artifactregistry.v1.GetMavenArtifactRequest\x1a\x32.google.devtools.artifactregistry.v1.MavenArtifact\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}\x12\xdd\x01\n\x0fListNpmPackages\x12;.google.devtools.artifactregistry.v1.ListNpmPackagesRequest\x1a<.google.devtools.artifactregistry.v1.ListNpmPackagesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages\x12\xca\x01\n\rGetNpmPackage\x12\x39.google.devtools.artifactregistry.v1.GetNpmPackageRequest\x1a/.google.devtools.artifactregistry.v1.NpmPackage\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}\x12\xe9\x01\n\x12ListPythonPackages\x12>.google.devtools.artifactregistry.v1.ListPythonPackagesRequest\x1a?.google.devtools.artifactregistry.v1.ListPythonPackagesResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages\x12\xd6\x01\n\x10GetPythonPackage\x12<.google.devtools.artifactregistry.v1.GetPythonPackageRequest\x1a\x32.google.devtools.artifactregistry.v1.PythonPackage\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}\x12\xcb\x02\n\x12ImportAptArtifacts\x12>.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x80\x01\n>google.devtools.artifactregistry.v1.ImportAptArtifactsResponse\x12>google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import:\x01*\x12\xcb\x02\n\x12ImportYumArtifacts\x12>.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x80\x01\n>google.devtools.artifactregistry.v1.ImportYumArtifactsResponse\x12>google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import:\x01*\x12\xd2\x01\n\x10ListRepositories\x12<.google.devtools.artifactregistry.v1.ListRepositoriesRequest\x1a=.google.devtools.artifactregistry.v1.ListRepositoriesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/repositories\x12\xbc\x01\n\rGetRepository\x12\x39.google.devtools.artifactregistry.v1.GetRepositoryRequest\x1a/.google.devtools.artifactregistry.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xc2\x02\n\x10\x43reateRepository\x12<.google.devtools.artifactregistry.v1.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xd0\x01\xca\x41g\n.google.devtools.artifactregistry.v1.Repository\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xeb\x01\n\x10UpdateRepository\x12<.google.devtools.artifactregistry.v1.UpdateRepositoryRequest\x1a/.google.devtools.artifactregistry.v1.Repository\"h\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x82\x02\n\x10\x44\x65leteRepository\x12<.google.devtools.artifactregistry.v1.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xd1\x01\n\x0cListPackages\x12\x38.google.devtools.artifactregistry.v1.ListPackagesRequest\x1a\x39.google.devtools.artifactregistry.v1.ListPackagesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/repositories/*}/packages\x12\xbe\x01\n\nGetPackage\x12\x36.google.devtools.artifactregistry.v1.GetPackageRequest\x1a,.google.devtools.artifactregistry.v1.Package\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/repositories/*/packages/*}\x12\x87\x02\n\rDeletePackage\x12\x39.google.devtools.artifactregistry.v1.DeletePackageRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/repositories/*/packages/*}\x12\xdc\x01\n\x0cListVersions\x12\x38.google.devtools.artifactregistry.v1.ListVersionsRequest\x1a\x39.google.devtools.artifactregistry.v1.ListVersionsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions\x12\xc9\x01\n\nGetVersion\x12\x36.google.devtools.artifactregistry.v1.GetVersionRequest\x1a,.google.devtools.artifactregistry.v1.Version\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\x92\x02\n\rDeleteVersion\x12\x39.google.devtools.artifactregistry.v1.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xbf\x02\n\x13\x42\x61tchDeleteVersions\x12?.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41X\n\x15google.protobuf.Empty\x12?google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02W\"R/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete:\x01*\x12\xef\x01\n\rUpdateVersion\x12\x39.google.devtools.artifactregistry.v1.UpdateVersionRequest\x1a,.google.devtools.artifactregistry.v1.Version\"u\xda\x41\x13version,update_mask\x82\xd3\xe4\x93\x02Y2N/v1/{version.name=projects/*/locations/*/repositories/*/packages/*/versions/*}:\x07version\x12\xc5\x01\n\tListFiles\x12\x35.google.devtools.artifactregistry.v1.ListFilesRequest\x1a\x36.google.devtools.artifactregistry.v1.ListFilesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/files\x12\xb3\x01\n\x07GetFile\x12\x33.google.devtools.artifactregistry.v1.GetFileRequest\x1a).google.devtools.artifactregistry.v1.File\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*/files/**}\x12\xfe\x01\n\nDeleteFile\x12\x36.google.devtools.artifactregistry.v1.DeleteFileRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/files/*}\x12\xcf\x01\n\nUpdateFile\x12\x36.google.devtools.artifactregistry.v1.UpdateFileRequest\x1a).google.devtools.artifactregistry.v1.File\"^\xda\x41\x10\x66ile,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{file.name=projects/*/locations/*/repositories/*/files/*}:\x04\x66ile\x12\xcc\x01\n\x08ListTags\x12\x34.google.devtools.artifactregistry.v1.ListTagsRequest\x1a\x35.google.devtools.artifactregistry.v1.ListTagsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags\x12\xb9\x01\n\x06GetTag\x12\x32.google.devtools.artifactregistry.v1.GetTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xd1\x01\n\tCreateTag\x12\x35.google.devtools.artifactregistry.v1.CreateTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"c\xda\x41\x11parent,tag,tag_id\x82\xd3\xe4\x93\x02I\"B/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags:\x03tag\x12\xd3\x01\n\tUpdateTag\x12\x35.google.devtools.artifactregistry.v1.UpdateTagRequest\x1a(.google.devtools.artifactregistry.v1.Tag\"e\xda\x41\x0ftag,update_mask\x82\xd3\xe4\x93\x02M2F/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}:\x03tag\x12\xad\x01\n\tDeleteTag\x12\x35.google.devtools.artifactregistry.v1.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xcd\x01\n\nCreateRule\x12\x36.google.devtools.artifactregistry.v1.CreateRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"\\\xda\x41\x13parent,rule,rule_id\x82\xd3\xe4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/rules:\x04rule\x12\xc5\x01\n\tListRules\x12\x35.google.devtools.artifactregistry.v1.ListRulesRequest\x1a\x36.google.devtools.artifactregistry.v1.ListRulesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/rules\x12\xb2\x01\n\x07GetRule\x12\x33.google.devtools.artifactregistry.v1.GetRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/repositories/*/rules/*}\x12\xcf\x01\n\nUpdateRule\x12\x36.google.devtools.artifactregistry.v1.UpdateRuleRequest\x1a).google.devtools.artifactregistry.v1.Rule\"^\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{rule.name=projects/*/locations/*/repositories/*/rules/*}:\x04rule\x12\xa5\x01\n\nDeleteRule\x12\x36.google.devtools.artifactregistry.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/rules/*}\x12\x97\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\x94\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"I\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xbd\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\xc0\x01\n\x12GetProjectSettings\x12>.google.devtools.artifactregistry.v1.GetProjectSettingsRequest\x1a\x34.google.devtools.artifactregistry.v1.ProjectSettings\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/v1/{name=projects/*/projectSettings}\x12\x81\x02\n\x15UpdateProjectSettings\x12\x41.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest\x1a\x34.google.devtools.artifactregistry.v1.ProjectSettings\"o\xda\x41\x1cproject_settings,update_mask\x82\xd3\xe4\x93\x02J26/v1/{project_settings.name=projects/*/projectSettings}:\x10project_settings\x12\xbc\x01\n\x0eGetVPCSCConfig\x12:.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest\x1a\x30.google.devtools.artifactregistry.v1.VPCSCConfig\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/vpcscConfig}\x12\xf1\x01\n\x11UpdateVPCSCConfig\x12=.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest\x1a\x30.google.devtools.artifactregistry.v1.VPCSCConfig\"k\xda\x41\x18vpcsc_config,update_mask\x82\xd3\xe4\x93\x02J2:/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}:\x0cvpcsc_config\x12\xe4\x01\n\rUpdatePackage\x12\x39.google.devtools.artifactregistry.v1.UpdatePackageRequest\x1a,.google.devtools.artifactregistry.v1.Package\"j\xda\x41\x13package,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{package.name=projects/*/locations/*/repositories/*/packages/*}:\x07package\x12\xdd\x01\n\x0fListAttachments\x12;.google.devtools.artifactregistry.v1.ListAttachmentsRequest\x1a<.google.devtools.artifactregistry.v1.ListAttachmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/attachments\x12\xca\x01\n\rGetAttachment\x12\x39.google.devtools.artifactregistry.v1.GetAttachmentRequest\x1a/.google.devtools.artifactregistry.v1.Attachment\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/attachments/*}\x12\xd0\x02\n\x10\x43reateAttachment\x12<.google.devtools.artifactregistry.v1.CreateAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\xde\x01\xca\x41g\n.google.devtools.artifactregistry.v1.Attachment\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x1fparent,attachment,attachment_id\x82\xd3\xe4\x93\x02L\">/v1/{parent=projects/*/locations/*/repositories/*}/attachments:\nattachment\x12\x90\x02\n\x10\x44\x65leteAttachment\x12<.google.devtools.artifactregistry.v1.DeleteAttachmentRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41N\n\x15google.protobuf.Empty\x12\x35google.devtools.artifactregistry.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/attachments/*}\x12\xb9\x02\n\x0e\x45xportArtifact\x12:.google.devtools.artifactregistry.v1.ExportArtifactRequest\x1a\x1d.google.longrunning.Operation\"\xcb\x01\xca\x41x\n:google.devtools.artifactregistry.v1.ExportArtifactResponse\x12:google.devtools.artifactregistry.v1.ExportArtifactMetadata\x82\xd3\xe4\x93\x02J\"E/v1/{repository=projects/*/locations/*/repositories/*}:exportArtifact:\x01*\x1a\x8c\x01\xca\x41\x1f\x61rtifactregistry.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cServiceProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb deleted file mode 100644 index cd63f995e427..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +++ /dev/null @@ -1,172 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/devtools/artifactregistry/v1/service.proto for package 'Google.Cloud.ArtifactRegistry.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/devtools/artifactregistry/v1/service_pb' - -module Google - module Cloud - module ArtifactRegistry - module V1 - module ArtifactRegistry - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.devtools.artifactregistry.v1.ArtifactRegistry' - - # Lists docker images. - rpc :ListDockerImages, ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse - # Gets a docker image. - rpc :GetDockerImage, ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Google::Cloud::ArtifactRegistry::V1::DockerImage - # Lists maven artifacts. - rpc :ListMavenArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse - # Gets a maven artifact. - rpc :GetMavenArtifact, ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact - # Lists npm packages. - rpc :ListNpmPackages, ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse - # Gets a npm package. - rpc :GetNpmPackage, ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::NpmPackage - # Lists python packages. - rpc :ListPythonPackages, ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse - # Gets a python package. - rpc :GetPythonPackage, ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::PythonPackage - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - rpc :ImportAptArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, ::Google::Longrunning::Operation - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - rpc :ImportYumArtifacts, ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, ::Google::Longrunning::Operation - # Lists repositories. - rpc :ListRepositories, ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse - # Gets a repository. - rpc :GetRepository, ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1::Repository - # Creates a repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - rpc :CreateRepository, ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, ::Google::Longrunning::Operation - # Updates a repository. - rpc :UpdateRepository, ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1::Repository - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - rpc :DeleteRepository, ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, ::Google::Longrunning::Operation - # Lists packages. - rpc :ListPackages, ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse - # Gets a package. - rpc :GetPackage, ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, ::Google::Cloud::ArtifactRegistry::V1::Package - # Deletes a package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - rpc :DeletePackage, ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, ::Google::Longrunning::Operation - # Lists versions. - rpc :ListVersions, ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse - # Gets a version - rpc :GetVersion, ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, ::Google::Cloud::ArtifactRegistry::V1::Version - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - rpc :DeleteVersion, ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, ::Google::Longrunning::Operation - # Deletes multiple versions across a repository. The returned operation will - # complete once the versions have been deleted. - rpc :BatchDeleteVersions, ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Google::Longrunning::Operation - # Updates a version. - rpc :UpdateVersion, ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Google::Cloud::ArtifactRegistry::V1::Version - # Lists files. - rpc :ListFiles, ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse - # Gets a file. - rpc :GetFile, ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, ::Google::Cloud::ArtifactRegistry::V1::File - # Deletes a file and all of its content. It is only allowed on generic - # repositories. The returned operation will complete once the file has been - # deleted. - rpc :DeleteFile, ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Google::Longrunning::Operation - # Updates a file. - rpc :UpdateFile, ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Google::Cloud::ArtifactRegistry::V1::File - # Lists tags. - rpc :ListTags, ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse - # Gets a tag. - rpc :GetTag, ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag - # Creates a tag. - rpc :CreateTag, ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag - # Updates a tag. - rpc :UpdateTag, ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, ::Google::Cloud::ArtifactRegistry::V1::Tag - # Deletes a tag. - rpc :DeleteTag, ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, ::Google::Protobuf::Empty - # Creates a rule. - rpc :CreateRule, ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule - # Lists rules. - rpc :ListRules, ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse - # Gets a rule. - rpc :GetRule, ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule - # Updates a rule. - rpc :UpdateRule, ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Google::Cloud::ArtifactRegistry::V1::Rule - # Deletes a rule. - rpc :DeleteRule, ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Google::Protobuf::Empty - # Updates the IAM policy for a given resource. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the IAM policy for a given resource. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Tests if the caller has a list of permissions on a resource. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Retrieves the Settings for the Project. - rpc :GetProjectSettings, ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings - # Updates the Settings for the Project. - rpc :UpdateProjectSettings, ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings - # Retrieves the VPCSC Config for the Project. - rpc :GetVPCSCConfig, ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig - # Updates the VPCSC Config for the Project. - rpc :UpdateVPCSCConfig, ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig - # Updates a package. - rpc :UpdatePackage, ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Google::Cloud::ArtifactRegistry::V1::Package - # Lists attachments. - rpc :ListAttachments, ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse - # Gets an attachment. - rpc :GetAttachment, ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Google::Cloud::ArtifactRegistry::V1::Attachment - # Creates an attachment. The returned Operation will finish once the - # attachment has been created. Its response will be the created attachment. - rpc :CreateAttachment, ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Google::Longrunning::Operation - # Deletes an attachment. The returned Operation will - # finish once the attachments has been deleted. It will not have any - # Operation metadata and will return a `google.protobuf.Empty` response. - rpc :DeleteAttachment, ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Google::Longrunning::Operation - # Exports an artifact to a Cloud Storage bucket. - rpc :ExportArtifact, ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb deleted file mode 100644 index 0c2cce6155dc..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/settings.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n2google/devtools/artifactregistry/v1/settings.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x88\x04\n\x0fProjectSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12g\n\x18legacy_redirection_state\x18\x02 \x01(\x0e\x32\x45.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState\x12\x14\n\x0cpull_percent\x18\x03 \x01(\x05\"\x8d\x02\n\x10RedirectionState\x12!\n\x1dREDIRECTION_STATE_UNSPECIFIED\x10\x00\x12$\n REDIRECTION_FROM_GCR_IO_DISABLED\x10\x01\x12#\n\x1fREDIRECTION_FROM_GCR_IO_ENABLED\x10\x02\x12)\n!REDIRECTION_FROM_GCR_IO_FINALIZED\x10\x03\x1a\x02\x08\x01\x12/\n+REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING\x10\x05\x12/\n+REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING\x10\x06:X\xea\x41U\n/artifactregistry.googleapis.com/ProjectSettings\x12\"projects/{project}/projectSettings\"b\n\x19GetProjectSettingsRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/artifactregistry.googleapis.com/ProjectSettings\"\x9f\x01\n\x1cUpdateProjectSettingsRequest\x12N\n\x10project_settings\x18\x02 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1.ProjectSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xf8\x01\n\'com.google.devtools.artifactregistry.v1B\rSettingsProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - ProjectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ProjectSettings").msgclass - ProjectSettings::RedirectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState").enummodule - GetProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetProjectSettingsRequest").msgclass - UpdateProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb deleted file mode 100644 index bb7df2a34734..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/tag.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n-google/devtools/artifactregistry/v1/tag.proto\x12#google.devtools.artifactregistry.v1\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:\x8a\x01\xea\x41\x86\x01\n#artifactregistry.googleapis.com/Tag\x12_projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}\"X\n\x0fListTagsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"c\n\x10ListTagsResponse\x12\x36\n\x04tags\x18\x01 \x03(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1d\n\rGetTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"i\n\x10\x43reateTagRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\x12\x35\n\x03tag\x18\x03 \x01(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\"z\n\x10UpdateTagRequest\x12\x35\n\x03tag\x18\x01 \x01(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\" \n\x10\x44\x65leteTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\xf3\x01\n\'com.google.devtools.artifactregistry.v1B\x08TagProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Tag").msgclass - ListTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListTagsRequest").msgclass - ListTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListTagsResponse").msgclass - GetTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetTagRequest").msgclass - CreateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.CreateTagRequest").msgclass - UpdateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateTagRequest").msgclass - DeleteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteTagRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb deleted file mode 100644 index d391b66a4f6d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/version.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/devtools/artifactregistry/v1/file_pb' -require 'google/devtools/artifactregistry/v1/tag_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/devtools/artifactregistry/v1/version.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/artifactregistry/v1/file.proto\x1a-google/devtools/artifactregistry/v1/tag.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xea\x04\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x0crelated_tags\x18\x07 \x03(\x0b\x32(.google.devtools.artifactregistry.v1.Tag\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.devtools.artifactregistry.v1.Version.AnnotationsEntryB\x03\xe0\x41\x01\x12\x44\n\x0c\x66ingerprints\x18\n \x03(\x0b\x32).google.devtools.artifactregistry.v1.HashB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x96\x01\xea\x41\x92\x01\n\'artifactregistry.googleapis.com/Version\x12gprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}\"\xb8\x01\n\x13ListVersionsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12>\n\x04view\x18\x04 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.VersionView\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x06 \x01(\tB\x03\xe0\x41\x01\"o\n\x14ListVersionsResponse\x12>\n\x08versions\x18\x01 \x03(\x0b\x32,.google.devtools.artifactregistry.v1.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x04view\x18\x02 \x01(\x0e\x32\x30.google.devtools.artifactregistry.v1.VersionView\"3\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"\xb1\x01\n\x1a\x42\x61tchDeleteVersionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xfa\x41)\x12\'artifactregistry.googleapis.com/Version\x12>\n\x05names\x18\x02 \x03(\tB/\xe0\x41\x02\xfa\x41)\n\'artifactregistry.googleapis.com/Version\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"6\n\x1b\x42\x61tchDeleteVersionsMetadata\x12\x17\n\x0f\x66\x61iled_versions\x18\x02 \x03(\t\"\x8b\x01\n\x14UpdateVersionRequest\x12\x42\n\x07version\x18\x01 \x01(\x0b\x32,.google.devtools.artifactregistry.v1.VersionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*@\n\x0bVersionView\x12\x1c\n\x18VERSION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\xf7\x01\n\'com.google.devtools.artifactregistry.v1B\x0cVersionProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.Version").msgclass - ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListVersionsRequest").msgclass - ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ListVersionsResponse").msgclass - GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetVersionRequest").msgclass - DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.DeleteVersionRequest").msgclass - BatchDeleteVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest").msgclass - BatchDeleteVersionsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata").msgclass - UpdateVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateVersionRequest").msgclass - VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VersionView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb deleted file mode 100644 index dbb9ba0543ee..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/vpcsc_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1/vpcsc_config.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x98\x02\n\x0bVPCSCConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\x0cvpcsc_policy\x18\x02 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy\"@\n\x0bVPCSCPolicy\x12\x1c\n\x18VPCSC_POLICY_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44\x45NY\x10\x01\x12\t\n\x05\x41LLOW\x10\x02:e\xea\x41\x62\n+artifactregistry.googleapis.com/VpcscConfig\x12\x33projects/{project}/locations/{location}/vpcscConfig\"Z\n\x15GetVPCSCConfigRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+artifactregistry.googleapis.com/VpcscConfig\"\x93\x01\n\x18UpdateVPCSCConfigRequest\x12\x46\n\x0cvpcsc_config\x18\x01 \x01(\x0b\x32\x30.google.devtools.artifactregistry.v1.VPCSCConfig\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10VPCSCConfigProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - VPCSCConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VPCSCConfig").msgclass - VPCSCConfig::VPCSCPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.VPCSCConfig.VPCSCPolicy").enummodule - GetVPCSCConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.GetVPCSCConfigRequest").msgclass - UpdateVPCSCConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb deleted file mode 100644 index a52fb7f9c0ff..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1/yum_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1/yum_artifact.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x87\x03\n\x0bYumArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12W\n\x0cpackage_type\x18\x03 \x01(\x0e\x32<.google.devtools.artifactregistry.v1.YumArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/YumArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}\"B\n\x1bImportYumArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x8d\x01\n\x19ImportYumArtifactsRequest\x12V\n\ngcs_source\x18\x02 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa2\x01\n\x1bImportYumArtifactsErrorInfo\x12V\n\ngcs_source\x18\x01 \x01(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xb7\x01\n\x1aImportYumArtifactsResponse\x12G\n\ryum_artifacts\x18\x01 \x03(\x0b\x32\x30.google.devtools.artifactregistry.v1.YumArtifact\x12P\n\x06\x65rrors\x18\x02 \x03(\x0b\x32@.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo\"\x1c\n\x1aImportYumArtifactsMetadataB\xfb\x01\n\'com.google.devtools.artifactregistry.v1B\x10YumArtifactProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1 - YumArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.YumArtifact").msgclass - YumArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.YumArtifact.PackageType").enummodule - ImportYumArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource").msgclass - ImportYumArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsRequest").msgclass - ImportYumArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo").msgclass - ImportYumArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsResponse").msgclass - ImportYumArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md deleted file mode 100644 index 94b4fba12369..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Artifact Registry V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb deleted file mode 100644 index a312b90573bf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/apt_artifact.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A detailed representation of an Apt artifact. Information in the record - # is derived from the archive's control file. - # See https://www.debian.org/doc/debian-policy/ch-controlfields.html - # @!attribute [r] name - # @return [::String] - # Output only. The Artifact Registry resource name of the artifact. - # @!attribute [r] package_name - # @return [::String] - # Output only. The Apt package name of the artifact. - # @!attribute [r] package_type - # @return [::Google::Cloud::ArtifactRegistry::V1::AptArtifact::PackageType] - # Output only. An artifact is a binary or source package. - # @!attribute [r] architecture - # @return [::String] - # Output only. Operating system architecture of the artifact. - # @!attribute [r] component - # @return [::String] - # Output only. Repository component of the artifact. - # @!attribute [r] control_file - # @return [::String] - # Output only. Contents of the artifact's control metadata file. - class AptArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Package type is either binary or source. - module PackageType - # Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0 - - # Binary package. - BINARY = 1 - - # Source package. - SOURCE = 2 - end - end - - # Google Cloud Storage location where the artifacts currently reside. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - # @!attribute [rw] use_wildcards - # @return [::Boolean] - # Supports URI wildcards for matching multiple objects from a single URI. - class ImportAptArtifactsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to import new apt artifacts. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource] - # Google Cloud Storage location where input content is located. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the artifacts will be imported. - class ImportAptArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error information explaining why a package was not imported. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource] - # Google Cloud Storage location requested. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The detailed error status. - class ImportAptArtifactsErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message from importing APT artifacts. - # @!attribute [rw] apt_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::AptArtifact>] - # The Apt artifacts imported. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsErrorInfo>] - # Detailed error info for packages that were not imported. - class ImportAptArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata for importing artifacts. - class ImportAptArtifactsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb deleted file mode 100644 index 19aa2ab91f75..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/artifact.rb +++ /dev/null @@ -1,384 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # DockerImage represents a docker artifact. - # The following fields are returned as untyped metadata in the Version - # resource, using camelcase keys (i.e. metadata.imageSizeBytes): - # * imageSizeBytes - # * mediaType - # * buildTime - # @!attribute [rw] name - # @return [::String] - # Required. registry_location, project_id, repository_name and image id forms - # a unique image - # name:`projects//locations//repositories//dockerImages/`. - # For example, - # "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ - # nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", - # where "us-west4" is the registry_location, "test-project" is the - # project_id, "test-repo" is the repository_name and - # "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" - # is the image's digest. - # @!attribute [rw] uri - # @return [::String] - # Required. URL to access the image. - # Example: - # us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf - # @!attribute [rw] tags - # @return [::Array<::String>] - # Tags attached to this image. - # @!attribute [rw] image_size_bytes - # @return [::Integer] - # Calculated size of the image. - # This field is returned as the 'metadata.imageSizeBytes' field in the - # Version resource. - # @!attribute [rw] upload_time - # @return [::Google::Protobuf::Timestamp] - # Time the image was uploaded. - # @!attribute [rw] media_type - # @return [::String] - # Media type of this image, e.g. - # "application/vnd.docker.distribution.manifest.v2+json". - # This field is returned as the 'metadata.mediaType' field in the - # Version resource. - # @!attribute [rw] build_time - # @return [::Google::Protobuf::Timestamp] - # The time this image was built. - # This field is returned as the 'metadata.buildTime' field in the - # Version resource. - # The build time is returned to the client as an RFC 3339 string, which can - # be easily used with the JavaScript Date constructor. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the docker image was last updated. - # @!attribute [rw] artifact_type - # @return [::String] - # ArtifactType of this image, e.g. "application/vnd.example+type". - # If the `subject_digest` is set and no `artifact_type` is given, the - # `media_type` will be considered as the `artifact_type`. This field is - # returned as the `metadata.artifactType` field in the Version resource. - # @!attribute [rw] image_manifests - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImageManifest>] - # Optional. For multi-arch images (manifest lists), this field contains the - # list of image manifests. - class DockerImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of a single image manifest within a multi-arch image. - # @!attribute [rw] architecture - # @return [::String] - # Optional. The CPU architecture of the image. - # Values are provided by the Docker client and are not validated by Artifact - # Registry. Example values include "amd64", "arm64", "ppc64le", "s390x", - # "riscv64", "mips64le", etc. - # @!attribute [rw] os - # @return [::String] - # Optional. The operating system of the image. - # Values are provided by the Docker client and are not validated by Artifact - # Registry. Example values include "linux", "windows", "darwin", "aix", etc. - # @!attribute [rw] digest - # @return [::String] - # Optional. The manifest digest, in the format "sha256:". - # @!attribute [rw] media_type - # @return [::String] - # Optional. The media type of the manifest, e.g., - # "application/vnd.docker.distribution.manifest.v2+json" - # @!attribute [rw] os_version - # @return [::String] - # Optional. The OS version of the image, for example on Windows - # `10.0.14393.1066`. - # @!attribute [rw] os_features - # @return [::Array<::String>] - # Optional. The required OS features for the image, for example on Windows - # `win32k`. - # @!attribute [rw] variant - # @return [::String] - # Optional. The variant of the CPU in the image, for example `v7` to specify - # ARMv7 when architecture is `arm`. - class ImageManifest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list docker images. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose docker images will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] order_by - # @return [::String] - # The field to order the results by. - class ListDockerImagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing docker images. - # @!attribute [rw] docker_images - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::DockerImage>] - # The docker images returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of artifacts, or empty if there are no - # more artifacts to return. - class ListDockerImagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get docker images. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the docker images. - class GetDockerImageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MavenArtifact represents a maven artifact. - # @!attribute [rw] name - # @return [::String] - # Required. registry_location, project_id, repository_name and maven_artifact - # forms a unique artifact For example, - # "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ - # com.google.guava:guava:31.0-jre", - # where "us-west4" is the registry_location, "test-project" is the - # project_id, "test-repo" is the repository_name and - # "com.google.guava:guava:31.0-jre" - # is the maven artifact. - # @!attribute [rw] pom_uri - # @return [::String] - # Required. URL to access the pom file of the artifact. - # Example: - # us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom - # @!attribute [rw] group_id - # @return [::String] - # Group ID for the artifact. - # Example: - # com.google.guava - # @!attribute [rw] artifact_id - # @return [::String] - # Artifact ID for the artifact. - # @!attribute [rw] version - # @return [::String] - # Version of this artifact. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the artifact was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the artifact was updated. - class MavenArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list maven artifacts. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose maven artifacts will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListMavenArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing maven artifacts. - # @!attribute [rw] maven_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>] - # The maven artifacts returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of artifacts, or empty if there are no - # more artifacts to return. - class ListMavenArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get maven artifacts. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the maven artifact. - class GetMavenArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NpmPackage represents an npm artifact. - # @!attribute [rw] name - # @return [::String] - # Required. registry_location, project_id, repository_name and npm_package - # forms a unique package For example, - # "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ - # npm_test:1.0.0", - # where "us-west4" is the registry_location, "test-project" is the - # project_id, "test-repo" is the repository_name and - # npm_test:1.0.0" is the npm package. - # @!attribute [rw] package_name - # @return [::String] - # Package for the artifact. - # @!attribute [rw] version - # @return [::String] - # Version of this package. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Tags attached to this package. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the package was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the package was updated. - class NpmPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list npm packages. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose npm packages will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListNpmPackagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing npm packages. - # @!attribute [rw] npm_packages - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>] - # The npm packages returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of artifacts, or empty if there are no - # more artifacts to return. - class ListNpmPackagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get npm packages. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the npm package. - class GetNpmPackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PythonPackage represents a python artifact. - # @!attribute [rw] name - # @return [::String] - # Required. registry_location, project_id, repository_name and python_package - # forms a unique package - # name:`projects//locations//repository//pythonPackages/`. - # For example, - # "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ - # python_package:1.0.0", - # where "us-west4" is the registry_location, "test-project" is the - # project_id, "test-repo" is the repository_name and - # python_package:1.0.0" is the python package. - # @!attribute [rw] uri - # @return [::String] - # Required. URL to access the package. - # Example: - # us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz - # @!attribute [rw] package_name - # @return [::String] - # Package for the artifact. - # @!attribute [rw] version - # @return [::String] - # Version of this package. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the package was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the package was updated. - class PythonPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list python packages. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose python packages will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListPythonPackagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing python packages. - # @!attribute [rw] python_packages - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>] - # The python packages returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of artifacts, or empty if there are no - # more artifacts to return. - class ListPythonPackagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get python packages. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the python package. - class GetPythonPackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb deleted file mode 100644 index 4f4aa4117723..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/attachment.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # An Attachment refers to additional metadata that can be attached to - # artifacts in Artifact Registry. An attachment consists of one or more files. - # @!attribute [rw] name - # @return [::String] - # The name of the attachment. E.g. - # `projects/p1/locations/us/repositories/repo/attachments/sbom`. - # @!attribute [rw] target - # @return [::String] - # Required. The target the attachment is for, can be a Version, Package or - # Repository. E.g. - # `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. - # @!attribute [rw] type - # @return [::String] - # Type of attachment. - # E.g. `application/vnd.spdx+json` - # @!attribute [rw] attachment_namespace - # @return [::String] - # The namespace this attachment belongs to. - # E.g. If an attachment is created by artifact analysis, namespace is set - # to `artifactanalysis.googleapis.com`. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User annotations. These attributes can only be set and used by - # the user, and not by Artifact Registry. See - # https://google.aip.dev/128#annotations for more details such as format and - # size limitations. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the attachment was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the attachment was last updated. - # @!attribute [rw] files - # @return [::Array<::String>] - # Required. The files that belong to this attachment. - # If the file ID part contains slashes, they are escaped. E.g. - # `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. - # @!attribute [r] oci_version_name - # @return [::String] - # Output only. The name of the OCI version that this attachment created. Only - # populated for Docker attachments. E.g. - # `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. - class Attachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request to list attachments. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose attachments will be listed. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `target` - # * `type` - # * `attachment_namespace` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of attachments to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListAttachmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing attachments. - # @!attribute [rw] attachments - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Attachment>] - # The attachments returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of attachments, or empty if there are - # no more attachments to return. - class ListAttachmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve an attachment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the attachment to retrieve. - class GetAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new attachment. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource where the attachment will be - # created. - # @!attribute [rw] attachment_id - # @return [::String] - # Required. The attachment id to use for this attachment. - # @!attribute [rw] attachment - # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment] - # Required. The attachment to be created. - class CreateAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete an attachment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the attachment to delete. - class DeleteAttachmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb deleted file mode 100644 index a94ff905b658..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/export.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # The request for exporting an artifact to a destination. - # @!attribute [rw] source_version - # @return [::String] - # The artifact version to export. - # Format: - # projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/versions/\\{version} - # - # Note: The following fields are mutually exclusive: `source_version`, `source_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] source_tag - # @return [::String] - # The artifact tag to export. - # Format:projects/\\{project}/locations/\\{location}/repositories/\\{repository}/packages/\\{package}/tags/\\{tag} - # - # Note: The following fields are mutually exclusive: `source_tag`, `source_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs_path - # @return [::String] - # The Cloud Storage path to export the artifact to. Should start with the - # bucket name, and optionally have a directory path. Examples: - # `dst_bucket`, `dst_bucket/sub_dir`. - # Existing objects with the same path will be overwritten. - # @!attribute [rw] repository - # @return [::String] - # Required. The repository of the artifact to export. - # Format: projects/\\{project}/locations/\\{location}/repositories/\\{repository} - class ExportArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for exporting an artifact to a destination. - # @!attribute [rw] exported_version - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # The exported version. Should be the same as the request version with - # fingerprint resource name. - class ExportArtifactResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The LRO metadata for exporting an artifact. - # @!attribute [rw] exported_files - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ExportArtifactMetadata::ExportedFile>] - # The exported artifact files. - class ExportArtifactMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The exported artifact file. - # @!attribute [rw] gcs_object_path - # @return [::String] - # Cloud Storage Object path of the exported file. Examples: - # `dst_bucket/file1`, `dst_bucket/sub_dir/file1` - # @!attribute [rw] name - # @return [::String] - # Name of the exported artifact file. - # Format: `projects/p1/locations/us/repositories/repo1/files/file1` - # @!attribute [rw] hashes - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] - # The hashes of the file content. - class ExportedFile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb deleted file mode 100644 index e07c055ac9d5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb +++ /dev/null @@ -1,211 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A hash of file content. - # @!attribute [rw] type - # @return [::Google::Cloud::ArtifactRegistry::V1::Hash::HashType] - # The algorithm used to compute the hash value. - # @!attribute [rw] value - # @return [::String] - # The hash value. - class Hash - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The algorithm used to compute the hash. - module HashType - # Unspecified. - HASH_TYPE_UNSPECIFIED = 0 - - # SHA256 hash. - SHA256 = 1 - - # MD5 hash. - MD5 = 2 - - # Dirsum SHA256 hash. - DIRSUM_SHA256 = 3 - end - end - - # Files store content that is potentially associated with Packages or Versions. - # @!attribute [rw] name - # @return [::String] - # The name of the file, for example: - # `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`. - # If the file ID part contains slashes, they are escaped. - # @!attribute [rw] size_bytes - # @return [::Integer] - # The size of the File in bytes. - # @!attribute [rw] hashes - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] - # The hashes of the file content. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the File was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the File was last updated. - # @!attribute [rw] owner - # @return [::String] - # The name of the Package or Version that owns this file, if any. - # @!attribute [r] fetch_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the last attempt to refresh the file's data was - # made. Only set when the repository is remote. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client specified annotations. - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request to list files. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the repository whose files will be listed. For - # example: "projects/p1/locations/us-central1/repositories/repo1 - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to files with the name `my_file.txt` - # in project `my-project` in the `us-central` region, in repository - # `my-repo`, append the following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"` - # - # To filter the results of your request to files owned by the version `1.0` - # in package `pkg1`, append the following filter expression to your request: - # - # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # - # To filter the results of your request to files with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to files with the annotation key-value pair - # [`external.link`:`https://example.com/my-file`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-file`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of files to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] order_by - # @return [::String] - # The field to order the results by. - class ListFilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing files. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::File>] - # The files returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of files, or empty if there are no - # more files to return. - class ListFilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a file. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the file to retrieve. - class GetFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a file. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the file to delete. - class DeleteFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a file. - # @!attribute [rw] file - # @return [::Google::Cloud::ArtifactRegistry::V1::File] - # Required. The File that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb deleted file mode 100644 index e851d178d658..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/generic.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # GenericArtifact represents a generic artifact - # @!attribute [rw] name - # @return [::String] - # Resource name of the generic artifact. - # project, location, repository, package_id and version_id - # create a unique generic artifact. - # i.e. "projects/test-project/locations/us-west4/repositories/test-repo/ - # genericArtifacts/package_id:version_id" - # @!attribute [rw] version - # @return [::String] - # The version of the generic artifact. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Generic module is created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Generic module is updated. - class GenericArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb deleted file mode 100644 index ad71da265c27..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/go.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # GoModule represents a Go module. - # @!attribute [rw] name - # @return [::String] - # The resource name of a Go module. - # @!attribute [rw] version - # @return [::String] - # The version of the Go module. Must be a valid canonical version as defined - # in https://go.dev/ref/mod#glos-canonical-version. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Go module is created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Go module is updated. - class GoModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb deleted file mode 100644 index 2b69b5b6bb0d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/kfp_artifact.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A detailed representation of a KFP artifact. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of the KFP artifact. Since users don't directly - # interact with this resource, the name will be derived from the associated - # version. For example, when version = ".../versions/sha256:abcdef...", the - # name will be ".../kfpArtifacts/sha256:abcdef...". - # @!attribute [rw] version - # @return [::String] - # The version associated with the KFP artifact. Must follow the Semantic - # Versioning standard. - class KfpArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb deleted file mode 100644 index b7e1ad069172..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/package.rb +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # Packages are named collections of versions. - # @!attribute [rw] name - # @return [::String] - # The name of the package, for example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - # If the package ID part contains slashes, the slashes are escaped. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the package. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the package was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the package was last updated. This includes publishing a new - # version of the package. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client specified annotations. - class Package - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request to list packages. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose packages will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of packages to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to packages with the name - # `my-package` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"` - # - # To filter the results of your request to packages with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request": - # - # * `"annotations.external_link:external_link_value"` - # - # To filter the results just for a specific annotation key `external_link`, - # append the following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to packages with the annotation key-value pair - # [`external.link`:`https://example.com/my-package`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-package`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - # @!attribute [rw] order_by - # @return [::String] - # Optional. The field to order the results by. - class ListPackagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing packages. - # @!attribute [rw] packages - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Package>] - # The packages returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of packages, or empty if there are no - # more packages to return. - class ListPackagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a package. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the package to retrieve. - class GetPackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a package. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the package to delete. - class DeletePackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a package. - # @!attribute [rw] package - # @return [::Google::Cloud::ArtifactRegistry::V1::Package] - # The package that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdatePackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb deleted file mode 100644 index 4f78625826fd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/repository.rb +++ /dev/null @@ -1,848 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # Artifact policy configuration for the repository contents. - # @!attribute [rw] id - # @return [::String] - # The user-provided ID of the upstream policy. - # @!attribute [rw] repository - # @return [::String] - # A reference to the repository resource, for example: - # `projects/p1/locations/us-central1/repositories/repo1`. - # @!attribute [rw] priority - # @return [::Integer] - # Entries with a greater priority value take precedence in the pull order. - class UpstreamPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. - # If multiple entries are set, all must be satisfied for the condition to be - # satisfied. - # @!attribute [rw] tag_state - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyCondition::TagState] - # Match versions by tag status. - # @!attribute [rw] tag_prefixes - # @return [::Array<::String>] - # Match versions by tag prefix. Applied on any prefix match. - # @!attribute [rw] version_name_prefixes - # @return [::Array<::String>] - # Match versions by version name prefix. Applied on any prefix match. - # @!attribute [rw] package_name_prefixes - # @return [::Array<::String>] - # Match versions by package prefix. Applied on any prefix match. - # @!attribute [rw] older_than - # @return [::Google::Protobuf::Duration] - # Match versions older than a duration. - # @!attribute [rw] newer_than - # @return [::Google::Protobuf::Duration] - # Match versions newer than a duration. - class CleanupPolicyCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Statuses applying to versions. - module TagState - # Tag status not specified. - TAG_STATE_UNSPECIFIED = 0 - - # Applies to tagged versions only. - TAGGED = 1 - - # Applies to untagged versions only. - UNTAGGED = 2 - - # Applies to all versions. - ANY = 3 - end - end - - # CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy - # for retaining a minimum number of versions. - # @!attribute [rw] package_name_prefixes - # @return [::Array<::String>] - # List of package name prefixes that will apply this rule. - # @!attribute [rw] keep_count - # @return [::Integer] - # Minimum number of versions to keep. - class CleanupPolicyMostRecentVersions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Artifact policy configuration for repository cleanup policies. - # @!attribute [rw] condition - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyCondition] - # Policy condition for matching versions. - # - # Note: The following fields are mutually exclusive: `condition`, `most_recent_versions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] most_recent_versions - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicyMostRecentVersions] - # Policy condition for retaining a minimum number of versions. May only be - # specified with a Keep action. - # - # Note: The following fields are mutually exclusive: `most_recent_versions`, `condition`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # The user-provided ID of the cleanup policy. - # @!attribute [rw] action - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy::Action] - # Policy action. - class CleanupPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Action type for a cleanup policy. - module Action - # Action not specified. - ACTION_UNSPECIFIED = 0 - - # Delete action. - DELETE = 1 - - # Keep action. - KEEP = 2 - end - end - - # Virtual repository configuration. - # @!attribute [rw] upstream_policies - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::UpstreamPolicy>] - # Policies that configure the upstream artifacts distributed by the Virtual - # Repository. Upstream policies cannot be set on a standard repository. - class VirtualRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Remote repository configuration. - # @!attribute [rw] docker_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository] - # Specific settings for a Docker remote repository. - # - # Note: The following fields are mutually exclusive: `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] maven_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository] - # Specific settings for a Maven remote repository. - # - # Note: The following fields are mutually exclusive: `maven_repository`, `docker_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] npm_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository] - # Specific settings for an Npm remote repository. - # - # Note: The following fields are mutually exclusive: `npm_repository`, `docker_repository`, `maven_repository`, `python_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] python_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository] - # Specific settings for a Python remote repository. - # - # Note: The following fields are mutually exclusive: `python_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `apt_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] apt_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository] - # Specific settings for an Apt remote repository. - # - # Note: The following fields are mutually exclusive: `apt_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `yum_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] yum_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository] - # Specific settings for a Yum remote repository. - # - # Note: The following fields are mutually exclusive: `yum_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `common_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] common_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::CommonRemoteRepository] - # Common remote repository settings. - # Used as the remote repository upstream URL. - # - # Note: The following fields are mutually exclusive: `common_repository`, `docker_repository`, `maven_repository`, `npm_repository`, `python_repository`, `apt_repository`, `yum_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] description - # @return [::String] - # The description of the remote source. - # @!attribute [rw] upstream_credentials - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::UpstreamCredentials] - # Optional. The credentials used to access the remote repository. - # @!attribute [rw] disable_upstream_validation - # @return [::Boolean] - # Input only. A create/update remote repo option to avoid making a HEAD/GET - # request to validate a remote repo and any supplied upstream credentials. - class RemoteRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The credentials to access the remote repository. - # @!attribute [rw] username_password_credentials - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::UpstreamCredentials::UsernamePasswordCredentials] - # Use username and password to access the remote repository. - class UpstreamCredentials - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Username and password credentials. - # @!attribute [rw] username - # @return [::String] - # The username to access the remote repository. - # @!attribute [rw] password_secret_version - # @return [::String] - # The Secret Manager key version that holds the password to access the - # remote repository. Must be in the format of - # `projects/{project}/secrets/{secret}/versions/{version}`. - class UsernamePasswordCredentials - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a Docker remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository::PublicRepository] - # One of the publicly available Docker repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::DockerRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DockerRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the custom remote repository, for ex: - # "https://registry-1.docker.io". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Predefined list of publicly available Docker repositories like Docker - # Hub. - module PublicRepository - # Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0 - - # Docker Hub. - DOCKER_HUB = 1 - end - end - - # Configuration for a Maven remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository::PublicRepository] - # One of the publicly available Maven repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::MavenRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MavenRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.maven.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Predefined list of publicly available Maven repositories like Maven - # Central. - module PublicRepository - # Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0 - - # Maven Central. - MAVEN_CENTRAL = 1 - end - end - - # Configuration for a Npm remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository::PublicRepository] - # One of the publicly available Npm repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::NpmRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class NpmRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.npm.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Predefined list of publicly available NPM repositories like npmjs. - module PublicRepository - # Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0 - - # npmjs. - NPMJS = 1 - end - end - - # Configuration for a Python remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository::PublicRepository] - # One of the publicly available Python repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::PythonRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PythonRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.python.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Predefined list of publicly available Python repositories like PyPI.org. - module PublicRepository - # Unspecified repository. - PUBLIC_REPOSITORY_UNSPECIFIED = 0 - - # PyPI. - PYPI = 1 - end - end - - # Configuration for an Apt remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::PublicRepository] - # One of the publicly available Apt repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AptRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Publicly available Apt repositories constructed from a common repository - # base and a custom repository path. - # @!attribute [rw] repository_base - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::AptRepository::PublicRepository::RepositoryBase] - # A common public repository base for Apt. - # @!attribute [rw] repository_path - # @return [::String] - # A custom field to define a path to a specific repository from the base. - class PublicRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Predefined list of publicly available repository bases for Apt. - module RepositoryBase - # Unspecified repository base. - REPOSITORY_BASE_UNSPECIFIED = 0 - - # Debian. - DEBIAN = 1 - - # Ubuntu LTS/Pro. - UBUNTU = 2 - - # Archived Debian. - DEBIAN_SNAPSHOT = 3 - end - end - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.apt.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a Yum remote repository. - # @!attribute [rw] public_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::PublicRepository] - # One of the publicly available Yum repositories supported by Artifact - # Registry. - # - # Note: The following fields are mutually exclusive: `public_repository`, `custom_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_repository - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::CustomRepository] - # Customer-specified remote repository. - # - # Note: The following fields are mutually exclusive: `custom_repository`, `public_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class YumRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Publicly available Yum repositories constructed from a common repository - # base and a custom repository path. - # @!attribute [rw] repository_base - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig::YumRepository::PublicRepository::RepositoryBase] - # A common public repository base for Yum. - # @!attribute [rw] repository_path - # @return [::String] - # A custom field to define a path to a specific repository from the base. - class PublicRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Predefined list of publicly available repository bases for Yum. - module RepositoryBase - # Unspecified repository base. - REPOSITORY_BASE_UNSPECIFIED = 0 - - # CentOS. - CENTOS = 1 - - # CentOS Debug. - CENTOS_DEBUG = 2 - - # CentOS Vault. - CENTOS_VAULT = 3 - - # CentOS Stream. - CENTOS_STREAM = 4 - - # Rocky. - ROCKY = 5 - - # Fedora Extra Packages for Enterprise Linux (EPEL). - EPEL = 6 - end - end - - # Customer-specified publicly available remote repository. - # @!attribute [rw] uri - # @return [::String] - # An http/https uri reference to the upstream remote repository, for ex: - # "https://my.yum.registry/". - class CustomRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Common remote repository settings type. - # @!attribute [rw] uri - # @return [::String] - # Required. A common public repository base for remote repository. - class CommonRemoteRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A Repository for storing artifacts with a specific format. - # @!attribute [rw] maven_config - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::MavenRepositoryConfig] - # Maven repository config contains repository level configuration - # for the repositories of maven type. - # - # Note: The following fields are mutually exclusive: `maven_config`, `docker_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] docker_config - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::DockerRepositoryConfig] - # Docker repository config contains repository level configuration - # for the repositories of docker type. - # - # Note: The following fields are mutually exclusive: `docker_config`, `maven_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] virtual_repository_config - # @return [::Google::Cloud::ArtifactRegistry::V1::VirtualRepositoryConfig] - # Configuration specific for a Virtual Repository. - # - # Note: The following fields are mutually exclusive: `virtual_repository_config`, `remote_repository_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remote_repository_config - # @return [::Google::Cloud::ArtifactRegistry::V1::RemoteRepositoryConfig] - # Configuration specific for a Remote Repository. - # - # Note: The following fields are mutually exclusive: `remote_repository_config`, `virtual_repository_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # The name of the repository, for example: - # `projects/p1/locations/us-central1/repositories/repo1`. For each location - # in a project, repository names must be unique. - # @!attribute [rw] format - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::Format] - # Optional. The format of packages that are stored in the repository. - # @!attribute [rw] description - # @return [::String] - # The user-provided description of the repository. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels with user-defined metadata. - # This field may contain up to 64 entries. Label keys and values may be no - # longer than 63 characters. Label keys must begin with a lowercase letter - # and may only contain lowercase letters, numeric characters, underscores, - # and dashes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the repository was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the repository was last updated. - # @!attribute [rw] kms_key_name - # @return [::String] - # The Cloud KMS resource name of the customer managed encryption key that's - # used to encrypt the contents of the Repository. Has the form: - # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. - # This value may not be changed after the Repository has been created. - # @!attribute [rw] mode - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::Mode] - # Optional. The mode of the repository. - # @!attribute [rw] cleanup_policies - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy}] - # Optional. Cleanup policies for this repository. Cleanup policies indicate - # when certain package versions can be automatically deleted. Map keys are - # policy IDs supplied by users during policy creation. They must unique - # within a repository and be under 128 characters in length. - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. The size, in bytes, of all artifact storage in this - # repository. Repositories that are generally available or in public preview - # use this to calculate storage costs. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Whether or not this repository satisfies PZS. - # @!attribute [rw] cleanup_policy_dry_run - # @return [::Boolean] - # Optional. If true, the cleanup pipeline is prevented from deleting versions - # in this repository. - # @!attribute [rw] vulnerability_scanning_config - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig] - # Optional. Config and state for vulnerability scanning of resources within - # this Repository. - # @!attribute [rw] disallow_unspecified_mode - # @return [::Boolean] - # Optional. If this is true, an unspecified repo type will be treated as - # error rather than defaulting to standard. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Whether or not this repository satisfies PZI. - # @!attribute [r] registry_uri - # @return [::String] - # Output only. The repository endpoint, for example: - # `us-docker.pkg.dev/my-proj/my-repo`. - class Repository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # MavenRepositoryConfig is maven related repository details. - # Provides additional configuration details for repositories of the maven - # format type. - # @!attribute [rw] allow_snapshot_overwrites - # @return [::Boolean] - # The repository with this flag will allow publishing - # the same snapshot versions. - # @!attribute [rw] version_policy - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::MavenRepositoryConfig::VersionPolicy] - # Version policy defines the versions that the registry will accept. - class MavenRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VersionPolicy is the version policy for the repository. - module VersionPolicy - # VERSION_POLICY_UNSPECIFIED - the version policy is not defined. - # When the version policy is not defined, no validation is performed - # for the versions. - VERSION_POLICY_UNSPECIFIED = 0 - - # RELEASE - repository will accept only Release versions. - RELEASE = 1 - - # SNAPSHOT - repository will accept only Snapshot versions. - SNAPSHOT = 2 - end - end - - # DockerRepositoryConfig is docker related repository details. - # Provides additional configuration details for repositories of the docker - # format type. - # @!attribute [rw] immutable_tags - # @return [::Boolean] - # The repository which enabled this flag prevents all tags from being - # modified, moved or deleted. This does not prevent tags from being - # created. - class DockerRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config on whether to perform vulnerability scanning for resources in this - # repository, as well as output fields describing current state. - # @!attribute [rw] enablement_config - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig::EnablementConfig] - # Optional. Config for whether this repository has vulnerability scanning - # disabled. - # @!attribute [r] last_enable_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time this repository config was enabled. - # @!attribute [r] enablement_state - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository::VulnerabilityScanningConfig::EnablementState] - # Output only. State of feature enablement, combining repository enablement - # config and API enablement state. - # @!attribute [r] enablement_state_reason - # @return [::String] - # Output only. Reason for the repository state. - class VulnerabilityScanningConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Config for vulnerability scanning of resources in this repository. - module EnablementConfig - # Not set. This will be treated as INHERITED for Docker repositories and - # DISABLED for non-Docker repositories. - ENABLEMENT_CONFIG_UNSPECIFIED = 0 - - # Scanning is Enabled, but dependent on API enablement. - INHERITED = 1 - - # No automatic vulnerability scanning will be performed for this - # repository. - DISABLED = 2 - end - - # Describes the state of vulnerability scanning in this repository, - # including both repository enablement and API enablement. - module EnablementState - # Enablement state is unclear. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # Repository does not support vulnerability scanning. - SCANNING_UNSUPPORTED = 1 - - # Vulnerability scanning is disabled for this repository. - SCANNING_DISABLED = 2 - - # Vulnerability scanning is active for this repository. - SCANNING_ACTIVE = 3 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::ArtifactRegistry::V1::CleanupPolicy] - class CleanupPoliciesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A package format. - module Format - # Unspecified package format. - FORMAT_UNSPECIFIED = 0 - - # Docker package format. - DOCKER = 1 - - # Maven package format. - MAVEN = 2 - - # NPM package format. - NPM = 3 - - # APT package format. - APT = 5 - - # YUM package format. - YUM = 6 - - # Python package format. - PYTHON = 8 - - # Kubeflow Pipelines package format. - KFP = 9 - - # Go package format. - GO = 10 - - # Generic package format. - GENERIC = 11 - - # Ruby package format. - RUBY = 12 - end - - # The mode configures the repository to serve artifacts from different - # sources. - module Mode - # Unspecified mode. - MODE_UNSPECIFIED = 0 - - # A standard repository storing artifacts. - STANDARD_REPOSITORY = 1 - - # A virtual repository to serve artifacts from one or more sources. - VIRTUAL_REPOSITORY = 2 - - # A remote repository to serve artifacts from a remote source. - REMOTE_REPOSITORY = 3 - end - end - - # The request to list repositories. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose repositories will be - # listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # - # Examples of using a filter: - # - # To filter the results of your request to repositories with the name - # `my-repo` in project `my-project` in the `us-central` region, append the - # following filter expression to your request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-*"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo"` - # * `name="projects/my-project/locations/us-central1/repositories/*repo*"` - # @!attribute [rw] order_by - # @return [::String] - # Optional. The field to order the results by. - class ListRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing repositories. - # @!attribute [rw] repositories - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Repository>] - # The repositories returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of repositories, or empty if there are - # no more repositories to return. - class ListRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the repository to retrieve. - class GetRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new repository. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource where the repository will be - # created. - # @!attribute [rw] repository_id - # @return [::String] - # Required. The repository id to use for this repository. - # @!attribute [rw] repository - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # Required. The repository to be created. - class CreateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a repository. - # @!attribute [rw] repository - # @return [::Google::Cloud::ArtifactRegistry::V1::Repository] - # The repository that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the repository to delete. - class DeleteRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb deleted file mode 100644 index 0bdb1d2172c8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/rule.rb +++ /dev/null @@ -1,149 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A rule defines the deny or allow action of the operation it applies to and - # the conditions required for the rule to apply. You can set one rule for an - # entire repository and one rule for each package within. - # @!attribute [rw] name - # @return [::String] - # The name of the rule, for example: - # `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`. - # @!attribute [rw] action - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule::Action] - # The action this rule takes. - # @!attribute [rw] operation - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule::Operation] - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # Optional. A CEL expression for conditions that must be met in order for the - # rule to apply. If not provided, the rule matches all objects. - # @!attribute [rw] package_id - # @return [::String] - # The package ID the rule applies to. - # If empty, this rule applies to all packages inside the repository. - class Rule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the action of the rule. - module Action - # Action not specified. - ACTION_UNSPECIFIED = 0 - - # Allow the operation. - ALLOW = 1 - - # Deny the operation. - DENY = 2 - end - - # The operation the rule applies to. - module Operation - # Operation not specified. - OPERATION_UNSPECIFIED = 0 - - # Download operation. - DOWNLOAD = 1 - end - end - - # The request to list rules. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent repository whose rules will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of rules to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing rules. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Rule>] - # The rules returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of rules, or empty if there are no - # more rules to return. - class ListRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a rule. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to retrieve. - class GetRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new rule. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource where the rule will be created. - # @!attribute [rw] rule_id - # @return [::String] - # The rule id to use for this repository. - # @!attribute [rw] rule - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # The rule to be created. - class CreateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a rule. - # @!attribute [rw] rule - # @return [::Google::Cloud::ArtifactRegistry::V1::Rule] - # The rule that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a rule. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to delete. - class DeleteRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb deleted file mode 100644 index 2ee4fa0cdea8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/service.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # Metadata type for longrunning-operations, currently empty. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb deleted file mode 100644 index a545ef0668e5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/settings.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # The Artifact Registry settings that apply to a Project. - # @!attribute [rw] name - # @return [::String] - # The name of the project's settings. - # - # Always of the form: - # projects/\\{project-id}/projectSettings - # - # In update request: never set - # In response: always set - # @!attribute [rw] legacy_redirection_state - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings::RedirectionState] - # The redirection state of the legacy repositories in this project. - # @!attribute [rw] pull_percent - # @return [::Integer] - # The percentage of pull traffic to redirect from GCR to AR when using - # partial redirection. - class ProjectSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible redirection states for legacy repositories. - module RedirectionState - # No redirection status has been set. - REDIRECTION_STATE_UNSPECIFIED = 0 - - # Redirection is disabled. - REDIRECTION_FROM_GCR_IO_DISABLED = 1 - - # Redirection is enabled. - REDIRECTION_FROM_GCR_IO_ENABLED = 2 - - # Redirection is enabled, and has been finalized so cannot be reverted. - REDIRECTION_FROM_GCR_IO_FINALIZED = 3 - - # Redirection is enabled and missing images are copied from GCR - REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING = 5 - - # Redirection is partially enabled and missing images are copied from GCR - REDIRECTION_FROM_GCR_IO_PARTIAL_AND_COPYING = 6 - end - end - - # Gets the redirection status for a project. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the projectSettings resource. - class GetProjectSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sets the settings of the project. - # @!attribute [rw] project_settings - # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings] - # The project settings. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask to support partial updates. - class UpdateProjectSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb deleted file mode 100644 index a9a41f7a2b11..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/tag.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # Tags point to a version and represent an alternative name that can be used - # to access the version. - # @!attribute [rw] name - # @return [::String] - # The name of the tag, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". - # If the package part contains slashes, the slashes are escaped. - # The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else - # must be URL encoded. - # @!attribute [rw] version - # @return [::String] - # The name of the version the tag refers to, for example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811` - # If the package or version ID parts contain slashes, the slashes are - # escaped. - class Tag - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list tags. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent package whose tags will be listed. - # For example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `version` - # - # Examples of using a filter: - # - # To filter the results of your request to tags with the name `my-tag` in - # package `my-package` in repository `my-repo` in project "`y-project` in - # the us-central region, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"` - # - # To filter the results of your request to tags applied to the version - # `1.0` in package `my-package`, append the following filter expression to - # your request: - # - # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of tags to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListTagsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing tags. - # @!attribute [rw] tags - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # The tags returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of tags, or empty if there are no - # more tags to return. - class ListTagsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a tag. - # @!attribute [rw] name - # @return [::String] - # The name of the tag to retrieve. - class GetTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new tag. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the tag will be created. - # @!attribute [rw] tag_id - # @return [::String] - # The tag id to use for this repository. - # @!attribute [rw] tag - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # The tag to be created. - class CreateTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create or update a tag. - # @!attribute [rw] tag - # @return [::Google::Cloud::ArtifactRegistry::V1::Tag] - # The tag that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a tag. - # @!attribute [rw] name - # @return [::String] - # The name of the tag to delete. - class DeleteTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb deleted file mode 100644 index 9c9c3ee8a90f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb +++ /dev/null @@ -1,237 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # The body of a version resource. A version resource represents a - # collection of components, such as files and other data. This may correspond - # to a version in many package management schemes. - # @!attribute [rw] name - # @return [::String] - # The name of the version, for example: - # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. - # If the package or version ID parts contain slashes, the slashes are - # escaped. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the version, as specified in its metadata. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the version was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the version was last updated. - # @!attribute [rw] related_tags - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Tag>] - # Output only. A list of related tags. Will contain up to 100 tags that - # reference this version. - # @!attribute [r] metadata - # @return [::Google::Protobuf::Struct] - # Output only. Repository-specific Metadata stored against this version. - # The fields returned are defined by the underlying repository-specific - # resource. Currently, the resources could be: - # {::Google::Cloud::ArtifactRegistry::V1::DockerImage DockerImage} - # {::Google::Cloud::ArtifactRegistry::V1::MavenArtifact MavenArtifact} - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client specified annotations. - # @!attribute [r] fingerprints - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Hash>] - # Output only. Immutable reference for the version, calculated based on the - # version's content. Currently we only support dirsum_sha256 hash algorithm. - # Additional hash algorithms may be added in the future. - class Version - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request to list versions. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource whose versions will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] view - # @return [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The field to order the results by. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. Filter - # rules are case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `annotations` - # - # Examples of using a filter: - # - # To filter the results of your request to versions with the name - # `my-version` in project `my-project` in the `us-central` region, in - # repository `my-repo`, append the following filter expression to your - # request: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"` - # - # You can also use wildcards to match any number of characters before or - # after the value: - # - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"` - # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"` - # - # To filter the results of your request to versions with the annotation - # key-value pair [`external_link`: `external_link_value`], append the - # following filter expression to your request: - # - # * `"annotations.external_link:external_link_value"` - # - # To filter just for a specific annotation key `external_link`, append the - # following filter expression to your request: - # - # * `"annotations.external_link"` - # - # If the annotation key or value contains special characters, you can escape - # them by surrounding the value with backticks. For example, to filter the - # results of your request to versions with the annotation key-value pair - # [`external.link`:`https://example.com/my-version`], append the following - # filter expression to your request: - # - # * `` "annotations.`external.link`:`https://example.com/my-version`" `` - # - # You can also filter with annotations with a wildcard to - # match any number of characters before or after the value: - # - # * `` "annotations.*_link:`*example.com*`" `` - class ListVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing versions. - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::Version>] - # The versions returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of versions, or empty if there are no - # more versions to return. - class ListVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a version. - # @!attribute [rw] name - # @return [::String] - # The name of the version to retrieve. - # @!attribute [rw] view - # @return [::Google::Cloud::ArtifactRegistry::V1::VersionView] - # The view that should be returned in the response. - class GetVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a version. - # @!attribute [rw] name - # @return [::String] - # The name of the version to delete. - # @!attribute [rw] force - # @return [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - class DeleteVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete multiple versions across a repository. - # @!attribute [rw] parent - # @return [::String] - # The name of the repository holding all requested versions. - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The names of the versions to delete. - # The maximum number of versions deleted per batch is determined by the - # service and is dependent on the available resources in the region. - # @!attribute [rw] validate_only - # @return [::Boolean] - # If true, the request is performed without deleting data, following AIP-163. - class BatchDeleteVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The metadata of an LRO from deleting multiple versions. - # @!attribute [rw] failed_versions - # @return [::Array<::String>] - # The versions the operation failed to delete. - class BatchDeleteVersionsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a version. - # @!attribute [rw] version - # @return [::Google::Cloud::ArtifactRegistry::V1::Version] - # Required. The Version that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The view, which determines what version information is returned in a - # response. - module VersionView - # The default / unset value. - # The API will default to the BASIC view. - VERSION_VIEW_UNSPECIFIED = 0 - - # Includes basic information about the version, but not any related tags. - BASIC = 1 - - # Include everything. - FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb deleted file mode 100644 index ddeb66c66eaa..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # The Artifact Registry VPC SC config that apply to a Project. - # @!attribute [rw] name - # @return [::String] - # The name of the project's VPC SC Config. - # - # Always of the form: - # projects/\\{projectID}/locations/\\{location}/vpcscConfig - # - # In update request: never set - # In response: always set - # @!attribute [rw] vpcsc_policy - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig::VPCSCPolicy] - # The project per location VPC SC policy that defines the VPC SC behavior for - # the Remote Repository (Allow/Deny). - class VPCSCConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VPCSCPolicy is the VPC SC policy for project and location. - module VPCSCPolicy - # VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined. - # When VPS SC policy is not defined - the Service will use the default - # behavior (VPCSC_DENY). - VPCSC_POLICY_UNSPECIFIED = 0 - - # VPCSC_DENY - repository will block the requests to the Upstreams for the - # Remote Repositories if the resource is in the perimeter. - DENY = 1 - - # VPCSC_ALLOW - repository will allow the requests to the Upstreams for the - # Remote Repositories if the resource is in the perimeter. - ALLOW = 2 - end - end - - # Gets the VPC SC config for a project. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the VPCSCConfig resource. - class GetVPCSCConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sets the VPCSC config of the project. - # @!attribute [rw] vpcsc_config - # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig] - # The project config. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask to support partial updates. - class UpdateVPCSCConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb deleted file mode 100644 index dac974efbbdf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/yum_artifact.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1 - # A detailed representation of a Yum artifact. - # @!attribute [r] name - # @return [::String] - # Output only. The Artifact Registry resource name of the artifact. - # @!attribute [r] package_name - # @return [::String] - # Output only. The yum package name of the artifact. - # @!attribute [r] package_type - # @return [::Google::Cloud::ArtifactRegistry::V1::YumArtifact::PackageType] - # Output only. An artifact is a binary or source package. - # @!attribute [r] architecture - # @return [::String] - # Output only. Operating system architecture of the artifact. - class YumArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Package type is either binary or source. - module PackageType - # Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0 - - # Binary package (.rpm). - BINARY = 1 - - # Source package (.srpm). - SOURCE = 2 - end - end - - # Google Cloud Storage location where the artifacts currently reside. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - # @!attribute [rw] use_wildcards - # @return [::Boolean] - # Supports URI wildcards for matching multiple objects from a single URI. - class ImportYumArtifactsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to import new yum artifacts. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource] - # Google Cloud Storage location where input content is located. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the artifacts will be imported. - class ImportYumArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error information explaining why a package was not imported. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource] - # Google Cloud Storage location requested. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The detailed error status. - class ImportYumArtifactsErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message from importing YUM artifacts. - # @!attribute [rw] yum_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::YumArtifact>] - # The yum artifacts imported. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsErrorInfo>] - # Detailed error info for packages that were not imported. - class ImportYumArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata for importing artifacts. - class ImportYumArtifactsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile deleted file mode 100644 index 459cdcd60fe7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-artifact_registry-v1", path: "../" -else - gem "google-cloud-artifact_registry-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb deleted file mode 100644 index 3551d1fea5e3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/batch_delete_versions.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the batch_delete_versions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions. -# -def batch_delete_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new - - # Call the batch_delete_versions method. - result = client.batch_delete_versions request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb deleted file mode 100644 index faa2d06ad650..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_attachment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the create_attachment call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment. -# -def create_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new - - # Call the create_attachment method. - result = client.create_attachment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb deleted file mode 100644 index da79982e2f09..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_repository.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the create_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository. -# -def create_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new - - # Call the create_repository method. - result = client.create_repository request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb deleted file mode 100644 index 446cae77d141..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the create_rule call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule. -# -def create_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new - - # Call the create_rule method. - result = client.create_rule request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb deleted file mode 100644 index 614917acd763..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/create_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the create_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag. -# -def create_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new - - # Call the create_tag method. - result = client.create_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb deleted file mode 100644 index a5a7848c4daa..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_attachment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_attachment call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment. -# -def delete_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new - - # Call the delete_attachment method. - result = client.delete_attachment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb deleted file mode 100644 index fdcd3ccaa467..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_file.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_file call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file. -# -def delete_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new - - # Call the delete_file method. - result = client.delete_file request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb deleted file mode 100644 index 5a655c2e4962..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_package.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package. -# -def delete_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new - - # Call the delete_package method. - result = client.delete_package request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb deleted file mode 100644 index 640b18b6b3c2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_repository.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository. -# -def delete_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new - - # Call the delete_repository method. - result = client.delete_repository request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb deleted file mode 100644 index 558ed7cef6e8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_rule call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule. -# -def delete_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new - - # Call the delete_rule method. - result = client.delete_rule request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb deleted file mode 100644 index 91e16a183ca6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag. -# -def delete_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new - - # Call the delete_tag method. - result = client.delete_tag request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb deleted file mode 100644 index 3eaddca23f51..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/delete_version.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the delete_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version. -# -def delete_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new - - # Call the delete_version method. - result = client.delete_version request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb deleted file mode 100644 index 5f1daba9d5a5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/export_artifact.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the export_artifact call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact. -# -def export_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new - - # Call the export_artifact method. - result = client.export_artifact request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb deleted file mode 100644 index b5b108c71355..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_attachment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_attachment call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment. -# -def get_attachment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new - - # Call the get_attachment method. - result = client.get_attachment request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb deleted file mode 100644 index 0ef05ed884cb..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_docker_image.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_docker_image call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image. -# -def get_docker_image - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new - - # Call the get_docker_image method. - result = client.get_docker_image request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb deleted file mode 100644 index 197816935c4b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_file.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_file call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file. -# -def get_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new - - # Call the get_file method. - result = client.get_file request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb deleted file mode 100644 index 1afea8a55d98..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_iam_policy call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb deleted file mode 100644 index 565ab113d0f9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_maven_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_maven_artifact call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact. -# -def get_maven_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new - - # Call the get_maven_artifact method. - result = client.get_maven_artifact request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb deleted file mode 100644 index e3fb548ad087..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_npm_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_npm_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package. -# -def get_npm_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new - - # Call the get_npm_package method. - result = client.get_npm_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb deleted file mode 100644 index e8bca8350df6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package. -# -def get_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new - - # Call the get_package method. - result = client.get_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb deleted file mode 100644 index cfb98bbd9209..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_project_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_project_settings call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings. -# -def get_project_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new - - # Call the get_project_settings method. - result = client.get_project_settings request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb deleted file mode 100644 index df5c6449c907..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_python_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_python_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package. -# -def get_python_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new - - # Call the get_python_package method. - result = client.get_python_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb deleted file mode 100644 index 4919f715af65..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_repository.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository. -# -def get_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new - - # Call the get_repository method. - result = client.get_repository request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb deleted file mode 100644 index 64edea734465..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_rule call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule. -# -def get_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new - - # Call the get_rule method. - result = client.get_rule request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb deleted file mode 100644 index 38020d4c9027..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag. -# -def get_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new - - # Call the get_tag method. - result = client.get_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb deleted file mode 100644 index ebfc4996d184..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version. -# -def get_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new - - # Call the get_version method. - result = client.get_version request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb deleted file mode 100644 index 6396617d1fd4..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/get_vpcsc_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the get_vpcsc_config call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config. -# -def get_vpcsc_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new - - # Call the get_vpcsc_config method. - result = client.get_vpcsc_config request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb deleted file mode 100644 index 1d1c19f659e9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_apt_artifacts.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the import_apt_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts. -# -def import_apt_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new - - # Call the import_apt_artifacts method. - result = client.import_apt_artifacts request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb deleted file mode 100644 index 3b576e4026b4..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/import_yum_artifacts.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the import_yum_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts. -# -def import_yum_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new - - # Call the import_yum_artifacts method. - result = client.import_yum_artifacts request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb deleted file mode 100644 index c0e7bcf3df0d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_attachments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_attachments call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments. -# -def list_attachments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new - - # Call the list_attachments method. - result = client.list_attachments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb deleted file mode 100644 index f5ae43a24fcb..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_docker_images.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_docker_images call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images. -# -def list_docker_images - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new - - # Call the list_docker_images method. - result = client.list_docker_images request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb deleted file mode 100644 index ef775fe14faa..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_files.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_files call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files. -# -def list_files - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new - - # Call the list_files method. - result = client.list_files request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb deleted file mode 100644 index 9485dc527e7e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_maven_artifacts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_maven_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts. -# -def list_maven_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new - - # Call the list_maven_artifacts method. - result = client.list_maven_artifacts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb deleted file mode 100644 index 5139dde54193..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_npm_packages.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_npm_packages call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages. -# -def list_npm_packages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new - - # Call the list_npm_packages method. - result = client.list_npm_packages request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb deleted file mode 100644 index 13c4c0a14971..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_packages.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_packages call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages. -# -def list_packages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new - - # Call the list_packages method. - result = client.list_packages request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb deleted file mode 100644 index d87b40b2c0cf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_python_packages.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_python_packages call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages. -# -def list_python_packages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new - - # Call the list_python_packages method. - result = client.list_python_packages request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb deleted file mode 100644 index 097d7c46cbf1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_repositories.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_repositories call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories. -# -def list_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new - - # Call the list_repositories method. - result = client.list_repositories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Repository. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb deleted file mode 100644 index 0e2f6de5c8fe..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_rules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_rules call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules. -# -def list_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new - - # Call the list_rules method. - result = client.list_rules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb deleted file mode 100644 index 0e0ed6c2658e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_tags.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_tags call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags. -# -def list_tags - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new - - # Call the list_tags method. - result = client.list_tags request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb deleted file mode 100644 index 4c0c49ab3fe0..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/list_versions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the list_versions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions. -# -def list_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new - - # Call the list_versions method. - result = client.list_versions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Version. - p item - end -end -# [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb deleted file mode 100644 index 976e507f153a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the set_iam_policy call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb deleted file mode 100644 index df231fd7b342..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the test_iam_permissions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb deleted file mode 100644 index b45c4176571a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_file.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_file call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file. -# -def update_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new - - # Call the update_file method. - result = client.update_file request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb deleted file mode 100644 index 39121b1eecdd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package. -# -def update_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new - - # Call the update_package method. - result = client.update_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb deleted file mode 100644 index fbc2f9584b3c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_project_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_project_settings call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings. -# -def update_project_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new - - # Call the update_project_settings method. - result = client.update_project_settings request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb deleted file mode 100644 index 7831d02528b2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_repository.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository. -# -def update_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new - - # Call the update_repository method. - result = client.update_repository request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb deleted file mode 100644 index 3304a6d9f6f3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_rule call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule. -# -def update_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new - - # Call the update_rule method. - result = client.update_rule request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb deleted file mode 100644 index 658e94dda101..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag. -# -def update_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new - - # Call the update_tag method. - result = client.update_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb deleted file mode 100644 index b1e1b1b96fea..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version. -# -def update_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new - - # Call the update_version method. - result = client.update_version request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb deleted file mode 100644 index 2d206b7333ad..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/artifact_registry/update_vpcsc_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] -require "google/cloud/artifact_registry/v1" - -## -# Snippet for the update_vpcsc_config call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config. -# -def update_vpcsc_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new - - # Call the update_vpcsc_config method. - result = client.update_vpcsc_config request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig. - p result -end -# [END artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json deleted file mode 100644 index 5ee717882e69..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/snippet_metadata_google.devtools.artifactregistry.v1.json +++ /dev/null @@ -1,2015 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-artifact_registry-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.devtools.artifactregistry.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_sync", - "title": "Snippet for the list_docker_images call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images.", - "file": "artifact_registry/list_docker_images.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_docker_images", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_docker_images", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListDockerImages", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_sync", - "title": "Snippet for the get_docker_image call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image.", - "file": "artifact_registry/get_docker_image.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_docker_image", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_docker_image", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::DockerImage", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetDockerImage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListMavenArtifacts_sync", - "title": "Snippet for the list_maven_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts.", - "file": "artifact_registry/list_maven_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_maven_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_maven_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListMavenArtifacts", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListMavenArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetMavenArtifact_sync", - "title": "Snippet for the get_maven_artifact call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact.", - "file": "artifact_registry/get_maven_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_maven_artifact", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_maven_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::MavenArtifact", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetMavenArtifact", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetMavenArtifact", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListNpmPackages_sync", - "title": "Snippet for the list_npm_packages call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages.", - "file": "artifact_registry/list_npm_packages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_npm_packages", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_npm_packages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListNpmPackages", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListNpmPackages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetNpmPackage_sync", - "title": "Snippet for the get_npm_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package.", - "file": "artifact_registry/get_npm_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_npm_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_npm_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::NpmPackage", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetNpmPackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetNpmPackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListPythonPackages_sync", - "title": "Snippet for the list_python_packages call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages.", - "file": "artifact_registry/list_python_packages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_python_packages", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_python_packages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListPythonPackages", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPythonPackages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetPythonPackage_sync", - "title": "Snippet for the get_python_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package.", - "file": "artifact_registry/get_python_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_python_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_python_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::PythonPackage", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetPythonPackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPythonPackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_sync", - "title": "Snippet for the import_apt_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts.", - "file": "artifact_registry/import_apt_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_apt_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_apt_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ImportAptArtifacts", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_sync", - "title": "Snippet for the import_yum_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts.", - "file": "artifact_registry/import_yum_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_yum_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#import_yum_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ImportYumArtifacts", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_sync", - "title": "Snippet for the list_repositories call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories.", - "file": "artifact_registry/list_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_repositories", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListRepositories", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositories", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetRepository_sync", - "title": "Snippet for the get_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository.", - "file": "artifact_registry/get_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Repository", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetRepository", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync", - "title": "Snippet for the create_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository.", - "file": "artifact_registry/create_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateRepository", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_sync", - "title": "Snippet for the update_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository.", - "file": "artifact_registry/update_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Repository", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateRepository", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_sync", - "title": "Snippet for the delete_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository.", - "file": "artifact_registry/delete_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteRepository", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_sync", - "title": "Snippet for the list_packages call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages.", - "file": "artifact_registry/list_packages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_packages", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_packages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListPackages", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_sync", - "title": "Snippet for the get_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package.", - "file": "artifact_registry/get_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Package", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetPackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_sync", - "title": "Snippet for the delete_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package.", - "file": "artifact_registry/delete_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeletePackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_sync", - "title": "Snippet for the list_versions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions.", - "file": "artifact_registry/list_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_versions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListVersions", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_sync", - "title": "Snippet for the get_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version.", - "file": "artifact_registry/get_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Version", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetVersion", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_sync", - "title": "Snippet for the delete_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version.", - "file": "artifact_registry/delete_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteVersion", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync", - "title": "Snippet for the batch_delete_versions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions.", - "file": "artifact_registry/batch_delete_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_delete_versions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#batch_delete_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "BatchDeleteVersions", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.BatchDeleteVersions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVersion_sync", - "title": "Snippet for the update_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version.", - "file": "artifact_registry/update_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Version", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateVersion", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_sync", - "title": "Snippet for the list_files call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files.", - "file": "artifact_registry/list_files.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_files", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_files", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListFiles", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_sync", - "title": "Snippet for the get_file call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file.", - "file": "artifact_registry/get_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_file", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::File", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetFile", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteFile_sync", - "title": "Snippet for the delete_file call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file.", - "file": "artifact_registry/delete_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_file", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteFile", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteFile", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateFile_sync", - "title": "Snippet for the update_file call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file.", - "file": "artifact_registry/update_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_file", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::File", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateFile", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateFile", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_sync", - "title": "Snippet for the list_tags call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags.", - "file": "artifact_registry/list_tags.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tags", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_tags", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListTags", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_sync", - "title": "Snippet for the get_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag.", - "file": "artifact_registry/get_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetTag", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_sync", - "title": "Snippet for the create_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag.", - "file": "artifact_registry/create_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateTag", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_sync", - "title": "Snippet for the update_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag.", - "file": "artifact_registry/update_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateTag", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_sync", - "title": "Snippet for the delete_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag.", - "file": "artifact_registry/delete_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteTag", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRule_sync", - "title": "Snippet for the create_rule call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule.", - "file": "artifact_registry/create_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_rule", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateRule", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRule", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListRules_sync", - "title": "Snippet for the list_rules call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules.", - "file": "artifact_registry/list_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rules", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListRules", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRules", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetRule_sync", - "title": "Snippet for the get_rule call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule.", - "file": "artifact_registry/get_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_rule", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetRule", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRule", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRule_sync", - "title": "Snippet for the update_rule call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule.", - "file": "artifact_registry/update_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_rule", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Rule", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateRule", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRule", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRule_sync", - "title": "Snippet for the delete_rule call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule.", - "file": "artifact_registry/delete_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_rule", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteRule", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRule", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy.", - "file": "artifact_registry/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy.", - "file": "artifact_registry/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions.", - "file": "artifact_registry/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_sync", - "title": "Snippet for the get_project_settings call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings.", - "file": "artifact_registry/get_project_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_project_settings", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_project_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ProjectSettings", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetProjectSettings", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_sync", - "title": "Snippet for the update_project_settings call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings.", - "file": "artifact_registry/update_project_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_project_settings", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_project_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ProjectSettings", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateProjectSettings", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetVPCSCConfig_sync", - "title": "Snippet for the get_vpcsc_config call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config.", - "file": "artifact_registry/get_vpcsc_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vpcsc_config", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_vpcsc_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetVPCSCConfig", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVPCSCConfig", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateVPCSCConfig_sync", - "title": "Snippet for the update_vpcsc_config call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config.", - "file": "artifact_registry/update_vpcsc_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vpcsc_config", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_vpcsc_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateVPCSCConfig", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateVPCSCConfig", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_UpdatePackage_sync", - "title": "Snippet for the update_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package.", - "file": "artifact_registry/update_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#update_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Package", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdatePackage", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdatePackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ListAttachments_sync", - "title": "Snippet for the list_attachments call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments.", - "file": "artifact_registry/list_attachments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_attachments", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#list_attachments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListAttachments", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListAttachments", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_GetAttachment_sync", - "title": "Snippet for the get_attachment call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment.", - "file": "artifact_registry/get_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_attachment", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#get_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1::Attachment", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetAttachment", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetAttachment", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_CreateAttachment_sync", - "title": "Snippet for the create_attachment call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment.", - "file": "artifact_registry/create_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_attachment", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#create_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateAttachment", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateAttachment", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteAttachment_sync", - "title": "Snippet for the delete_attachment call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment.", - "file": "artifact_registry/delete_attachment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_attachment", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#delete_attachment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteAttachment", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteAttachment", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1_generated_ArtifactRegistry_ExportArtifact_sync", - "title": "Snippet for the export_artifact call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact.", - "file": "artifact_registry/export_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_artifact", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client#export_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ExportArtifact", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry.ExportArtifact", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb deleted file mode 100644 index b88fa033a980..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/devtools/artifactregistry/v1/service_pb" -require "google/devtools/artifactregistry/v1/service_services_pb" -require "google/cloud/artifact_registry/v1/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb deleted file mode 100644 index ee6f6455b726..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_paths_test.rb +++ /dev/null @@ -1,223 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/artifact_registry/v1/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_attachment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.attachment_path project: "value0", location: "value1", repository: "value2", attachment: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/attachments/value3", path - end - end - - def test_docker_image_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.docker_image_path project: "value0", location: "value1", repository: "value2", docker_image: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/dockerImages/value3", path - end - end - - def test_file_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.file_path project: "value0", location: "value1", repository: "value2", file: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/files/value3", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_maven_artifact_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.maven_artifact_path project: "value0", location: "value1", repository: "value2", maven_artifact: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/mavenArtifacts/value3", path - end - end - - def test_npm_package_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.npm_package_path project: "value0", location: "value1", repository: "value2", npm_package: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/npmPackages/value3", path - end - end - - def test_package_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.package_path project: "value0", location: "value1", repository: "value2", package: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3", path - end - end - - def test_project_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_settings_path project: "value0" - assert_equal "projects/value0/projectSettings", path - end - end - - def test_python_package_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.python_package_path project: "value0", location: "value1", repository: "value2", python_package: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/pythonPackages/value3", path - end - end - - def test_repository_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.repository_path project: "value0", location: "value1", repository: "value2" - assert_equal "projects/value0/locations/value1/repositories/value2", path - end - end - - def test_rule_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rule_path project: "value0", location: "value1", repository: "value2", rule: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/rules/value3", path - end - end - - def test_secret_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" - assert_equal "projects/value0/secrets/value1/versions/value2", path - end - end - - def test_tag_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tag_path project: "value0", location: "value1", repository: "value2", package: "value3", tag: "value4" - assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/tags/value4", path - end - end - - def test_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.version_path project: "value0", location: "value1", repository: "value2", package: "value3", version: "value4" - assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/versions/value4", path - end - end - - def test_vpcsc_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vpcsc_config_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1/vpcscConfig", path - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb deleted file mode 100644 index 9529929725eb..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_rest_test.rb +++ /dev/null @@ -1,2861 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/devtools/artifactregistry/v1/service_pb" -require "google/cloud/artifact_registry/v1/artifact_registry/rest" - - -class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_docker_images - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_docker_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_docker_images_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_docker_images_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_docker_images parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_docker_images ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_docker_images(::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_docker_images_client_stub.call_count - end - end - end - - def test_get_docker_image - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_docker_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_docker_image_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_docker_image_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_docker_image({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_docker_image name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_docker_image ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_docker_image({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_docker_image(::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_docker_image_client_stub.call_count - end - end - end - - def test_list_maven_artifacts - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_maven_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_maven_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_maven_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_maven_artifacts parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_maven_artifacts ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_maven_artifacts(::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_maven_artifacts_client_stub.call_count - end - end - end - - def test_get_maven_artifact - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_maven_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_maven_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_maven_artifact_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_maven_artifact({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_maven_artifact name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_maven_artifact ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_maven_artifact({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_maven_artifact(::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_maven_artifact_client_stub.call_count - end - end - end - - def test_list_npm_packages - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_npm_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_npm_packages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_npm_packages_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_npm_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_npm_packages parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_npm_packages ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_npm_packages({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_npm_packages(::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_npm_packages_client_stub.call_count - end - end - end - - def test_get_npm_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_npm_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_npm_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_npm_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_npm_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_npm_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_npm_package ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_npm_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_npm_package(::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_npm_package_client_stub.call_count - end - end - end - - def test_list_python_packages - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_python_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_python_packages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_python_packages_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_python_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_python_packages parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_python_packages ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_python_packages({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_python_packages(::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_python_packages_client_stub.call_count - end - end - end - - def test_get_python_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_python_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_python_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_python_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_python_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_python_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_python_package ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_python_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_python_package(::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_python_package_client_stub.call_count - end - end - end - - def test_import_apt_artifacts - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_apt_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_apt_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_apt_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_apt_artifacts gcs_source: gcs_source, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_apt_artifacts_client_stub.call_count - end - end - end - - def test_import_yum_artifacts - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_yum_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_yum_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_yum_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_yum_artifacts gcs_source: gcs_source, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_yum_artifacts_client_stub.call_count - end - end - end - - def test_list_repositories - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_repositories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_repositories parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_repositories ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_repositories(::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_repositories_client_stub.call_count - end - end - end - - def test_get_repository - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Repository.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_repository({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_repository name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_repository ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_repository({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_repository(::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_repository_client_stub.call_count - end - end - end - - def test_create_repository - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - repository_id = "hello world" - repository = {} - - create_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_repository parent: parent, repository_id: repository_id, repository: repository do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_repository ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_repository(::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_repository_client_stub.call_count - end - end - end - - def test_update_repository - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Repository.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - repository = {} - update_mask = {} - - update_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_repository({ repository: repository, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_repository repository: repository, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_repository ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_repository({ repository: repository, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_repository(::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_repository_client_stub.call_count - end - end - end - - def test_delete_repository - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_repository({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_repository name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_repository ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_repository({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_repository(::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_repository_client_stub.call_count - end - end - end - - def test_list_packages - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_packages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_packages_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_packages parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_packages ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_packages(::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_packages_client_stub.call_count - end - end - end - - def test_get_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Package.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_package ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_package(::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_package_client_stub.call_count - end - end - end - - def test_delete_package - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_package ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_package(::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_package_client_stub.call_count - end - end - end - - def test_list_versions - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - order_by = "hello world" - filter = "hello world" - - list_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_versions ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_versions(::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_versions_client_stub.call_count - end - end - end - - def test_get_version - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Version.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - - get_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_version({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_version name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_version ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_version({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_version(::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_count - end - end - end - - def test_delete_version - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_version({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_version name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_version ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_version({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_version(::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_version_client_stub.call_count - end - end - end - - def test_batch_delete_versions - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - validate_only = true - - batch_delete_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_batch_delete_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_delete_versions_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_delete_versions parent: parent, names: names, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_delete_versions ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_delete_versions(::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_delete_versions_client_stub.call_count - end - end - end - - def test_update_version - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Version.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - version = {} - update_mask = {} - - update_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_version({ version: version, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_version version: version, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_version ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_version({ version: version, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_version(::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_version_client_stub.call_count - end - end - end - - def test_list_files - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_files_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_files_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_files ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_files(::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_files_client_stub.call_count - end - end - end - - def test_get_file - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::File.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_file_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_file({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_file name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_file ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_file({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_file(::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_file_client_stub.call_count - end - end - end - - def test_delete_file - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_file_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_file({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_file name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_file ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_file({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_file(::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_file_client_stub.call_count - end - end - end - - def test_update_file - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::File.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - file = {} - update_mask = {} - - update_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_file_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_file({ file: file, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_file file: file, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_file ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_file({ file: file, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_file(::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_file_client_stub.call_count - end - end - end - - def test_list_tags - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_tags_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_tags_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tags_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tags parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tags ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_tags(::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tags_client_stub.call_count - end - end - end - - def test_get_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_tag({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_tag name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_tag ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_tag({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_tag(::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tag_client_stub.call_count - end - end - end - - def test_create_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tag_id = "hello world" - tag = {} - - create_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_tag parent: parent, tag_id: tag_id, tag: tag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_tag ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_tag(::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tag_client_stub.call_count - end - end - end - - def test_update_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - tag = {} - update_mask = {} - - update_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_tag({ tag: tag, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_tag tag: tag, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_tag ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_tag({ tag: tag, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_tag(::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tag_client_stub.call_count - end - end - end - - def test_delete_tag - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_tag({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_tag name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_tag ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_tag({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_tag(::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tag_client_stub.call_count - end - end - end - - def test_create_rule - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule_id = "hello world" - rule = {} - - create_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_rule({ parent: parent, rule_id: rule_id, rule: rule }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_rule parent: parent, rule_id: rule_id, rule: rule do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_rule ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_rule({ parent: parent, rule_id: rule_id, rule: rule }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_rule(::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_count - end - end - end - - def test_list_rules - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rules ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rules(::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_count - end - end - end - - def test_get_rule - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_rule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_rule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_rule ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_rule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_rule(::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_count - end - end - end - - def test_update_rule - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rule = {} - update_mask = {} - - update_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_rule rule: rule, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_rule ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_rule(::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_rule_client_stub.call_count - end - end - end - - def test_delete_rule - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_rule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_rule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_rule ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_rule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_rule(::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_get_project_settings - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_project_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_project_settings_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_project_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_project_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_project_settings ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_project_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_project_settings(::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_project_settings_client_stub.call_count - end - end - end - - def test_update_project_settings - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - project_settings = {} - update_mask = {} - - update_project_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_project_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_project_settings_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_project_settings project_settings: project_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_project_settings ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_project_settings(::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_project_settings_client_stub.call_count - end - end - end - - def test_get_vpcsc_config - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_vpcsc_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_vpcsc_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_vpcsc_config_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_vpcsc_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_vpcsc_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_vpcsc_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_vpcsc_config_client_stub.call_count - end - end - end - - def test_update_vpcsc_config - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - vpcsc_config = {} - update_mask = {} - - update_vpcsc_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_vpcsc_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vpcsc_config_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_vpcsc_config vpcsc_config: vpcsc_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vpcsc_config_client_stub.call_count - end - end - end - - def test_update_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Package.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - package = {} - update_mask = {} - - update_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_package({ package: package, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_package package: package, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_package ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_package({ package: package, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_package(::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_package_client_stub.call_count - end - end - end - - def test_list_attachments - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_attachments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_attachments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_attachments_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_attachments({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_attachments parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_attachments ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_attachments({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_attachments(::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_attachments_client_stub.call_count - end - end - end - - def test_get_attachment - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1::Attachment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_attachment_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_attachment ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_attachment(::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_attachment_client_stub.call_count - end - end - end - - def test_create_attachment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - attachment_id = "hello world" - attachment = {} - - create_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_attachment_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_attachment parent: parent, attachment_id: attachment_id, attachment: attachment do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_attachment ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_attachment(::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_attachment_client_stub.call_count - end - end - end - - def test_delete_attachment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_attachment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_attachment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_attachment_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_attachment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_attachment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_attachment ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_attachment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_attachment(::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_attachment_client_stub.call_count - end - end - end - - def test_export_artifact - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - source_version = "hello world" - gcs_path = "hello world" - repository = "hello world" - - export_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::ServiceStub.stub :transcode_export_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_artifact_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_artifact source_version: source_version, gcs_path: gcs_path, repository: repository do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_artifact ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_artifact(::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_artifact_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb deleted file mode 100644 index 67a6a7cfdec9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/google/cloud/artifact_registry/v1/artifact_registry_test.rb +++ /dev/null @@ -1,3256 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/devtools/artifactregistry/v1/service_pb" -require "google/cloud/artifact_registry/v1/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_docker_images - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_docker_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_docker_images, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_docker_images_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_docker_images parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_docker_images ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_docker_images({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_docker_images(::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_docker_images_client_stub.call_rpc_count - end - end - - def test_get_docker_image - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_docker_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_docker_image, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_docker_image_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_docker_image({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_docker_image name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_docker_image ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_docker_image({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_docker_image(::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_docker_image_client_stub.call_rpc_count - end - end - - def test_list_maven_artifacts - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_maven_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_maven_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_maven_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_maven_artifacts parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_maven_artifacts ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_maven_artifacts({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_maven_artifacts(::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_maven_artifacts_client_stub.call_rpc_count - end - end - - def test_get_maven_artifact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_maven_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_maven_artifact, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_maven_artifact_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_maven_artifact({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_maven_artifact name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_maven_artifact ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_maven_artifact({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_maven_artifact(::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_maven_artifact_client_stub.call_rpc_count - end - end - - def test_list_npm_packages - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_npm_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_npm_packages, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_npm_packages_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_npm_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_npm_packages parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_npm_packages ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_npm_packages({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_npm_packages(::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_npm_packages_client_stub.call_rpc_count - end - end - - def test_get_npm_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_npm_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_npm_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_npm_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_npm_package({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_npm_package name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_npm_package ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_npm_package({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_npm_package(::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_npm_package_client_stub.call_rpc_count - end - end - - def test_list_python_packages - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_python_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_python_packages, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_python_packages_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_python_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_python_packages parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_python_packages ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_python_packages({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_python_packages(::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_python_packages_client_stub.call_rpc_count - end - end - - def test_get_python_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_python_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_python_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_python_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_python_package({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_python_package name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_python_package ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_python_package({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_python_package(::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_python_package_client_stub.call_rpc_count - end - end - - def test_import_apt_artifacts - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_apt_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_apt_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsGcsSource), request["gcs_source"] - assert_equal :gcs_source, request.source - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_apt_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_apt_artifacts gcs_source: gcs_source, parent: parent do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_apt_artifacts_client_stub.call_rpc_count - end - end - - def test_import_yum_artifacts - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_yum_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_yum_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsGcsSource), request["gcs_source"] - assert_equal :gcs_source, request.source - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_yum_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_yum_artifacts gcs_source: gcs_source, parent: parent do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_yum_artifacts_client_stub.call_rpc_count - end - end - - def test_list_repositories - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_repositories, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_repositories_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_repositories parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_repositories ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_repositories(::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_repositories_client_stub.call_rpc_count - end - end - - def test_get_repository - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Repository.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_repository({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_repository name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_repository ::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_repository({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_repository(::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_repository_client_stub.call_rpc_count - end - end - - def test_create_repository - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - repository_id = "hello world" - repository = {} - - create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["repository_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Repository), request["repository"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_repository parent: parent, repository_id: repository_id, repository: repository do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_repository ::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_repository(::Google::Cloud::ArtifactRegistry::V1::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_repository_client_stub.call_rpc_count - end - end - - def test_update_repository - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Repository.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - repository = {} - update_mask = {} - - update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Repository), request["repository"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_repository({ repository: repository, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_repository repository: repository, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_repository ::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_repository({ repository: repository, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_repository(::Google::Cloud::ArtifactRegistry::V1::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_repository_client_stub.call_rpc_count - end - end - - def test_delete_repository - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_repository({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_repository name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_repository ::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_repository({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_repository(::Google::Cloud::ArtifactRegistry::V1::DeleteRepositoryRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_repository_client_stub.call_rpc_count - end - end - - def test_list_packages - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_packages, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_packages_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_packages parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_packages ::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_packages({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_packages(::Google::Cloud::ArtifactRegistry::V1::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_packages_client_stub.call_rpc_count - end - end - - def test_get_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Package.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_package({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_package name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_package ::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_package({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_package(::Google::Cloud::ArtifactRegistry::V1::GetPackageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_package_client_stub.call_rpc_count - end - end - - def test_delete_package - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_package({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_package name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_package ::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_package({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_package(::Google::Cloud::ArtifactRegistry::V1::DeletePackageRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_package_client_stub.call_rpc_count - end - end - - def test_list_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - order_by = "hello world" - filter = "hello world" - - list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_versions, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_versions_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_versions ::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_versions(::Google::Cloud::ArtifactRegistry::V1::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_versions_client_stub.call_rpc_count - end - end - - def test_get_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Version.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - - get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_version({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_version name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_version ::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_version({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_version(::Google::Cloud::ArtifactRegistry::V1::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_rpc_count - end - end - - def test_delete_version - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_version({ name: name, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_version name: name, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_version ::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_version({ name: name, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_version(::Google::Cloud::ArtifactRegistry::V1::DeleteVersionRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_version_client_stub.call_rpc_count - end - end - - def test_batch_delete_versions - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - validate_only = true - - batch_delete_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_delete_versions, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_delete_versions_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_delete_versions parent: parent, names: names, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_delete_versions ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_delete_versions({ parent: parent, names: names, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_delete_versions(::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new(parent: parent, names: names, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_delete_versions_client_stub.call_rpc_count - end - end - - def test_update_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Version.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - version = {} - update_mask = {} - - update_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Version), request["version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_version({ version: version, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_version version: version, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_version ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_version({ version: version, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_version(::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new(version: version, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_version_client_stub.call_rpc_count - end - end - - def test_list_files - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_files, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_files_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_files ::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_files(::Google::Cloud::ArtifactRegistry::V1::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_files_client_stub.call_rpc_count - end - end - - def test_get_file - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::File.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_file, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_file_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_file({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_file name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_file ::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_file({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_file(::Google::Cloud::ArtifactRegistry::V1::GetFileRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_file_client_stub.call_rpc_count - end - end - - def test_delete_file - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_file, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_file_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_file({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_file name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_file ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_file({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_file(::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_file_client_stub.call_rpc_count - end - end - - def test_update_file - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::File.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - file = {} - update_mask = {} - - update_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_file, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::File), request["file"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_file_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_file({ file: file, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_file file: file, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_file ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_file({ file: file, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_file(::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new(file: file, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_file_client_stub.call_rpc_count - end - end - - def test_list_tags - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_tags_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tags, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tags_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_tags parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_tags ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_tags(::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tags_client_stub.call_rpc_count - end - end - - def test_get_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_tag({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_tag name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_tag ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_tag({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_tag(::Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_tag_client_stub.call_rpc_count - end - end - - def test_create_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tag_id = "hello world" - tag = {} - - create_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tag_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Tag), request["tag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_tag parent: parent, tag_id: tag_id, tag: tag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_tag ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_tag(::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_tag_client_stub.call_rpc_count - end - end - - def test_update_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - tag = {} - update_mask = {} - - update_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Tag), request["tag"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_tag({ tag: tag, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_tag tag: tag, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_tag ::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_tag({ tag: tag, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_tag(::Google::Cloud::ArtifactRegistry::V1::UpdateTagRequest.new(tag: tag, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_tag_client_stub.call_rpc_count - end - end - - def test_delete_tag - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_tag({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_tag name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_tag ::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_tag({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_tag(::Google::Cloud::ArtifactRegistry::V1::DeleteTagRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_tag_client_stub.call_rpc_count - end - end - - def test_create_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule_id = "hello world" - rule = {} - - create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_rule, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["rule_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Rule), request["rule"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_rule_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_rule({ parent: parent, rule_id: rule_id, rule: rule }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_rule parent: parent, rule_id: rule_id, rule: rule do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_rule ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_rule({ parent: parent, rule_id: rule_id, rule: rule }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_rule(::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new(parent: parent, rule_id: rule_id, rule: rule), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_rpc_count - end - end - - def test_list_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rules, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rules_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_rules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_rules ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_rules(::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_rpc_count - end - end - - def test_get_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_rule, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_rule_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_rule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_rule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_rule ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_rule({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_rule(::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_rpc_count - end - end - - def test_update_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Rule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - rule = {} - update_mask = {} - - update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_rule, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Rule), request["rule"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_rule_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_rule rule: rule, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_rule ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_rule({ rule: rule, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_rule(::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_rule_client_stub.call_rpc_count - end - end - - def test_delete_rule - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_rule, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_rule_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_rule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_rule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_rule ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_rule({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_rule(::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_get_project_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_project_settings, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_project_settings_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_project_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_project_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_project_settings ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_project_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_project_settings(::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_project_settings_client_stub.call_rpc_count - end - end - - def test_update_project_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - project_settings = {} - update_mask = {} - - update_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_project_settings, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings), request["project_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_project_settings_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_project_settings project_settings: project_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_project_settings ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_project_settings(::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_project_settings_client_stub.call_rpc_count - end - end - - def test_get_vpcsc_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_vpcsc_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vpcsc_config, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vpcsc_config_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_vpcsc_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_vpcsc_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_vpcsc_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_vpcsc_config_client_stub.call_rpc_count - end - end - - def test_update_vpcsc_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - vpcsc_config = {} - update_mask = {} - - update_vpcsc_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vpcsc_config, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig), request["vpcsc_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vpcsc_config_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_vpcsc_config vpcsc_config: vpcsc_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_vpcsc_config ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_vpcsc_config({ vpcsc_config: vpcsc_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_vpcsc_config(::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new(vpcsc_config: vpcsc_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_vpcsc_config_client_stub.call_rpc_count - end - end - - def test_update_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Package.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - package = {} - update_mask = {} - - update_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Package), request["package"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_package({ package: package, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_package package: package, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_package ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_package({ package: package, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_package(::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new(package: package, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_package_client_stub.call_rpc_count - end - end - - def test_list_attachments - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_attachments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_attachments, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_attachments_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_attachments({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_attachments parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_attachments ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_attachments({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_attachments(::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_attachments_client_stub.call_rpc_count - end - end - - def test_get_attachment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1::Attachment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_attachment, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_attachment_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_attachment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_attachment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_attachment ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_attachment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_attachment(::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_attachment_client_stub.call_rpc_count - end - end - - def test_create_attachment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - attachment_id = "hello world" - attachment = {} - - create_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_attachment, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["attachment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1::Attachment), request["attachment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_attachment_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_attachment parent: parent, attachment_id: attachment_id, attachment: attachment do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_attachment ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_attachment({ parent: parent, attachment_id: attachment_id, attachment: attachment }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_attachment(::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new(parent: parent, attachment_id: attachment_id, attachment: attachment), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_attachment_client_stub.call_rpc_count - end - end - - def test_delete_attachment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_attachment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_attachment, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_attachment_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_attachment({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_attachment name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_attachment ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_attachment({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_attachment(::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_attachment_client_stub.call_rpc_count - end - end - - def test_export_artifact - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - source_version = "hello world" - gcs_path = "hello world" - repository = "hello world" - - export_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_artifact, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, request - assert_equal "hello world", request["source_version"] - assert_equal :source_version, request.source_artifact - assert_equal "hello world", request["gcs_path"] - assert_equal :gcs_path, request.destination - assert_equal "hello world", request["repository"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_artifact_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_artifact source_version: source_version, gcs_path: gcs_path, repository: repository do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_artifact ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_artifact({ source_version: source_version, gcs_path: gcs_path, repository: repository }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_artifact(::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest.new(source_version: source_version, gcs_path: gcs_path, repository: repository), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_artifact_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb b/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json deleted file mode 100644 index 7910a7e9b677..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "artifactregistry.googleapis.com", - "api_shortname": "artifactregistry", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest", - "distribution_name": "google-cloud-artifact_registry-v1beta2", - "is_cloud": true, - "language": "ruby", - "name": "artifactregistry", - "name_pretty": "Artifact Registry V1beta2 API", - "product_documentation": "https://cloud.google.com/artifact-registry/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ARTIFACT_REGISTRY", - "ruby-cloud-product-url": "https://cloud.google.com/artifact-registry/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml deleted file mode 100644 index 6d12e8a99a67..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-artifact_registry-v1beta2.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-artifact_registry-v1beta2.rb" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts deleted file mode 100644 index 577e906ef894..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Artifact Registry V1beta2 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md deleted file mode 100644 index 658611b9d9e8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-artifact_registry-v1beta2 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-artifact_registry-v1beta2 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/artifact_registry/v1beta2" - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/artifact_registry/v1beta2" - -::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-artifact_registry-v1beta2 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/artifact_registry/v1beta2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md deleted file mode 100644 index 94ae812d7df2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Artifact Registry V1beta2 API - -Store and manage build artifacts in a scalable and integrated service built on Google infrastructure. - -Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Artifact Registry V1beta2 API. Most users should consider using -the main client gem, -[google-cloud-artifact_registry](https://rubygems.org/gems/google-cloud-artifact_registry). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-artifact_registry-v1beta2 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/artifact_registry/v1beta2" - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new -request = ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new # (request fields as keyword arguments...) -response = client.import_apt_artifacts request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/artifact-registry/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/artifact_registry/v1beta2" -require "logger" - -client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-artifact_registry`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-artifact_registry-v1beta2`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-artifact_registry`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-artifact_registry-v1beta2`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile deleted file mode 100644 index 1d749b6abb41..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-artifact_registry-v1beta2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ARTIFACT_REGISTRY_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ARTIFACT_REGISTRY_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ARTIFACT_REGISTRY_TEST_PROJECT=test123 ARTIFACT_REGISTRY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ARTIFACT_REGISTRY_PROJECT"] = project - ENV["ARTIFACT_REGISTRY_TEST_PROJECT"] = project - ENV["ARTIFACT_REGISTRY_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-artifact_registry-v1beta2 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-artifact_registry-v1beta2 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-artifact_registry-v1beta2 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-artifact_registry-v1beta2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-artifact_registry-v1beta2" - header "google-cloud-artifact_registry-v1beta2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-artifact_registry-v1beta2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-artifact_registry-v1beta2 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-artifact_registry-v1beta2 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-artifact_registry-v1beta2 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json deleted file mode 100644 index 478bacfc4ddd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/gapic_metadata.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.devtools.artifactregistry.v1beta2", - "libraryPackage": "::Google::Cloud::ArtifactRegistry::V1beta2", - "services": { - "ArtifactRegistry": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client", - "rpcs": { - "ImportAptArtifacts": { - "methods": [ - "import_apt_artifacts" - ] - }, - "ImportYumArtifacts": { - "methods": [ - "import_yum_artifacts" - ] - }, - "ListRepositories": { - "methods": [ - "list_repositories" - ] - }, - "GetRepository": { - "methods": [ - "get_repository" - ] - }, - "CreateRepository": { - "methods": [ - "create_repository" - ] - }, - "UpdateRepository": { - "methods": [ - "update_repository" - ] - }, - "DeleteRepository": { - "methods": [ - "delete_repository" - ] - }, - "ListPackages": { - "methods": [ - "list_packages" - ] - }, - "GetPackage": { - "methods": [ - "get_package" - ] - }, - "DeletePackage": { - "methods": [ - "delete_package" - ] - }, - "ListVersions": { - "methods": [ - "list_versions" - ] - }, - "GetVersion": { - "methods": [ - "get_version" - ] - }, - "DeleteVersion": { - "methods": [ - "delete_version" - ] - }, - "ListFiles": { - "methods": [ - "list_files" - ] - }, - "GetFile": { - "methods": [ - "get_file" - ] - }, - "ListTags": { - "methods": [ - "list_tags" - ] - }, - "GetTag": { - "methods": [ - "get_tag" - ] - }, - "CreateTag": { - "methods": [ - "create_tag" - ] - }, - "UpdateTag": { - "methods": [ - "update_tag" - ] - }, - "DeleteTag": { - "methods": [ - "delete_tag" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "GetProjectSettings": { - "methods": [ - "get_project_settings" - ] - }, - "UpdateProjectSettings": { - "methods": [ - "update_project_settings" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec deleted file mode 100644 index 7af21b8ecad3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/google-cloud-artifact_registry-v1beta2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/artifact_registry/v1beta2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-artifact_registry-v1beta2" - gem.version = Google::Cloud::ArtifactRegistry::V1beta2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure. Note that google-cloud-artifact_registry-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-artifact_registry instead. See the readme for more details." - gem.summary = "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb deleted file mode 100644 index 42773d56b713..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google-cloud-artifact_registry-v1beta2.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/artifact_registry/v1beta2" diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb deleted file mode 100644 index 5a48465dc9de..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/artifact_registry/v1beta2/artifact_registry" -require "google/cloud/artifact_registry/v1beta2/version" - -module Google - module Cloud - module ArtifactRegistry - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/artifact_registry/v1beta2" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/artifact_registry/v1beta2" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module V1beta2 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta2", "_helpers.rb" -require "google/cloud/artifact_registry/v1beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb deleted file mode 100644 index de5f1fa1ee86..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/artifact_registry/v1beta2/version" - -require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/operations" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/client" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - ## - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/artifact_registry/v1beta2/artifact_registry" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module ArtifactRegistry - end - end - end - end -end - -helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb deleted file mode 100644 index cd41e2a04e6a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb +++ /dev/null @@ -1,3002 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - ## - # Client for the ArtifactRegistry service. - # - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :artifact_registry_stub - - ## - # Configure the ArtifactRegistry Client class. - # - # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ArtifactRegistry clients - # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ArtifactRegistry", "V1beta2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_repositories.timeout = 30.0 - default_config.rpcs.list_repositories.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_repository.timeout = 30.0 - default_config.rpcs.get_repository.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_repository.timeout = 30.0 - - default_config.rpcs.update_repository.timeout = 30.0 - - default_config.rpcs.delete_repository.timeout = 30.0 - default_config.rpcs.delete_repository.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_packages.timeout = 30.0 - default_config.rpcs.list_packages.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_package.timeout = 30.0 - default_config.rpcs.get_package.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_package.timeout = 30.0 - default_config.rpcs.delete_package.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_versions.timeout = 30.0 - default_config.rpcs.list_versions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_version.timeout = 30.0 - default_config.rpcs.get_version.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_version.timeout = 30.0 - default_config.rpcs.delete_version.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_files.timeout = 30.0 - default_config.rpcs.list_files.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_file.timeout = 30.0 - default_config.rpcs.get_file.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tags.timeout = 30.0 - default_config.rpcs.list_tags.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_tag.timeout = 30.0 - default_config.rpcs.get_tag.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_tag.timeout = 30.0 - - default_config.rpcs.update_tag.timeout = 30.0 - - default_config.rpcs.delete_tag.timeout = 30.0 - default_config.rpcs.delete_tag.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 30.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.test_iam_permissions.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @artifact_registry_stub.universe_domain - end - - ## - # Create a new ArtifactRegistry client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ArtifactRegistry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/devtools/artifactregistry/v1beta2/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @artifact_registry_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @artifact_registry_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @artifact_registry_stub.endpoint - config.universe_domain = @artifact_registry_stub.universe_domain - config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @artifact_registry_stub.logger - end - - # Service calls - - ## - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_apt_artifacts(request, options = nil) - # Pass arguments to `import_apt_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_apt_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new - # - # # Call the import_apt_artifacts method. - # result = client.import_apt_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_apt_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_apt_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_apt_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_yum_artifacts(request, options = nil) - # Pass arguments to `import_yum_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_yum_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new - # - # # Call the import_yum_artifacts method. - # result = client.import_yum_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_yum_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_yum_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_yum_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists repositories. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_repositories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose repositories will be listed. - # @param page_size [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new - # - # # Call the list_repositories method. - # result = client.list_repositories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Repository. - # p item - # end - # - def list_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_repositories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_repositories, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - # p result - # - def get_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_repository, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_repository(parent: nil, repository_id: nil, repository: nil) - # Pass arguments to `create_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the repository will be created. - # @param repository_id [::String] - # The repository id to use for this repository. - # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] - # The repository to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new - # - # # Call the create_repository method. - # result = client.create_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_repository, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_repository(repository: nil, update_mask: nil) - # Pass arguments to `update_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] - # The repository that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - # p result - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.repository&.name - header_params["repository.name"] = request.repository.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_repository, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_repository(name: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new - # - # # Call the delete_repository method. - # result = client.delete_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_repository, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists packages. - # - # @overload list_packages(request, options = nil) - # Pass arguments to `list_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose packages will be listed. - # @param page_size [::Integer] - # The maximum number of packages to return. - # Maximum page size is 10,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new - # - # # Call the list_packages method. - # result = client.list_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. - # p item - # end - # - def list_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_packages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a package. - # - # @overload get_package(request, options = nil) - # Pass arguments to `get_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_package(name: nil) - # Pass arguments to `get_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the package to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new - # - # # Call the get_package method. - # result = client.get_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. - # p result - # - def get_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_package, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - # - # @overload delete_package(request, options = nil) - # Pass arguments to `delete_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_package(name: nil) - # Pass arguments to `delete_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the package to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new - # - # # Call the delete_package method. - # result = client.delete_package request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_package.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists versions. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil) - # Pass arguments to `list_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose versions will be listed. - # @param page_size [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # @param order_by [::String] - # Optional. The field to order the results by. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a version - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the version to retrieve. - # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_version(name: nil, force: nil) - # Pass arguments to `delete_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the version to delete. - # @param force [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists files. - # - # @overload list_files(request, options = nil) - # Pass arguments to `list_files` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the repository whose files will be listed. For example: - # "projects/p1/locations/us-central1/repositories/repo1 - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # - # An example of using a filter: - # - # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - # ID starting with "a/b/". - # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - # Files owned by the version `1.0` in package `pkg1`. - # @param page_size [::Integer] - # The maximum number of files to return. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new - # - # # Call the list_files method. - # result = client.list_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. - # p item - # end - # - def list_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_files.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a file. - # - # @overload get_file(request, options = nil) - # Pass arguments to `get_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_file(name: nil) - # Pass arguments to `get_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the file to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new - # - # # Call the get_file method. - # result = client.get_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. - # p result - # - def get_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_file, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tags. - # - # @overload list_tags(request, options = nil) - # Pass arguments to `list_tags` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tags` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose tags will be listed. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `version` - # - # An example of using a filter: - # - # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - # --> Tags that are applied to the version `1.0` in package `pkg1`. - # @param page_size [::Integer] - # The maximum number of tags to return. Maximum page size is 10,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new - # - # # Call the list_tags method. - # result = client.list_tags request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p item - # end - # - def list_tags request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tags.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tags.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tags.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a tag. - # - # @overload get_tag(request, options = nil) - # Pass arguments to `get_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_tag(name: nil) - # Pass arguments to `get_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new - # - # # Call the get_tag method. - # result = client.get_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def get_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_tag, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a tag. - # - # @overload create_tag(request, options = nil) - # Pass arguments to `create_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_tag(parent: nil, tag_id: nil, tag: nil) - # Pass arguments to `create_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource where the tag will be created. - # @param tag_id [::String] - # The tag id to use for this repository. - # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] - # The tag to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new - # - # # Call the create_tag method. - # result = client.create_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def create_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :create_tag, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a tag. - # - # @overload update_tag(request, options = nil) - # Pass arguments to `update_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_tag(tag: nil, update_mask: nil) - # Pass arguments to `update_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] - # The tag that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new - # - # # Call the update_tag method. - # result = client.update_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def update_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.tag&.name - header_params["tag.name"] = request.tag.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_tag, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a tag. - # - # @overload delete_tag(request, options = nil) - # Pass arguments to `delete_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_tag(name: nil) - # Pass arguments to `delete_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new - # - # # Call the delete_tag method. - # result = client.delete_tag request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :delete_tag, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the IAM policy for a given resource. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for a given resource. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Tests if the caller has a list of permissions on a resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the Settings for the Project. - # - # @overload get_project_settings(request, options = nil) - # Pass arguments to `get_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_project_settings(name: nil) - # Pass arguments to `get_project_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the projectSettings resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new - # - # # Call the get_project_settings method. - # result = client.get_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - # p result - # - def get_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_project_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Settings for the Project. - # - # @overload update_project_settings(request, options = nil) - # Pass arguments to `update_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_project_settings(project_settings: nil, update_mask: nil) - # Pass arguments to `update_project_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash] - # The project settings. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new - # - # # Call the update_project_settings method. - # result = client.update_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - # p result - # - def update_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_project_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.project_settings&.name - header_params["project_settings.name"] = request.project_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ArtifactRegistry API. - # - # This class represents the configuration for ArtifactRegistry, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # import_apt_artifacts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.import_apt_artifacts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.import_apt_artifacts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ArtifactRegistry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `import_apt_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_apt_artifacts - ## - # RPC-specific configuration for `import_yum_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_yum_artifacts - ## - # RPC-specific configuration for `list_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_repositories - ## - # RPC-specific configuration for `get_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :get_repository - ## - # RPC-specific configuration for `create_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :create_repository - ## - # RPC-specific configuration for `update_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :update_repository - ## - # RPC-specific configuration for `delete_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_repository - ## - # RPC-specific configuration for `list_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_packages - ## - # RPC-specific configuration for `get_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_package - ## - # RPC-specific configuration for `delete_package` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_package - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - ## - # RPC-specific configuration for `list_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_files - ## - # RPC-specific configuration for `get_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file - ## - # RPC-specific configuration for `list_tags` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tags - ## - # RPC-specific configuration for `get_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tag - ## - # RPC-specific configuration for `create_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tag - ## - # RPC-specific configuration for `update_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tag - ## - # RPC-specific configuration for `delete_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tag - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `get_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_settings - ## - # RPC-specific configuration for `update_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_settings - - # @private - def initialize parent_rpcs = nil - import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts - @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config - import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts - @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config - list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories - @list_repositories = ::Gapic::Config::Method.new list_repositories_config - get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository - @get_repository = ::Gapic::Config::Method.new get_repository_config - create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository - @create_repository = ::Gapic::Config::Method.new create_repository_config - update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository - @update_repository = ::Gapic::Config::Method.new update_repository_config - delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository - @delete_repository = ::Gapic::Config::Method.new delete_repository_config - list_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages - @list_packages = ::Gapic::Config::Method.new list_packages_config - get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package - @get_package = ::Gapic::Config::Method.new get_package_config - delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package - @delete_package = ::Gapic::Config::Method.new delete_package_config - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files - @list_files = ::Gapic::Config::Method.new list_files_config - get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file - @get_file = ::Gapic::Config::Method.new get_file_config - list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags - @list_tags = ::Gapic::Config::Method.new list_tags_config - get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag - @get_tag = ::Gapic::Config::Method.new get_tag_config - create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag - @create_tag = ::Gapic::Config::Method.new create_tag_config - update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag - @update_tag = ::Gapic::Config::Method.new update_tag_config - delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag - @delete_tag = ::Gapic::Config::Method.new delete_tag_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings - @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config - update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings - @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb deleted file mode 100644 index bca5d7763a5e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - # Credentials for the ArtifactRegistry API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "ARTIFACT_REGISTRY_CREDENTIALS", - "ARTIFACT_REGISTRY_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ARTIFACT_REGISTRY_CREDENTIALS_JSON", - "ARTIFACT_REGISTRY_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb deleted file mode 100644 index 8b3c92993a8f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ArtifactRegistry Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb deleted file mode 100644 index 4b937ff38983..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - # Path helper methods for the ArtifactRegistry API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified ProjectSettings resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/projectSettings` - # - # @param project [String] - # - # @return [::String] - def project_settings_path project: - "projects/#{project}/projectSettings" - end - - ## - # Create a fully-qualified Repository resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # - # @return [::String] - def repository_path project:, location:, repository: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}" - end - - ## - # Create a fully-qualified Tag resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param package [String] - # @param tag [String] - # - # @return [::String] - def tag_path project:, location:, repository:, package:, tag: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb deleted file mode 100644 index 4e4826632d6d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/artifact_registry/v1beta2/version" -require "google/cloud/artifact_registry/v1beta2/bindings_override" - -require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - ## - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module ArtifactRegistry - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb deleted file mode 100644 index 3a6cd238f23a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb +++ /dev/null @@ -1,2792 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - module Rest - ## - # REST client for the ArtifactRegistry service. - # - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :artifact_registry_stub - - ## - # Configure the ArtifactRegistry Client class. - # - # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ArtifactRegistry clients - # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ArtifactRegistry", "V1beta2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_repositories.timeout = 30.0 - default_config.rpcs.list_repositories.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_repository.timeout = 30.0 - default_config.rpcs.get_repository.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_repository.timeout = 30.0 - - default_config.rpcs.update_repository.timeout = 30.0 - - default_config.rpcs.delete_repository.timeout = 30.0 - default_config.rpcs.delete_repository.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_packages.timeout = 30.0 - default_config.rpcs.list_packages.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_package.timeout = 30.0 - default_config.rpcs.get_package.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_package.timeout = 30.0 - default_config.rpcs.delete_package.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_versions.timeout = 30.0 - default_config.rpcs.list_versions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_version.timeout = 30.0 - default_config.rpcs.get_version.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_version.timeout = 30.0 - default_config.rpcs.delete_version.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_files.timeout = 30.0 - default_config.rpcs.list_files.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_file.timeout = 30.0 - default_config.rpcs.get_file.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tags.timeout = 30.0 - default_config.rpcs.list_tags.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_tag.timeout = 30.0 - default_config.rpcs.get_tag.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_tag.timeout = 30.0 - - default_config.rpcs.update_tag.timeout = 30.0 - - default_config.rpcs.delete_tag.timeout = 30.0 - default_config.rpcs.delete_tag.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 30.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.test_iam_permissions.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @artifact_registry_stub.universe_domain - end - - ## - # Create a new ArtifactRegistry REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ArtifactRegistry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @artifact_registry_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @artifact_registry_stub.endpoint - config.universe_domain = @artifact_registry_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @artifact_registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @artifact_registry_stub.logger - end - - # Service calls - - ## - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_apt_artifacts(request, options = nil) - # Pass arguments to `import_apt_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_apt_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new - # - # # Call the import_apt_artifacts method. - # result = client.import_apt_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_apt_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_apt_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.import_apt_artifacts request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - # - # @overload import_yum_artifacts(request, options = nil) - # Pass arguments to `import_yum_artifacts` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_yum_artifacts(gcs_source: nil, parent: nil) - # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash] - # Google Cloud Storage location where input content is located. - # @param parent [::String] - # The name of the parent resource where the artifacts will be imported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new - # - # # Call the import_yum_artifacts method. - # result = client.import_yum_artifacts request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_yum_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_yum_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.import_yum_artifacts request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists repositories. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_repositories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource whose repositories will be listed. - # @param page_size [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new - # - # # Call the list_repositories method. - # result = client.list_repositories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Repository. - # p item - # end - # - def list_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_repositories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_repositories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_repositories, "repositories", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - # p result - # - def get_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_repository request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_repository(parent: nil, repository_id: nil, repository: nil) - # Pass arguments to `create_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource where the repository will be created. - # @param repository_id [::String] - # The repository id to use for this repository. - # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] - # The repository to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new - # - # # Call the create_repository method. - # result = client.create_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_repository request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_repository(repository: nil, update_mask: nil) - # Pass arguments to `update_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash] - # The repository that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - # p result - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_repository request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_repository(name: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the repository to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new - # - # # Call the delete_repository method. - # result = client.delete_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_repository request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists packages. - # - # @overload list_packages(request, options = nil) - # Pass arguments to `list_packages` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_packages(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_packages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose packages will be listed. - # @param page_size [::Integer] - # The maximum number of packages to return. - # Maximum page size is 10,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new - # - # # Call the list_packages method. - # result = client.list_packages request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. - # p item - # end - # - def list_packages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_packages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_packages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_packages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_packages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a package. - # - # @overload get_package(request, options = nil) - # Pass arguments to `get_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_package(name: nil) - # Pass arguments to `get_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the package to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new - # - # # Call the get_package method. - # result = client.get_package request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. - # p result - # - def get_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_package request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - # - # @overload delete_package(request, options = nil) - # Pass arguments to `delete_package` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_package(name: nil) - # Pass arguments to `delete_package` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the package to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new - # - # # Call the delete_package method. - # result = client.delete_package request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_package request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_package.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_package.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_package.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_package request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists versions. - # - # @overload list_versions(request, options = nil) - # Pass arguments to `list_versions` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil) - # Pass arguments to `list_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose versions will be listed. - # @param page_size [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # @param order_by [::String] - # Optional. The field to order the results by. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new - # - # # Call the list_versions method. - # result = client.list_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Version. - # p item - # end - # - def list_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_versions, "versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a version - # - # @overload get_version(request, options = nil) - # Pass arguments to `get_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_version(name: nil, view: nil) - # Pass arguments to `get_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the version to retrieve. - # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new - # - # # Call the get_version method. - # result = client.get_version request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. - # p result - # - def get_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - # - # @overload delete_version(request, options = nil) - # Pass arguments to `delete_version` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_version(name: nil, force: nil) - # Pass arguments to `delete_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the version to delete. - # @param force [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new - # - # # Call the delete_version method. - # result = client.delete_version request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists files. - # - # @overload list_files(request, options = nil) - # Pass arguments to `list_files` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the repository whose files will be listed. For example: - # "projects/p1/locations/us-central1/repositories/repo1 - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # - # An example of using a filter: - # - # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - # ID starting with "a/b/". - # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - # Files owned by the version `1.0` in package `pkg1`. - # @param page_size [::Integer] - # The maximum number of files to return. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new - # - # # Call the list_files method. - # result = client.list_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. - # p item - # end - # - def list_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_files.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_files request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a file. - # - # @overload get_file(request, options = nil) - # Pass arguments to `get_file` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_file(name: nil) - # Pass arguments to `get_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the file to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new - # - # # Call the get_file method. - # result = client.get_file request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. - # p result - # - def get_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_file request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tags. - # - # @overload list_tags(request, options = nil) - # Pass arguments to `list_tags` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tags` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource whose tags will be listed. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `version` - # - # An example of using a filter: - # - # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - # --> Tags that are applied to the version `1.0` in package `pkg1`. - # @param page_size [::Integer] - # The maximum number of tags to return. Maximum page size is 10,000. - # @param page_token [::String] - # The next_page_token value returned from a previous list request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new - # - # # Call the list_tags method. - # result = client.list_tags request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p item - # end - # - def list_tags request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tags.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tags.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tags.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.list_tags request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a tag. - # - # @overload get_tag(request, options = nil) - # Pass arguments to `get_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_tag(name: nil) - # Pass arguments to `get_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new - # - # # Call the get_tag method. - # result = client.get_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def get_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_tag request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a tag. - # - # @overload create_tag(request, options = nil) - # Pass arguments to `create_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_tag(parent: nil, tag_id: nil, tag: nil) - # Pass arguments to `create_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the parent resource where the tag will be created. - # @param tag_id [::String] - # The tag id to use for this repository. - # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] - # The tag to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new - # - # # Call the create_tag method. - # result = client.create_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def create_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.create_tag request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a tag. - # - # @overload update_tag(request, options = nil) - # Pass arguments to `update_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_tag(tag: nil, update_mask: nil) - # Pass arguments to `update_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash] - # The tag that replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new - # - # # Call the update_tag method. - # result = client.update_tag request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - # p result - # - def update_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_tag request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a tag. - # - # @overload delete_tag(request, options = nil) - # Pass arguments to `delete_tag` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_tag(name: nil) - # Pass arguments to `delete_tag` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the tag to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new - # - # # Call the delete_tag method. - # result = client.delete_tag request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tag request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_tag.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tag.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.delete_tag request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the IAM policy for a given resource. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for a given resource. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Tests if the caller has a list of permissions on a resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the Settings for the Project. - # - # @overload get_project_settings(request, options = nil) - # Pass arguments to `get_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_project_settings(name: nil) - # Pass arguments to `get_project_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the projectSettings resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new - # - # # Call the get_project_settings method. - # result = client.get_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - # p result - # - def get_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_project_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.get_project_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Settings for the Project. - # - # @overload update_project_settings(request, options = nil) - # Pass arguments to `update_project_settings` via a request object, either of type - # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_project_settings(project_settings: nil, update_mask: nil) - # Pass arguments to `update_project_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash] - # The project settings. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask to support partial updates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/artifact_registry/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new - # - # # Call the update_project_settings method. - # result = client.update_project_settings request - # - # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - # p result - # - def update_project_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_project_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_project_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @artifact_registry_stub.update_project_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ArtifactRegistry REST API. - # - # This class represents the configuration for ArtifactRegistry REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # import_apt_artifacts to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.import_apt_artifacts.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.import_apt_artifacts.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ArtifactRegistry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `import_apt_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_apt_artifacts - ## - # RPC-specific configuration for `import_yum_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :import_yum_artifacts - ## - # RPC-specific configuration for `list_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_repositories - ## - # RPC-specific configuration for `get_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :get_repository - ## - # RPC-specific configuration for `create_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :create_repository - ## - # RPC-specific configuration for `update_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :update_repository - ## - # RPC-specific configuration for `delete_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_repository - ## - # RPC-specific configuration for `list_packages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_packages - ## - # RPC-specific configuration for `get_package` - # @return [::Gapic::Config::Method] - # - attr_reader :get_package - ## - # RPC-specific configuration for `delete_package` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_package - ## - # RPC-specific configuration for `list_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_versions - ## - # RPC-specific configuration for `get_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_version - ## - # RPC-specific configuration for `delete_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_version - ## - # RPC-specific configuration for `list_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_files - ## - # RPC-specific configuration for `get_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file - ## - # RPC-specific configuration for `list_tags` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tags - ## - # RPC-specific configuration for `get_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tag - ## - # RPC-specific configuration for `create_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tag - ## - # RPC-specific configuration for `update_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tag - ## - # RPC-specific configuration for `delete_tag` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tag - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `get_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_settings - ## - # RPC-specific configuration for `update_project_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_settings - - # @private - def initialize parent_rpcs = nil - import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts - @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config - import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts - @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config - list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories - @list_repositories = ::Gapic::Config::Method.new list_repositories_config - get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository - @get_repository = ::Gapic::Config::Method.new get_repository_config - create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository - @create_repository = ::Gapic::Config::Method.new create_repository_config - update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository - @update_repository = ::Gapic::Config::Method.new update_repository_config - delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository - @delete_repository = ::Gapic::Config::Method.new delete_repository_config - list_packages_config = parent_rpcs.list_packages if parent_rpcs.respond_to? :list_packages - @list_packages = ::Gapic::Config::Method.new list_packages_config - get_package_config = parent_rpcs.get_package if parent_rpcs.respond_to? :get_package - @get_package = ::Gapic::Config::Method.new get_package_config - delete_package_config = parent_rpcs.delete_package if parent_rpcs.respond_to? :delete_package - @delete_package = ::Gapic::Config::Method.new delete_package_config - list_versions_config = parent_rpcs.list_versions if parent_rpcs.respond_to? :list_versions - @list_versions = ::Gapic::Config::Method.new list_versions_config - get_version_config = parent_rpcs.get_version if parent_rpcs.respond_to? :get_version - @get_version = ::Gapic::Config::Method.new get_version_config - delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version - @delete_version = ::Gapic::Config::Method.new delete_version_config - list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files - @list_files = ::Gapic::Config::Method.new list_files_config - get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file - @get_file = ::Gapic::Config::Method.new get_file_config - list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags - @list_tags = ::Gapic::Config::Method.new list_tags_config - get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag - @get_tag = ::Gapic::Config::Method.new get_tag_config - create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag - @create_tag = ::Gapic::Config::Method.new create_tag_config - update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag - @update_tag = ::Gapic::Config::Method.new update_tag_config - delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag - @delete_tag = ::Gapic::Config::Method.new delete_tag_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings - @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config - update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings - @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb deleted file mode 100644 index c5a1c00d8578..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ArtifactRegistry Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ArtifactRegistry Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "artifactregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb deleted file mode 100644 index bc5b22bf3093..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb +++ /dev/null @@ -1,1615 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/devtools/artifactregistry/v1beta2/service_pb" - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - module Rest - ## - # REST service stub for the ArtifactRegistry service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the import_apt_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_apt_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_apt_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_apt_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_yum_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_yum_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_yum_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_yum_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_repositories REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse] - # A result object deserialized from the server's reply - def list_repositories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_repositories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # A result object deserialized from the server's reply - def get_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # A result object deserialized from the server's reply - def update_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse] - # A result object deserialized from the server's reply - def list_packages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_packages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_packages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package] - # A result object deserialized from the server's reply - def get_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_package request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_package_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_package", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse] - # A result object deserialized from the server's reply - def list_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version] - # A result object deserialized from the server's reply - def get_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_files REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse] - # A result object deserialized from the server's reply - def list_files request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_files_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_files", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File] - # A result object deserialized from the server's reply - def get_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::File.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tags REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse] - # A result object deserialized from the server's reply - def list_tags request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tags_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tags", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # A result object deserialized from the server's reply - def get_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # A result object deserialized from the server's reply - def create_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # A result object deserialized from the server's reply - def update_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_tag request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_tag", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # A result object deserialized from the server's reply - def get_project_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_project_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_project_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # A result object deserialized from the server's reply - def update_project_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_project_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_project_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the import_apt_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_apt_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/aptArtifacts:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_yum_artifacts REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_yum_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/yumArtifacts:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_repositories REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_repositories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/repositories", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/repositories", - body: "repository", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta2/{repository.name}", - body: "repository", - matches: [ - ["repository.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_repository REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_packages REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_packages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/packages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_package REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_package_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_versions REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_version REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_files REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_files_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/files", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_file REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tags REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tags_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/tags", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/tags", - body: "tag", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta2/{tag.name}", - body: "tag", - matches: [ - ["tag.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tag REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_tag_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+/tags/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_project_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/projectSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_project_settings REST call - # - # @param request_pb [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_project_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta2/{project_settings.name}", - body: "project_settings", - matches: [ - ["project_settings.name", %r{^projects/[^/]+/projectSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb deleted file mode 100644 index 51f57d10ff56..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module ArtifactRegistry - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/artifact_registry/v1beta2/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module V1beta2 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ArtifactRegistry"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta2/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb deleted file mode 100644 index d25e48a6eb93..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" -require "google/cloud/artifact_registry/v1beta2/bindings_override" -require "google/cloud/artifact_registry/v1beta2/version" - -module Google - module Cloud - module ArtifactRegistry - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/artifact_registry/v1beta2/rest" - # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new - # - module V1beta2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb deleted file mode 100644 index 8a820cee0d3a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/cloud/artifact_registry/v1beta2/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb deleted file mode 100644 index 27134bb36c91..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/apt_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n;google/devtools/artifactregistry/v1beta2/apt_artifact.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xbf\x03\n\x0b\x41ptArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0cpackage_type\x18\x03 \x01(\x0e\x32\x41.google.devtools.artifactregistry.v1beta2.AptArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcomponent\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ontrol_file\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/AptArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}\"B\n\x1bImportAptArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x92\x01\n\x19ImportAptArtifactsRequest\x12[\n\ngcs_source\x18\x02 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa7\x01\n\x1bImportAptArtifactsErrorInfo\x12[\n\ngcs_source\x18\x01 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xc1\x01\n\x1aImportAptArtifactsResponse\x12L\n\rapt_artifacts\x18\x01 \x03(\x0b\x32\x35.google.devtools.artifactregistry.v1beta2.AptArtifact\x12U\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo\"\x1c\n\x1aImportAptArtifactsMetadataB\x94\x02\n,com.google.devtools.artifactregistry.v1beta2B\x10\x41ptArtifactProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - AptArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.AptArtifact").msgclass - AptArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType").enummodule - ImportAptArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource").msgclass - ImportAptArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest").msgclass - ImportAptArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo").msgclass - ImportAptArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse").msgclass - ImportAptArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb deleted file mode 100644 index a1cc80819447..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/file.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/devtools/artifactregistry/v1beta2/file.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x98\x01\n\x04Hash\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.devtools.artifactregistry.v1beta2.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\":\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\"\xd4\x02\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\x12>\n\x06hashes\x18\x04 \x03(\x0b\x32..google.devtools.artifactregistry.v1beta2.Hash\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05owner\x18\x07 \x01(\t:y\xea\x41v\n$artifactregistry.googleapis.com/File\x12Nprojects/{project}/locations/{location}/repositories/{repository}/files/{file}\"Y\n\x10ListFilesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x11ListFilesResponse\x12=\n\x05\x66iles\x18\x01 \x03(\x0b\x32..google.devtools.artifactregistry.v1beta2.File\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1e\n\x0eGetFileRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x8d\x02\n,com.google.devtools.artifactregistry.v1beta2B\tFileProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Hash").msgclass - Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Hash.HashType").enummodule - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.File").msgclass - ListFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListFilesRequest").msgclass - ListFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListFilesResponse").msgclass - GetFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetFileRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb deleted file mode 100644 index 29552f5694d6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/package.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/package.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x01\n\x07Package\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"L\n\x13ListPackagesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x14ListPackagesResponse\x12\x43\n\x08packages\x18\x01 \x03(\x0b\x32\x31.google.devtools.artifactregistry.v1beta2.Package\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"!\n\x11GetPackageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"$\n\x14\x44\x65letePackageRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cPackageProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Package").msgclass - ListPackagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListPackagesRequest").msgclass - ListPackagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListPackagesResponse").msgclass - GetPackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetPackageRequest").msgclass - DeletePackageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeletePackageRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb deleted file mode 100644 index 9c549297f124..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/repository.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/devtools/artifactregistry/v1beta2/repository.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x07\n\nRepository\x12\x62\n\x0cmaven_config\x18\t \x01(\x0b\x32J.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfigH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x06\x66ormat\x18\x02 \x01(\x0e\x32;.google.devtools.artifactregistry.v1beta2.Repository.Format\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12P\n\x06labels\x18\x04 \x03(\x0b\x32@.google.devtools.artifactregistry.v1beta2.Repository.LabelsEntry\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x1a\xf8\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12p\n\x0eversion_policy\x18\x02 \x01(\x0e\x32X.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_config\"\x84\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x7f\n\x18ListRepositoriesResponse\x12J\n\x0crepositories\x18\x01 \x03(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xbe\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x15\n\rrepository_id\x18\x02 \x01(\t\x12H\n\nrepository\x18\x03 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\"\x94\x01\n\x17UpdateRepositoryRequest\x12H\n\nrepository\x18\x01 \x01(\x0b\x32\x34.google.devtools.artifactregistry.v1beta2.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\x93\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0fRepositoryProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository").msgclass - Repository::MavenRepositoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig").msgclass - Repository::MavenRepositoryConfig::VersionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy").enummodule - Repository::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Repository.Format").enummodule - ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest").msgclass - ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse").msgclass - GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetRepositoryRequest").msgclass - CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest").msgclass - UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest").msgclass - DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb deleted file mode 100644 index e30893147e79..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/devtools/artifactregistry/v1beta2/apt_artifact_pb' -require 'google/devtools/artifactregistry/v1beta2/file_pb' -require 'google/devtools/artifactregistry/v1beta2/package_pb' -require 'google/devtools/artifactregistry/v1beta2/repository_pb' -require 'google/devtools/artifactregistry/v1beta2/settings_pb' -require 'google/devtools/artifactregistry/v1beta2/tag_pb' -require 'google/devtools/artifactregistry/v1beta2/version_pb' -require 'google/devtools/artifactregistry/v1beta2/yum_artifact_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/service.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a;google/devtools/artifactregistry/v1beta2/apt_artifact.proto\x1a\x33google/devtools/artifactregistry/v1beta2/file.proto\x1a\x36google/devtools/artifactregistry/v1beta2/package.proto\x1a\x39google/devtools/artifactregistry/v1beta2/repository.proto\x1a\x37google/devtools/artifactregistry/v1beta2/settings.proto\x1a\x32google/devtools/artifactregistry/v1beta2/tag.proto\x1a\x36google/devtools/artifactregistry/v1beta2/version.proto\x1a;google/devtools/artifactregistry/v1beta2/yum_artifact.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x13\n\x11OperationMetadata2\xe6/\n\x10\x41rtifactRegistry\x12\xdf\x02\n\x12ImportAptArtifacts\x12\x43.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x8a\x01\nCgoogle.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse\x12\x43google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata\x82\xd3\xe4\x93\x02P\"K/v1beta2/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import:\x01*\x12\xdf\x02\n\x12ImportYumArtifacts\x12\x43.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x8a\x01\nCgoogle.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse\x12\x43google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata\x82\xd3\xe4\x93\x02P\"K/v1beta2/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import:\x01*\x12\xe1\x01\n\x10ListRepositories\x12\x41.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest\x1a\x42.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta2/{parent=projects/*/locations/*}/repositories\x12\xcb\x01\n\rGetRepository\x12>.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest\x1a\x34.google.devtools.artifactregistry.v1beta2.Repository\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta2/{name=projects/*/locations/*/repositories/*}\x12\xd6\x02\n\x10\x43reateRepository\x12\x41.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41q\n3google.devtools.artifactregistry.v1beta2.Repository\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02\x43\"5/v1beta2/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xfa\x01\n\x10UpdateRepository\x12\x41.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest\x1a\x34.google.devtools.artifactregistry.v1beta2.Repository\"m\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02N2@/v1beta2/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x91\x02\n\x10\x44\x65leteRepository\x12\x41.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta2/{name=projects/*/locations/*/repositories/*}\x12\xe0\x01\n\x0cListPackages\x12=.google.devtools.artifactregistry.v1beta2.ListPackagesRequest\x1a>.google.devtools.artifactregistry.v1beta2.ListPackagesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages\x12\xcd\x01\n\nGetPackage\x12;.google.devtools.artifactregistry.v1beta2.GetPackageRequest\x1a\x31.google.devtools.artifactregistry.v1beta2.Package\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}\x12\x96\x02\n\rDeletePackage\x12>.google.devtools.artifactregistry.v1beta2.DeletePackageRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}\x12\xeb\x01\n\x0cListVersions\x12=.google.devtools.artifactregistry.v1beta2.ListVersionsRequest\x1a>.google.devtools.artifactregistry.v1beta2.ListVersionsResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions\x12\xd8\x01\n\nGetVersion\x12;.google.devtools.artifactregistry.v1beta2.GetVersionRequest\x1a\x31.google.devtools.artifactregistry.v1beta2.Version\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xa1\x02\n\rDeleteVersion\x12>.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.devtools.artifactregistry.v1beta2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02M*K/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}\x12\xd4\x01\n\tListFiles\x12:.google.devtools.artifactregistry.v1beta2.ListFilesRequest\x1a;.google.devtools.artifactregistry.v1beta2.ListFilesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1beta2/{parent=projects/*/locations/*/repositories/*}/files\x12\xc2\x01\n\x07GetFile\x12\x38.google.devtools.artifactregistry.v1beta2.GetFileRequest\x1a..google.devtools.artifactregistry.v1beta2.File\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}\x12\xdb\x01\n\x08ListTags\x12\x39.google.devtools.artifactregistry.v1beta2.ListTagsRequest\x1a:.google.devtools.artifactregistry.v1beta2.ListTagsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags\x12\xc8\x01\n\x06GetTag\x12\x37.google.devtools.artifactregistry.v1beta2.GetTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\xe0\x01\n\tCreateTag\x12:.google.devtools.artifactregistry.v1beta2.CreateTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"h\xda\x41\x11parent,tag,tag_id\x82\xd3\xe4\x93\x02N\"G/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags:\x03tag\x12\xe2\x01\n\tUpdateTag\x12:.google.devtools.artifactregistry.v1beta2.UpdateTagRequest\x1a-.google.devtools.artifactregistry.v1beta2.Tag\"j\xda\x41\x0ftag,update_mask\x82\xd3\xe4\x93\x02R2K/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}:\x03tag\x12\xb7\x01\n\tDeleteTag\x12:.google.devtools.artifactregistry.v1beta2.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I*G/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}\x12\x9c\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\x99\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"N\x82\xd3\xe4\x93\x02H\x12\x46/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xc2\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\xcf\x01\n\x12GetProjectSettings\x12\x43.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest\x1a\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1beta2/{name=projects/*/projectSettings}\x12\x90\x02\n\x15UpdateProjectSettings\x12\x46.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest\x1a\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\"t\xda\x41\x1cproject_settings,update_mask\x82\xd3\xe4\x93\x02O2;/v1beta2/{project_settings.name=projects/*/projectSettings}:\x10project_settings\x1a\x8c\x01\xca\x41\x1f\x61rtifactregistry.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cServiceProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb deleted file mode 100644 index aaa057d35013..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb +++ /dev/null @@ -1,116 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/devtools/artifactregistry/v1beta2/service.proto for package 'Google.Cloud.ArtifactRegistry.V1beta2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/devtools/artifactregistry/v1beta2/service_pb' - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - module ArtifactRegistry - # The Artifact Registry API service. - # - # Artifact Registry is an artifact management system for storing artifacts - # from different package management systems. - # - # The resources managed by this API are: - # - # * Repositories, which group packages and their data. - # * Packages, which group versions and their tags. - # * Versions, which are specific forms of a package. - # * Tags, which represent alternative names for versions. - # * Files, which contain content and are optionally associated with a Package - # or Version. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.devtools.artifactregistry.v1beta2.ArtifactRegistry' - - # Imports Apt artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - rpc :ImportAptArtifacts, ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Google::Longrunning::Operation - # Imports Yum (RPM) artifacts. The returned Operation will complete once the - # resources are imported. Package, Version, and File resources are created - # based on the imported artifacts. Imported artifacts that conflict with - # existing resources are ignored. - rpc :ImportYumArtifacts, ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Google::Longrunning::Operation - # Lists repositories. - rpc :ListRepositories, ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse - # Gets a repository. - rpc :GetRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Repository - # Creates a repository. The returned Operation will finish once the - # repository has been created. Its response will be the created Repository. - rpc :CreateRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Google::Longrunning::Operation - # Updates a repository. - rpc :UpdateRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Repository - # Deletes a repository and all of its contents. The returned Operation will - # finish once the repository has been deleted. It will not have any Operation - # metadata and will return a google.protobuf.Empty response. - rpc :DeleteRepository, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Google::Longrunning::Operation - # Lists packages. - rpc :ListPackages, ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse - # Gets a package. - rpc :GetPackage, ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Package - # Deletes a package and all of its versions and tags. The returned operation - # will complete once the package has been deleted. - rpc :DeletePackage, ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Google::Longrunning::Operation - # Lists versions. - rpc :ListVersions, ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse - # Gets a version - rpc :GetVersion, ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Version - # Deletes a version and all of its content. The returned operation will - # complete once the version has been deleted. - rpc :DeleteVersion, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Google::Longrunning::Operation - # Lists files. - rpc :ListFiles, ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse - # Gets a file. - rpc :GetFile, ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::File - # Lists tags. - rpc :ListTags, ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse - # Gets a tag. - rpc :GetTag, ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag - # Creates a tag. - rpc :CreateTag, ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag - # Updates a tag. - rpc :UpdateTag, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::Tag - # Deletes a tag. - rpc :DeleteTag, ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Google::Protobuf::Empty - # Updates the IAM policy for a given resource. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the IAM policy for a given resource. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Tests if the caller has a list of permissions on a resource. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Retrieves the Settings for the Project. - rpc :GetProjectSettings, ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings - # Updates the Settings for the Project. - rpc :UpdateProjectSettings, ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb deleted file mode 100644 index 7dec3dc9290c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/settings.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n7google/devtools/artifactregistry/v1beta2/settings.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x91\x03\n\x0fProjectSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12l\n\x18legacy_redirection_state\x18\x02 \x01(\x0e\x32J.google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState\"\xa7\x01\n\x10RedirectionState\x12!\n\x1dREDIRECTION_STATE_UNSPECIFIED\x10\x00\x12$\n REDIRECTION_FROM_GCR_IO_DISABLED\x10\x01\x12#\n\x1fREDIRECTION_FROM_GCR_IO_ENABLED\x10\x02\x12%\n!REDIRECTION_FROM_GCR_IO_FINALIZED\x10\x03:X\xea\x41U\n/artifactregistry.googleapis.com/ProjectSettings\x12\"projects/{project}/projectSettings\"b\n\x19GetProjectSettingsRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/artifactregistry.googleapis.com/ProjectSettings\"\xa4\x01\n\x1cUpdateProjectSettingsRequest\x12S\n\x10project_settings\x18\x02 \x01(\x0b\x32\x39.google.devtools.artifactregistry.v1beta2.ProjectSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x91\x02\n,com.google.devtools.artifactregistry.v1beta2B\rSettingsProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - ProjectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ProjectSettings").msgclass - ProjectSettings::RedirectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState").enummodule - GetProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest").msgclass - UpdateProjectSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb deleted file mode 100644 index 658061a8e001..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/tag.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n2google/devtools/artifactregistry/v1beta2/tag.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:\x8a\x01\xea\x41\x86\x01\n#artifactregistry.googleapis.com/Tag\x12_projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}\"X\n\x0fListTagsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"h\n\x10ListTagsResponse\x12;\n\x04tags\x18\x01 \x03(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x1d\n\rGetTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"n\n\x10\x43reateTagRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06tag_id\x18\x02 \x01(\t\x12:\n\x03tag\x18\x03 \x01(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\"\x7f\n\x10UpdateTagRequest\x12:\n\x03tag\x18\x01 \x01(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\" \n\x10\x44\x65leteTagRequest\x12\x0c\n\x04name\x18\x01 \x01(\tB\x8c\x02\n,com.google.devtools.artifactregistry.v1beta2B\x08TagProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Tag").msgclass - ListTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListTagsRequest").msgclass - ListTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListTagsResponse").msgclass - GetTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetTagRequest").msgclass - CreateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.CreateTagRequest").msgclass - UpdateTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.UpdateTagRequest").msgclass - DeleteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteTagRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb deleted file mode 100644 index e557d358711e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/version.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/devtools/artifactregistry/v1beta2/tag_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n6google/devtools/artifactregistry/v1beta2/version.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/devtools/artifactregistry/v1beta2/tag.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x03\n\x07Version\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0crelated_tags\x18\x07 \x03(\x0b\x32-.google.devtools.artifactregistry.v1beta2.Tag\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03:\x96\x01\xea\x41\x92\x01\n\'artifactregistry.googleapis.com/Version\x12gprojects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}\"\xa8\x01\n\x13ListVersionsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x43\n\x04view\x18\x04 \x01(\x0e\x32\x35.google.devtools.artifactregistry.v1beta2.VersionView\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"t\n\x14ListVersionsResponse\x12\x43\n\x08versions\x18\x01 \x03(\x0b\x32\x31.google.devtools.artifactregistry.v1beta2.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"f\n\x11GetVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.devtools.artifactregistry.v1beta2.VersionView\"3\n\x14\x44\x65leteVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08*@\n\x0bVersionView\x12\x1c\n\x18VERSION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\x90\x02\n,com.google.devtools.artifactregistry.v1beta2B\x0cVersionProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.Version").msgclass - ListVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListVersionsRequest").msgclass - ListVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ListVersionsResponse").msgclass - GetVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.GetVersionRequest").msgclass - DeleteVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.DeleteVersionRequest").msgclass - VersionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.VersionView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb deleted file mode 100644 index 7391ace9af17..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/artifactregistry/v1beta2/yum_artifact.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n;google/devtools/artifactregistry/v1beta2/yum_artifact.proto\x12(google.devtools.artifactregistry.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x8c\x03\n\x0bYumArtifact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cpackage_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0cpackage_type\x18\x03 \x01(\x0e\x32\x41.google.devtools.artifactregistry.v1beta2.YumArtifact.PackageTypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x61rchitecture\x18\x04 \x01(\tB\x03\xe0\x41\x03\"C\n\x0bPackageType\x12\x1c\n\x18PACKAGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42INARY\x10\x01\x12\n\n\x06SOURCE\x10\x02:\x90\x01\xea\x41\x8c\x01\n+artifactregistry.googleapis.com/YumArtifact\x12]projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}\"B\n\x1bImportYumArtifactsGcsSource\x12\x0c\n\x04uris\x18\x01 \x03(\t\x12\x15\n\ruse_wildcards\x18\x02 \x01(\x08\"\x92\x01\n\x19ImportYumArtifactsRequest\x12[\n\ngcs_source\x18\x02 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSourceH\x00\x12\x0e\n\x06parent\x18\x01 \x01(\tB\x08\n\x06source\"\xa7\x01\n\x1bImportYumArtifactsErrorInfo\x12[\n\ngcs_source\x18\x01 \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSourceH\x00\x12!\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\n\x06source\"\xc1\x01\n\x1aImportYumArtifactsResponse\x12L\n\ryum_artifacts\x18\x01 \x03(\x0b\x32\x35.google.devtools.artifactregistry.v1beta2.YumArtifact\x12U\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x45.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo\"\x1c\n\x1aImportYumArtifactsMetadataB\x94\x02\n,com.google.devtools.artifactregistry.v1beta2B\x10YumArtifactProtoP\x01ZUcloud.google.com/go/artifactregistry/apiv1beta2/artifactregistrypb;artifactregistrypb\xaa\x02%Google.Cloud.ArtifactRegistry.V1Beta2\xca\x02%Google\\Cloud\\ArtifactRegistry\\V1beta2\xea\x02(Google::Cloud::ArtifactRegistry::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - YumArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.YumArtifact").msgclass - YumArtifact::PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType").enummodule - ImportYumArtifactsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource").msgclass - ImportYumArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest").msgclass - ImportYumArtifactsErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo").msgclass - ImportYumArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse").msgclass - ImportYumArtifactsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md deleted file mode 100644 index 2d7f47c14fc9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Artifact Registry V1beta2 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb deleted file mode 100644 index 87bcf0a3806a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # A detailed representation of an Apt artifact. Information in the record - # is derived from the archive's control file. - # See https://www.debian.org/doc/debian-policy/ch-controlfields.html - # @!attribute [r] name - # @return [::String] - # Output only. The Artifact Registry resource name of the artifact. - # @!attribute [r] package_name - # @return [::String] - # Output only. The Apt package name of the artifact. - # @!attribute [r] package_type - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::AptArtifact::PackageType] - # Output only. An artifact is a binary or source package. - # @!attribute [r] architecture - # @return [::String] - # Output only. Operating system architecture of the artifact. - # @!attribute [r] component - # @return [::String] - # Output only. Repository component of the artifact. - # @!attribute [r] control_file - # @return [::String] - # Output only. Contents of the artifact's control metadata file. - class AptArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Package type is either binary or source. - module PackageType - # Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0 - - # Binary package. - BINARY = 1 - - # Source package. - SOURCE = 2 - end - end - - # Google Cloud Storage location where the artifacts currently reside. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - # @!attribute [rw] use_wildcards - # @return [::Boolean] - # Supports URI wildcards for matching multiple objects from a single URI. - class ImportAptArtifactsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to import new apt artifacts. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource] - # Google Cloud Storage location where input content is located. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the artifacts will be imported. - class ImportAptArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error information explaining why a package was not imported. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource] - # Google Cloud Storage location requested. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The detailed error status. - class ImportAptArtifactsErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message from importing APT artifacts. - # @!attribute [rw] apt_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::AptArtifact>] - # The Apt artifacts imported. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsErrorInfo>] - # Detailed error info for artifacts that were not imported. - class ImportAptArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata for importing artifacts. - class ImportAptArtifactsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb deleted file mode 100644 index b01bb4f451a4..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # A hash of file content. - # @!attribute [rw] type - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Hash::HashType] - # The algorithm used to compute the hash value. - # @!attribute [rw] value - # @return [::String] - # The hash value. - class Hash - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The algorithm used to compute the hash. - module HashType - # Unspecified. - HASH_TYPE_UNSPECIFIED = 0 - - # SHA256 hash. - SHA256 = 1 - - # MD5 hash. - MD5 = 2 - end - end - - # Files store content that is potentially associated with Packages or Versions. - # @!attribute [rw] name - # @return [::String] - # The name of the file, for example: - # "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". - # If the file ID part contains slashes, they are escaped. - # @!attribute [rw] size_bytes - # @return [::Integer] - # The size of the File in bytes. - # @!attribute [rw] hashes - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Hash>] - # The hashes of the file content. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the File was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the File was last updated. - # @!attribute [rw] owner - # @return [::String] - # The name of the Package or Version that owns this file, if any. - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list files. - # @!attribute [rw] parent - # @return [::String] - # The name of the repository whose files will be listed. For example: - # "projects/p1/locations/us-central1/repositories/repo1 - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `owner` - # - # An example of using a filter: - # - # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an - # ID starting with "a/b/". - # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> - # Files owned by the version `1.0` in package `pkg1`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of files to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListFilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing files. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::File>] - # The files returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of files, or empty if there are no - # more files to return. - class ListFilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a file. - # @!attribute [rw] name - # @return [::String] - # The name of the file to retrieve. - class GetFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb deleted file mode 100644 index 24ee1b9b6dc3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb +++ /dev/null @@ -1,93 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # Packages are named collections of versions. - # @!attribute [rw] name - # @return [::String] - # The name of the package, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". - # @!attribute [rw] display_name - # @return [::String] - # The display name of the package. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the package was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the package was last updated. This includes publishing a new - # version of the package. - class Package - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list packages. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource whose packages will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of packages to return. - # Maximum page size is 10,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListPackagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing packages. - # @!attribute [rw] packages - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Package>] - # The packages returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of packages, or empty if there are no - # more packages to return. - class ListPackagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a package. - # @!attribute [rw] name - # @return [::String] - # The name of the package to retrieve. - class GetPackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a package. - # @!attribute [rw] name - # @return [::String] - # The name of the package to delete. - class DeletePackageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb deleted file mode 100644 index 30184abcdddf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb +++ /dev/null @@ -1,202 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # A Repository for storing artifacts with a specific format. - # @!attribute [rw] maven_config - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::MavenRepositoryConfig] - # Maven repository config contains repository level configuration - # for the repositories of maven type. - # @!attribute [rw] name - # @return [::String] - # The name of the repository, for example: - # "projects/p1/locations/us-central1/repositories/repo1". - # @!attribute [rw] format - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::Format] - # The format of packages that are stored in the repository. - # @!attribute [rw] description - # @return [::String] - # The user-provided description of the repository. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels with user-defined metadata. - # This field may contain up to 64 entries. Label keys and values may be no - # longer than 63 characters. Label keys must begin with a lowercase letter - # and may only contain lowercase letters, numeric characters, underscores, - # and dashes. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the repository was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the repository was last updated. - # @!attribute [rw] kms_key_name - # @return [::String] - # The Cloud KMS resource name of the customer managed encryption key that’s - # used to encrypt the contents of the Repository. Has the form: - # `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. - # This value may not be changed after the Repository has been created. - class Repository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # MavenRepositoryConfig is maven related repository details. - # Provides additional configuration details for repositories of the maven - # format type. - # @!attribute [rw] allow_snapshot_overwrites - # @return [::Boolean] - # The repository with this flag will allow publishing - # the same snapshot versions. - # @!attribute [rw] version_policy - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository::MavenRepositoryConfig::VersionPolicy] - # Version policy defines the versions that the registry will accept. - class MavenRepositoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VersionPolicy is the version policy for the repository. - module VersionPolicy - # VERSION_POLICY_UNSPECIFIED - the version policy is not defined. - # When the version policy is not defined, no validation is performed - # for the versions. - VERSION_POLICY_UNSPECIFIED = 0 - - # RELEASE - repository will accept only Release versions. - RELEASE = 1 - - # SNAPSHOT - repository will accept only Snapshot versions. - SNAPSHOT = 2 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A package format. - module Format - # Unspecified package format. - FORMAT_UNSPECIFIED = 0 - - # Docker package format. - DOCKER = 1 - - # Maven package format. - MAVEN = 2 - - # NPM package format. - NPM = 3 - - # APT package format. - APT = 5 - - # YUM package format. - YUM = 6 - - # Python package format. - PYTHON = 8 - end - end - - # The request to list repositories. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource whose repositories will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of repositories to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing repositories. - # @!attribute [rw] repositories - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>] - # The repositories returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of repositories, or empty if there are - # no more repositories to return. - class ListRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the repository to retrieve. - class GetRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new repository. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource where the repository will be created. - # @!attribute [rw] repository_id - # @return [::String] - # The repository id to use for this repository. - # @!attribute [rw] repository - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # The repository to be created. - class CreateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a repository. - # @!attribute [rw] repository - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository] - # The repository that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the repository to delete. - class DeleteRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb deleted file mode 100644 index cf0245f23a64..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # Metadata type for longrunning-operations, currently empty. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb deleted file mode 100644 index b2fdc4b27fd1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # The Artifact Registry settings that apply to a Project. - # @!attribute [rw] name - # @return [::String] - # The name of the project's settings. - # - # Always of the form: - # projects/\\{project-id}/projectSettings - # - # In update request: never set - # In response: always set - # @!attribute [rw] legacy_redirection_state - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings::RedirectionState] - # The redirection state of the legacy repositories in this project. - class ProjectSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible redirection states for legacy repositories. - module RedirectionState - # No redirection status has been set. - REDIRECTION_STATE_UNSPECIFIED = 0 - - # Redirection is disabled. - REDIRECTION_FROM_GCR_IO_DISABLED = 1 - - # Redirection is enabled. - REDIRECTION_FROM_GCR_IO_ENABLED = 2 - - # Redirection is enabled, and has been finalized so cannot be reverted. - REDIRECTION_FROM_GCR_IO_FINALIZED = 3 - end - end - - # Gets the redirection status for a project. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the projectSettings resource. - class GetProjectSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sets the settings of the project. - # @!attribute [rw] project_settings - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings] - # The project settings. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask to support partial updates. - class UpdateProjectSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb deleted file mode 100644 index 2a6ea04aff2a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # Tags point to a version and represent an alternative name that can be used - # to access the version. - # @!attribute [rw] name - # @return [::String] - # The name of the tag, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". - # If the package part contains slashes, the slashes are escaped. - # The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else - # must be URL encoded. - # @!attribute [rw] version - # @return [::String] - # The name of the version the tag refers to, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" - # If the package or version ID parts contain slashes, the slashes are - # escaped. - class Tag - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list tags. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource whose tags will be listed. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `version` - # - # An example of using a filter: - # - # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` - # --> Tags that are applied to the version `1.0` in package `pkg1`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of tags to return. Maximum page size is 10,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - class ListTagsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing tags. - # @!attribute [rw] tags - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # The tags returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of tags, or empty if there are no - # more tags to return. - class ListTagsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a tag. - # @!attribute [rw] name - # @return [::String] - # The name of the tag to retrieve. - class GetTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a new tag. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the tag will be created. - # @!attribute [rw] tag_id - # @return [::String] - # The tag id to use for this repository. - # @!attribute [rw] tag - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # The tag to be created. - class CreateTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create or update a tag. - # @!attribute [rw] tag - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag] - # The tag that replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a tag. - # @!attribute [rw] name - # @return [::String] - # The name of the tag to delete. - class DeleteTagRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb deleted file mode 100644 index 51bc9a408b69..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # The body of a version resource. A version resource represents a - # collection of components, such as files and other data. This may correspond - # to a version in many package management schemes. - # @!attribute [rw] name - # @return [::String] - # The name of the version, for example: - # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1". - # If the package or version ID parts contain slashes, the slashes are - # escaped. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the version, as specified in its metadata. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the version was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the version was last updated. - # @!attribute [rw] related_tags - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>] - # Output only. A list of related tags. Will contain up to 100 tags that - # reference this version. - # @!attribute [r] metadata - # @return [::Google::Protobuf::Struct] - # Output only. Repository-specific Metadata stored against this version. - # The fields returned are defined by the underlying repository-specific - # resource. Currently, the only resource in use is - # [DockerImage][google.devtools.artifactregistry.v1.DockerImage] - class Version - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list versions. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource whose versions will be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of versions to return. Maximum page size is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous list request, if any. - # @!attribute [rw] view - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The field to order the results by. - class ListVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from listing versions. - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::Version>] - # The versions returned. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of versions, or empty if there are no - # more versions to return. - class ListVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to retrieve a version. - # @!attribute [rw] name - # @return [::String] - # The name of the version to retrieve. - # @!attribute [rw] view - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView] - # The view that should be returned in the response. - class GetVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a version. - # @!attribute [rw] name - # @return [::String] - # The name of the version to delete. - # @!attribute [rw] force - # @return [::Boolean] - # By default, a version that is tagged may not be deleted. If force=true, the - # version and any tags pointing to the version are deleted. - class DeleteVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The view, which determines what version information is returned in a - # response. - module VersionView - # The default / unset value. - # The API will default to the BASIC view. - VERSION_VIEW_UNSPECIFIED = 0 - - # Includes basic information about the version, but not any related tags. - BASIC = 1 - - # Include everything. - FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb deleted file mode 100644 index 1bf31d939f3d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ArtifactRegistry - module V1beta2 - # A detailed representation of a Yum artifact. - # @!attribute [r] name - # @return [::String] - # Output only. The Artifact Registry resource name of the artifact. - # @!attribute [r] package_name - # @return [::String] - # Output only. The yum package name of the artifact. - # @!attribute [r] package_type - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::YumArtifact::PackageType] - # Output only. An artifact is a binary or source package. - # @!attribute [r] architecture - # @return [::String] - # Output only. Operating system architecture of the artifact. - class YumArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Package type is either binary or source. - module PackageType - # Package type is not specified. - PACKAGE_TYPE_UNSPECIFIED = 0 - - # Binary package (.rpm). - BINARY = 1 - - # Source package (.srpm). - SOURCE = 2 - end - end - - # Google Cloud Storage location where the artifacts currently reside. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Cloud Storage paths URI (e.g., gs://my_bucket//my_object). - # @!attribute [rw] use_wildcards - # @return [::Boolean] - # Supports URI wildcards for matching multiple objects from a single URI. - class ImportYumArtifactsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to import new yum artifacts. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource] - # Google Cloud Storage location where input content is located. - # @!attribute [rw] parent - # @return [::String] - # The name of the parent resource where the artifacts will be imported. - class ImportYumArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error information explaining why a package was not imported. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource] - # Google Cloud Storage location requested. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The detailed error status. - class ImportYumArtifactsErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message from importing YUM artifacts. - # @!attribute [rw] yum_artifacts - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::YumArtifact>] - # The yum artifacts imported. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsErrorInfo>] - # Detailed error info for artifacts that were not imported. - class ImportYumArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata for importing artifacts. - class ImportYumArtifactsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile deleted file mode 100644 index 6aaca3591deb..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-artifact_registry-v1beta2", path: "../" -else - gem "google-cloud-artifact_registry-v1beta2" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb deleted file mode 100644 index b4aec628bdf3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_repository.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the create_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository. -# -def create_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new - - # Call the create_repository method. - result = client.create_repository request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb deleted file mode 100644 index ea333cf7fe5d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/create_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the create_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag. -# -def create_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new - - # Call the create_tag method. - result = client.create_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb deleted file mode 100644 index 3a5fe36a176f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_package.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the delete_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package. -# -def delete_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new - - # Call the delete_package method. - result = client.delete_package request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb deleted file mode 100644 index 9d4a02cbddc5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_repository.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the delete_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository. -# -def delete_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new - - # Call the delete_repository method. - result = client.delete_repository request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb deleted file mode 100644 index f712c0a18063..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the delete_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag. -# -def delete_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new - - # Call the delete_tag method. - result = client.delete_tag request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb deleted file mode 100644 index 1240bb6fbb67..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/delete_version.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the delete_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version. -# -def delete_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new - - # Call the delete_version method. - result = client.delete_version request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb deleted file mode 100644 index b69d234386f5..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_file.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_file call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file. -# -def get_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new - - # Call the get_file method. - result = client.get_file request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb deleted file mode 100644 index 75c9dd1f58a6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_iam_policy call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb deleted file mode 100644 index 24c3dd6d088f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_package.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_package call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package. -# -def get_package - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new - - # Call the get_package method. - result = client.get_package request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb deleted file mode 100644 index 1504ae352b97..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_project_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_project_settings call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings. -# -def get_project_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new - - # Call the get_project_settings method. - result = client.get_project_settings request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb deleted file mode 100644 index 6b62a92d27cf..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_repository.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository. -# -def get_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new - - # Call the get_repository method. - result = client.get_repository request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb deleted file mode 100644 index 227f1cb970c6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag. -# -def get_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new - - # Call the get_tag method. - result = client.get_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb deleted file mode 100644 index 053bede11d21..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/get_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the get_version call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version. -# -def get_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new - - # Call the get_version method. - result = client.get_version request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb deleted file mode 100644 index 749491500cbe..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_apt_artifacts.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the import_apt_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts. -# -def import_apt_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new - - # Call the import_apt_artifacts method. - result = client.import_apt_artifacts request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb deleted file mode 100644 index b177cea98dc7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/import_yum_artifacts.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the import_yum_artifacts call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts. -# -def import_yum_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new - - # Call the import_yum_artifacts method. - result = client.import_yum_artifacts request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb deleted file mode 100644 index 0cccd6b55a02..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_files.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_files call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files. -# -def list_files - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new - - # Call the list_files method. - result = client.list_files request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb deleted file mode 100644 index 3d5971af0c9d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_packages.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_packages call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages. -# -def list_packages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new - - # Call the list_packages method. - result = client.list_packages request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb deleted file mode 100644 index b371d20afeb1..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_repositories.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_repositories call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories. -# -def list_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new - - # Call the list_repositories method. - result = client.list_repositories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Repository. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb deleted file mode 100644 index ba98059582c0..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_tags.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_tags call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags. -# -def list_tags - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new - - # Call the list_tags method. - result = client.list_tags request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb deleted file mode 100644 index f1ec20f158bd..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/list_versions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the list_versions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions. -# -def list_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new - - # Call the list_versions method. - result = client.list_versions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Version. - p item - end -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb deleted file mode 100644 index dca645f107d7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the set_iam_policy call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb deleted file mode 100644 index 7990b39f1d6a..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the test_iam_permissions call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb deleted file mode 100644 index 0aca5331f573..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_project_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the update_project_settings call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings. -# -def update_project_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new - - # Call the update_project_settings method. - result = client.update_project_settings request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb deleted file mode 100644 index b49bb58893ec..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_repository.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the update_repository call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository. -# -def update_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new - - # Call the update_repository method. - result = client.update_repository request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb deleted file mode 100644 index 477573a098df..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/artifact_registry/update_tag.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] -require "google/cloud/artifact_registry/v1beta2" - -## -# Snippet for the update_tag call in the ArtifactRegistry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag. -# -def update_tag - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new - - # Call the update_tag method. - result = client.update_tag request - - # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag. - p result -end -# [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json deleted file mode 100644 index 344fe59d344c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/snippets/snippet_metadata_google.devtools.artifactregistry.v1beta2.json +++ /dev/null @@ -1,1015 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-artifact_registry-v1beta2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.devtools.artifactregistry.v1beta2", - "version": "v1beta2" - } - ] - }, - "snippets": [ - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync", - "title": "Snippet for the import_apt_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts.", - "file": "artifact_registry/import_apt_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_apt_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_apt_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ImportAptArtifacts", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync", - "title": "Snippet for the import_yum_artifacts call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts.", - "file": "artifact_registry/import_yum_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_yum_artifacts", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#import_yum_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ImportYumArtifacts", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync", - "title": "Snippet for the list_repositories call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories.", - "file": "artifact_registry/list_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_repositories", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListRepositories", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync", - "title": "Snippet for the get_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository.", - "file": "artifact_registry/get_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Repository", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetRepository", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync", - "title": "Snippet for the create_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository.", - "file": "artifact_registry/create_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateRepository", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync", - "title": "Snippet for the update_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository.", - "file": "artifact_registry/update_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Repository", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateRepository", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync", - "title": "Snippet for the delete_repository call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository.", - "file": "artifact_registry/delete_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_repository", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteRepository", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync", - "title": "Snippet for the list_packages call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages.", - "file": "artifact_registry/list_packages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_packages", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_packages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListPackages", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync", - "title": "Snippet for the get_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package.", - "file": "artifact_registry/get_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Package", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetPackage", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync", - "title": "Snippet for the delete_package call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package.", - "file": "artifact_registry/delete_package.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_package", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_package", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeletePackage", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync", - "title": "Snippet for the list_versions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions.", - "file": "artifact_registry/list_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_versions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListVersions", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync", - "title": "Snippet for the get_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version.", - "file": "artifact_registry/get_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Version", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetVersion", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync", - "title": "Snippet for the delete_version call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version.", - "file": "artifact_registry/delete_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_version", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteVersion", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync", - "title": "Snippet for the list_files call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files.", - "file": "artifact_registry/list_files.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_files", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_files", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListFiles", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync", - "title": "Snippet for the get_file call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file.", - "file": "artifact_registry/get_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_file", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::File", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetFile", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync", - "title": "Snippet for the list_tags call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags.", - "file": "artifact_registry/list_tags.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tags", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#list_tags", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "ListTags", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync", - "title": "Snippet for the get_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag.", - "file": "artifact_registry/get_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetTag", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync", - "title": "Snippet for the create_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag.", - "file": "artifact_registry/create_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#create_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "CreateTag", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync", - "title": "Snippet for the update_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag.", - "file": "artifact_registry/update_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::Tag", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateTag", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync", - "title": "Snippet for the delete_tag call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag.", - "file": "artifact_registry/delete_tag.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tag", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#delete_tag", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "DeleteTag", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy.", - "file": "artifact_registry/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy.", - "file": "artifact_registry/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions.", - "file": "artifact_registry/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync", - "title": "Snippet for the get_project_settings call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings.", - "file": "artifact_registry/get_project_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_project_settings", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#get_project_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "GetProjectSettings", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync", - "title": "Snippet for the update_project_settings call in the ArtifactRegistry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings.", - "file": "artifact_registry/update_project_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_project_settings", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client#update_project_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings", - "client": { - "short_name": "ArtifactRegistry::Client", - "full_name": "::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client" - }, - "method": { - "short_name": "UpdateProjectSettings", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings", - "service": { - "short_name": "ArtifactRegistry", - "full_name": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb deleted file mode 100644 index 947e460b617b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/devtools/artifactregistry/v1beta2/service_services_pb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb deleted file mode 100644 index 81fee8ae756c..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/artifact_registry/v1beta2/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_project_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_settings_path project: "value0" - assert_equal "projects/value0/projectSettings", path - end - end - - def test_repository_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.repository_path project: "value0", location: "value1", repository: "value2" - assert_equal "projects/value0/locations/value1/repositories/value2", path - end - end - - def test_tag_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tag_path project: "value0", location: "value1", repository: "value2", package: "value3", tag: "value4" - assert_equal "projects/value0/locations/value1/repositories/value2/packages/value3/tags/value4", path - end - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb deleted file mode 100644 index 8c55356954ee..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_rest_test.rb +++ /dev/null @@ -1,1478 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry/rest" - - -class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_import_apt_artifacts - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_apt_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_apt_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_apt_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_apt_artifacts gcs_source: gcs_source, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_apt_artifacts_client_stub.call_count - end - end - end - - def test_import_yum_artifacts - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_yum_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_import_yum_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_yum_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_yum_artifacts gcs_source: gcs_source, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_yum_artifacts_client_stub.call_count - end - end - end - - def test_list_repositories - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_repositories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_repositories parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_repositories ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_repositories(::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_repositories_client_stub.call_count - end - end - end - - def test_get_repository - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_repository({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_repository name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_repository ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_repository({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_repository(::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_repository_client_stub.call_count - end - end - end - - def test_create_repository - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - repository_id = "hello world" - repository = {} - - create_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_repository parent: parent, repository_id: repository_id, repository: repository do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_repository ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_repository(::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_repository_client_stub.call_count - end - end - end - - def test_update_repository - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - repository = {} - update_mask = {} - - update_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_repository({ repository: repository, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_repository repository: repository, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_repository ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_repository({ repository: repository, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_repository(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_repository_client_stub.call_count - end - end - end - - def test_delete_repository - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_repository({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_repository name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_repository ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_repository({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_repository(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_repository_client_stub.call_count - end - end - end - - def test_list_packages - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_packages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_packages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_packages_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_packages parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_packages ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_packages({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_packages(::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_packages_client_stub.call_count - end - end - end - - def test_get_package - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_package ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_package(::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_package_client_stub.call_count - end - end - end - - def test_delete_package - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_package_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_package_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_package({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_package name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_package ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_package({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_package(::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_package_client_stub.call_count - end - end - end - - def test_list_versions - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - order_by = "hello world" - - list_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_versions_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_versions ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_versions(::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_versions_client_stub.call_count - end - end - end - - def test_get_version - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - - get_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_version({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_version name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_version ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_version({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_version(::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_count - end - end - end - - def test_delete_version - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_version({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_version name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_version ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_version({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_version(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_version_client_stub.call_count - end - end - end - - def test_list_files - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_files_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_files_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_files ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_files(::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_files_client_stub.call_count - end - end - end - - def test_get_file - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::File.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_file_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_file({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_file name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_file ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_file({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_file(::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_file_client_stub.call_count - end - end - end - - def test_list_tags - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_tags_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_list_tags_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tags_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tags parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tags ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_tags(::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tags_client_stub.call_count - end - end - end - - def test_get_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_tag({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_tag name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_tag ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_tag({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_tag(::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tag_client_stub.call_count - end - end - end - - def test_create_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tag_id = "hello world" - tag = {} - - create_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_create_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_tag parent: parent, tag_id: tag_id, tag: tag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_tag ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_tag(::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tag_client_stub.call_count - end - end - end - - def test_update_tag - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - tag = {} - update_mask = {} - - update_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_tag({ tag: tag, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_tag tag: tag, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_tag ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_tag({ tag: tag, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_tag(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tag_client_stub.call_count - end - end - end - - def test_delete_tag - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_tag_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_delete_tag_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_tag({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_tag name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_tag ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_tag({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_tag(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tag_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_get_project_settings - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_get_project_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_project_settings_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_project_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_project_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_project_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_project_settings_client_stub.call_count - end - end - end - - def test_update_project_settings - # Create test objects. - client_result = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - project_settings = {} - update_mask = {} - - update_project_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.stub :transcode_update_project_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_project_settings_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_project_settings project_settings: project_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_project_settings_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb deleted file mode 100644 index 2bc1a81812d3..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/google/cloud/artifact_registry/v1beta2/artifact_registry_test.rb +++ /dev/null @@ -1,1683 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/devtools/artifactregistry/v1beta2/service_pb" -require "google/cloud/artifact_registry/v1beta2/artifact_registry" - -class ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_import_apt_artifacts - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_apt_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_apt_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource), request["gcs_source"] - assert_equal :gcs_source, request.source - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_apt_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_apt_artifacts gcs_source: gcs_source, parent: parent do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_apt_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_apt_artifacts({ gcs_source: gcs_source, parent: parent }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_apt_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new(gcs_source: gcs_source, parent: parent), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_apt_artifacts_client_stub.call_rpc_count - end - end - - def test_import_yum_artifacts - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - gcs_source = {} - parent = "hello world" - - import_yum_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_yum_artifacts, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource), request["gcs_source"] - assert_equal :gcs_source, request.source - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_yum_artifacts_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_yum_artifacts gcs_source: gcs_source, parent: parent do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_yum_artifacts ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_yum_artifacts({ gcs_source: gcs_source, parent: parent }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_yum_artifacts(::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new(gcs_source: gcs_source, parent: parent), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_yum_artifacts_client_stub.call_rpc_count - end - end - - def test_list_repositories - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_repositories, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_repositories_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_repositories parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_repositories ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_repositories({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_repositories(::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_repositories_client_stub.call_rpc_count - end - end - - def test_get_repository - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_repository({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_repository name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_repository ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_repository({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_repository(::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_repository_client_stub.call_rpc_count - end - end - - def test_create_repository - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - repository_id = "hello world" - repository = {} - - create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["repository_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Repository), request["repository"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_repository parent: parent, repository_id: repository_id, repository: repository do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_repository ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_repository({ parent: parent, repository_id: repository_id, repository: repository }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_repository(::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new(parent: parent, repository_id: repository_id, repository: repository), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_repository_client_stub.call_rpc_count - end - end - - def test_update_repository - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - repository = {} - update_mask = {} - - update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Repository), request["repository"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_repository({ repository: repository, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_repository repository: repository, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_repository ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_repository({ repository: repository, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_repository(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new(repository: repository, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_repository_client_stub.call_rpc_count - end - end - - def test_delete_repository - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_repository, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_repository_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_repository({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_repository name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_repository ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_repository({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_repository(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_repository_client_stub.call_rpc_count - end - end - - def test_list_packages - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_packages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_packages, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_packages_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_packages({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_packages parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_packages ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_packages({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_packages(::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_packages_client_stub.call_rpc_count - end - end - - def test_get_package - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Package.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_package({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_package name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_package ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_package({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_package(::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_package_client_stub.call_rpc_count - end - end - - def test_delete_package - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_package_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_package, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_package_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_package({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_package name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_package ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_package({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_package(::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_package_client_stub.call_rpc_count - end - end - - def test_list_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - order_by = "hello world" - - list_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_versions, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_versions_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_versions parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_versions ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_versions({ parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_versions(::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_versions_client_stub.call_rpc_count - end - end - - def test_get_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Version.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :VERSION_VIEW_UNSPECIFIED - - get_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal :VERSION_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_version({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_version name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_version ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_version({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_version(::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_version_client_stub.call_rpc_count - end - end - - def test_delete_version - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_version, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_version_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_version({ name: name, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_version name: name, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_version ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_version({ name: name, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_version(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_version_client_stub.call_rpc_count - end - end - - def test_list_files - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_files, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_files_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_files parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_files ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_files({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_files(::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_files_client_stub.call_rpc_count - end - end - - def test_get_file - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::File.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_file, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_file_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_file({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_file name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_file ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_file({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_file(::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_file_client_stub.call_rpc_count - end - end - - def test_list_tags - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_tags_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tags, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tags_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_tags parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_tags ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_tags({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_tags(::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tags_client_stub.call_rpc_count - end - end - - def test_get_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_tag({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_tag name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_tag ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_tag({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_tag(::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_tag_client_stub.call_rpc_count - end - end - - def test_create_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tag_id = "hello world" - tag = {} - - create_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tag_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Tag), request["tag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_tag parent: parent, tag_id: tag_id, tag: tag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_tag ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_tag({ parent: parent, tag_id: tag_id, tag: tag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_tag(::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new(parent: parent, tag_id: tag_id, tag: tag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_tag_client_stub.call_rpc_count - end - end - - def test_update_tag - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - tag = {} - update_mask = {} - - update_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::Tag), request["tag"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_tag({ tag: tag, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_tag tag: tag, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_tag ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_tag({ tag: tag, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_tag(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new(tag: tag, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_tag_client_stub.call_rpc_count - end - end - - def test_delete_tag - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_tag_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tag, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tag_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_tag({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_tag name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_tag ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_tag({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_tag(::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_tag_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_get_project_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_project_settings, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_project_settings_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_project_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_project_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_project_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_project_settings_client_stub.call_rpc_count - end - end - - def test_update_project_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - project_settings = {} - update_mask = {} - - update_project_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_project_settings, name - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings), request["project_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_project_settings_client_stub do - # Create client - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_project_settings project_settings: project_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_project_settings ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_project_settings({ project_settings: project_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_project_settings(::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new(project_settings: project_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_project_settings_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb b/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1beta2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-asset-v1/.gitignore b/owl-bot-staging/google-cloud-asset-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-asset-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-asset-v1/.repo-metadata.json deleted file mode 100644 index 7def6cd22bee..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudasset.googleapis.com", - "api_shortname": "cloudasset", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest", - "distribution_name": "google-cloud-asset-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudasset", - "name_pretty": "Cloud Asset V1 API", - "product_documentation": "https://cloud.google.com/asset-inventory/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "A metadata inventory service that allows you to view, monitor, and analyze all your GCP and Anthos assets across projects and services. Note that google-cloud-asset-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-asset instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ASSET", - "ruby-cloud-product-url": "https://cloud.google.com/asset-inventory/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-asset-v1/.rubocop.yml b/owl-bot-staging/google-cloud-asset-v1/.rubocop.yml deleted file mode 100644 index bc19046e2ec5..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-asset-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-asset-v1.rb" diff --git a/owl-bot-staging/google-cloud-asset-v1/.toys.rb b/owl-bot-staging/google-cloud-asset-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/.yardopts b/owl-bot-staging/google-cloud-asset-v1/.yardopts deleted file mode 100644 index 3b0824309194..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Asset 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-asset-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-asset-v1/AUTHENTICATION.md deleted file mode 100644 index 3b34e30c6704..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-asset-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-asset-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/asset/v1" - -client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/asset/v1" - -::Google::Cloud::Asset::V1::AssetService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Asset::V1::AssetService::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-asset-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/asset/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Asset::V1::AssetService::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-asset-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-asset-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-asset-v1/Gemfile b/owl-bot-staging/google-cloud-asset-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/Gemfile +++ /dev/null @@ -1,14 +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-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-asset-v1/LICENSE.md b/owl-bot-staging/google-cloud-asset-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/README.md b/owl-bot-staging/google-cloud-asset-v1/README.md deleted file mode 100644 index c5eb207100ca..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Asset V1 API - -The Cloud Asset API manages the history and inventory of Google Cloud resources. - -A metadata inventory service that allows you to view, monitor, and analyze all your GCP and Anthos assets across projects and services. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Asset V1 API. Most users should consider using -the main client gem, -[google-cloud-asset](https://rubygems.org/gems/google-cloud-asset). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-asset-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/cloudasset.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/asset/v1" - -client = ::Google::Cloud::Asset::V1::AssetService::Client.new -request = ::Google::Cloud::Asset::V1::ExportAssetsRequest.new # (request fields as keyword arguments...) -response = client.export_assets request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/asset-inventory/) -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/asset/v1" -require "logger" - -client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-asset`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-asset-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-asset`. -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-asset-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-asset-v1/Rakefile b/owl-bot-staging/google-cloud-asset-v1/Rakefile deleted file mode 100644 index 96313e76c5a7..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ASSET_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ASSET_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ASSET_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 ASSET_TEST_PROJECT=test123 ASSET_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/asset/v1/asset_service/credentials" - ::Google::Cloud::Asset::V1::AssetService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ASSET_PROJECT"] = project - ENV["ASSET_TEST_PROJECT"] = project - ENV["ASSET_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-asset-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-asset-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-asset-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-asset-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-asset-v1" - header "google-cloud-asset-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-asset-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-asset-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-asset-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-asset-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-asset-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-asset-v1/gapic_metadata.json deleted file mode 100644 index 8aa482a92f45..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/gapic_metadata.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.asset.v1", - "libraryPackage": "::Google::Cloud::Asset::V1", - "services": { - "AssetService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Asset::V1::AssetService::Client", - "rpcs": { - "ExportAssets": { - "methods": [ - "export_assets" - ] - }, - "ListAssets": { - "methods": [ - "list_assets" - ] - }, - "BatchGetAssetsHistory": { - "methods": [ - "batch_get_assets_history" - ] - }, - "CreateFeed": { - "methods": [ - "create_feed" - ] - }, - "GetFeed": { - "methods": [ - "get_feed" - ] - }, - "ListFeeds": { - "methods": [ - "list_feeds" - ] - }, - "UpdateFeed": { - "methods": [ - "update_feed" - ] - }, - "DeleteFeed": { - "methods": [ - "delete_feed" - ] - }, - "SearchAllResources": { - "methods": [ - "search_all_resources" - ] - }, - "SearchAllIamPolicies": { - "methods": [ - "search_all_iam_policies" - ] - }, - "AnalyzeIamPolicy": { - "methods": [ - "analyze_iam_policy" - ] - }, - "AnalyzeIamPolicyLongrunning": { - "methods": [ - "analyze_iam_policy_longrunning" - ] - }, - "AnalyzeMove": { - "methods": [ - "analyze_move" - ] - }, - "QueryAssets": { - "methods": [ - "query_assets" - ] - }, - "CreateSavedQuery": { - "methods": [ - "create_saved_query" - ] - }, - "GetSavedQuery": { - "methods": [ - "get_saved_query" - ] - }, - "ListSavedQueries": { - "methods": [ - "list_saved_queries" - ] - }, - "UpdateSavedQuery": { - "methods": [ - "update_saved_query" - ] - }, - "DeleteSavedQuery": { - "methods": [ - "delete_saved_query" - ] - }, - "BatchGetEffectiveIamPolicies": { - "methods": [ - "batch_get_effective_iam_policies" - ] - }, - "AnalyzeOrgPolicies": { - "methods": [ - "analyze_org_policies" - ] - }, - "AnalyzeOrgPolicyGovernedContainers": { - "methods": [ - "analyze_org_policy_governed_containers" - ] - }, - "AnalyzeOrgPolicyGovernedAssets": { - "methods": [ - "analyze_org_policy_governed_assets" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-asset-v1/google-cloud-asset-v1.gemspec b/owl-bot-staging/google-cloud-asset-v1/google-cloud-asset-v1.gemspec deleted file mode 100644 index 1d813d0834b1..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/google-cloud-asset-v1.gemspec +++ /dev/null @@ -1,31 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/asset/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-asset-v1" - gem.version = Google::Cloud::Asset::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "A metadata inventory service that allows you to view, monitor, and analyze all your GCP and Anthos assets across projects and services. Note that google-cloud-asset-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-asset instead. See the readme for more details." - gem.summary = "The Cloud Asset API manages the history and inventory of Google Cloud resources." - 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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-os_config-v1", "> 0.0", "< 2.a" - gem.add_dependency "google-identity-access_context_manager-v1", "> 0.0", "< 2.a" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google-cloud-asset-v1.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google-cloud-asset-v1.rb deleted file mode 100644 index 14598cf10234..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google-cloud-asset-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/asset/v1" diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1.rb deleted file mode 100644 index a02ac2ba74fb..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/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/asset/v1/asset_service" -require "google/cloud/asset/v1/version" - -module Google - module Cloud - module Asset - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/asset/v1" - # client = ::Google::Cloud::Asset::V1::AssetService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/asset/v1" - # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/asset/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_enrichment_resourceowners_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_enrichment_resourceowners_pb.rb deleted file mode 100644 index 728884b914b3..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_enrichment_resourceowners_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/asset/v1/asset_enrichment_resourceowners.proto - -require 'google/protobuf' - - -descriptor_data = "\n;google/cloud/asset/v1/asset_enrichment_resourceowners.proto\x12\x15google.cloud.asset.v1\")\n\x0eResourceOwners\x12\x17\n\x0fresource_owners\x18\x01 \x03(\tB\xa2\x01\n\x19\x63om.google.cloud.asset.v1B\"AssetEnrichmentResourceownersProtoP\x01Z/cloud.google.com/go/asset/apiv1/assetpb;assetpb\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Asset - module V1 - ResourceOwners = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ResourceOwners").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service.rb deleted file mode 100644 index 0ee9cc0080ea..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/asset/v1/version" - -require "google/cloud/asset/v1/asset_service/credentials" -require "google/cloud/asset/v1/asset_service/paths" -require "google/cloud/asset/v1/asset_service/operations" -require "google/cloud/asset/v1/asset_service/client" -require "google/cloud/asset/v1/asset_service/rest" - -module Google - module Cloud - module Asset - module V1 - ## - # Asset service definition. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/asset/v1/asset_service" - # client = ::Google::Cloud::Asset::V1::AssetService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/asset/v1/asset_service/rest" - # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - module AssetService - end - end - end - end -end - -helper_path = ::File.join __dir__, "asset_service", "helpers.rb" -require "google/cloud/asset/v1/asset_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb deleted file mode 100644 index 78ae3db04cd2..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/client.rb +++ /dev/null @@ -1,3484 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/asset/v1/asset_service_pb" - -module Google - module Cloud - module Asset - module V1 - module AssetService - ## - # Client for the AssetService service. - # - # Asset service definition. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudasset.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :asset_service_stub - - ## - # Configure the AssetService Client class. - # - # See {::Google::Cloud::Asset::V1::AssetService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssetService clients - # ::Google::Cloud::Asset::V1::AssetService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Asset", "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.export_assets.timeout = 60.0 - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.batch_get_assets_history.timeout = 60.0 - default_config.rpcs.batch_get_assets_history.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_feed.timeout = 60.0 - - default_config.rpcs.get_feed.timeout = 60.0 - default_config.rpcs.get_feed.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_feeds.timeout = 60.0 - default_config.rpcs.list_feeds.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_feed.timeout = 60.0 - - default_config.rpcs.delete_feed.timeout = 60.0 - default_config.rpcs.delete_feed.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_all_resources.timeout = 30.0 - default_config.rpcs.search_all_resources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_all_iam_policies.timeout = 30.0 - default_config.rpcs.search_all_iam_policies.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.analyze_iam_policy.timeout = 300.0 - default_config.rpcs.analyze_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.analyze_iam_policy_longrunning.timeout = 60.0 - - default_config.rpcs.query_assets.timeout = 200.0 - default_config.rpcs.query_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_saved_query.timeout = 60.0 - - default_config.rpcs.get_saved_query.timeout = 60.0 - default_config.rpcs.get_saved_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_saved_queries.timeout = 60.0 - default_config.rpcs.list_saved_queries.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_saved_query.timeout = 60.0 - - default_config.rpcs.delete_saved_query.timeout = 60.0 - default_config.rpcs.delete_saved_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.batch_get_effective_iam_policies.timeout = 300.0 - default_config.rpcs.batch_get_effective_iam_policies.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.analyze_org_policies.timeout = 60.0 - default_config.rpcs.analyze_org_policies.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.analyze_org_policy_governed_containers.timeout = 60.0 - default_config.rpcs.analyze_org_policy_governed_containers.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.analyze_org_policy_governed_assets.timeout = 60.0 - default_config.rpcs.analyze_org_policy_governed_assets.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 AssetService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Asset::V1::AssetService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @asset_service_stub.universe_domain - end - - ## - # Create a new AssetService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssetService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed 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/asset/v1/asset_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 - - @asset_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Asset::V1::AssetService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @asset_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Asset::V1::AssetService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @asset_service_stub.logger - end - - # Service calls - - ## - # Exports assets with time and resource types to a given Cloud Storage - # location/BigQuery table. For Cloud Storage location destinations, the - # output format is newline-delimited JSON. Each line represents a - # {::Google::Cloud::Asset::V1::Asset google.cloud.asset.v1.Asset} in the JSON - # format; for BigQuery table destinations, the output table stores the fields - # in asset Protobuf as columns. This API implements the - # {::Google::Longrunning::Operation google.longrunning.Operation} API, which - # allows you to keep track of the export. We recommend intervals of at least - # 2 seconds with exponential retry to poll the export operation result. For - # regular-size resource parent, the export operation usually finishes within - # 5 minutes. - # - # @overload export_assets(request, options = nil) - # Pass arguments to `export_assets` via a request object, either of type - # {::Google::Cloud::Asset::V1::ExportAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, output_config: nil, relationship_types: nil) - # Pass arguments to `export_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative name of the root asset. This can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"), - # or a folder number (such as "folders/123"). - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Timestamp to take an asset snapshot. This can only be set to a timestamp - # between the current time and the current time minus 35 days (inclusive). - # If not specified, the current time will be used. Due to delays in resource - # data collection and indexing, there is a volatile window during which - # running the same query may get different results. - # @param asset_types [::Array<::String>] - # A list of asset types to take a snapshot for. For example: - # "compute.googleapis.com/Disk". - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # - # If specified, only matching assets will be returned, otherwise, it will - # snapshot all asset types. See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types. - # @param content_type [::Google::Cloud::Asset::V1::ContentType] - # Asset content type. If not specified, no content but the asset name will be - # returned. - # @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # @param relationship_types [::Array<::String>] - # A list of relationship types to export, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it snapshots specified relationships. It returns an error if - # any of the [relationship_types] doesn't belong to the supported - # relationship types of the [asset_types] or if any of the [asset_types] - # doesn't belong to the source types of the [relationship_types]. - # * Otherwise: - # it snapshots the supported relationships for all [asset_types] or returns - # an error if any of the [asset_types] has no relationship support. - # An unspecified asset types field means all supported asset_types. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - # supported asset types and relationship types. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::ExportAssetsRequest.new - # - # # Call the export_assets method. - # result = client.export_assets request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ExportAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :export_assets, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 assets with time and resource types and returns paged results in - # response. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Asset::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, relationship_types: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization, folder, or project the assets belong - # to. Format: "organizations/[organization-number]" (such as - # "organizations/123"), "projects/[project-id]" (such as - # "projects/my-project-id"), "projects/[project-number]" (such as - # "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Timestamp to take an asset snapshot. This can only be set to a timestamp - # between the current time and the current time minus 35 days (inclusive). - # If not specified, the current time will be used. Due to delays in resource - # data collection and indexing, there is a volatile window during which - # running the same query may get different results. - # @param asset_types [::Array<::String>] - # A list of asset types to take a snapshot for. For example: - # "compute.googleapis.com/Disk". - # - # Regular expression is also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # - # If specified, only matching assets will be returned, otherwise, it will - # snapshot all asset types. See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types. - # @param content_type [::Google::Cloud::Asset::V1::ContentType] - # Asset content type. If not specified, no content but the asset name will - # be returned. - # @param page_size [::Integer] - # The maximum number of assets to be returned in a single response. Default - # is 100, minimum is 1, and maximum is 1000. - # @param page_token [::String] - # The `next_page_token` returned from the previous `ListAssetsResponse`, or - # unspecified for the first `ListAssetsRequest`. It is a continuation of a - # prior `ListAssets` call, and the API should return the next page of assets. - # @param relationship_types [::Array<::String>] - # A list of relationship types to output, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it snapshots specified relationships. It returns an error if - # any of the [relationship_types] doesn't belong to the supported - # relationship types of the [asset_types] or if any of the [asset_types] - # doesn't belong to the source types of the [relationship_types]. - # * Otherwise: - # it snapshots the supported relationships for all [asset_types] or returns - # an error if any of the [asset_types] has no relationship support. - # An unspecified asset types field means all supported asset_types. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types and relationship types. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Asset::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :list_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @asset_service_stub, :list_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Batch gets the update history of assets that overlap a time window. - # For IAM_POLICY content, this API outputs history when the asset and its - # attached IAM POLICY both exist. This can create gaps in the output history. - # Otherwise, this API outputs history with asset in both non-delete or - # deleted status. - # If a specified asset does not exist, this API returns an INVALID_ARGUMENT - # error. - # - # @overload batch_get_assets_history(request, options = nil) - # Pass arguments to `batch_get_assets_history` via a request object, either of type - # {::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assets_history(parent: nil, asset_names: nil, content_type: nil, read_time_window: nil, relationship_types: nil) - # Pass arguments to `batch_get_assets_history` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative name of the root asset. It can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id")", or a project number (such as "projects/12345"). - # @param asset_names [::Array<::String>] - # A list of the full names of the assets. - # See: https://cloud.google.com/asset-inventory/docs/resource-name-format - # Example: - # - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - # - # The request becomes a no-op if the asset name list is empty, and the max - # size of the asset name list is 100 in one request. - # @param content_type [::Google::Cloud::Asset::V1::ContentType] - # Optional. The content type. - # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash] - # Optional. The time window for the asset history. Both start_time and - # end_time are optional and if set, it must be after the current time minus - # 35 days. If end_time is not set, it is default to current timestamp. - # If start_time is not set, the snapshot of the assets at end_time will be - # returned. The returned results contain all temporal assets whose time - # window overlap with read_time_window. - # @param relationship_types [::Array<::String>] - # Optional. A list of relationship types to output, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it outputs specified relationships' history on the [asset_names]. It - # returns an error if any of the [relationship_types] doesn't belong to the - # supported relationship types of the [asset_names] or if any of the - # [asset_names]'s types doesn't belong to the source types of the - # [relationship_types]. - # * Otherwise: - # it outputs the supported relationships' history on the [asset_names] or - # returns an error if any of the [asset_names]'s types has no relationship - # support. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - # supported asset types and relationship types. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new - # - # # Call the batch_get_assets_history method. - # result = client.batch_get_assets_history request - # - # # The returned object is of type Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse. - # p result - # - def batch_get_assets_history request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest - - # Converts hash and nil to 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_assets_history.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_get_assets_history.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_get_assets_history.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :batch_get_assets_history, request, 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 feed in a parent project/folder/organization to listen to its - # asset updates. - # - # @overload create_feed(request, options = nil) - # Pass arguments to `create_feed` via a request object, either of type - # {::Google::Cloud::Asset::V1::CreateFeedRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::CreateFeedRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_feed(parent: nil, feed_id: nil, feed: nil) - # Pass arguments to `create_feed` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project/folder/organization where this feed - # should be created in. It can only be an organization number (such as - # "organizations/123"), a folder number (such as "folders/123"), a project ID - # (such as "projects/my-project-id"), or a project number (such as - # "projects/12345"). - # @param feed_id [::String] - # Required. This is the client-assigned asset feed identifier and it needs to - # be unique under a specific parent project/folder/organization. - # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash] - # Required. The feed details. The field `name` must be empty and it will be - # generated in the format of: projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::CreateFeedRequest.new - # - # # Call the create_feed method. - # result = client.create_feed request - # - # # The returned object is of type Google::Cloud::Asset::V1::Feed. - # p result - # - def create_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateFeedRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_feed.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_feed.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_feed.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :create_feed, request, 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 details about an asset feed. - # - # @overload get_feed(request, options = nil) - # Pass arguments to `get_feed` via a request object, either of type - # {::Google::Cloud::Asset::V1::GetFeedRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::GetFeedRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_feed(name: nil) - # Pass arguments to `get_feed` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Feed and it must be in the format of: - # projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::GetFeedRequest.new - # - # # Call the get_feed method. - # result = client.get_feed request - # - # # The returned object is of type Google::Cloud::Asset::V1::Feed. - # p result - # - def get_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetFeedRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_feed.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_feed.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_feed.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :get_feed, request, 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 asset feeds in a parent project/folder/organization. - # - # @overload list_feeds(request, options = nil) - # Pass arguments to `list_feeds` via a request object, either of type - # {::Google::Cloud::Asset::V1::ListFeedsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::ListFeedsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_feeds(parent: nil) - # Pass arguments to `list_feeds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project/folder/organization whose feeds are to be - # listed. It can only be using project/folder/organization number (such as - # "folders/12345")", or a project ID (such as "projects/my-project-id"). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::ListFeedsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::ListFeedsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::ListFeedsRequest.new - # - # # Call the list_feeds method. - # result = client.list_feeds request - # - # # The returned object is of type Google::Cloud::Asset::V1::ListFeedsResponse. - # p result - # - def list_feeds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListFeedsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_feeds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_feeds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_feeds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :list_feeds, request, 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 asset feed configuration. - # - # @overload update_feed(request, options = nil) - # Pass arguments to `update_feed` via a request object, either of type - # {::Google::Cloud::Asset::V1::UpdateFeedRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_feed(feed: nil, update_mask: nil) - # Pass arguments to `update_feed` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash] - # Required. The new values of feed details. It must match an existing feed - # and the field `name` must be in the format of: - # projects/project_number/feeds/feed_id or - # folders/folder_number/feeds/feed_id or - # organizations/organization_number/feeds/feed_id. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Only updates the `feed` fields indicated by this mask. - # The field mask must not be empty, and it must not contain fields that - # are immutable or only set by the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::UpdateFeedRequest.new - # - # # Call the update_feed method. - # result = client.update_feed request - # - # # The returned object is of type Google::Cloud::Asset::V1::Feed. - # p result - # - def update_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateFeedRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_feed.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.feed&.name - header_params["feed.name"] = request.feed.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_feed.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_feed.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :update_feed, request, 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 asset feed. - # - # @overload delete_feed(request, options = nil) - # Pass arguments to `delete_feed` via a request object, either of type - # {::Google::Cloud::Asset::V1::DeleteFeedRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_feed(name: nil) - # Pass arguments to `delete_feed` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the feed and it must be in the format of: - # projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::DeleteFeedRequest.new - # - # # Call the delete_feed method. - # result = client.delete_feed request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteFeedRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_feed.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_feed.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_feed.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :delete_feed, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches all Google Cloud resources within the specified scope, such as a - # project, folder, or organization. The caller must be granted the - # `cloudasset.assets.searchAllResources` permission on the desired scope, - # otherwise the request will be rejected. - # - # @overload search_all_resources(request, options = nil) - # Pass arguments to `search_all_resources` via a request object, either of type - # {::Google::Cloud::Asset::V1::SearchAllResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::SearchAllResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_all_resources(scope: nil, query: nil, asset_types: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) - # Pass arguments to `search_all_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 scope [::String] - # Required. A scope can be a project, a folder, or an organization. The - # search is limited to the resources within the `scope`. The caller must be - # granted the - # [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - # permission on the desired scope. - # - # The allowed values are: - # - # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") - # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") - # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param query [::String] - # Optional. The query statement. See [how to construct a - # query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) - # for more information. If not specified or empty, it will search all the - # resources within the specified `scope`. - # - # Examples: - # - # * `name:Important` to find Google Cloud resources whose name contains - # `Important` as a word. - # * `name=Important` to find the Google Cloud resource whose name is exactly - # `Important`. - # * `displayName:Impor*` to find Google Cloud resources whose display name - # contains `Impor` as a prefix of any word in the field. - # * `location:us-west*` to find Google Cloud resources whose location - # contains both `us` and `west` as prefixes. - # * `labels:prod` to find Google Cloud resources whose labels contain `prod` - # as a key or value. - # * `labels.env:prod` to find Google Cloud resources that have a label `env` - # and its value is `prod`. - # * `labels.env:*` to find Google Cloud resources that have a label `env`. - # * `tagKeys:env` to find Google Cloud resources that have directly - # attached tags where the - # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) - # contains `env`. - # * `tagValues:prod*` to find Google Cloud resources that have directly - # attached tags where the - # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # contains a word prefixed by `prod`. - # * `tagValueIds=tagValues/123` to find Google Cloud resources that have - # directly attached tags where the - # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # is exactly `tagValues/123`. - # * `effectiveTagKeys:env` to find Google Cloud resources that have - # directly attached or inherited tags where the - # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) - # contains `env`. - # * `effectiveTagValues:prod*` to find Google Cloud resources that have - # directly attached or inherited tags where the - # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # contains a word prefixed by `prod`. - # * `effectiveTagValueIds=tagValues/123` to find Google Cloud resources that - # have directly attached or inherited tags where the - # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # is exactly `tagValues/123`. - # * `kmsKey:key` to find Google Cloud resources encrypted with a - # customer-managed encryption key whose name contains `key` as a word. This - # field is deprecated. Use the `kmsKeys` field to retrieve Cloud KMS - # key information. - # * `kmsKeys:key` to find Google Cloud resources encrypted with - # customer-managed encryption keys whose name contains the word `key`. - # * `relationships:instance-group-1` to find Google Cloud resources that have - # relationships with `instance-group-1` in the related resource name. - # * `relationships:INSTANCE_TO_INSTANCEGROUP` to find Compute Engine - # instances that have relationships of type `INSTANCE_TO_INSTANCEGROUP`. - # * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find - # Compute Engine instances that have relationships with `instance-group-1` - # in the Compute Engine instance group resource name, for relationship type - # `INSTANCE_TO_INSTANCEGROUP`. - # * `sccSecurityMarks.key=value` to find Cloud resources that are attached - # with security marks whose key is `key` and value is `value`. - # * `sccSecurityMarks.key:*` to find Cloud resources that are attached with - # security marks whose key is `key`. - # * `state:ACTIVE` to find Google Cloud resources whose state contains - # `ACTIVE` as a word. - # * `NOT state:ACTIVE` to find Google Cloud resources whose state doesn't - # contain `ACTIVE` as a word. - # * `createTime<1609459200` to find Google Cloud resources that were created - # before `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of - # `2021-01-01 00:00:00 UTC` in seconds. - # * `updateTime>1609459200` to find Google Cloud resources that were updated - # after `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of - # `2021-01-01 00:00:00 UTC` in seconds. - # * `Important` to find Google Cloud resources that contain `Important` as a - # word in any of the searchable fields. - # * `Impor*` to find Google Cloud resources that contain `Impor` as a prefix - # of any word in any of the searchable fields. - # * `Important location:(us-west1 OR global)` to find Google Cloud - # resources that contain `Important` as a word in any of the searchable - # fields and are also located in the `us-west1` region or the `global` - # location. - # @param asset_types [::Array<::String>] - # Optional. A list of asset types that this request searches for. If empty, - # it will search all the asset types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # @param page_size [::Integer] - # Optional. The page size for search result pagination. Page size is capped - # at 500 even if a larger value is given. If set to zero or a negative value, - # server will pick an appropriate default. Returned results may be fewer than - # requested. When this happens, there could be more results as long as - # `next_page_token` is returned. - # @param page_token [::String] - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. `page_token` must be the value of - # `next_page_token` from the previous response. The values of all other - # method parameters, must be identical to those in the previous call. - # @param order_by [::String] - # Optional. A comma-separated list of fields specifying the sorting order of - # the results. The default order is ascending. Add " DESC" after the field - # name to indicate descending order. Redundant space characters are ignored. - # Example: "location DESC, name". - # Only the following fields in the response are sortable: - # - # * name - # * assetType - # * project - # * displayName - # * description - # * location - # * createTime - # * updateTime - # * state - # * parentFullResourceName - # * parentAssetType - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A comma-separated list of fields that you want returned in the - # results. The following fields are returned by default if not specified: - # - # * `name` - # * `assetType` - # * `project` - # * `folders` - # * `organization` - # * `displayName` - # * `description` - # * `location` - # * `labels` - # * `tags` - # * `effectiveTags` - # * `networkTags` - # * `kmsKeys` - # * `createTime` - # * `updateTime` - # * `state` - # * `additionalAttributes` - # * `parentFullResourceName` - # * `parentAssetType` - # - # Some fields of large size, such as `versionedResources`, - # `attachedResources`, `effectiveTags` etc., are not returned by default, but - # you can specify them in the `read_mask` parameter if you want to include - # them. If `"*"` is specified, all [available - # fields](https://cloud.google.com/asset-inventory/docs/reference/rest/v1/TopLevel/searchAllResources#resourcesearchresult) - # are returned. - # Examples: `"name,location"`, `"name,versionedResources"`, `"*"`. - # Any invalid field path will trigger INVALID_ARGUMENT error. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::SearchAllResourcesRequest.new - # - # # Call the search_all_resources method. - # result = client.search_all_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::Asset::V1::ResourceSearchResult. - # p item - # end - # - def search_all_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_all_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::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_all_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_all_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :search_all_resources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @asset_service_stub, :search_all_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 - - ## - # Searches all IAM policies within the specified scope, such as a project, - # folder, or organization. The caller must be granted the - # `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, - # otherwise the request will be rejected. - # - # @overload search_all_iam_policies(request, options = nil) - # Pass arguments to `search_all_iam_policies` via a request object, either of type - # {::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_all_iam_policies(scope: nil, query: nil, page_size: nil, page_token: nil, asset_types: nil, order_by: nil) - # Pass arguments to `search_all_iam_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 scope [::String] - # Required. A scope can be a project, a folder, or an organization. The - # search is limited to the IAM policies within the `scope`. The caller must - # be granted the - # [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - # permission on the desired scope. - # - # The allowed values are: - # - # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") - # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") - # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param query [::String] - # Optional. The query statement. See [how to construct a - # query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) - # for more information. If not specified or empty, it will search all the - # IAM policies within the specified `scope`. Note that the query string is - # compared against each IAM policy binding, including its principals, - # roles, and IAM conditions. The returned IAM policies will only - # contain the bindings that match your query. To learn more about the IAM - # policy structure, see the [IAM policy - # documentation](https://cloud.google.com/iam/help/allow-policies/structure). - # - # Examples: - # - # * `policy:amy@gmail.com` to find IAM policy bindings that specify user - # "amy@gmail.com". - # * `policy:roles/compute.admin` to find IAM policy bindings that specify - # the Compute Admin role. - # * `policy:comp*` to find IAM policy bindings that contain "comp" as a - # prefix of any word in the binding. - # * `policy.role.permissions:storage.buckets.update` to find IAM policy - # bindings that specify a role containing "storage.buckets.update" - # permission. Note that if callers don't have `iam.roles.get` access to a - # role's included permissions, policy bindings that specify this role will - # be dropped from the search results. - # * `policy.role.permissions:upd*` to find IAM policy bindings that specify a - # role containing "upd" as a prefix of any word in the role permission. - # Note that if callers don't have `iam.roles.get` access to a role's - # included permissions, policy bindings that specify this role will be - # dropped from the search results. - # * `resource:organizations/123456` to find IAM policy bindings - # that are set on "organizations/123456". - # * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to - # find IAM policy bindings that are set on the project named "myproject". - # * `Important` to find IAM policy bindings that contain "Important" as a - # word in any of the searchable fields (except for the included - # permissions). - # * `resource:(instance1 OR instance2) policy:amy` to find - # IAM policy bindings that are set on resources "instance1" or - # "instance2" and also specify user "amy". - # * `roles:roles/compute.admin` to find IAM policy bindings that specify the - # Compute Admin role. - # * `memberTypes:user` to find IAM policy bindings that contain the - # principal type "user". - # @param page_size [::Integer] - # Optional. The page size for search result pagination. Page size is capped - # at 500 even if a larger value is given. If set to zero or a negative value, - # server will pick an appropriate default. Returned results may be fewer than - # requested. When this happens, there could be more results as long as - # `next_page_token` is returned. - # @param page_token [::String] - # Optional. If present, retrieve the next batch of results from the preceding - # call to this method. `page_token` must be the value of `next_page_token` - # from the previous response. The values of all other method parameters must - # be identical to those in the previous call. - # @param asset_types [::Array<::String>] - # Optional. A list of asset types that the IAM policies are attached to. If - # empty, it will search the IAM policies that are attached to all the asset - # types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots IAM policies attached to asset type - # starts with "compute.googleapis.com". - # * ".*Instance" snapshots IAM policies attached to asset type ends with - # "Instance". - # * ".*Instance.*" snapshots IAM policies attached to asset type contains - # "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # @param order_by [::String] - # Optional. A comma-separated list of fields specifying the sorting order of - # the results. The default order is ascending. Add " DESC" after the field - # name to indicate descending order. Redundant space characters are ignored. - # Example: "assetType DESC, resource". - # Only singular primitive fields in the response are sortable: - # * resource - # * assetType - # * project - # All the other fields such as repeated fields (e.g., `folders`) and - # non-primitive fields (e.g., `policy`) are not supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new - # - # # Call the search_all_iam_policies method. - # result = client.search_all_iam_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::Cloud::Asset::V1::IamPolicySearchResult. - # p item - # end - # - def search_all_iam_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_all_iam_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::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_all_iam_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_all_iam_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :search_all_iam_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @asset_service_stub, :search_all_iam_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 - - ## - # Analyzes IAM policies to answer which identities have what accesses on - # which resources. - # - # @overload analyze_iam_policy(request, options = nil) - # Pass arguments to `analyze_iam_policy` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload analyze_iam_policy(analysis_query: nil, saved_analysis_query: nil, execution_timeout: nil) - # Pass arguments to `analyze_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 analysis_query [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery, ::Hash] - # Required. The request query. - # @param saved_analysis_query [::String] - # Optional. The name of a saved query, which must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # - # If both `analysis_query` and `saved_analysis_query` are provided, they - # will be merged together with the `saved_analysis_query` as base and - # the `analysis_query` as overrides. For more details of the merge behavior, - # refer to the - # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) - # page. - # - # Note that you cannot override primitive fields with default value, such as - # 0 or empty string, etc., because we use proto3, which doesn't support field - # presence yet. - # @param execution_timeout [::Google::Protobuf::Duration, ::Hash] - # Optional. Amount of time executable has to complete. See JSON - # representation of - # [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). - # - # If this field is set with a value less than the RPC deadline, and the - # execution of your query hasn't finished in the specified - # execution timeout, you will get a response with partial result. - # Otherwise, your query's execution will continue until the RPC deadline. - # If it's not finished until then, you will get a DEADLINE_EXCEEDED error. - # - # Default is empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new - # - # # Call the analyze_iam_policy method. - # result = client.analyze_iam_policy request - # - # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse. - # p result - # - def analyze_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.analyze_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.analysis_query&.scope - header_params["analysis_query.scope"] = request.analysis_query.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.analyze_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.analyze_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :analyze_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 - - ## - # Analyzes IAM policies asynchronously to answer which identities have what - # accesses on which resources, and writes the analysis results to a Google - # Cloud Storage or a BigQuery destination. For Cloud Storage destination, the - # output format is the JSON format that represents a - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse AnalyzeIamPolicyResponse}. - # This method implements the - # {::Google::Longrunning::Operation google.longrunning.Operation}, which allows - # you to track the operation status. We recommend intervals of at least 2 - # seconds with exponential backoff retry to poll the operation result. The - # metadata contains the metadata for the long-running operation. - # - # @overload analyze_iam_policy_longrunning(request, options = nil) - # Pass arguments to `analyze_iam_policy_longrunning` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload analyze_iam_policy_longrunning(analysis_query: nil, saved_analysis_query: nil, output_config: nil) - # Pass arguments to `analyze_iam_policy_longrunning` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param analysis_query [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery, ::Hash] - # Required. The request query. - # @param saved_analysis_query [::String] - # Optional. The name of a saved query, which must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # - # If both `analysis_query` and `saved_analysis_query` are provided, they - # will be merged together with the `saved_analysis_query` as base and - # the `analysis_query` as overrides. For more details of the merge behavior, - # refer to the - # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) - # doc. - # - # Note that you cannot override primitive fields with default value, such as - # 0 or empty string, etc., because we use proto3, which doesn't support field - # presence yet. - # @param output_config [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new - # - # # Call the analyze_iam_policy_longrunning method. - # result = client.analyze_iam_policy_longrunning request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def analyze_iam_policy_longrunning request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.analyze_iam_policy_longrunning.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.analysis_query&.scope - header_params["analysis_query.scope"] = request.analysis_query.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.analyze_iam_policy_longrunning.timeout, - metadata: metadata, - retry_policy: @config.rpcs.analyze_iam_policy_longrunning.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :analyze_iam_policy_longrunning, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Analyze moving a resource to a specified destination without kicking off - # the actual move. The analysis is best effort depending on the user's - # permissions of viewing different hierarchical policies and configurations. - # The policies and configuration are subject to change before the actual - # resource migration takes place. - # - # @overload analyze_move(request, options = nil) - # Pass arguments to `analyze_move` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeMoveRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeMoveRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload analyze_move(resource: nil, destination_parent: nil, view: nil) - # Pass arguments to `analyze_move` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # Required. Name of the resource to perform the analysis against. - # Only Google Cloud projects are supported as of today. Hence, this can only - # be a project ID (such as "projects/my-project-id") or a project number - # (such as "projects/12345"). - # @param destination_parent [::String] - # Required. Name of the Google Cloud folder or organization to reparent the - # target resource. The analysis will be performed against hypothetically - # moving the resource to this specified destination parent. This can only be - # a folder number (such as "folders/123") or an organization number (such as - # "organizations/123"). - # @param view [::Google::Cloud::Asset::V1::AnalyzeMoveRequest::AnalysisView] - # Analysis view indicating what information should be included in the - # analysis response. If unspecified, the default view is FULL. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeMoveRequest.new - # - # # Call the analyze_move method. - # result = client.analyze_move request - # - # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeMoveResponse. - # p result - # - def analyze_move request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeMoveRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.analyze_move.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-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.analyze_move.timeout, - metadata: metadata, - retry_policy: @config.rpcs.analyze_move.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :analyze_move, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Issue a job that queries assets using a SQL statement compatible with - # [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). - # - # If the query execution finishes within timeout and there's no pagination, - # the full query results will be returned in the `QueryAssetsResponse`. - # - # Otherwise, full query results can be obtained by issuing extra requests - # with the `job_reference` from the a previous `QueryAssets` call. - # - # Note, the query result has approximately 10 GB limitation enforced by - # [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). - # Queries return larger results will result in errors. - # - # @overload query_assets(request, options = nil) - # Pass arguments to `query_assets` via a request object, either of type - # {::Google::Cloud::Asset::V1::QueryAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload query_assets(parent: nil, statement: nil, job_reference: nil, page_size: nil, page_token: nil, timeout: nil, read_time_window: nil, read_time: nil, output_config: nil) - # Pass arguments to `query_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative name of the root asset. This can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"), - # or a folder number (such as "folders/123"). - # - # Only assets belonging to the `parent` will be returned. - # @param statement [::String] - # Optional. A SQL statement that's compatible with [BigQuery - # SQL](https://cloud.google.com/bigquery/docs/introduction-sql). - # - # Note: The following parameters are mutually exclusive: `statement`, `job_reference`. 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 job_reference [::String] - # Optional. Reference to the query job, which is from the - # `QueryAssetsResponse` of previous `QueryAssets` call. - # - # Note: The following parameters are mutually exclusive: `job_reference`, `statement`. 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 page_size [::Integer] - # Optional. The maximum number of rows to return in the results. Responses - # are limited to 10 MB and 1000 rows. - # - # By default, the maximum row count is 1000. When the byte or row count limit - # is reached, the rest of the query results will be paginated. - # - # The field will be ignored when [output_config] is specified. - # @param page_token [::String] - # Optional. A page token received from previous `QueryAssets`. - # - # The field will be ignored when [output_config] is specified. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # Optional. Specifies the maximum amount of time that the client is willing - # to wait for the query to complete. By default, this limit is 5 min for the - # first query, and 1 minute for the following queries. If the query is - # complete, the `done` field in the `QueryAssetsResponse` is true, otherwise - # false. - # - # Like BigQuery [jobs.query - # API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) - # The call is not guaranteed to wait for the specified timeout; it typically - # returns after around 200 seconds (200,000 milliseconds), even if the query - # is not complete. - # - # The field will be ignored when [output_config] is specified. - # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash] - # Optional. [start_time] is required. [start_time] must be less than - # [end_time] Defaults [end_time] to now if [start_time] is set and - # [end_time] isn't. Maximum permitted time range is 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time_window`, `read_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 read_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. Queries cloud assets as they appeared at the specified point in - # time. - # - # Note: The following parameters are mutually exclusive: `read_time`, `read_time_window`. 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 output_config [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig, ::Hash] - # Optional. Destination where the query results will be saved. - # - # When this field is specified, the query results won't be saved in the - # [QueryAssetsResponse.query_result]. Instead - # [QueryAssetsResponse.output_config] will be set. - # - # Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used - # to check the status of the query job when passed to a following - # [QueryAssets] API call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::QueryAssetsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::QueryAssetsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::QueryAssetsRequest.new - # - # # Call the query_assets method. - # result = client.query_assets request - # - # # The returned object is of type Google::Cloud::Asset::V1::QueryAssetsResponse. - # p result - # - def query_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::QueryAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.query_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.query_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.query_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :query_assets, request, 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 saved query in a parent project/folder/organization. - # - # @overload create_saved_query(request, options = nil) - # Pass arguments to `create_saved_query` via a request object, either of type - # {::Google::Cloud::Asset::V1::CreateSavedQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::CreateSavedQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_saved_query(parent: nil, saved_query: nil, saved_query_id: nil) - # Pass arguments to `create_saved_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 parent [::String] - # Required. The name of the project/folder/organization where this - # saved_query should be created in. It can only be an organization number - # (such as "organizations/123"), a folder number (such as "folders/123"), a - # project ID (such as "projects/my-project-id"), or a project number (such as - # "projects/12345"). - # @param saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash] - # Required. The saved_query details. The `name` field must be empty as it - # will be generated based on the parent and saved_query_id. - # @param saved_query_id [::String] - # Required. The ID to use for the saved query, which must be unique in the - # specified parent. It will become the final component of the saved query's - # resource name. - # - # This value should be 4-63 characters, and valid characters - # are `[a-z][0-9]-`. - # - # Notice that this field is required in the saved query creation, and the - # `name` field of the `saved_query` will be ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::CreateSavedQueryRequest.new - # - # # Call the create_saved_query method. - # result = client.create_saved_query request - # - # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - # p result - # - def create_saved_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateSavedQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_saved_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_saved_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_saved_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :create_saved_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 - - ## - # Gets details about a saved query. - # - # @overload get_saved_query(request, options = nil) - # Pass arguments to `get_saved_query` via a request object, either of type - # {::Google::Cloud::Asset::V1::GetSavedQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::GetSavedQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_saved_query(name: nil) - # Pass arguments to `get_saved_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 name [::String] - # Required. The name of the saved query and it must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::GetSavedQueryRequest.new - # - # # Call the get_saved_query method. - # result = client.get_saved_query request - # - # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - # p result - # - def get_saved_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetSavedQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_saved_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_saved_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_saved_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :get_saved_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 - - ## - # Lists all saved queries in a parent project/folder/organization. - # - # @overload list_saved_queries(request, options = nil) - # Pass arguments to `list_saved_queries` via a request object, either of type - # {::Google::Cloud::Asset::V1::ListSavedQueriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::ListSavedQueriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_saved_queries(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_saved_queries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project/folder/organization whose savedQueries are to - # be listed. It can only be using project/folder/organization number (such as - # "folders/12345")", or a project ID (such as "projects/my-project-id"). - # @param filter [::String] - # Optional. The expression to filter resources. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. When `AND` and `OR` are both used in the - # expression, parentheses must be appropriately used to group the - # combinations. The expression may also contain regular expressions. - # - # See https://google.aip.dev/160 for more information on the grammar. - # @param page_size [::Integer] - # Optional. The maximum number of saved queries to return per page. The - # service may return fewer than this value. If unspecified, at most 50 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 `ListSavedQueries` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListSavedQueries` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::SavedQuery>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::SavedQuery>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::ListSavedQueriesRequest.new - # - # # Call the list_saved_queries method. - # result = client.list_saved_queries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Asset::V1::SavedQuery. - # p item - # end - # - def list_saved_queries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListSavedQueriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_saved_queries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_saved_queries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_saved_queries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :list_saved_queries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @asset_service_stub, :list_saved_queries, request, response, 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 saved query. - # - # @overload update_saved_query(request, options = nil) - # Pass arguments to `update_saved_query` via a request object, either of type - # {::Google::Cloud::Asset::V1::UpdateSavedQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::UpdateSavedQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_saved_query(saved_query: nil, update_mask: nil) - # Pass arguments to `update_saved_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 saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash] - # Required. The saved query to update. - # - # The saved query's `name` field is used to identify the one to update, - # which has format as below: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new - # - # # Call the update_saved_query method. - # result = client.update_saved_query request - # - # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - # p result - # - def update_saved_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_saved_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.saved_query&.name - header_params["saved_query.name"] = request.saved_query.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_saved_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_saved_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :update_saved_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 - - ## - # Deletes a saved query. - # - # @overload delete_saved_query(request, options = nil) - # Pass arguments to `delete_saved_query` via a request object, either of type - # {::Google::Cloud::Asset::V1::DeleteSavedQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::DeleteSavedQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_saved_query(name: nil) - # Pass arguments to `delete_saved_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 name [::String] - # Required. The name of the saved query to delete. It must be in the format - # of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new - # - # # Call the delete_saved_query method. - # result = client.delete_saved_query request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_saved_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_saved_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_saved_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_saved_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :delete_saved_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 - - ## - # Gets effective IAM policies for a batch of resources. - # - # @overload batch_get_effective_iam_policies(request, options = nil) - # Pass arguments to `batch_get_effective_iam_policies` via a request object, either of type - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_effective_iam_policies(scope: nil, names: nil) - # Pass arguments to `batch_get_effective_iam_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 scope [::String] - # Required. Only IAM policies on or below the scope will be returned. - # - # This can only be an organization number (such as "organizations/123"), a - # folder number (such as "folders/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"). - # - # To know how to get organization ID, visit [here - # ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # - # To know how to get folder or project ID, visit [here - # ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). - # @param names [::Array<::String>] - # Required. The names refer to the [full_resource_names] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the asset types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - # A maximum of 20 resources' effective policies can be retrieved in a batch. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new - # - # # Call the batch_get_effective_iam_policies method. - # result = client.batch_get_effective_iam_policies request - # - # # The returned object is of type Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse. - # p result - # - def batch_get_effective_iam_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest - - # Converts hash and nil to 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_effective_iam_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::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_get_effective_iam_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_get_effective_iam_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :batch_get_effective_iam_policies, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Analyzes organization policies under a scope. - # - # @overload analyze_org_policies(request, options = nil) - # Pass arguments to `analyze_org_policies` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload analyze_org_policies(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `analyze_org_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 scope [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param constraint [::String] - # Required. The name of the constraint to analyze organization policies for. - # The response only contains analyzed organization policies for the provided - # constraint. - # @param filter [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results}. - # Filtering is currently available for bare literal values and the following - # fields: - # * consolidated_policy.attached_resource - # * consolidated_policy.rules.enforce - # - # When filtering by a specific field, the only supported operator is `=`. - # For example, filtering by - # consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" - # will return all the Organization Policy results attached to "folders/001". - # @param page_size [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results} - # will contain 20 items with a maximum of 200. - # @param page_token [::String] - # The pagination token to retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new - # - # # Call the analyze_org_policies method. - # result = client.analyze_org_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::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult. - # p item - # end - # - def analyze_org_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.analyze_org_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::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.analyze_org_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.analyze_org_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :analyze_org_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @asset_service_stub, :analyze_org_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 - - ## - # Analyzes organization policies governed containers (projects, folders or - # organization) under a scope. - # - # @overload analyze_org_policy_governed_containers(request, options = nil) - # Pass arguments to `analyze_org_policy_governed_containers` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload analyze_org_policy_governed_containers(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `analyze_org_policy_governed_containers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param scope [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. The output containers will - # also be limited to the ones governed by those in-scope organization - # policies. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param constraint [::String] - # Required. The name of the constraint to analyze governed containers for. - # The analysis only contains organization policies for the provided - # constraint. - # @param filter [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers}. - # Filtering is currently available for bare literal values and the following - # fields: - # * parent - # * consolidated_policy.rules.enforce - # - # When filtering by a specific field, the only supported operator is `=`. - # For example, filtering by - # parent="//cloudresourcemanager.googleapis.com/folders/001" - # will return all the containers under "folders/001". - # @param page_size [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers} - # will contain 100 items with a maximum of 200. - # @param page_token [::String] - # The pagination token to retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new - # - # # Call the analyze_org_policy_governed_containers method. - # result = client.analyze_org_policy_governed_containers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer. - # p item - # end - # - def analyze_org_policy_governed_containers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.analyze_org_policy_governed_containers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.analyze_org_policy_governed_containers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.analyze_org_policy_governed_containers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :analyze_org_policy_governed_containers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @asset_service_stub, :analyze_org_policy_governed_containers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Analyzes organization policies governed assets (Google Cloud resources or - # policies) under a scope. This RPC supports custom constraints and the - # following canned constraints: - # - # * constraints/ainotebooks.accessMode - # * constraints/ainotebooks.disableFileDownloads - # * constraints/ainotebooks.disableRootAccess - # * constraints/ainotebooks.disableTerminal - # * constraints/ainotebooks.environmentOptions - # * constraints/ainotebooks.requireAutoUpgradeSchedule - # * constraints/ainotebooks.restrictVpcNetworks - # * constraints/compute.disableGuestAttributesAccess - # * constraints/compute.disableInstanceDataAccessApis - # * constraints/compute.disableNestedVirtualization - # * constraints/compute.disableSerialPortAccess - # * constraints/compute.disableSerialPortLogging - # * constraints/compute.disableVpcExternalIpv6 - # * constraints/compute.requireOsLogin - # * constraints/compute.requireShieldedVm - # * constraints/compute.restrictLoadBalancerCreationForTypes - # * constraints/compute.restrictProtocolForwardingCreationForTypes - # * constraints/compute.restrictXpnProjectLienRemoval - # * constraints/compute.setNewProjectDefaultToZonalDNSOnly - # * constraints/compute.skipDefaultNetworkCreation - # * constraints/compute.trustedImageProjects - # * constraints/compute.vmCanIpForward - # * constraints/compute.vmExternalIpAccess - # * constraints/gcp.detailedAuditLoggingMode - # * constraints/gcp.resourceLocations - # * constraints/iam.allowedPolicyMemberDomains - # * constraints/iam.automaticIamGrantsForDefaultServiceAccounts - # * constraints/iam.disableServiceAccountCreation - # * constraints/iam.disableServiceAccountKeyCreation - # * constraints/iam.disableServiceAccountKeyUpload - # * constraints/iam.restrictCrossProjectServiceAccountLienRemoval - # * constraints/iam.serviceAccountKeyExpiryHours - # * constraints/resourcemanager.accessBoundaries - # * constraints/resourcemanager.allowedExportDestinations - # * constraints/sql.restrictAuthorizedNetworks - # * constraints/sql.restrictNoncompliantDiagnosticDataAccess - # * constraints/sql.restrictNoncompliantResourceCreation - # * constraints/sql.restrictPublicIp - # * constraints/storage.publicAccessPrevention - # * constraints/storage.restrictAuthTypes - # * constraints/storage.uniformBucketLevelAccess - # - # This RPC only returns either resources of types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # or IAM policies. - # - # @overload analyze_org_policy_governed_assets(request, options = nil) - # Pass arguments to `analyze_org_policy_governed_assets` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload analyze_org_policy_governed_assets(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `analyze_org_policy_governed_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param scope [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. The output assets will - # also be limited to the ones governed by those in-scope organization - # policies. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param constraint [::String] - # Required. The name of the constraint to analyze governed assets for. The - # analysis only contains analyzed organization policies for the provided - # constraint. - # @param filter [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets}. - # - # For governed resources, filtering is currently available for bare literal - # values and the following fields: - # * governed_resource.project - # * governed_resource.folders - # * consolidated_policy.rules.enforce - # When filtering by `governed_resource.project` or - # `consolidated_policy.rules.enforce`, the only supported operator is `=`. - # When filtering by `governed_resource.folders`, the supported operators - # are `=` and `:`. - # For example, filtering by `governed_resource.project="projects/12345678"` - # will return all the governed resources under "projects/12345678", - # including the project itself if applicable. - # - # For governed IAM policies, filtering is currently available for bare - # literal values and the following fields: - # * governed_iam_policy.project - # * governed_iam_policy.folders - # * consolidated_policy.rules.enforce - # When filtering by `governed_iam_policy.project` or - # `consolidated_policy.rules.enforce`, the only supported operator is `=`. - # When filtering by `governed_iam_policy.folders`, the supported operators - # are `=` and `:`. - # For example, filtering by `governed_iam_policy.folders:"folders/12345678"` - # will return all the governed IAM policies under "folders/001". - # @param page_size [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets} - # will contain 100 items with a maximum of 200. - # @param page_token [::String] - # The pagination token to retrieve the next page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new - # - # # Call the analyze_org_policy_governed_assets method. - # result = client.analyze_org_policy_governed_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset. - # p item - # end - # - def analyze_org_policy_governed_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.analyze_org_policy_governed_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.analyze_org_policy_governed_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.analyze_org_policy_governed_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.call_rpc :analyze_org_policy_governed_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @asset_service_stub, :analyze_org_policy_governed_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssetService API. - # - # This class represents the configuration for AssetService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Asset::V1::AssetService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # export_assets to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Asset::V1::AssetService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.export_assets.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.export_assets.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::Asset::V1::AssetService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudasset.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AssetService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `export_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :export_assets - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `batch_get_assets_history` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_assets_history - ## - # RPC-specific configuration for `create_feed` - # @return [::Gapic::Config::Method] - # - attr_reader :create_feed - ## - # RPC-specific configuration for `get_feed` - # @return [::Gapic::Config::Method] - # - attr_reader :get_feed - ## - # RPC-specific configuration for `list_feeds` - # @return [::Gapic::Config::Method] - # - attr_reader :list_feeds - ## - # RPC-specific configuration for `update_feed` - # @return [::Gapic::Config::Method] - # - attr_reader :update_feed - ## - # RPC-specific configuration for `delete_feed` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_feed - ## - # RPC-specific configuration for `search_all_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :search_all_resources - ## - # RPC-specific configuration for `search_all_iam_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :search_all_iam_policies - ## - # RPC-specific configuration for `analyze_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_iam_policy - ## - # RPC-specific configuration for `analyze_iam_policy_longrunning` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_iam_policy_longrunning - ## - # RPC-specific configuration for `analyze_move` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_move - ## - # RPC-specific configuration for `query_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :query_assets - ## - # RPC-specific configuration for `create_saved_query` - # @return [::Gapic::Config::Method] - # - attr_reader :create_saved_query - ## - # RPC-specific configuration for `get_saved_query` - # @return [::Gapic::Config::Method] - # - attr_reader :get_saved_query - ## - # RPC-specific configuration for `list_saved_queries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_saved_queries - ## - # RPC-specific configuration for `update_saved_query` - # @return [::Gapic::Config::Method] - # - attr_reader :update_saved_query - ## - # RPC-specific configuration for `delete_saved_query` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_saved_query - ## - # RPC-specific configuration for `batch_get_effective_iam_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_effective_iam_policies - ## - # RPC-specific configuration for `analyze_org_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_org_policies - ## - # RPC-specific configuration for `analyze_org_policy_governed_containers` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_org_policy_governed_containers - ## - # RPC-specific configuration for `analyze_org_policy_governed_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_org_policy_governed_assets - - # @private - def initialize parent_rpcs = nil - export_assets_config = parent_rpcs.export_assets if parent_rpcs.respond_to? :export_assets - @export_assets = ::Gapic::Config::Method.new export_assets_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - batch_get_assets_history_config = parent_rpcs.batch_get_assets_history if parent_rpcs.respond_to? :batch_get_assets_history - @batch_get_assets_history = ::Gapic::Config::Method.new batch_get_assets_history_config - create_feed_config = parent_rpcs.create_feed if parent_rpcs.respond_to? :create_feed - @create_feed = ::Gapic::Config::Method.new create_feed_config - get_feed_config = parent_rpcs.get_feed if parent_rpcs.respond_to? :get_feed - @get_feed = ::Gapic::Config::Method.new get_feed_config - list_feeds_config = parent_rpcs.list_feeds if parent_rpcs.respond_to? :list_feeds - @list_feeds = ::Gapic::Config::Method.new list_feeds_config - update_feed_config = parent_rpcs.update_feed if parent_rpcs.respond_to? :update_feed - @update_feed = ::Gapic::Config::Method.new update_feed_config - delete_feed_config = parent_rpcs.delete_feed if parent_rpcs.respond_to? :delete_feed - @delete_feed = ::Gapic::Config::Method.new delete_feed_config - search_all_resources_config = parent_rpcs.search_all_resources if parent_rpcs.respond_to? :search_all_resources - @search_all_resources = ::Gapic::Config::Method.new search_all_resources_config - search_all_iam_policies_config = parent_rpcs.search_all_iam_policies if parent_rpcs.respond_to? :search_all_iam_policies - @search_all_iam_policies = ::Gapic::Config::Method.new search_all_iam_policies_config - analyze_iam_policy_config = parent_rpcs.analyze_iam_policy if parent_rpcs.respond_to? :analyze_iam_policy - @analyze_iam_policy = ::Gapic::Config::Method.new analyze_iam_policy_config - analyze_iam_policy_longrunning_config = parent_rpcs.analyze_iam_policy_longrunning if parent_rpcs.respond_to? :analyze_iam_policy_longrunning - @analyze_iam_policy_longrunning = ::Gapic::Config::Method.new analyze_iam_policy_longrunning_config - analyze_move_config = parent_rpcs.analyze_move if parent_rpcs.respond_to? :analyze_move - @analyze_move = ::Gapic::Config::Method.new analyze_move_config - query_assets_config = parent_rpcs.query_assets if parent_rpcs.respond_to? :query_assets - @query_assets = ::Gapic::Config::Method.new query_assets_config - create_saved_query_config = parent_rpcs.create_saved_query if parent_rpcs.respond_to? :create_saved_query - @create_saved_query = ::Gapic::Config::Method.new create_saved_query_config - get_saved_query_config = parent_rpcs.get_saved_query if parent_rpcs.respond_to? :get_saved_query - @get_saved_query = ::Gapic::Config::Method.new get_saved_query_config - list_saved_queries_config = parent_rpcs.list_saved_queries if parent_rpcs.respond_to? :list_saved_queries - @list_saved_queries = ::Gapic::Config::Method.new list_saved_queries_config - update_saved_query_config = parent_rpcs.update_saved_query if parent_rpcs.respond_to? :update_saved_query - @update_saved_query = ::Gapic::Config::Method.new update_saved_query_config - delete_saved_query_config = parent_rpcs.delete_saved_query if parent_rpcs.respond_to? :delete_saved_query - @delete_saved_query = ::Gapic::Config::Method.new delete_saved_query_config - batch_get_effective_iam_policies_config = parent_rpcs.batch_get_effective_iam_policies if parent_rpcs.respond_to? :batch_get_effective_iam_policies - @batch_get_effective_iam_policies = ::Gapic::Config::Method.new batch_get_effective_iam_policies_config - analyze_org_policies_config = parent_rpcs.analyze_org_policies if parent_rpcs.respond_to? :analyze_org_policies - @analyze_org_policies = ::Gapic::Config::Method.new analyze_org_policies_config - analyze_org_policy_governed_containers_config = parent_rpcs.analyze_org_policy_governed_containers if parent_rpcs.respond_to? :analyze_org_policy_governed_containers - @analyze_org_policy_governed_containers = ::Gapic::Config::Method.new analyze_org_policy_governed_containers_config - analyze_org_policy_governed_assets_config = parent_rpcs.analyze_org_policy_governed_assets if parent_rpcs.respond_to? :analyze_org_policy_governed_assets - @analyze_org_policy_governed_assets = ::Gapic::Config::Method.new analyze_org_policy_governed_assets_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/credentials.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/credentials.rb deleted file mode 100644 index 0df5128ff644..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Asset - module V1 - module AssetService - # Credentials for the AssetService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "ASSET_CREDENTIALS", - "ASSET_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ASSET_CREDENTIALS_JSON", - "ASSET_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-asset-v1/lib/google/cloud/asset/v1/asset_service/operations.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/operations.rb deleted file mode 100644 index 0a39c88f5206..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Asset - module V1 - module AssetService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudasset.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssetService 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 AssetService 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::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Asset::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudasset.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/paths.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/paths.rb deleted file mode 100644 index 5c49ad154545..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/paths.rb +++ /dev/null @@ -1,179 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Asset - module V1 - module AssetService - # Path helper methods for the AssetService API. - module Paths - ## - # Create a fully-qualified Feed resource string. - # - # @overload feed_path(project:, feed:) - # The resource will be in the following format: - # - # `projects/{project}/feeds/{feed}` - # - # @param project [String] - # @param feed [String] - # - # @overload feed_path(folder:, feed:) - # The resource will be in the following format: - # - # `folders/{folder}/feeds/{feed}` - # - # @param folder [String] - # @param feed [String] - # - # @overload feed_path(organization:, feed:) - # The resource will be in the following format: - # - # `organizations/{organization}/feeds/{feed}` - # - # @param organization [String] - # @param feed [String] - # - # @return [::String] - def feed_path **args - resources = { - "feed:project" => (proc do |project:, feed:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/feeds/#{feed}" - end), - "feed:folder" => (proc do |folder:, feed:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/feeds/#{feed}" - end), - "feed:organization" => (proc do |organization:, feed:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/feeds/#{feed}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Folder resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}` - # - # @param folder [String] - # - # @return [::String] - def folder_path folder: - "folders/#{folder}" - end - - ## - # Create a fully-qualified 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 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 SavedQuery resource string. - # - # @overload saved_query_path(project:, saved_query:) - # The resource will be in the following format: - # - # `projects/{project}/savedQueries/{saved_query}` - # - # @param project [String] - # @param saved_query [String] - # - # @overload saved_query_path(folder:, saved_query:) - # The resource will be in the following format: - # - # `folders/{folder}/savedQueries/{saved_query}` - # - # @param folder [String] - # @param saved_query [String] - # - # @overload saved_query_path(organization:, saved_query:) - # The resource will be in the following format: - # - # `organizations/{organization}/savedQueries/{saved_query}` - # - # @param organization [String] - # @param saved_query [String] - # - # @return [::String] - def saved_query_path **args - resources = { - "project:saved_query" => (proc do |project:, saved_query:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/savedQueries/#{saved_query}" - end), - "folder:saved_query" => (proc do |folder:, saved_query:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/savedQueries/#{saved_query}" - end), - "organization:saved_query" => (proc do |organization:, saved_query:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/savedQueries/#{saved_query}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest.rb deleted file mode 100644 index abe60059c622..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/asset/v1/version" - -require "google/cloud/asset/v1/asset_service/credentials" -require "google/cloud/asset/v1/asset_service/paths" -require "google/cloud/asset/v1/asset_service/rest/operations" -require "google/cloud/asset/v1/asset_service/rest/client" - -module Google - module Cloud - module Asset - module V1 - ## - # Asset service definition. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/asset/v1/asset_service/rest" - # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - module AssetService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/asset/v1/asset_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb deleted file mode 100644 index 1a1b0888a7d1..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/client.rb +++ /dev/null @@ -1,3280 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/asset/v1/asset_service_pb" -require "google/cloud/asset/v1/asset_service/rest/service_stub" - -module Google - module Cloud - module Asset - module V1 - module AssetService - module Rest - ## - # REST client for the AssetService service. - # - # Asset service definition. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudasset.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :asset_service_stub - - ## - # Configure the AssetService Client class. - # - # See {::Google::Cloud::Asset::V1::AssetService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssetService clients - # ::Google::Cloud::Asset::V1::AssetService::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", "Asset", "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.export_assets.timeout = 60.0 - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.batch_get_assets_history.timeout = 60.0 - default_config.rpcs.batch_get_assets_history.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_feed.timeout = 60.0 - - default_config.rpcs.get_feed.timeout = 60.0 - default_config.rpcs.get_feed.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_feeds.timeout = 60.0 - default_config.rpcs.list_feeds.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_feed.timeout = 60.0 - - default_config.rpcs.delete_feed.timeout = 60.0 - default_config.rpcs.delete_feed.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_all_resources.timeout = 30.0 - default_config.rpcs.search_all_resources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.search_all_iam_policies.timeout = 30.0 - default_config.rpcs.search_all_iam_policies.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.analyze_iam_policy.timeout = 300.0 - default_config.rpcs.analyze_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.analyze_iam_policy_longrunning.timeout = 60.0 - - default_config.rpcs.query_assets.timeout = 200.0 - default_config.rpcs.query_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_saved_query.timeout = 60.0 - - default_config.rpcs.get_saved_query.timeout = 60.0 - default_config.rpcs.get_saved_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_saved_queries.timeout = 60.0 - default_config.rpcs.list_saved_queries.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_saved_query.timeout = 60.0 - - default_config.rpcs.delete_saved_query.timeout = 60.0 - default_config.rpcs.delete_saved_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.batch_get_effective_iam_policies.timeout = 300.0 - default_config.rpcs.batch_get_effective_iam_policies.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.analyze_org_policies.timeout = 60.0 - default_config.rpcs.analyze_org_policies.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.analyze_org_policy_governed_containers.timeout = 60.0 - default_config.rpcs.analyze_org_policy_governed_containers.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.analyze_org_policy_governed_assets.timeout = 60.0 - default_config.rpcs.analyze_org_policy_governed_assets.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 AssetService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Asset::V1::AssetService::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 - @asset_service_stub.universe_domain - end - - ## - # Create a new AssetService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssetService 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::Asset::V1::AssetService::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 - - @asset_service_stub = ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @asset_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Asset::V1::AssetService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @asset_service_stub.logger - end - - # Service calls - - ## - # Exports assets with time and resource types to a given Cloud Storage - # location/BigQuery table. For Cloud Storage location destinations, the - # output format is newline-delimited JSON. Each line represents a - # {::Google::Cloud::Asset::V1::Asset google.cloud.asset.v1.Asset} in the JSON - # format; for BigQuery table destinations, the output table stores the fields - # in asset Protobuf as columns. This API implements the - # {::Google::Longrunning::Operation google.longrunning.Operation} API, which - # allows you to keep track of the export. We recommend intervals of at least - # 2 seconds with exponential retry to poll the export operation result. For - # regular-size resource parent, the export operation usually finishes within - # 5 minutes. - # - # @overload export_assets(request, options = nil) - # Pass arguments to `export_assets` via a request object, either of type - # {::Google::Cloud::Asset::V1::ExportAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, output_config: nil, relationship_types: nil) - # Pass arguments to `export_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative name of the root asset. This can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"), - # or a folder number (such as "folders/123"). - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Timestamp to take an asset snapshot. This can only be set to a timestamp - # between the current time and the current time minus 35 days (inclusive). - # If not specified, the current time will be used. Due to delays in resource - # data collection and indexing, there is a volatile window during which - # running the same query may get different results. - # @param asset_types [::Array<::String>] - # A list of asset types to take a snapshot for. For example: - # "compute.googleapis.com/Disk". - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # - # If specified, only matching assets will be returned, otherwise, it will - # snapshot all asset types. See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types. - # @param content_type [::Google::Cloud::Asset::V1::ContentType] - # Asset content type. If not specified, no content but the asset name will be - # returned. - # @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # @param relationship_types [::Array<::String>] - # A list of relationship types to export, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it snapshots specified relationships. It returns an error if - # any of the [relationship_types] doesn't belong to the supported - # relationship types of the [asset_types] or if any of the [asset_types] - # doesn't belong to the source types of the [relationship_types]. - # * Otherwise: - # it snapshots the supported relationships for all [asset_types] or returns - # an error if any of the [asset_types] has no relationship support. - # An unspecified asset types field means all supported asset_types. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - # supported asset types and relationship types. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::ExportAssetsRequest.new - # - # # Call the export_assets method. - # result = client.export_assets request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ExportAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.export_assets request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 assets with time and resource types and returns paged results in - # response. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Asset::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, relationship_types: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization, folder, or project the assets belong - # to. Format: "organizations/[organization-number]" (such as - # "organizations/123"), "projects/[project-id]" (such as - # "projects/my-project-id"), "projects/[project-number]" (such as - # "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Timestamp to take an asset snapshot. This can only be set to a timestamp - # between the current time and the current time minus 35 days (inclusive). - # If not specified, the current time will be used. Due to delays in resource - # data collection and indexing, there is a volatile window during which - # running the same query may get different results. - # @param asset_types [::Array<::String>] - # A list of asset types to take a snapshot for. For example: - # "compute.googleapis.com/Disk". - # - # Regular expression is also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # - # If specified, only matching assets will be returned, otherwise, it will - # snapshot all asset types. See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types. - # @param content_type [::Google::Cloud::Asset::V1::ContentType] - # Asset content type. If not specified, no content but the asset name will - # be returned. - # @param page_size [::Integer] - # The maximum number of assets to be returned in a single response. Default - # is 100, minimum is 1, and maximum is 1000. - # @param page_token [::String] - # The `next_page_token` returned from the previous `ListAssetsResponse`, or - # unspecified for the first `ListAssetsRequest`. It is a continuation of a - # prior `ListAssets` call, and the API should return the next page of assets. - # @param relationship_types [::Array<::String>] - # A list of relationship types to output, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it snapshots specified relationships. It returns an error if - # any of the [relationship_types] doesn't belong to the supported - # relationship types of the [asset_types] or if any of the [asset_types] - # doesn't belong to the source types of the [relationship_types]. - # * Otherwise: - # it snapshots the supported relationships for all [asset_types] or returns - # an error if any of the [asset_types] has no relationship support. - # An unspecified asset types field means all supported asset_types. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types and relationship types. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Asset::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.list_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :list_assets, "assets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Batch gets the update history of assets that overlap a time window. - # For IAM_POLICY content, this API outputs history when the asset and its - # attached IAM POLICY both exist. This can create gaps in the output history. - # Otherwise, this API outputs history with asset in both non-delete or - # deleted status. - # If a specified asset does not exist, this API returns an INVALID_ARGUMENT - # error. - # - # @overload batch_get_assets_history(request, options = nil) - # Pass arguments to `batch_get_assets_history` via a request object, either of type - # {::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assets_history(parent: nil, asset_names: nil, content_type: nil, read_time_window: nil, relationship_types: nil) - # Pass arguments to `batch_get_assets_history` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative name of the root asset. It can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id")", or a project number (such as "projects/12345"). - # @param asset_names [::Array<::String>] - # A list of the full names of the assets. - # See: https://cloud.google.com/asset-inventory/docs/resource-name-format - # Example: - # - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - # - # The request becomes a no-op if the asset name list is empty, and the max - # size of the asset name list is 100 in one request. - # @param content_type [::Google::Cloud::Asset::V1::ContentType] - # Optional. The content type. - # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash] - # Optional. The time window for the asset history. Both start_time and - # end_time are optional and if set, it must be after the current time minus - # 35 days. If end_time is not set, it is default to current timestamp. - # If start_time is not set, the snapshot of the assets at end_time will be - # returned. The returned results contain all temporal assets whose time - # window overlap with read_time_window. - # @param relationship_types [::Array<::String>] - # Optional. A list of relationship types to output, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it outputs specified relationships' history on the [asset_names]. It - # returns an error if any of the [relationship_types] doesn't belong to the - # supported relationship types of the [asset_names] or if any of the - # [asset_names]'s types doesn't belong to the source types of the - # [relationship_types]. - # * Otherwise: - # it outputs the supported relationships' history on the [asset_names] or - # returns an error if any of the [asset_names]'s types has no relationship - # support. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - # supported asset types and relationship types. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new - # - # # Call the batch_get_assets_history method. - # result = client.batch_get_assets_history request - # - # # The returned object is of type Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse. - # p result - # - def batch_get_assets_history request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest - - # Converts hash and nil to an 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_assets_history.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_assets_history.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_get_assets_history.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.batch_get_assets_history request, 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 feed in a parent project/folder/organization to listen to its - # asset updates. - # - # @overload create_feed(request, options = nil) - # Pass arguments to `create_feed` via a request object, either of type - # {::Google::Cloud::Asset::V1::CreateFeedRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::CreateFeedRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_feed(parent: nil, feed_id: nil, feed: nil) - # Pass arguments to `create_feed` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project/folder/organization where this feed - # should be created in. It can only be an organization number (such as - # "organizations/123"), a folder number (such as "folders/123"), a project ID - # (such as "projects/my-project-id"), or a project number (such as - # "projects/12345"). - # @param feed_id [::String] - # Required. This is the client-assigned asset feed identifier and it needs to - # be unique under a specific parent project/folder/organization. - # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash] - # Required. The feed details. The field `name` must be empty and it will be - # generated in the format of: projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::CreateFeedRequest.new - # - # # Call the create_feed method. - # result = client.create_feed request - # - # # The returned object is of type Google::Cloud::Asset::V1::Feed. - # p result - # - def create_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateFeedRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_feed.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_feed.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_feed.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.create_feed request, 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 details about an asset feed. - # - # @overload get_feed(request, options = nil) - # Pass arguments to `get_feed` via a request object, either of type - # {::Google::Cloud::Asset::V1::GetFeedRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::GetFeedRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_feed(name: nil) - # Pass arguments to `get_feed` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Feed and it must be in the format of: - # projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::GetFeedRequest.new - # - # # Call the get_feed method. - # result = client.get_feed request - # - # # The returned object is of type Google::Cloud::Asset::V1::Feed. - # p result - # - def get_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetFeedRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_feed.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_feed.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_feed.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.get_feed request, 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 asset feeds in a parent project/folder/organization. - # - # @overload list_feeds(request, options = nil) - # Pass arguments to `list_feeds` via a request object, either of type - # {::Google::Cloud::Asset::V1::ListFeedsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::ListFeedsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_feeds(parent: nil) - # Pass arguments to `list_feeds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project/folder/organization whose feeds are to be - # listed. It can only be using project/folder/organization number (such as - # "folders/12345")", or a project ID (such as "projects/my-project-id"). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::ListFeedsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::ListFeedsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::ListFeedsRequest.new - # - # # Call the list_feeds method. - # result = client.list_feeds request - # - # # The returned object is of type Google::Cloud::Asset::V1::ListFeedsResponse. - # p result - # - def list_feeds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListFeedsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_feeds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_feeds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_feeds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.list_feeds request, 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 asset feed configuration. - # - # @overload update_feed(request, options = nil) - # Pass arguments to `update_feed` via a request object, either of type - # {::Google::Cloud::Asset::V1::UpdateFeedRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_feed(feed: nil, update_mask: nil) - # Pass arguments to `update_feed` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash] - # Required. The new values of feed details. It must match an existing feed - # and the field `name` must be in the format of: - # projects/project_number/feeds/feed_id or - # folders/folder_number/feeds/feed_id or - # organizations/organization_number/feeds/feed_id. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Only updates the `feed` fields indicated by this mask. - # The field mask must not be empty, and it must not contain fields that - # are immutable or only set by the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::UpdateFeedRequest.new - # - # # Call the update_feed method. - # result = client.update_feed request - # - # # The returned object is of type Google::Cloud::Asset::V1::Feed. - # p result - # - def update_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateFeedRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_feed.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_feed.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_feed.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.update_feed request, 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 asset feed. - # - # @overload delete_feed(request, options = nil) - # Pass arguments to `delete_feed` via a request object, either of type - # {::Google::Cloud::Asset::V1::DeleteFeedRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_feed(name: nil) - # Pass arguments to `delete_feed` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the feed and it must be in the format of: - # projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::DeleteFeedRequest.new - # - # # Call the delete_feed method. - # result = client.delete_feed request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteFeedRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_feed.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_feed.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_feed.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.delete_feed request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches all Google Cloud resources within the specified scope, such as a - # project, folder, or organization. The caller must be granted the - # `cloudasset.assets.searchAllResources` permission on the desired scope, - # otherwise the request will be rejected. - # - # @overload search_all_resources(request, options = nil) - # Pass arguments to `search_all_resources` via a request object, either of type - # {::Google::Cloud::Asset::V1::SearchAllResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::SearchAllResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_all_resources(scope: nil, query: nil, asset_types: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil) - # Pass arguments to `search_all_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 scope [::String] - # Required. A scope can be a project, a folder, or an organization. The - # search is limited to the resources within the `scope`. The caller must be - # granted the - # [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - # permission on the desired scope. - # - # The allowed values are: - # - # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") - # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") - # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param query [::String] - # Optional. The query statement. See [how to construct a - # query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) - # for more information. If not specified or empty, it will search all the - # resources within the specified `scope`. - # - # Examples: - # - # * `name:Important` to find Google Cloud resources whose name contains - # `Important` as a word. - # * `name=Important` to find the Google Cloud resource whose name is exactly - # `Important`. - # * `displayName:Impor*` to find Google Cloud resources whose display name - # contains `Impor` as a prefix of any word in the field. - # * `location:us-west*` to find Google Cloud resources whose location - # contains both `us` and `west` as prefixes. - # * `labels:prod` to find Google Cloud resources whose labels contain `prod` - # as a key or value. - # * `labels.env:prod` to find Google Cloud resources that have a label `env` - # and its value is `prod`. - # * `labels.env:*` to find Google Cloud resources that have a label `env`. - # * `tagKeys:env` to find Google Cloud resources that have directly - # attached tags where the - # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) - # contains `env`. - # * `tagValues:prod*` to find Google Cloud resources that have directly - # attached tags where the - # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # contains a word prefixed by `prod`. - # * `tagValueIds=tagValues/123` to find Google Cloud resources that have - # directly attached tags where the - # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # is exactly `tagValues/123`. - # * `effectiveTagKeys:env` to find Google Cloud resources that have - # directly attached or inherited tags where the - # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) - # contains `env`. - # * `effectiveTagValues:prod*` to find Google Cloud resources that have - # directly attached or inherited tags where the - # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # contains a word prefixed by `prod`. - # * `effectiveTagValueIds=tagValues/123` to find Google Cloud resources that - # have directly attached or inherited tags where the - # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # is exactly `tagValues/123`. - # * `kmsKey:key` to find Google Cloud resources encrypted with a - # customer-managed encryption key whose name contains `key` as a word. This - # field is deprecated. Use the `kmsKeys` field to retrieve Cloud KMS - # key information. - # * `kmsKeys:key` to find Google Cloud resources encrypted with - # customer-managed encryption keys whose name contains the word `key`. - # * `relationships:instance-group-1` to find Google Cloud resources that have - # relationships with `instance-group-1` in the related resource name. - # * `relationships:INSTANCE_TO_INSTANCEGROUP` to find Compute Engine - # instances that have relationships of type `INSTANCE_TO_INSTANCEGROUP`. - # * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find - # Compute Engine instances that have relationships with `instance-group-1` - # in the Compute Engine instance group resource name, for relationship type - # `INSTANCE_TO_INSTANCEGROUP`. - # * `sccSecurityMarks.key=value` to find Cloud resources that are attached - # with security marks whose key is `key` and value is `value`. - # * `sccSecurityMarks.key:*` to find Cloud resources that are attached with - # security marks whose key is `key`. - # * `state:ACTIVE` to find Google Cloud resources whose state contains - # `ACTIVE` as a word. - # * `NOT state:ACTIVE` to find Google Cloud resources whose state doesn't - # contain `ACTIVE` as a word. - # * `createTime<1609459200` to find Google Cloud resources that were created - # before `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of - # `2021-01-01 00:00:00 UTC` in seconds. - # * `updateTime>1609459200` to find Google Cloud resources that were updated - # after `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of - # `2021-01-01 00:00:00 UTC` in seconds. - # * `Important` to find Google Cloud resources that contain `Important` as a - # word in any of the searchable fields. - # * `Impor*` to find Google Cloud resources that contain `Impor` as a prefix - # of any word in any of the searchable fields. - # * `Important location:(us-west1 OR global)` to find Google Cloud - # resources that contain `Important` as a word in any of the searchable - # fields and are also located in the `us-west1` region or the `global` - # location. - # @param asset_types [::Array<::String>] - # Optional. A list of asset types that this request searches for. If empty, - # it will search all the asset types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # @param page_size [::Integer] - # Optional. The page size for search result pagination. Page size is capped - # at 500 even if a larger value is given. If set to zero or a negative value, - # server will pick an appropriate default. Returned results may be fewer than - # requested. When this happens, there could be more results as long as - # `next_page_token` is returned. - # @param page_token [::String] - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. `page_token` must be the value of - # `next_page_token` from the previous response. The values of all other - # method parameters, must be identical to those in the previous call. - # @param order_by [::String] - # Optional. A comma-separated list of fields specifying the sorting order of - # the results. The default order is ascending. Add " DESC" after the field - # name to indicate descending order. Redundant space characters are ignored. - # Example: "location DESC, name". - # Only the following fields in the response are sortable: - # - # * name - # * assetType - # * project - # * displayName - # * description - # * location - # * createTime - # * updateTime - # * state - # * parentFullResourceName - # * parentAssetType - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A comma-separated list of fields that you want returned in the - # results. The following fields are returned by default if not specified: - # - # * `name` - # * `assetType` - # * `project` - # * `folders` - # * `organization` - # * `displayName` - # * `description` - # * `location` - # * `labels` - # * `tags` - # * `effectiveTags` - # * `networkTags` - # * `kmsKeys` - # * `createTime` - # * `updateTime` - # * `state` - # * `additionalAttributes` - # * `parentFullResourceName` - # * `parentAssetType` - # - # Some fields of large size, such as `versionedResources`, - # `attachedResources`, `effectiveTags` etc., are not returned by default, but - # you can specify them in the `read_mask` parameter if you want to include - # them. If `"*"` is specified, all [available - # fields](https://cloud.google.com/asset-inventory/docs/reference/rest/v1/TopLevel/searchAllResources#resourcesearchresult) - # are returned. - # Examples: `"name,location"`, `"name,versionedResources"`, `"*"`. - # Any invalid field path will trigger INVALID_ARGUMENT error. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::SearchAllResourcesRequest.new - # - # # Call the search_all_resources method. - # result = client.search_all_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::Asset::V1::ResourceSearchResult. - # p item - # end - # - def search_all_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_all_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::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_all_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_all_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.search_all_resources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :search_all_resources, "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 - - ## - # Searches all IAM policies within the specified scope, such as a project, - # folder, or organization. The caller must be granted the - # `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, - # otherwise the request will be rejected. - # - # @overload search_all_iam_policies(request, options = nil) - # Pass arguments to `search_all_iam_policies` via a request object, either of type - # {::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_all_iam_policies(scope: nil, query: nil, page_size: nil, page_token: nil, asset_types: nil, order_by: nil) - # Pass arguments to `search_all_iam_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 scope [::String] - # Required. A scope can be a project, a folder, or an organization. The - # search is limited to the IAM policies within the `scope`. The caller must - # be granted the - # [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - # permission on the desired scope. - # - # The allowed values are: - # - # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") - # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") - # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param query [::String] - # Optional. The query statement. See [how to construct a - # query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) - # for more information. If not specified or empty, it will search all the - # IAM policies within the specified `scope`. Note that the query string is - # compared against each IAM policy binding, including its principals, - # roles, and IAM conditions. The returned IAM policies will only - # contain the bindings that match your query. To learn more about the IAM - # policy structure, see the [IAM policy - # documentation](https://cloud.google.com/iam/help/allow-policies/structure). - # - # Examples: - # - # * `policy:amy@gmail.com` to find IAM policy bindings that specify user - # "amy@gmail.com". - # * `policy:roles/compute.admin` to find IAM policy bindings that specify - # the Compute Admin role. - # * `policy:comp*` to find IAM policy bindings that contain "comp" as a - # prefix of any word in the binding. - # * `policy.role.permissions:storage.buckets.update` to find IAM policy - # bindings that specify a role containing "storage.buckets.update" - # permission. Note that if callers don't have `iam.roles.get` access to a - # role's included permissions, policy bindings that specify this role will - # be dropped from the search results. - # * `policy.role.permissions:upd*` to find IAM policy bindings that specify a - # role containing "upd" as a prefix of any word in the role permission. - # Note that if callers don't have `iam.roles.get` access to a role's - # included permissions, policy bindings that specify this role will be - # dropped from the search results. - # * `resource:organizations/123456` to find IAM policy bindings - # that are set on "organizations/123456". - # * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to - # find IAM policy bindings that are set on the project named "myproject". - # * `Important` to find IAM policy bindings that contain "Important" as a - # word in any of the searchable fields (except for the included - # permissions). - # * `resource:(instance1 OR instance2) policy:amy` to find - # IAM policy bindings that are set on resources "instance1" or - # "instance2" and also specify user "amy". - # * `roles:roles/compute.admin` to find IAM policy bindings that specify the - # Compute Admin role. - # * `memberTypes:user` to find IAM policy bindings that contain the - # principal type "user". - # @param page_size [::Integer] - # Optional. The page size for search result pagination. Page size is capped - # at 500 even if a larger value is given. If set to zero or a negative value, - # server will pick an appropriate default. Returned results may be fewer than - # requested. When this happens, there could be more results as long as - # `next_page_token` is returned. - # @param page_token [::String] - # Optional. If present, retrieve the next batch of results from the preceding - # call to this method. `page_token` must be the value of `next_page_token` - # from the previous response. The values of all other method parameters must - # be identical to those in the previous call. - # @param asset_types [::Array<::String>] - # Optional. A list of asset types that the IAM policies are attached to. If - # empty, it will search the IAM policies that are attached to all the asset - # types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots IAM policies attached to asset type - # starts with "compute.googleapis.com". - # * ".*Instance" snapshots IAM policies attached to asset type ends with - # "Instance". - # * ".*Instance.*" snapshots IAM policies attached to asset type contains - # "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # @param order_by [::String] - # Optional. A comma-separated list of fields specifying the sorting order of - # the results. The default order is ascending. Add " DESC" after the field - # name to indicate descending order. Redundant space characters are ignored. - # Example: "assetType DESC, resource". - # Only singular primitive fields in the response are sortable: - # * resource - # * assetType - # * project - # All the other fields such as repeated fields (e.g., `folders`) and - # non-primitive fields (e.g., `policy`) are not supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new - # - # # Call the search_all_iam_policies method. - # result = client.search_all_iam_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::Cloud::Asset::V1::IamPolicySearchResult. - # p item - # end - # - def search_all_iam_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_all_iam_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::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_all_iam_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_all_iam_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.search_all_iam_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :search_all_iam_policies, "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 - - ## - # Analyzes IAM policies to answer which identities have what accesses on - # which resources. - # - # @overload analyze_iam_policy(request, options = nil) - # Pass arguments to `analyze_iam_policy` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload analyze_iam_policy(analysis_query: nil, saved_analysis_query: nil, execution_timeout: nil) - # Pass arguments to `analyze_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 analysis_query [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery, ::Hash] - # Required. The request query. - # @param saved_analysis_query [::String] - # Optional. The name of a saved query, which must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # - # If both `analysis_query` and `saved_analysis_query` are provided, they - # will be merged together with the `saved_analysis_query` as base and - # the `analysis_query` as overrides. For more details of the merge behavior, - # refer to the - # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) - # page. - # - # Note that you cannot override primitive fields with default value, such as - # 0 or empty string, etc., because we use proto3, which doesn't support field - # presence yet. - # @param execution_timeout [::Google::Protobuf::Duration, ::Hash] - # Optional. Amount of time executable has to complete. See JSON - # representation of - # [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). - # - # If this field is set with a value less than the RPC deadline, and the - # execution of your query hasn't finished in the specified - # execution timeout, you will get a response with partial result. - # Otherwise, your query's execution will continue until the RPC deadline. - # If it's not finished until then, you will get a DEADLINE_EXCEEDED error. - # - # Default is empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new - # - # # Call the analyze_iam_policy method. - # result = client.analyze_iam_policy request - # - # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse. - # p result - # - def analyze_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.analyze_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.analyze_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.analyze_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.analyze_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 - - ## - # Analyzes IAM policies asynchronously to answer which identities have what - # accesses on which resources, and writes the analysis results to a Google - # Cloud Storage or a BigQuery destination. For Cloud Storage destination, the - # output format is the JSON format that represents a - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse AnalyzeIamPolicyResponse}. - # This method implements the - # {::Google::Longrunning::Operation google.longrunning.Operation}, which allows - # you to track the operation status. We recommend intervals of at least 2 - # seconds with exponential backoff retry to poll the operation result. The - # metadata contains the metadata for the long-running operation. - # - # @overload analyze_iam_policy_longrunning(request, options = nil) - # Pass arguments to `analyze_iam_policy_longrunning` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload analyze_iam_policy_longrunning(analysis_query: nil, saved_analysis_query: nil, output_config: nil) - # Pass arguments to `analyze_iam_policy_longrunning` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param analysis_query [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery, ::Hash] - # Required. The request query. - # @param saved_analysis_query [::String] - # Optional. The name of a saved query, which must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # - # If both `analysis_query` and `saved_analysis_query` are provided, they - # will be merged together with the `saved_analysis_query` as base and - # the `analysis_query` as overrides. For more details of the merge behavior, - # refer to the - # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) - # doc. - # - # Note that you cannot override primitive fields with default value, such as - # 0 or empty string, etc., because we use proto3, which doesn't support field - # presence yet. - # @param output_config [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new - # - # # Call the analyze_iam_policy_longrunning method. - # result = client.analyze_iam_policy_longrunning request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def analyze_iam_policy_longrunning request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.analyze_iam_policy_longrunning.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.analyze_iam_policy_longrunning.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.analyze_iam_policy_longrunning.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.analyze_iam_policy_longrunning request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Analyze moving a resource to a specified destination without kicking off - # the actual move. The analysis is best effort depending on the user's - # permissions of viewing different hierarchical policies and configurations. - # The policies and configuration are subject to change before the actual - # resource migration takes place. - # - # @overload analyze_move(request, options = nil) - # Pass arguments to `analyze_move` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeMoveRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeMoveRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload analyze_move(resource: nil, destination_parent: nil, view: nil) - # Pass arguments to `analyze_move` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # Required. Name of the resource to perform the analysis against. - # Only Google Cloud projects are supported as of today. Hence, this can only - # be a project ID (such as "projects/my-project-id") or a project number - # (such as "projects/12345"). - # @param destination_parent [::String] - # Required. Name of the Google Cloud folder or organization to reparent the - # target resource. The analysis will be performed against hypothetically - # moving the resource to this specified destination parent. This can only be - # a folder number (such as "folders/123") or an organization number (such as - # "organizations/123"). - # @param view [::Google::Cloud::Asset::V1::AnalyzeMoveRequest::AnalysisView] - # Analysis view indicating what information should be included in the - # analysis response. If unspecified, the default view is FULL. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeMoveRequest.new - # - # # Call the analyze_move method. - # result = client.analyze_move request - # - # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeMoveResponse. - # p result - # - def analyze_move request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeMoveRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.analyze_move.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.analyze_move.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.analyze_move.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.analyze_move request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Issue a job that queries assets using a SQL statement compatible with - # [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). - # - # If the query execution finishes within timeout and there's no pagination, - # the full query results will be returned in the `QueryAssetsResponse`. - # - # Otherwise, full query results can be obtained by issuing extra requests - # with the `job_reference` from the a previous `QueryAssets` call. - # - # Note, the query result has approximately 10 GB limitation enforced by - # [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). - # Queries return larger results will result in errors. - # - # @overload query_assets(request, options = nil) - # Pass arguments to `query_assets` via a request object, either of type - # {::Google::Cloud::Asset::V1::QueryAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload query_assets(parent: nil, statement: nil, job_reference: nil, page_size: nil, page_token: nil, timeout: nil, read_time_window: nil, read_time: nil, output_config: nil) - # Pass arguments to `query_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative name of the root asset. This can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"), - # or a folder number (such as "folders/123"). - # - # Only assets belonging to the `parent` will be returned. - # @param statement [::String] - # Optional. A SQL statement that's compatible with [BigQuery - # SQL](https://cloud.google.com/bigquery/docs/introduction-sql). - # - # Note: The following parameters are mutually exclusive: `statement`, `job_reference`. 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 job_reference [::String] - # Optional. Reference to the query job, which is from the - # `QueryAssetsResponse` of previous `QueryAssets` call. - # - # Note: The following parameters are mutually exclusive: `job_reference`, `statement`. 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 page_size [::Integer] - # Optional. The maximum number of rows to return in the results. Responses - # are limited to 10 MB and 1000 rows. - # - # By default, the maximum row count is 1000. When the byte or row count limit - # is reached, the rest of the query results will be paginated. - # - # The field will be ignored when [output_config] is specified. - # @param page_token [::String] - # Optional. A page token received from previous `QueryAssets`. - # - # The field will be ignored when [output_config] is specified. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # Optional. Specifies the maximum amount of time that the client is willing - # to wait for the query to complete. By default, this limit is 5 min for the - # first query, and 1 minute for the following queries. If the query is - # complete, the `done` field in the `QueryAssetsResponse` is true, otherwise - # false. - # - # Like BigQuery [jobs.query - # API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) - # The call is not guaranteed to wait for the specified timeout; it typically - # returns after around 200 seconds (200,000 milliseconds), even if the query - # is not complete. - # - # The field will be ignored when [output_config] is specified. - # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash] - # Optional. [start_time] is required. [start_time] must be less than - # [end_time] Defaults [end_time] to now if [start_time] is set and - # [end_time] isn't. Maximum permitted time range is 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time_window`, `read_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 read_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. Queries cloud assets as they appeared at the specified point in - # time. - # - # Note: The following parameters are mutually exclusive: `read_time`, `read_time_window`. 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 output_config [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig, ::Hash] - # Optional. Destination where the query results will be saved. - # - # When this field is specified, the query results won't be saved in the - # [QueryAssetsResponse.query_result]. Instead - # [QueryAssetsResponse.output_config] will be set. - # - # Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used - # to check the status of the query job when passed to a following - # [QueryAssets] API call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::QueryAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::QueryAssetsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::QueryAssetsRequest.new - # - # # Call the query_assets method. - # result = client.query_assets request - # - # # The returned object is of type Google::Cloud::Asset::V1::QueryAssetsResponse. - # p result - # - def query_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::QueryAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.query_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.query_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.query_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.query_assets request, 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 saved query in a parent project/folder/organization. - # - # @overload create_saved_query(request, options = nil) - # Pass arguments to `create_saved_query` via a request object, either of type - # {::Google::Cloud::Asset::V1::CreateSavedQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::CreateSavedQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_saved_query(parent: nil, saved_query: nil, saved_query_id: nil) - # Pass arguments to `create_saved_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 parent [::String] - # Required. The name of the project/folder/organization where this - # saved_query should be created in. It can only be an organization number - # (such as "organizations/123"), a folder number (such as "folders/123"), a - # project ID (such as "projects/my-project-id"), or a project number (such as - # "projects/12345"). - # @param saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash] - # Required. The saved_query details. The `name` field must be empty as it - # will be generated based on the parent and saved_query_id. - # @param saved_query_id [::String] - # Required. The ID to use for the saved query, which must be unique in the - # specified parent. It will become the final component of the saved query's - # resource name. - # - # This value should be 4-63 characters, and valid characters - # are `[a-z][0-9]-`. - # - # Notice that this field is required in the saved query creation, and the - # `name` field of the `saved_query` will be ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::CreateSavedQueryRequest.new - # - # # Call the create_saved_query method. - # result = client.create_saved_query request - # - # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - # p result - # - def create_saved_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateSavedQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_saved_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::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_saved_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_saved_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.create_saved_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 - - ## - # Gets details about a saved query. - # - # @overload get_saved_query(request, options = nil) - # Pass arguments to `get_saved_query` via a request object, either of type - # {::Google::Cloud::Asset::V1::GetSavedQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::GetSavedQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_saved_query(name: nil) - # Pass arguments to `get_saved_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 name [::String] - # Required. The name of the saved query and it must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::GetSavedQueryRequest.new - # - # # Call the get_saved_query method. - # result = client.get_saved_query request - # - # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - # p result - # - def get_saved_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetSavedQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_saved_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::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_saved_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_saved_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.get_saved_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 - - ## - # Lists all saved queries in a parent project/folder/organization. - # - # @overload list_saved_queries(request, options = nil) - # Pass arguments to `list_saved_queries` via a request object, either of type - # {::Google::Cloud::Asset::V1::ListSavedQueriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::ListSavedQueriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_saved_queries(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_saved_queries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project/folder/organization whose savedQueries are to - # be listed. It can only be using project/folder/organization number (such as - # "folders/12345")", or a project ID (such as "projects/my-project-id"). - # @param filter [::String] - # Optional. The expression to filter resources. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. When `AND` and `OR` are both used in the - # expression, parentheses must be appropriately used to group the - # combinations. The expression may also contain regular expressions. - # - # See https://google.aip.dev/160 for more information on the grammar. - # @param page_size [::Integer] - # Optional. The maximum number of saved queries to return per page. The - # service may return fewer than this value. If unspecified, at most 50 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 `ListSavedQueries` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListSavedQueries` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::SavedQuery>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::SavedQuery>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::ListSavedQueriesRequest.new - # - # # Call the list_saved_queries method. - # result = client.list_saved_queries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Asset::V1::SavedQuery. - # p item - # end - # - def list_saved_queries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListSavedQueriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_saved_queries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_saved_queries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_saved_queries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.list_saved_queries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :list_saved_queries, "saved_queries", request, result, 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 saved query. - # - # @overload update_saved_query(request, options = nil) - # Pass arguments to `update_saved_query` via a request object, either of type - # {::Google::Cloud::Asset::V1::UpdateSavedQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::UpdateSavedQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_saved_query(saved_query: nil, update_mask: nil) - # Pass arguments to `update_saved_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 saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash] - # Required. The saved query to update. - # - # The saved query's `name` field is used to identify the one to update, - # which has format as below: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new - # - # # Call the update_saved_query method. - # result = client.update_saved_query request - # - # # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - # p result - # - def update_saved_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_saved_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::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_saved_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_saved_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.update_saved_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 - - ## - # Deletes a saved query. - # - # @overload delete_saved_query(request, options = nil) - # Pass arguments to `delete_saved_query` via a request object, either of type - # {::Google::Cloud::Asset::V1::DeleteSavedQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::DeleteSavedQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_saved_query(name: nil) - # Pass arguments to `delete_saved_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 name [::String] - # Required. The name of the saved query to delete. It must be in the format - # of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new - # - # # Call the delete_saved_query method. - # result = client.delete_saved_query request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_saved_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_saved_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::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_saved_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_saved_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.delete_saved_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 - - ## - # Gets effective IAM policies for a batch of resources. - # - # @overload batch_get_effective_iam_policies(request, options = nil) - # Pass arguments to `batch_get_effective_iam_policies` via a request object, either of type - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_effective_iam_policies(scope: nil, names: nil) - # Pass arguments to `batch_get_effective_iam_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 scope [::String] - # Required. Only IAM policies on or below the scope will be returned. - # - # This can only be an organization number (such as "organizations/123"), a - # folder number (such as "folders/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"). - # - # To know how to get organization ID, visit [here - # ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # - # To know how to get folder or project ID, visit [here - # ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). - # @param names [::Array<::String>] - # Required. The names refer to the [full_resource_names] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the asset types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - # A maximum of 20 resources' effective policies can be retrieved in a batch. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new - # - # # Call the batch_get_effective_iam_policies method. - # result = client.batch_get_effective_iam_policies request - # - # # The returned object is of type Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse. - # p result - # - def batch_get_effective_iam_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest - - # Converts hash and nil to an 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_effective_iam_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::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_effective_iam_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_get_effective_iam_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.batch_get_effective_iam_policies request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Analyzes organization policies under a scope. - # - # @overload analyze_org_policies(request, options = nil) - # Pass arguments to `analyze_org_policies` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload analyze_org_policies(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `analyze_org_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 scope [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param constraint [::String] - # Required. The name of the constraint to analyze organization policies for. - # The response only contains analyzed organization policies for the provided - # constraint. - # @param filter [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results}. - # Filtering is currently available for bare literal values and the following - # fields: - # * consolidated_policy.attached_resource - # * consolidated_policy.rules.enforce - # - # When filtering by a specific field, the only supported operator is `=`. - # For example, filtering by - # consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" - # will return all the Organization Policy results attached to "folders/001". - # @param page_size [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results} - # will contain 20 items with a maximum of 200. - # @param page_token [::String] - # The pagination token to retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new - # - # # Call the analyze_org_policies method. - # result = client.analyze_org_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::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult. - # p item - # end - # - def analyze_org_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.analyze_org_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::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.analyze_org_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.analyze_org_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.analyze_org_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :analyze_org_policies, "org_policy_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 - - ## - # Analyzes organization policies governed containers (projects, folders or - # organization) under a scope. - # - # @overload analyze_org_policy_governed_containers(request, options = nil) - # Pass arguments to `analyze_org_policy_governed_containers` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload analyze_org_policy_governed_containers(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `analyze_org_policy_governed_containers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param scope [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. The output containers will - # also be limited to the ones governed by those in-scope organization - # policies. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param constraint [::String] - # Required. The name of the constraint to analyze governed containers for. - # The analysis only contains organization policies for the provided - # constraint. - # @param filter [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers}. - # Filtering is currently available for bare literal values and the following - # fields: - # * parent - # * consolidated_policy.rules.enforce - # - # When filtering by a specific field, the only supported operator is `=`. - # For example, filtering by - # parent="//cloudresourcemanager.googleapis.com/folders/001" - # will return all the containers under "folders/001". - # @param page_size [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers} - # will contain 100 items with a maximum of 200. - # @param page_token [::String] - # The pagination token to retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new - # - # # Call the analyze_org_policy_governed_containers method. - # result = client.analyze_org_policy_governed_containers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer. - # p item - # end - # - def analyze_org_policy_governed_containers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.analyze_org_policy_governed_containers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.analyze_org_policy_governed_containers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.analyze_org_policy_governed_containers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.analyze_org_policy_governed_containers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :analyze_org_policy_governed_containers, "governed_containers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Analyzes organization policies governed assets (Google Cloud resources or - # policies) under a scope. This RPC supports custom constraints and the - # following canned constraints: - # - # * constraints/ainotebooks.accessMode - # * constraints/ainotebooks.disableFileDownloads - # * constraints/ainotebooks.disableRootAccess - # * constraints/ainotebooks.disableTerminal - # * constraints/ainotebooks.environmentOptions - # * constraints/ainotebooks.requireAutoUpgradeSchedule - # * constraints/ainotebooks.restrictVpcNetworks - # * constraints/compute.disableGuestAttributesAccess - # * constraints/compute.disableInstanceDataAccessApis - # * constraints/compute.disableNestedVirtualization - # * constraints/compute.disableSerialPortAccess - # * constraints/compute.disableSerialPortLogging - # * constraints/compute.disableVpcExternalIpv6 - # * constraints/compute.requireOsLogin - # * constraints/compute.requireShieldedVm - # * constraints/compute.restrictLoadBalancerCreationForTypes - # * constraints/compute.restrictProtocolForwardingCreationForTypes - # * constraints/compute.restrictXpnProjectLienRemoval - # * constraints/compute.setNewProjectDefaultToZonalDNSOnly - # * constraints/compute.skipDefaultNetworkCreation - # * constraints/compute.trustedImageProjects - # * constraints/compute.vmCanIpForward - # * constraints/compute.vmExternalIpAccess - # * constraints/gcp.detailedAuditLoggingMode - # * constraints/gcp.resourceLocations - # * constraints/iam.allowedPolicyMemberDomains - # * constraints/iam.automaticIamGrantsForDefaultServiceAccounts - # * constraints/iam.disableServiceAccountCreation - # * constraints/iam.disableServiceAccountKeyCreation - # * constraints/iam.disableServiceAccountKeyUpload - # * constraints/iam.restrictCrossProjectServiceAccountLienRemoval - # * constraints/iam.serviceAccountKeyExpiryHours - # * constraints/resourcemanager.accessBoundaries - # * constraints/resourcemanager.allowedExportDestinations - # * constraints/sql.restrictAuthorizedNetworks - # * constraints/sql.restrictNoncompliantDiagnosticDataAccess - # * constraints/sql.restrictNoncompliantResourceCreation - # * constraints/sql.restrictPublicIp - # * constraints/storage.publicAccessPrevention - # * constraints/storage.restrictAuthTypes - # * constraints/storage.uniformBucketLevelAccess - # - # This RPC only returns either resources of types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # or IAM policies. - # - # @overload analyze_org_policy_governed_assets(request, options = nil) - # Pass arguments to `analyze_org_policy_governed_assets` via a request object, either of type - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload analyze_org_policy_governed_assets(scope: nil, constraint: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `analyze_org_policy_governed_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param scope [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. The output assets will - # also be limited to the ones governed by those in-scope organization - # policies. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @param constraint [::String] - # Required. The name of the constraint to analyze governed assets for. The - # analysis only contains analyzed organization policies for the provided - # constraint. - # @param filter [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets}. - # - # For governed resources, filtering is currently available for bare literal - # values and the following fields: - # * governed_resource.project - # * governed_resource.folders - # * consolidated_policy.rules.enforce - # When filtering by `governed_resource.project` or - # `consolidated_policy.rules.enforce`, the only supported operator is `=`. - # When filtering by `governed_resource.folders`, the supported operators - # are `=` and `:`. - # For example, filtering by `governed_resource.project="projects/12345678"` - # will return all the governed resources under "projects/12345678", - # including the project itself if applicable. - # - # For governed IAM policies, filtering is currently available for bare - # literal values and the following fields: - # * governed_iam_policy.project - # * governed_iam_policy.folders - # * consolidated_policy.rules.enforce - # When filtering by `governed_iam_policy.project` or - # `consolidated_policy.rules.enforce`, the only supported operator is `=`. - # When filtering by `governed_iam_policy.folders`, the supported operators - # are `=` and `:`. - # For example, filtering by `governed_iam_policy.folders:"folders/12345678"` - # will return all the governed IAM policies under "folders/001". - # @param page_size [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets} - # will contain 100 items with a maximum of 200. - # @param page_token [::String] - # The pagination token to retrieve the next page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/asset/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new - # - # # Call the analyze_org_policy_governed_assets method. - # result = client.analyze_org_policy_governed_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset. - # p item - # end - # - def analyze_org_policy_governed_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.analyze_org_policy_governed_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.analyze_org_policy_governed_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.analyze_org_policy_governed_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @asset_service_stub.analyze_org_policy_governed_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @asset_service_stub, :analyze_org_policy_governed_assets, "governed_assets", request, result, 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 AssetService REST API. - # - # This class represents the configuration for AssetService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Asset::V1::AssetService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # export_assets to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Asset::V1::AssetService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.export_assets.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.export_assets.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudasset.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AssetService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `export_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :export_assets - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `batch_get_assets_history` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_assets_history - ## - # RPC-specific configuration for `create_feed` - # @return [::Gapic::Config::Method] - # - attr_reader :create_feed - ## - # RPC-specific configuration for `get_feed` - # @return [::Gapic::Config::Method] - # - attr_reader :get_feed - ## - # RPC-specific configuration for `list_feeds` - # @return [::Gapic::Config::Method] - # - attr_reader :list_feeds - ## - # RPC-specific configuration for `update_feed` - # @return [::Gapic::Config::Method] - # - attr_reader :update_feed - ## - # RPC-specific configuration for `delete_feed` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_feed - ## - # RPC-specific configuration for `search_all_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :search_all_resources - ## - # RPC-specific configuration for `search_all_iam_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :search_all_iam_policies - ## - # RPC-specific configuration for `analyze_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_iam_policy - ## - # RPC-specific configuration for `analyze_iam_policy_longrunning` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_iam_policy_longrunning - ## - # RPC-specific configuration for `analyze_move` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_move - ## - # RPC-specific configuration for `query_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :query_assets - ## - # RPC-specific configuration for `create_saved_query` - # @return [::Gapic::Config::Method] - # - attr_reader :create_saved_query - ## - # RPC-specific configuration for `get_saved_query` - # @return [::Gapic::Config::Method] - # - attr_reader :get_saved_query - ## - # RPC-specific configuration for `list_saved_queries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_saved_queries - ## - # RPC-specific configuration for `update_saved_query` - # @return [::Gapic::Config::Method] - # - attr_reader :update_saved_query - ## - # RPC-specific configuration for `delete_saved_query` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_saved_query - ## - # RPC-specific configuration for `batch_get_effective_iam_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_effective_iam_policies - ## - # RPC-specific configuration for `analyze_org_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_org_policies - ## - # RPC-specific configuration for `analyze_org_policy_governed_containers` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_org_policy_governed_containers - ## - # RPC-specific configuration for `analyze_org_policy_governed_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_org_policy_governed_assets - - # @private - def initialize parent_rpcs = nil - export_assets_config = parent_rpcs.export_assets if parent_rpcs.respond_to? :export_assets - @export_assets = ::Gapic::Config::Method.new export_assets_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - batch_get_assets_history_config = parent_rpcs.batch_get_assets_history if parent_rpcs.respond_to? :batch_get_assets_history - @batch_get_assets_history = ::Gapic::Config::Method.new batch_get_assets_history_config - create_feed_config = parent_rpcs.create_feed if parent_rpcs.respond_to? :create_feed - @create_feed = ::Gapic::Config::Method.new create_feed_config - get_feed_config = parent_rpcs.get_feed if parent_rpcs.respond_to? :get_feed - @get_feed = ::Gapic::Config::Method.new get_feed_config - list_feeds_config = parent_rpcs.list_feeds if parent_rpcs.respond_to? :list_feeds - @list_feeds = ::Gapic::Config::Method.new list_feeds_config - update_feed_config = parent_rpcs.update_feed if parent_rpcs.respond_to? :update_feed - @update_feed = ::Gapic::Config::Method.new update_feed_config - delete_feed_config = parent_rpcs.delete_feed if parent_rpcs.respond_to? :delete_feed - @delete_feed = ::Gapic::Config::Method.new delete_feed_config - search_all_resources_config = parent_rpcs.search_all_resources if parent_rpcs.respond_to? :search_all_resources - @search_all_resources = ::Gapic::Config::Method.new search_all_resources_config - search_all_iam_policies_config = parent_rpcs.search_all_iam_policies if parent_rpcs.respond_to? :search_all_iam_policies - @search_all_iam_policies = ::Gapic::Config::Method.new search_all_iam_policies_config - analyze_iam_policy_config = parent_rpcs.analyze_iam_policy if parent_rpcs.respond_to? :analyze_iam_policy - @analyze_iam_policy = ::Gapic::Config::Method.new analyze_iam_policy_config - analyze_iam_policy_longrunning_config = parent_rpcs.analyze_iam_policy_longrunning if parent_rpcs.respond_to? :analyze_iam_policy_longrunning - @analyze_iam_policy_longrunning = ::Gapic::Config::Method.new analyze_iam_policy_longrunning_config - analyze_move_config = parent_rpcs.analyze_move if parent_rpcs.respond_to? :analyze_move - @analyze_move = ::Gapic::Config::Method.new analyze_move_config - query_assets_config = parent_rpcs.query_assets if parent_rpcs.respond_to? :query_assets - @query_assets = ::Gapic::Config::Method.new query_assets_config - create_saved_query_config = parent_rpcs.create_saved_query if parent_rpcs.respond_to? :create_saved_query - @create_saved_query = ::Gapic::Config::Method.new create_saved_query_config - get_saved_query_config = parent_rpcs.get_saved_query if parent_rpcs.respond_to? :get_saved_query - @get_saved_query = ::Gapic::Config::Method.new get_saved_query_config - list_saved_queries_config = parent_rpcs.list_saved_queries if parent_rpcs.respond_to? :list_saved_queries - @list_saved_queries = ::Gapic::Config::Method.new list_saved_queries_config - update_saved_query_config = parent_rpcs.update_saved_query if parent_rpcs.respond_to? :update_saved_query - @update_saved_query = ::Gapic::Config::Method.new update_saved_query_config - delete_saved_query_config = parent_rpcs.delete_saved_query if parent_rpcs.respond_to? :delete_saved_query - @delete_saved_query = ::Gapic::Config::Method.new delete_saved_query_config - batch_get_effective_iam_policies_config = parent_rpcs.batch_get_effective_iam_policies if parent_rpcs.respond_to? :batch_get_effective_iam_policies - @batch_get_effective_iam_policies = ::Gapic::Config::Method.new batch_get_effective_iam_policies_config - analyze_org_policies_config = parent_rpcs.analyze_org_policies if parent_rpcs.respond_to? :analyze_org_policies - @analyze_org_policies = ::Gapic::Config::Method.new analyze_org_policies_config - analyze_org_policy_governed_containers_config = parent_rpcs.analyze_org_policy_governed_containers if parent_rpcs.respond_to? :analyze_org_policy_governed_containers - @analyze_org_policy_governed_containers = ::Gapic::Config::Method.new analyze_org_policy_governed_containers_config - analyze_org_policy_governed_assets_config = parent_rpcs.analyze_org_policy_governed_assets if parent_rpcs.respond_to? :analyze_org_policy_governed_assets - @analyze_org_policy_governed_assets = ::Gapic::Config::Method.new analyze_org_policy_governed_assets_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/operations.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/operations.rb deleted file mode 100644 index 68df16330170..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Asset - module V1 - module AssetService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudasset.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssetService 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 AssetService 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::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Asset::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudasset.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - 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/[^/]+(?:/.*)?$}, 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(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb deleted file mode 100644 index 60cd7c6699ef..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb +++ /dev/null @@ -1,1491 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/asset/v1/asset_service_pb" - -module Google - module Cloud - module Asset - module V1 - module AssetService - module Rest - ## - # REST service stub for the AssetService 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 export_assets REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::ExportAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::ListAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::ListAssetsResponse] - # A result object deserialized from the server's reply - def list_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_get_assets_history REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse] - # A result object deserialized from the server's reply - def batch_get_assets_history request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_assets_history_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_assets_history", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse.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_feed REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::CreateFeedRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # A result object deserialized from the server's reply - def create_feed request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_feed_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_feed", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::Feed.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_feed REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::GetFeedRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # A result object deserialized from the server's reply - def get_feed request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_feed_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_feed", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::Feed.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_feeds REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::ListFeedsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::ListFeedsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::ListFeedsResponse] - # A result object deserialized from the server's reply - def list_feeds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_feeds_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_feeds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::ListFeedsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_feed REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::UpdateFeedRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::Feed] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::Feed] - # A result object deserialized from the server's reply - def update_feed request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_feed_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_feed", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::Feed.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_feed REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::DeleteFeedRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_feed request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_feed_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_feed", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_all_resources REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::SearchAllResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::SearchAllResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::SearchAllResourcesResponse] - # A result object deserialized from the server's reply - def search_all_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_all_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: "search_all_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::SearchAllResourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_all_iam_policies REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse] - # A result object deserialized from the server's reply - def search_all_iam_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_all_iam_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: "search_all_iam_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the analyze_iam_policy REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse] - # A result object deserialized from the server's reply - def analyze_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_analyze_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: "analyze_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the analyze_iam_policy_longrunning REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def analyze_iam_policy_longrunning request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_analyze_iam_policy_longrunning_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "analyze_iam_policy_longrunning", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the analyze_move REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeMoveRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeMoveResponse] - # A result object deserialized from the server's reply - def analyze_move request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_analyze_move_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "analyze_move", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::AnalyzeMoveResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the query_assets REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::QueryAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::QueryAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::QueryAssetsResponse] - # A result object deserialized from the server's reply - def query_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_query_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "query_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::QueryAssetsResponse.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_saved_query REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::CreateSavedQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # A result object deserialized from the server's reply - def create_saved_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_saved_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: "create_saved_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::SavedQuery.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_saved_query REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::GetSavedQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # A result object deserialized from the server's reply - def get_saved_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_saved_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: "get_saved_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::SavedQuery.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_saved_queries REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::ListSavedQueriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::ListSavedQueriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::ListSavedQueriesResponse] - # A result object deserialized from the server's reply - def list_saved_queries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_saved_queries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_saved_queries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::ListSavedQueriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_saved_query REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::UpdateSavedQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::SavedQuery] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # A result object deserialized from the server's reply - def update_saved_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_saved_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: "update_saved_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::SavedQuery.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_saved_query REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::DeleteSavedQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_saved_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_saved_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: "delete_saved_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 batch_get_effective_iam_policies REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse] - # A result object deserialized from the server's reply - def batch_get_effective_iam_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_effective_iam_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: "batch_get_effective_iam_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the analyze_org_policies REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse] - # A result object deserialized from the server's reply - def analyze_org_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_analyze_org_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: "analyze_org_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the analyze_org_policy_governed_containers REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse] - # A result object deserialized from the server's reply - def analyze_org_policy_governed_containers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_analyze_org_policy_governed_containers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "analyze_org_policy_governed_containers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the analyze_org_policy_governed_assets REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse] - # A result object deserialized from the server's reply - def analyze_org_policy_governed_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_analyze_org_policy_governed_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "analyze_org_policy_governed_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the export_assets REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::ExportAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:exportAssets", - body: "*", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_get_assets_history REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest] - # 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_assets_history_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:batchGetAssetsHistory", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_feed REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::CreateFeedRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_feed_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/feeds", - body: "*", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_feed REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::GetFeedRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_feed_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^[^/]+/[^/]+/feeds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_feeds REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::ListFeedsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_feeds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/feeds", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_feed REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::UpdateFeedRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_feed_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{feed.name}", - body: "*", - matches: [ - ["feed.name", %r{^[^/]+/[^/]+/feeds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_feed REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::DeleteFeedRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_feed_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^[^/]+/[^/]+/feeds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_all_resources REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::SearchAllResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_all_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{scope}:searchAllResources", - matches: [ - ["scope", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_all_iam_policies REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_all_iam_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{scope}:searchAllIamPolicies", - matches: [ - ["scope", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the analyze_iam_policy REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_analyze_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{analysis_query.scope}:analyzeIamPolicy", - matches: [ - ["analysis_query.scope", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the analyze_iam_policy_longrunning REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_analyze_iam_policy_longrunning_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{analysis_query.scope}:analyzeIamPolicyLongrunning", - body: "*", - matches: [ - ["analysis_query.scope", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the analyze_move REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeMoveRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_analyze_move_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:analyzeMove", - matches: [ - ["resource", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the query_assets REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::QueryAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_query_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:queryAssets", - body: "*", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_saved_query REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::CreateSavedQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_saved_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/savedQueries", - body: "saved_query", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_saved_query REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::GetSavedQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_saved_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^[^/]+/[^/]+/savedQueries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_saved_queries REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::ListSavedQueriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_saved_queries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/savedQueries", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_saved_query REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::UpdateSavedQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_saved_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{saved_query.name}", - body: "saved_query", - matches: [ - ["saved_query.name", %r{^[^/]+/[^/]+/savedQueries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_saved_query REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::DeleteSavedQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_saved_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^[^/]+/[^/]+/savedQueries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_get_effective_iam_policies REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest] - # 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_effective_iam_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{scope}/effectiveIamPolicies:batchGet", - matches: [ - ["scope", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the analyze_org_policies REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_analyze_org_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{scope}:analyzeOrgPolicies", - matches: [ - ["scope", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the analyze_org_policy_governed_containers REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_analyze_org_policy_governed_containers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{scope}:analyzeOrgPolicyGovernedContainers", - matches: [ - ["scope", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the analyze_org_policy_governed_assets REST call - # - # @param request_pb [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_analyze_org_policy_governed_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{scope}:analyzeOrgPolicyGovernedAssets", - matches: [ - ["scope", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_pb.rb deleted file mode 100644 index 5d049db618f6..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_pb.rb +++ /dev/null @@ -1,125 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/asset/v1/asset_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/asset/v1/assets_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n)google/cloud/asset/v1/asset_service.proto\x12\x15google.cloud.asset.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/cloud/asset/v1/assets.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/expr.proto\"[\n#AnalyzeIamPolicyLongrunningMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xa9\x02\n\x13\x45xportAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32\".google.cloud.asset.v1.ContentType\x12?\n\routput_config\x18\x05 \x01(\x0b\x32#.google.cloud.asset.v1.OutputConfigB\x03\xe0\x41\x02\x12\x1a\n\x12relationship_types\x18\x06 \x03(\t\"\xbd\x01\n\x14\x45xportAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\routput_config\x18\x02 \x01(\x0b\x32#.google.cloud.asset.v1.OutputConfig\x12:\n\routput_result\x18\x03 \x01(\x0b\x32#.google.cloud.asset.v1.OutputResult\"\x8d\x02\n\x11ListAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32\".google.cloud.asset.v1.ContentType\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\x12\x1a\n\x12relationship_types\x18\x07 \x03(\t\"\x8a\x01\n\x12ListAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x06\x61ssets\x18\x02 \x03(\x0b\x32\x1c.google.cloud.asset.v1.Asset\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\x8e\x02\n\x1c\x42\x61tchGetAssetsHistoryRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12=\n\x0c\x63ontent_type\x18\x03 \x01(\x0e\x32\".google.cloud.asset.v1.ContentTypeB\x03\xe0\x41\x01\x12@\n\x10read_time_window\x18\x04 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindowB\x03\xe0\x41\x01\x12\x1f\n\x12relationship_types\x18\x05 \x03(\tB\x03\xe0\x41\x01\"U\n\x1d\x42\x61tchGetAssetsHistoryResponse\x12\x34\n\x06\x61ssets\x18\x01 \x03(\x0b\x32$.google.cloud.asset.v1.TemporalAsset\"n\n\x11\x43reateFeedRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x66\x65\x65\x64_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12.\n\x04\x66\x65\x65\x64\x18\x03 \x01(\x0b\x32\x1b.google.cloud.asset.v1.FeedB\x03\xe0\x41\x02\"F\n\x0eGetFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed\"\'\n\x10ListFeedsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"?\n\x11ListFeedsResponse\x12*\n\x05\x66\x65\x65\x64s\x18\x01 \x03(\x0b\x32\x1b.google.cloud.asset.v1.Feed\"y\n\x11UpdateFeedRequest\x12.\n\x04\x66\x65\x65\x64\x18\x01 \x01(\x0b\x32\x1b.google.cloud.asset.v1.FeedB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"I\n\x11\x44\x65leteFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed\"\xab\x01\n\x0cOutputConfig\x12@\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32%.google.cloud.asset.v1.GcsDestinationH\x00\x12J\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32*.google.cloud.asset.v1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"V\n\x0cOutputResult\x12<\n\ngcs_result\x18\x01 \x01(\x0b\x32&.google.cloud.asset.v1.GcsOutputResultH\x00\x42\x08\n\x06result\"\x1f\n\x0fGcsOutputResult\x12\x0c\n\x04uris\x18\x01 \x03(\t\"C\n\x0eGcsDestination\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x12\x14\n\nuri_prefix\x18\x02 \x01(\tH\x00\x42\x0c\n\nobject_uri\"\xb4\x01\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\x12<\n\x0epartition_spec\x18\x04 \x01(\x0b\x32$.google.cloud.asset.v1.PartitionSpec\x12&\n\x1eseparate_tables_per_asset_type\x18\x05 \x01(\x08\"\xa9\x01\n\rPartitionSpec\x12H\n\rpartition_key\x18\x01 \x01(\x0e\x32\x31.google.cloud.asset.v1.PartitionSpec.PartitionKey\"N\n\x0cPartitionKey\x12\x1d\n\x19PARTITION_KEY_UNSPECIFIED\x10\x00\x12\r\n\tREAD_TIME\x10\x01\x12\x10\n\x0cREQUEST_TIME\x10\x02\"\"\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t\"i\n\x10\x46\x65\x65\x64OutputConfig\x12\x46\n\x12pubsub_destination\x18\x01 \x01(\x0b\x32(.google.cloud.asset.v1.PubsubDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x9d\x03\n\x04\x46\x65\x65\x64\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12\x38\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32\".google.cloud.asset.v1.ContentType\x12H\n\x12\x66\x65\x65\x64_output_config\x18\x05 \x01(\x0b\x32\'.google.cloud.asset.v1.FeedOutputConfigB\x03\xe0\x41\x02\x12$\n\tcondition\x18\x06 \x01(\x0b\x32\x11.google.type.Expr\x12\x1a\n\x12relationship_types\x18\x07 \x03(\t:\x91\x01\xea\x41\x8d\x01\n\x1e\x63loudasset.googleapis.com/Feed\x12\x1fprojects/{project}/feeds/{feed}\x12\x1d\x66olders/{folder}/feeds/{feed}\x12)organizations/{organization}/feeds/{feed} \x01\"\xd9\x01\n\x19SearchAllResourcesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\tread_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n\x1aSearchAllResourcesResponse\x12<\n\x07results\x18\x01 \x03(\x0b\x32+.google.cloud.asset.v1.ResourceSearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x1bSearchAllIamPoliciesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x07 \x01(\tB\x03\xe0\x41\x01\"v\n\x1cSearchAllIamPoliciesResponse\x12=\n\x07results\x18\x01 \x03(\x0b\x32,.google.cloud.asset.v1.IamPolicySearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc6\x07\n\x16IamPolicyAnalysisQuery\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12^\n\x11resource_selector\x18\x02 \x01(\x0b\x32>.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorB\x03\xe0\x41\x01\x12^\n\x11identity_selector\x18\x03 \x01(\x0b\x32>.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorB\x03\xe0\x41\x01\x12Z\n\x0f\x61\x63\x63\x65ss_selector\x18\x04 \x01(\x0b\x32<.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorB\x03\xe0\x41\x01\x12K\n\x07options\x18\x05 \x01(\x0b\x32\x35.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsB\x03\xe0\x41\x01\x12^\n\x11\x63ondition_context\x18\x06 \x01(\x0b\x32>.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextB\x03\xe0\x41\x01\x1a\x33\n\x10ResourceSelector\x12\x1f\n\x12\x66ull_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a)\n\x10IdentitySelector\x12\x15\n\x08identity\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a>\n\x0e\x41\x63\x63\x65ssSelector\x12\x12\n\x05roles\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0bpermissions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\xd8\x01\n\x07Options\x12\x1a\n\rexpand_groups\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x65xpand_roles\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x65xpand_resources\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15output_resource_edges\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12output_group_edges\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x32\n%analyze_service_account_impersonation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1aT\n\x10\x43onditionContext\x12\x31\n\x0b\x61\x63\x63\x65ss_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\r\n\x0bTimeContext\"\xc3\x01\n\x17\x41nalyzeIamPolicyRequest\x12J\n\x0e\x61nalysis_query\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisQueryB\x03\xe0\x41\x02\x12!\n\x14saved_analysis_query\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x39\n\x11\x65xecution_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\x8a\x04\n\x18\x41nalyzeIamPolicyResponse\x12X\n\rmain_analysis\x18\x01 \x01(\x0b\x32\x41.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis\x12q\n&service_account_impersonation_analysis\x18\x02 \x03(\x0b\x32\x41.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis\x12\x16\n\x0e\x66ully_explored\x18\x03 \x01(\x08\x1a\x88\x02\n\x11IamPolicyAnalysis\x12\x45\n\x0e\x61nalysis_query\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisQuery\x12H\n\x10\x61nalysis_results\x18\x02 \x03(\x0b\x32..google.cloud.asset.v1.IamPolicyAnalysisResult\x12\x16\n\x0e\x66ully_explored\x18\x03 \x01(\x08\x12J\n\x13non_critical_errors\x18\x05 \x03(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisState\"\xb4\x04\n\x1dIamPolicyAnalysisOutputConfig\x12^\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x43.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationH\x00\x12h\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32H.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationH\x00\x1a\"\n\x0eGcsDestination\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x95\x02\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0ctable_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12l\n\rpartition_key\x18\x03 \x01(\x0e\x32U.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey\x12\x1e\n\x11write_disposition\x18\x04 \x01(\tB\x03\xe0\x41\x01\"?\n\x0cPartitionKey\x12\x1d\n\x19PARTITION_KEY_UNSPECIFIED\x10\x00\x12\x10\n\x0cREQUEST_TIME\x10\x01\x42\r\n\x0b\x64\x65stination\"\xe5\x01\n\"AnalyzeIamPolicyLongrunningRequest\x12J\n\x0e\x61nalysis_query\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisQueryB\x03\xe0\x41\x02\x12!\n\x14saved_analysis_query\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12P\n\routput_config\x18\x02 \x01(\x0b\x32\x34.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigB\x03\xe0\x41\x02\"%\n#AnalyzeIamPolicyLongrunningResponse\"\xb7\x05\n\nSavedQuery\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x07\x63reator\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0clast_updater\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12=\n\x06labels\x18\x07 \x03(\x0b\x32-.google.cloud.asset.v1.SavedQuery.LabelsEntry\x12?\n\x07\x63ontent\x18\x08 \x01(\x0b\x32..google.cloud.asset.v1.SavedQuery.QueryContent\x1as\n\x0cQueryContent\x12R\n\x19iam_policy_analysis_query\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisQueryH\x00\x42\x0f\n\rquery_content\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbf\x01\xea\x41\xbb\x01\n$cloudasset.googleapis.com/SavedQuery\x12-projects/{project}/savedQueries/{saved_query}\x12+folders/{folder}/savedQueries/{saved_query}\x12\x37organizations/{organization}/savedQueries/{saved_query}\"\xb1\x01\n\x17\x43reateSavedQueryRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudasset.googleapis.com/SavedQuery\x12;\n\x0bsaved_query\x18\x02 \x01(\x0b\x32!.google.cloud.asset.v1.SavedQueryB\x03\xe0\x41\x02\x12\x1b\n\x0esaved_query_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"R\n\x14GetSavedQueryRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudasset.googleapis.com/SavedQuery\"\x9d\x01\n\x17ListSavedQueriesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudasset.googleapis.com/SavedQuery\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\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\"m\n\x18ListSavedQueriesResponse\x12\x38\n\rsaved_queries\x18\x01 \x03(\x0b\x32!.google.cloud.asset.v1.SavedQuery\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n\x17UpdateSavedQueryRequest\x12;\n\x0bsaved_query\x18\x01 \x01(\x0b\x32!.google.cloud.asset.v1.SavedQueryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"U\n\x17\x44\x65leteSavedQueryRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudasset.googleapis.com/SavedQuery\"\x8c\x02\n\x12\x41nalyzeMoveRequest\x12\x45\n\x08resource\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12%\n\x12\x64\x65stination_parent\x18\x02 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x44\n\x04view\x18\x03 \x01(\x0e\x32\x36.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView\"B\n\x0c\x41nalysisView\x12\x1d\n\x19\x41NALYSIS_VIEW_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\"Q\n\x13\x41nalyzeMoveResponse\x12:\n\rmove_analysis\x18\x01 \x03(\x0b\x32#.google.cloud.asset.v1.MoveAnalysis\"\x92\x01\n\x0cMoveAnalysis\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12=\n\x08\x61nalysis\x18\x02 \x01(\x0b\x32).google.cloud.asset.v1.MoveAnalysisResultH\x00\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"~\n\x12MoveAnalysisResult\x12\x33\n\x08\x62lockers\x18\x01 \x03(\x0b\x32!.google.cloud.asset.v1.MoveImpact\x12\x33\n\x08warnings\x18\x02 \x03(\x0b\x32!.google.cloud.asset.v1.MoveImpact\"\x1c\n\nMoveImpact\x12\x0e\n\x06\x64\x65tail\x18\x01 \x01(\t\"\xd7\x01\n\x17QueryAssetsOutputConfig\x12`\n\x14\x62igquery_destination\x18\x01 \x01(\x0b\x32\x42.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination\x1aZ\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05table\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x11write_disposition\x18\x03 \x01(\t\"\xbe\x03\n\x12QueryAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12\x18\n\tstatement\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1c\n\rjob_reference\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\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\x12/\n\x07timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x42\n\x10read_time_window\x18\x07 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindowB\x03\xe0\x41\x01H\x01\x12\x34\n\tread_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x01\x12J\n\routput_config\x18\t \x01(\x0b\x32..google.cloud.asset.v1.QueryAssetsOutputConfigB\x03\xe0\x41\x01\x42\x07\n\x05queryB\x06\n\x04time\"\xf0\x01\n\x13QueryAssetsResponse\x12\x15\n\rjob_reference\x18\x01 \x01(\t\x12\x0c\n\x04\x64one\x18\x02 \x01(\x08\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12:\n\x0cquery_result\x18\x04 \x01(\x0b\x32\".google.cloud.asset.v1.QueryResultH\x00\x12G\n\routput_config\x18\x05 \x01(\x0b\x32..google.cloud.asset.v1.QueryAssetsOutputConfigH\x00\x42\n\n\x08response\"\x95\x01\n\x0bQueryResult\x12%\n\x04rows\x18\x01 \x03(\x0b\x32\x17.google.protobuf.Struct\x12\x32\n\x06schema\x18\x02 \x01(\x0b\x32\".google.cloud.asset.v1.TableSchema\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_rows\x18\x04 \x01(\x03\"F\n\x0bTableSchema\x12\x37\n\x06\x66ields\x18\x01 \x03(\x0b\x32\'.google.cloud.asset.v1.TableFieldSchema\"v\n\x10TableFieldSchema\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04mode\x18\x03 \x01(\t\x12\x37\n\x06\x66ields\x18\x04 \x03(\x0b\x32\'.google.cloud.asset.v1.TableFieldSchema\"Y\n#BatchGetEffectiveIamPoliciesRequest\x12\x18\n\x05scope\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\x12\x01*\x12\x18\n\x05names\x18\x03 \x03(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\"\xfe\x02\n$BatchGetEffectiveIamPoliciesResponse\x12\x66\n\x0epolicy_results\x18\x02 \x03(\x0b\x32N.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy\x1a\xed\x01\n\x12\x45\x66\x66\x65\x63tiveIamPolicy\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12k\n\x08policies\x18\x02 \x03(\x0b\x32Y.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo\x1aN\n\nPolicyInfo\x12\x19\n\x11\x61ttached_resource\x18\x01 \x01(\t\x12%\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy\"\xfc\x03\n\x11\x41nalyzerOrgPolicy\x12\x19\n\x11\x61ttached_resource\x18\x01 \x01(\t\x12\x18\n\x10\x61pplied_resource\x18\x05 \x01(\t\x12<\n\x05rules\x18\x02 \x03(\x0b\x32-.google.cloud.asset.v1.AnalyzerOrgPolicy.Rule\x12\x1b\n\x13inherit_from_parent\x18\x03 \x01(\x08\x12\r\n\x05reset\x18\x04 \x01(\x08\x1a\xc7\x02\n\x04Rule\x12L\n\x06values\x18\x03 \x01(\x0b\x32:.google.cloud.asset.v1.AnalyzerOrgPolicy.Rule.StringValuesH\x00\x12\x13\n\tallow_all\x18\x04 \x01(\x08H\x00\x12\x12\n\x08\x64\x65ny_all\x18\x05 \x01(\x08H\x00\x12\x11\n\x07\x65nforce\x18\x06 \x01(\x08H\x00\x12$\n\tcondition\x18\x07 \x01(\x0b\x32\x11.google.type.Expr\x12H\n\x14\x63ondition_evaluation\x18\x08 \x01(\x0b\x32*.google.cloud.asset.v1.ConditionEvaluation\x1a=\n\x0cStringValues\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x12\x15\n\rdenied_values\x18\x02 \x03(\tB\x06\n\x04kind\"\xb4\n\n\x1b\x41nalyzerOrgPolicyConstraint\x12\x62\n\x19google_defined_constraint\x18\x01 \x01(\x0b\x32=.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.ConstraintH\x00\x12`\n\x11\x63ustom_constraint\x18\x02 \x01(\x0b\x32\x43.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraintH\x00\x1a\xbf\x04\n\nConstraint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12k\n\x12\x63onstraint_default\x18\x04 \x01(\x0e\x32O.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.ConstraintDefault\x12g\n\x0flist_constraint\x18\x05 \x01(\x0b\x32L.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.ListConstraintH\x00\x12m\n\x12\x62oolean_constraint\x18\x06 \x01(\x0b\x32O.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.BooleanConstraintH\x00\x1a=\n\x0eListConstraint\x12\x13\n\x0bsupports_in\x18\x01 \x01(\x08\x12\x16\n\x0esupports_under\x18\x02 \x01(\x08\x1a\x13\n\x11\x42ooleanConstraint\"L\n\x11\x43onstraintDefault\x12\"\n\x1e\x43ONSTRAINT_DEFAULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x42\x11\n\x0f\x63onstraint_type\x1a\xf3\x03\n\x10\x43ustomConstraint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0eresource_types\x18\x02 \x03(\t\x12\x64\n\x0cmethod_types\x18\x03 \x03(\x0e\x32N.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType\x12\x11\n\tcondition\x18\x04 \x01(\t\x12\x63\n\x0b\x61\x63tion_type\x18\x05 \x01(\x0e\x32N.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\"p\n\nMethodType\x12\x1b\n\x17METHOD_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x12\x10\n\x0cREMOVE_GRANT\x10\x04\x12\x0f\n\x0bGOVERN_TAGS\x10\x05\">\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x42\x17\n\x15\x63onstraint_definition\"\x92\x01\n\x19\x41nalyzeOrgPoliciesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nconstraint\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\npage_token\x18\x05 \x01(\tB\x0c\n\n_page_size\"\xb0\x03\n\x1a\x41nalyzeOrgPoliciesResponse\x12]\n\x12org_policy_results\x18\x01 \x03(\x0b\x32\x41.google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.OrgPolicyResult\x12\x46\n\nconstraint\x18\x02 \x01(\x0b\x32\x32.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x1a\xd1\x01\n\x0fOrgPolicyResult\x12\x45\n\x13\x63onsolidated_policy\x18\x01 \x01(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12?\n\rpolicy_bundle\x18\x02 \x03(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12\x0f\n\x07project\x18\x03 \x01(\t\x12\x0f\n\x07\x66olders\x18\x04 \x03(\t\x12\x14\n\x0corganization\x18\x05 \x01(\t\"\xa2\x01\n)AnalyzeOrgPolicyGovernedContainersRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nconstraint\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\npage_token\x18\x05 \x01(\tB\x0c\n\n_page_size\"\xc5\x04\n*AnalyzeOrgPolicyGovernedContainersResponse\x12p\n\x13governed_containers\x18\x01 \x03(\x0b\x32S.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer\x12\x46\n\nconstraint\x18\x02 \x01(\x0b\x32\x32.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x1a\xc3\x02\n\x11GovernedContainer\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x45\n\x13\x63onsolidated_policy\x18\x03 \x01(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12?\n\rpolicy_bundle\x18\x04 \x03(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12\x0f\n\x07project\x18\x05 \x01(\t\x12\x0f\n\x07\x66olders\x18\x06 \x03(\t\x12\x14\n\x0corganization\x18\x07 \x01(\t\x12\x42\n\x0e\x65\x66\x66\x65\x63tive_tags\x18\x08 \x03(\x0b\x32*.google.cloud.asset.v1.EffectiveTagDetails\"\x9e\x01\n%AnalyzeOrgPolicyGovernedAssetsRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nconstraint\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\npage_token\x18\x05 \x01(\tB\x0c\n\n_page_size\"\xed\x07\n&AnalyzeOrgPolicyGovernedAssetsResponse\x12\x64\n\x0fgoverned_assets\x18\x01 \x03(\x0b\x32K.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset\x12\x46\n\nconstraint\x18\x02 \x01(\x0b\x32\x32.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x1a\xce\x01\n\x10GovernedResource\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x0f\n\x07project\x18\x05 \x01(\t\x12\x0f\n\x07\x66olders\x18\x06 \x03(\t\x12\x14\n\x0corganization\x18\x07 \x01(\t\x12\x12\n\nasset_type\x18\x08 \x01(\t\x12\x42\n\x0e\x65\x66\x66\x65\x63tive_tags\x18\t \x03(\x0b\x32*.google.cloud.asset.v1.EffectiveTagDetails\x1a\xa1\x01\n\x11GovernedIamPolicy\x12\x19\n\x11\x61ttached_resource\x18\x01 \x01(\t\x12%\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12\x0f\n\x07project\x18\x05 \x01(\t\x12\x0f\n\x07\x66olders\x18\x06 \x03(\t\x12\x14\n\x0corganization\x18\x07 \x01(\t\x12\x12\n\nasset_type\x18\x08 \x01(\t\x1a\x86\x03\n\rGovernedAsset\x12k\n\x11governed_resource\x18\x01 \x01(\x0b\x32N.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResourceH\x00\x12n\n\x13governed_iam_policy\x18\x02 \x01(\x0b\x32O.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedIamPolicyH\x00\x12\x45\n\x13\x63onsolidated_policy\x18\x03 \x01(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicy\x12?\n\rpolicy_bundle\x18\x04 \x03(\x0b\x32(.google.cloud.asset.v1.AnalyzerOrgPolicyB\x10\n\x0egoverned_asset*\x90\x01\n\x0b\x43ontentType\x12\x1c\n\x18\x43ONTENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOURCE\x10\x01\x12\x0e\n\nIAM_POLICY\x10\x02\x12\x0e\n\nORG_POLICY\x10\x04\x12\x11\n\rACCESS_POLICY\x10\x05\x12\x10\n\x0cOS_INVENTORY\x10\x06\x12\x10\n\x0cRELATIONSHIP\x10\x07\x32\xd1 \n\x0c\x41ssetService\x12\xde\x01\n\x0c\x45xportAssets\x12*.google.cloud.asset.v1.ExportAssetsRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41W\n*google.cloud.asset.v1.ExportAssetsResponse\x12)google.cloud.asset.v1.ExportAssetsRequest\x82\xd3\xe4\x93\x02\"\"\x1d/v1/{parent=*/*}:exportAssets:\x01*\x12\x8b\x01\n\nListAssets\x12(.google.cloud.asset.v1.ListAssetsRequest\x1a).google.cloud.asset.v1.ListAssetsResponse\"(\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{parent=*/*}/assets\x12\xb2\x01\n\x15\x42\x61tchGetAssetsHistory\x12\x33.google.cloud.asset.v1.BatchGetAssetsHistoryRequest\x1a\x34.google.cloud.asset.v1.BatchGetAssetsHistoryResponse\".\x82\xd3\xe4\x93\x02(\x12&/v1/{parent=*/*}:batchGetAssetsHistory\x12\x7f\n\nCreateFeed\x12(.google.cloud.asset.v1.CreateFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed\"*\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1b\"\x16/v1/{parent=*/*}/feeds:\x01*\x12t\n\x07GetFeed\x12%.google.cloud.asset.v1.GetFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed\"%\xda\x41\x04name\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{name=*/*/feeds/*}\x12\x87\x01\n\tListFeeds\x12\'.google.cloud.asset.v1.ListFeedsRequest\x1a(.google.cloud.asset.v1.ListFeedsResponse\"\'\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{parent=*/*}/feeds\x12\x82\x01\n\nUpdateFeed\x12(.google.cloud.asset.v1.UpdateFeedRequest\x1a\x1b.google.cloud.asset.v1.Feed\"-\xda\x41\x04\x66\x65\x65\x64\x82\xd3\xe4\x93\x02 2\x1b/v1/{feed.name=*/*/feeds/*}:\x01*\x12u\n\nDeleteFeed\x12(.google.cloud.asset.v1.DeleteFeedRequest\x1a\x16.google.protobuf.Empty\"%\xda\x41\x04name\x82\xd3\xe4\x93\x02\x18*\x16/v1/{name=*/*/feeds/*}\x12\xbf\x01\n\x12SearchAllResources\x12\x30.google.cloud.asset.v1.SearchAllResourcesRequest\x1a\x31.google.cloud.asset.v1.SearchAllResourcesResponse\"D\xda\x41\x17scope,query,asset_types\x82\xd3\xe4\x93\x02$\x12\"/v1/{scope=*/*}:searchAllResources\x12\xbb\x01\n\x14SearchAllIamPolicies\x12\x32.google.cloud.asset.v1.SearchAllIamPoliciesRequest\x1a\x33.google.cloud.asset.v1.SearchAllIamPoliciesResponse\":\xda\x41\x0bscope,query\x82\xd3\xe4\x93\x02&\x12$/v1/{scope=*/*}:searchAllIamPolicies\x12\xac\x01\n\x10\x41nalyzeIamPolicy\x12..google.cloud.asset.v1.AnalyzeIamPolicyRequest\x1a/.google.cloud.asset.v1.AnalyzeIamPolicyResponse\"7\x82\xd3\xe4\x93\x02\x31\x12//v1/{analysis_query.scope=*/*}:analyzeIamPolicy\x12\xb8\x02\n\x1b\x41nalyzeIamPolicyLongrunning\x12\x39.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41v\n9google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse\x12\x39google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata\x82\xd3\xe4\x93\x02?\":/v1/{analysis_query.scope=*/*}:analyzeIamPolicyLongrunning:\x01*\x12\x8c\x01\n\x0b\x41nalyzeMove\x12).google.cloud.asset.v1.AnalyzeMoveRequest\x1a*.google.cloud.asset.v1.AnalyzeMoveResponse\"&\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{resource=*/*}:analyzeMove\x12\x8d\x01\n\x0bQueryAssets\x12).google.cloud.asset.v1.QueryAssetsRequest\x1a*.google.cloud.asset.v1.QueryAssetsResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/v1/{parent=*/*}:queryAssets:\x01*\x12\xbd\x01\n\x10\x43reateSavedQuery\x12..google.cloud.asset.v1.CreateSavedQueryRequest\x1a!.google.cloud.asset.v1.SavedQuery\"V\xda\x41!parent,saved_query,saved_query_id\x82\xd3\xe4\x93\x02,\"\x1d/v1/{parent=*/*}/savedQueries:\x0bsaved_query\x12\x8d\x01\n\rGetSavedQuery\x12+.google.cloud.asset.v1.GetSavedQueryRequest\x1a!.google.cloud.asset.v1.SavedQuery\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=*/*/savedQueries/*}\x12\xa3\x01\n\x10ListSavedQueries\x12..google.cloud.asset.v1.ListSavedQueriesRequest\x1a/.google.cloud.asset.v1.ListSavedQueriesResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=*/*}/savedQueries\x12\xbf\x01\n\x10UpdateSavedQuery\x12..google.cloud.asset.v1.UpdateSavedQueryRequest\x1a!.google.cloud.asset.v1.SavedQuery\"X\xda\x41\x17saved_query,update_mask\x82\xd3\xe4\x93\x02\x38\x32)/v1/{saved_query.name=*/*/savedQueries/*}:\x0bsaved_query\x12\x88\x01\n\x10\x44\x65leteSavedQuery\x12..google.cloud.asset.v1.DeleteSavedQueryRequest\x1a\x16.google.protobuf.Empty\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=*/*/savedQueries/*}\x12\xce\x01\n\x1c\x42\x61tchGetEffectiveIamPolicies\x12:.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest\x1a;.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{scope=*/*}/effectiveIamPolicies:batchGet\x12\xbf\x01\n\x12\x41nalyzeOrgPolicies\x12\x30.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest\x1a\x31.google.cloud.asset.v1.AnalyzeOrgPoliciesResponse\"D\xda\x41\x17scope,constraint,filter\x82\xd3\xe4\x93\x02$\x12\"/v1/{scope=*/*}:analyzeOrgPolicies\x12\xff\x01\n\"AnalyzeOrgPolicyGovernedContainers\x12@.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest\x1a\x41.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse\"T\xda\x41\x17scope,constraint,filter\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{scope=*/*}:analyzeOrgPolicyGovernedContainers\x12\xef\x01\n\x1e\x41nalyzeOrgPolicyGovernedAssets\x12<.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest\x1a=.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse\"P\xda\x41\x17scope,constraint,filter\x82\xd3\xe4\x93\x02\x30\x12./v1/{scope=*/*}:analyzeOrgPolicyGovernedAssets\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x01\n\x19\x63om.google.cloud.asset.v1B\x11\x41ssetServiceProtoP\x01Z/cloud.google.com/go/asset/apiv1/assetpb;assetpb\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Asset - module V1 - AnalyzeIamPolicyLongrunningMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata").msgclass - ExportAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ExportAssetsRequest").msgclass - ExportAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ExportAssetsResponse").msgclass - ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListAssetsRequest").msgclass - ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListAssetsResponse").msgclass - BatchGetAssetsHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetAssetsHistoryRequest").msgclass - BatchGetAssetsHistoryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetAssetsHistoryResponse").msgclass - CreateFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.CreateFeedRequest").msgclass - GetFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GetFeedRequest").msgclass - ListFeedsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListFeedsRequest").msgclass - ListFeedsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListFeedsResponse").msgclass - UpdateFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.UpdateFeedRequest").msgclass - DeleteFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.DeleteFeedRequest").msgclass - OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.OutputConfig").msgclass - OutputResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.OutputResult").msgclass - GcsOutputResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsOutputResult").msgclass - GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsDestination").msgclass - BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BigQueryDestination").msgclass - PartitionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PartitionSpec").msgclass - PartitionSpec::PartitionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PartitionSpec.PartitionKey").enummodule - PubsubDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PubsubDestination").msgclass - FeedOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.FeedOutputConfig").msgclass - Feed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Feed").msgclass - SearchAllResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllResourcesRequest").msgclass - SearchAllResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllResourcesResponse").msgclass - SearchAllIamPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllIamPoliciesRequest").msgclass - SearchAllIamPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllIamPoliciesResponse").msgclass - IamPolicyAnalysisQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery").msgclass - IamPolicyAnalysisQuery::ResourceSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector").msgclass - IamPolicyAnalysisQuery::IdentitySelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector").msgclass - IamPolicyAnalysisQuery::AccessSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector").msgclass - IamPolicyAnalysisQuery::Options = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.Options").msgclass - IamPolicyAnalysisQuery::ConditionContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext").msgclass - AnalyzeIamPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyRequest").msgclass - AnalyzeIamPolicyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyResponse").msgclass - AnalyzeIamPolicyResponse::IamPolicyAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis").msgclass - IamPolicyAnalysisOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisOutputConfig").msgclass - IamPolicyAnalysisOutputConfig::GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination").msgclass - IamPolicyAnalysisOutputConfig::BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination").msgclass - IamPolicyAnalysisOutputConfig::BigQueryDestination::PartitionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey").enummodule - AnalyzeIamPolicyLongrunningRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest").msgclass - AnalyzeIamPolicyLongrunningResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse").msgclass - SavedQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SavedQuery").msgclass - SavedQuery::QueryContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SavedQuery.QueryContent").msgclass - CreateSavedQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.CreateSavedQueryRequest").msgclass - GetSavedQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GetSavedQueryRequest").msgclass - ListSavedQueriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListSavedQueriesRequest").msgclass - ListSavedQueriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListSavedQueriesResponse").msgclass - UpdateSavedQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.UpdateSavedQueryRequest").msgclass - DeleteSavedQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.DeleteSavedQueryRequest").msgclass - AnalyzeMoveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeMoveRequest").msgclass - AnalyzeMoveRequest::AnalysisView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView").enummodule - AnalyzeMoveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeMoveResponse").msgclass - MoveAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveAnalysis").msgclass - MoveAnalysisResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveAnalysisResult").msgclass - MoveImpact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveImpact").msgclass - QueryAssetsOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsOutputConfig").msgclass - QueryAssetsOutputConfig::BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination").msgclass - QueryAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsRequest").msgclass - QueryAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsResponse").msgclass - QueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryResult").msgclass - TableSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TableSchema").msgclass - TableFieldSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TableFieldSchema").msgclass - BatchGetEffectiveIamPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest").msgclass - BatchGetEffectiveIamPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse").msgclass - BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy").msgclass - BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo").msgclass - AnalyzerOrgPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicy").msgclass - AnalyzerOrgPolicy::Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicy.Rule").msgclass - AnalyzerOrgPolicy::Rule::StringValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicy.Rule.StringValues").msgclass - AnalyzerOrgPolicyConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint").msgclass - AnalyzerOrgPolicyConstraint::Constraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint").msgclass - AnalyzerOrgPolicyConstraint::Constraint::ListConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.ListConstraint").msgclass - AnalyzerOrgPolicyConstraint::Constraint::BooleanConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.BooleanConstraint").msgclass - AnalyzerOrgPolicyConstraint::Constraint::ConstraintDefault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint.ConstraintDefault").enummodule - AnalyzerOrgPolicyConstraint::CustomConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint").msgclass - AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType").enummodule - AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType").enummodule - AnalyzeOrgPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPoliciesRequest").msgclass - AnalyzeOrgPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPoliciesResponse").msgclass - AnalyzeOrgPoliciesResponse::OrgPolicyResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.OrgPolicyResult").msgclass - AnalyzeOrgPolicyGovernedContainersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest").msgclass - AnalyzeOrgPolicyGovernedContainersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse").msgclass - AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer").msgclass - AnalyzeOrgPolicyGovernedAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest").msgclass - AnalyzeOrgPolicyGovernedAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse").msgclass - AnalyzeOrgPolicyGovernedAssetsResponse::GovernedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource").msgclass - AnalyzeOrgPolicyGovernedAssetsResponse::GovernedIamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedIamPolicy").msgclass - AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset").msgclass - ContentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ContentType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_services_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_services_pb.rb deleted file mode 100644 index 8b4c8e2e63e2..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/asset_service_services_pb.rb +++ /dev/null @@ -1,187 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/asset/v1/asset_service.proto for package 'google.cloud.asset.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/asset/v1/asset_service_pb' - -module Google - module Cloud - module Asset - module V1 - module AssetService - # Asset service definition. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.asset.v1.AssetService' - - # Exports assets with time and resource types to a given Cloud Storage - # location/BigQuery table. For Cloud Storage location destinations, the - # output format is newline-delimited JSON. Each line represents a - # [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON - # format; for BigQuery table destinations, the output table stores the fields - # in asset Protobuf as columns. This API implements the - # [google.longrunning.Operation][google.longrunning.Operation] API, which - # allows you to keep track of the export. We recommend intervals of at least - # 2 seconds with exponential retry to poll the export operation result. For - # regular-size resource parent, the export operation usually finishes within - # 5 minutes. - rpc :ExportAssets, ::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Google::Longrunning::Operation - # Lists assets with time and resource types and returns paged results in - # response. - rpc :ListAssets, ::Google::Cloud::Asset::V1::ListAssetsRequest, ::Google::Cloud::Asset::V1::ListAssetsResponse - # Batch gets the update history of assets that overlap a time window. - # For IAM_POLICY content, this API outputs history when the asset and its - # attached IAM POLICY both exist. This can create gaps in the output history. - # Otherwise, this API outputs history with asset in both non-delete or - # deleted status. - # If a specified asset does not exist, this API returns an INVALID_ARGUMENT - # error. - rpc :BatchGetAssetsHistory, ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse - # Creates a feed in a parent project/folder/organization to listen to its - # asset updates. - rpc :CreateFeed, ::Google::Cloud::Asset::V1::CreateFeedRequest, ::Google::Cloud::Asset::V1::Feed - # Gets details about an asset feed. - rpc :GetFeed, ::Google::Cloud::Asset::V1::GetFeedRequest, ::Google::Cloud::Asset::V1::Feed - # Lists all asset feeds in a parent project/folder/organization. - rpc :ListFeeds, ::Google::Cloud::Asset::V1::ListFeedsRequest, ::Google::Cloud::Asset::V1::ListFeedsResponse - # Updates an asset feed configuration. - rpc :UpdateFeed, ::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Google::Cloud::Asset::V1::Feed - # Deletes an asset feed. - rpc :DeleteFeed, ::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Google::Protobuf::Empty - # Searches all Google Cloud resources within the specified scope, such as a - # project, folder, or organization. The caller must be granted the - # `cloudasset.assets.searchAllResources` permission on the desired scope, - # otherwise the request will be rejected. - rpc :SearchAllResources, ::Google::Cloud::Asset::V1::SearchAllResourcesRequest, ::Google::Cloud::Asset::V1::SearchAllResourcesResponse - # Searches all IAM policies within the specified scope, such as a project, - # folder, or organization. The caller must be granted the - # `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, - # otherwise the request will be rejected. - rpc :SearchAllIamPolicies, ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse - # Analyzes IAM policies to answer which identities have what accesses on - # which resources. - rpc :AnalyzeIamPolicy, ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest, ::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse - # Analyzes IAM policies asynchronously to answer which identities have what - # accesses on which resources, and writes the analysis results to a Google - # Cloud Storage or a BigQuery destination. For Cloud Storage destination, the - # output format is the JSON format that represents a - # [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. - # This method implements the - # [google.longrunning.Operation][google.longrunning.Operation], which allows - # you to track the operation status. We recommend intervals of at least 2 - # seconds with exponential backoff retry to poll the operation result. The - # metadata contains the metadata for the long-running operation. - rpc :AnalyzeIamPolicyLongrunning, ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest, ::Google::Longrunning::Operation - # Analyze moving a resource to a specified destination without kicking off - # the actual move. The analysis is best effort depending on the user's - # permissions of viewing different hierarchical policies and configurations. - # The policies and configuration are subject to change before the actual - # resource migration takes place. - rpc :AnalyzeMove, ::Google::Cloud::Asset::V1::AnalyzeMoveRequest, ::Google::Cloud::Asset::V1::AnalyzeMoveResponse - # Issue a job that queries assets using a SQL statement compatible with - # [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). - # - # If the query execution finishes within timeout and there's no pagination, - # the full query results will be returned in the `QueryAssetsResponse`. - # - # Otherwise, full query results can be obtained by issuing extra requests - # with the `job_reference` from the a previous `QueryAssets` call. - # - # Note, the query result has approximately 10 GB limitation enforced by - # [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). - # Queries return larger results will result in errors. - rpc :QueryAssets, ::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Google::Cloud::Asset::V1::QueryAssetsResponse - # Creates a saved query in a parent project/folder/organization. - rpc :CreateSavedQuery, ::Google::Cloud::Asset::V1::CreateSavedQueryRequest, ::Google::Cloud::Asset::V1::SavedQuery - # Gets details about a saved query. - rpc :GetSavedQuery, ::Google::Cloud::Asset::V1::GetSavedQueryRequest, ::Google::Cloud::Asset::V1::SavedQuery - # Lists all saved queries in a parent project/folder/organization. - rpc :ListSavedQueries, ::Google::Cloud::Asset::V1::ListSavedQueriesRequest, ::Google::Cloud::Asset::V1::ListSavedQueriesResponse - # Updates a saved query. - rpc :UpdateSavedQuery, ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest, ::Google::Cloud::Asset::V1::SavedQuery - # Deletes a saved query. - rpc :DeleteSavedQuery, ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest, ::Google::Protobuf::Empty - # Gets effective IAM policies for a batch of resources. - rpc :BatchGetEffectiveIamPolicies, ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest, ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse - # Analyzes organization policies under a scope. - rpc :AnalyzeOrgPolicies, ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest, ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse - # Analyzes organization policies governed containers (projects, folders or - # organization) under a scope. - rpc :AnalyzeOrgPolicyGovernedContainers, ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest, ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse - # Analyzes organization policies governed assets (Google Cloud resources or - # policies) under a scope. This RPC supports custom constraints and the - # following canned constraints: - # - # * constraints/ainotebooks.accessMode - # * constraints/ainotebooks.disableFileDownloads - # * constraints/ainotebooks.disableRootAccess - # * constraints/ainotebooks.disableTerminal - # * constraints/ainotebooks.environmentOptions - # * constraints/ainotebooks.requireAutoUpgradeSchedule - # * constraints/ainotebooks.restrictVpcNetworks - # * constraints/compute.disableGuestAttributesAccess - # * constraints/compute.disableInstanceDataAccessApis - # * constraints/compute.disableNestedVirtualization - # * constraints/compute.disableSerialPortAccess - # * constraints/compute.disableSerialPortLogging - # * constraints/compute.disableVpcExternalIpv6 - # * constraints/compute.requireOsLogin - # * constraints/compute.requireShieldedVm - # * constraints/compute.restrictLoadBalancerCreationForTypes - # * constraints/compute.restrictProtocolForwardingCreationForTypes - # * constraints/compute.restrictXpnProjectLienRemoval - # * constraints/compute.setNewProjectDefaultToZonalDNSOnly - # * constraints/compute.skipDefaultNetworkCreation - # * constraints/compute.trustedImageProjects - # * constraints/compute.vmCanIpForward - # * constraints/compute.vmExternalIpAccess - # * constraints/gcp.detailedAuditLoggingMode - # * constraints/gcp.resourceLocations - # * constraints/iam.allowedPolicyMemberDomains - # * constraints/iam.automaticIamGrantsForDefaultServiceAccounts - # * constraints/iam.disableServiceAccountCreation - # * constraints/iam.disableServiceAccountKeyCreation - # * constraints/iam.disableServiceAccountKeyUpload - # * constraints/iam.restrictCrossProjectServiceAccountLienRemoval - # * constraints/iam.serviceAccountKeyExpiryHours - # * constraints/resourcemanager.accessBoundaries - # * constraints/resourcemanager.allowedExportDestinations - # * constraints/sql.restrictAuthorizedNetworks - # * constraints/sql.restrictNoncompliantDiagnosticDataAccess - # * constraints/sql.restrictNoncompliantResourceCreation - # * constraints/sql.restrictPublicIp - # * constraints/storage.publicAccessPrevention - # * constraints/storage.restrictAuthTypes - # * constraints/storage.uniformBucketLevelAccess - # - # This RPC only returns either resources of types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # or IAM policies. - rpc :AnalyzeOrgPolicyGovernedAssets, ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest, ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/assets_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/assets_pb.rb deleted file mode 100644 index 41e7a438191f..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/assets_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/asset/v1/assets.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/asset/v1/asset_enrichment_resourceowners_pb' -require 'google/cloud/orgpolicy/v1/orgpolicy_pb' -require 'google/cloud/osconfig/v1/inventory_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/service_perimeter_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/code_pb' - - -descriptor_data = "\n\"google/cloud/asset/v1/assets.proto\x12\x15google.cloud.asset.v1\x1a\x19google/api/resource.proto\x1a;google/cloud/asset/v1/asset_enrichment_resourceowners.proto\x1a)google/cloud/orgpolicy/v1/orgpolicy.proto\x1a(google/cloud/osconfig/v1/inventory.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a:google/identity/accesscontextmanager/v1/access_level.proto\x1a;google/identity/accesscontextmanager/v1/access_policy.proto\x1a?google/identity/accesscontextmanager/v1/service_perimeter.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15google/rpc/code.proto\"\xf5\x02\n\rTemporalAsset\x12\x31\n\x06window\x18\x01 \x01(\x0b\x32!.google.cloud.asset.v1.TimeWindow\x12\x0f\n\x07\x64\x65leted\x18\x02 \x01(\x08\x12+\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x1c.google.cloud.asset.v1.Asset\x12O\n\x11prior_asset_state\x18\x04 \x01(\x0e\x32\x34.google.cloud.asset.v1.TemporalAsset.PriorAssetState\x12\x31\n\x0bprior_asset\x18\x05 \x01(\x0b\x32\x1c.google.cloud.asset.v1.Asset\"o\n\x0fPriorAssetState\x12!\n\x1dPRIOR_ASSET_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRESENT\x10\x01\x12\x0b\n\x07INVALID\x10\x02\x12\x12\n\x0e\x44OES_NOT_EXIST\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04\"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x0f\x41ssetEnrichment\x12@\n\x0fresource_owners\x18\x07 \x01(\x0b\x32%.google.cloud.asset.v1.ResourceOwnersH\x00\x42\x10\n\x0e\x45nrichmentData\"\xf3\x05\n\x05\x41sset\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.asset.v1.Resource\x12)\n\niam_policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12\x35\n\norg_policy\x18\x06 \x03(\x0b\x32!.google.cloud.orgpolicy.v1.Policy\x12N\n\raccess_policy\x18\x07 \x01(\x0b\x32\x35.google.identity.accesscontextmanager.v1.AccessPolicyH\x00\x12L\n\x0c\x61\x63\x63\x65ss_level\x18\x08 \x01(\x0b\x32\x34.google.identity.accesscontextmanager.v1.AccessLevelH\x00\x12V\n\x11service_perimeter\x18\t \x01(\x0b\x32\x39.google.identity.accesscontextmanager.v1.ServicePerimeterH\x00\x12\x39\n\x0cos_inventory\x18\x0c \x01(\x0b\x32#.google.cloud.osconfig.v1.Inventory\x12@\n\x0erelated_assets\x18\r \x01(\x0b\x32$.google.cloud.asset.v1.RelatedAssetsB\x02\x18\x01\x12:\n\rrelated_asset\x18\x0f \x01(\x0b\x32#.google.cloud.asset.v1.RelatedAsset\x12\x11\n\tancestors\x18\n \x03(\t:\'\xea\x41$\n\x1f\x63loudasset.googleapis.com/Asset\x12\x01*B\x17\n\x15\x61\x63\x63\x65ss_context_policy\"\xb2\x01\n\x08Resource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x1e\n\x16\x64iscovery_document_uri\x18\x02 \x01(\t\x12\x16\n\x0e\x64iscovery_name\x18\x03 \x01(\t\x12\x14\n\x0cresource_url\x18\x04 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12%\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08location\x18\x08 \x01(\t\"\x98\x01\n\rRelatedAssets\x12N\n\x17relationship_attributes\x18\x01 \x01(\x0b\x32-.google.cloud.asset.v1.RelationshipAttributes\x12\x33\n\x06\x61ssets\x18\x02 \x03(\x0b\x32#.google.cloud.asset.v1.RelatedAsset:\x02\x18\x01\"v\n\x16RelationshipAttributes\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x1c\n\x14source_resource_type\x18\x01 \x01(\t\x12\x1c\n\x14target_resource_type\x18\x02 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t:\x02\x18\x01\"\x85\x01\n\x0cRelatedAsset\x12\x33\n\x05\x61sset\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x63loudasset.googleapis.com/Asset\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x11\n\tancestors\x18\x03 \x03(\t\x12\x19\n\x11relationship_type\x18\x04 \x01(\t\"\xa1\x01\n\x03Tag\x12\x14\n\x07tag_key\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntag_key_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\ttag_value\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0ctag_value_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\n\n\x08_tag_keyB\r\n\x0b_tag_key_idB\x0c\n\n_tag_valueB\x0f\n\r_tag_value_id\"\x7f\n\x13\x45\x66\x66\x65\x63tiveTagDetails\x12\x1e\n\x11\x61ttached_resource\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x32\n\x0e\x65\x66\x66\x65\x63tive_tags\x18\x02 \x03(\x0b\x32\x1a.google.cloud.asset.v1.TagB\x14\n\x12_attached_resource\"\x97\n\n\x14ResourceSearchResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x0f\n\x07project\x18\x03 \x01(\t\x12\x0f\n\x07\x66olders\x18\x11 \x03(\t\x12\x14\n\x0corganization\x18\x12 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12G\n\x06labels\x18\x07 \x03(\x0b\x32\x37.google.cloud.asset.v1.ResourceSearchResult.LabelsEntry\x12\x14\n\x0cnetwork_tags\x18\x08 \x03(\t\x12\x13\n\x07kms_key\x18\n \x01(\tB\x02\x18\x01\x12\x10\n\x08kms_keys\x18\x1c \x03(\t\x12/\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05state\x18\r \x01(\t\x12\x36\n\x15\x61\x64\x64itional_attributes\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12!\n\x19parent_full_resource_name\x18\x13 \x01(\t\x12\x45\n\x13versioned_resources\x18\x10 \x03(\x0b\x32(.google.cloud.asset.v1.VersionedResource\x12\x43\n\x12\x61ttached_resources\x18\x14 \x03(\x0b\x32\'.google.cloud.asset.v1.AttachedResource\x12U\n\rrelationships\x18\x15 \x03(\x0b\x32>.google.cloud.asset.v1.ResourceSearchResult.RelationshipsEntry\x12\x14\n\x08tag_keys\x18\x17 \x03(\tB\x02\x18\x01\x12\x16\n\ntag_values\x18\x19 \x03(\tB\x02\x18\x01\x12\x19\n\rtag_value_ids\x18\x1a \x03(\tB\x02\x18\x01\x12(\n\x04tags\x18\x1d \x03(\x0b\x32\x1a.google.cloud.asset.v1.Tag\x12\x42\n\x0e\x65\x66\x66\x65\x63tive_tags\x18\x1e \x03(\x0b\x32*.google.cloud.asset.v1.EffectiveTagDetails\x12;\n\x0b\x65nrichments\x18\x1f \x03(\x0b\x32&.google.cloud.asset.v1.AssetEnrichment\x12\x19\n\x11parent_asset_type\x18g \x01(\t\x12]\n\x12scc_security_marks\x18 \x03(\x0b\x32\x41.google.cloud.asset.v1.ResourceSearchResult.SccSecurityMarksEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a]\n\x12RelationshipsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.asset.v1.RelatedResources:\x02\x38\x01\x1a\x37\n\x15SccSecurityMarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"O\n\x11VersionedResource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12)\n\x08resource\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"m\n\x10\x41ttachedResource\x12\x12\n\nasset_type\x18\x01 \x01(\t\x12\x45\n\x13versioned_resources\x18\x03 \x03(\x0b\x32(.google.cloud.asset.v1.VersionedResource\"U\n\x10RelatedResources\x12\x41\n\x11related_resources\x18\x01 \x03(\x0b\x32&.google.cloud.asset.v1.RelatedResource\"A\n\x0fRelatedResource\x12\x12\n\nasset_type\x18\x01 \x01(\t\x12\x1a\n\x12\x66ull_resource_name\x18\x02 \x01(\t\"\x8f\x04\n\x15IamPolicySearchResult\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x05 \x01(\t\x12\x0f\n\x07project\x18\x02 \x01(\t\x12\x0f\n\x07\x66olders\x18\x06 \x03(\t\x12\x14\n\x0corganization\x18\x07 \x01(\t\x12%\n\x06policy\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12M\n\x0b\x65xplanation\x18\x04 \x01(\x0b\x32\x38.google.cloud.asset.v1.IamPolicySearchResult.Explanation\x1a\xa1\x02\n\x0b\x45xplanation\x12m\n\x13matched_permissions\x18\x01 \x03(\x0b\x32P.google.cloud.asset.v1.IamPolicySearchResult.Explanation.MatchedPermissionsEntry\x1a\"\n\x0bPermissions\x12\x13\n\x0bpermissions\x18\x01 \x03(\t\x1a\x7f\n\x17MatchedPermissionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12S\n\x05value\x18\x02 \x01(\x0b\x32\x44.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions:\x02\x38\x01\"G\n\x16IamPolicyAnalysisState\x12\x1e\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x10.google.rpc.Code\x12\r\n\x05\x63\x61use\x18\x02 \x01(\t\"\xc6\x01\n\x13\x43onditionEvaluation\x12T\n\x10\x65valuation_value\x18\x01 \x01(\x0e\x32:.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue\"Y\n\x0f\x45valuationValue\x12 \n\x1c\x45VALUATION_VALUE_UNSPECIFIED\x10\x00\x12\x08\n\x04TRUE\x10\x01\x12\t\n\x05\x46\x41LSE\x10\x02\x12\x0f\n\x0b\x43ONDITIONAL\x10\x03\"\xab\t\n\x17IamPolicyAnalysisResult\x12#\n\x1b\x61ttached_resource_full_name\x18\x01 \x01(\t\x12+\n\x0biam_binding\x18\x02 \x01(\x0b\x32\x16.google.iam.v1.Binding\x12^\n\x14\x61\x63\x63\x65ss_control_lists\x18\x03 \x03(\x0b\x32@.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList\x12R\n\ridentity_list\x18\x04 \x01(\x0b\x32;.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList\x12\x16\n\x0e\x66ully_explored\x18\x05 \x01(\x08\x1am\n\x08Resource\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12\x45\n\x0e\x61nalysis_state\x18\x02 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisState\x1a\x85\x01\n\x06\x41\x63\x63\x65ss\x12\x0e\n\x04role\x18\x01 \x01(\tH\x00\x12\x14\n\npermission\x18\x02 \x01(\tH\x00\x12\x45\n\x0e\x61nalysis_state\x18\x03 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisStateB\x0e\n\x0coneof_access\x1a_\n\x08Identity\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0e\x61nalysis_state\x18\x02 \x01(\x0b\x32-.google.cloud.asset.v1.IamPolicyAnalysisState\x1a\x30\n\x04\x45\x64ge\x12\x13\n\x0bsource_node\x18\x01 \x01(\t\x12\x13\n\x0btarget_node\x18\x02 \x01(\t\x1a\xbf\x02\n\x11\x41\x63\x63\x65ssControlList\x12J\n\tresources\x18\x01 \x03(\x0b\x32\x37.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource\x12G\n\x08\x61\x63\x63\x65sses\x18\x02 \x03(\x0b\x32\x35.google.cloud.asset.v1.IamPolicyAnalysisResult.Access\x12K\n\x0eresource_edges\x18\x03 \x03(\x0b\x32\x33.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge\x12H\n\x14\x63ondition_evaluation\x18\x04 \x01(\x0b\x32*.google.cloud.asset.v1.ConditionEvaluation\x1a\xa5\x01\n\x0cIdentityList\x12K\n\nidentities\x18\x01 \x03(\x0b\x32\x37.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity\x12H\n\x0bgroup_edges\x18\x02 \x03(\x0b\x32\x33.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeB\x8a\x01\n\x19\x63om.google.cloud.asset.v1B\nAssetProtoP\x01Z/cloud.google.com/go/asset/apiv1/assetpb;assetpb\xaa\x02\x15Google.Cloud.Asset.V1\xca\x02\x15Google\\Cloud\\Asset\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Asset - module V1 - TemporalAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TemporalAsset").msgclass - TemporalAsset::PriorAssetState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TemporalAsset.PriorAssetState").enummodule - TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TimeWindow").msgclass - AssetEnrichment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AssetEnrichment").msgclass - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Asset").msgclass - Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Resource").msgclass - RelatedAssets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelatedAssets").msgclass - RelationshipAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelationshipAttributes").msgclass - RelatedAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelatedAsset").msgclass - Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Tag").msgclass - EffectiveTagDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.EffectiveTagDetails").msgclass - ResourceSearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ResourceSearchResult").msgclass - VersionedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.VersionedResource").msgclass - AttachedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.AttachedResource").msgclass - RelatedResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelatedResources").msgclass - RelatedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.RelatedResource").msgclass - IamPolicySearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult").msgclass - IamPolicySearchResult::Explanation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult.Explanation").msgclass - IamPolicySearchResult::Explanation::Permissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions").msgclass - IamPolicyAnalysisState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisState").msgclass - ConditionEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ConditionEvaluation").msgclass - ConditionEvaluation::EvaluationValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ConditionEvaluation.EvaluationValue").enummodule - IamPolicyAnalysisResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult").msgclass - IamPolicyAnalysisResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.Resource").msgclass - IamPolicyAnalysisResult::Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.Access").msgclass - IamPolicyAnalysisResult::Identity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.Identity").msgclass - IamPolicyAnalysisResult::Edge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.Edge").msgclass - IamPolicyAnalysisResult::AccessControlList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList").msgclass - IamPolicyAnalysisResult::IdentityList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/rest.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/rest.rb deleted file mode 100644 index c4e70181fe84..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/asset/v1/asset_service/rest" -require "google/cloud/asset/v1/version" - -module Google - module Cloud - module Asset - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/asset/v1/rest" - # client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/v1/version.rb deleted file mode 100644 index 282474cc9d81..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/asset/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 Asset - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb b/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb deleted file mode 100644 index 0a6ae7993bbc..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/orgpolicy/v1/orgpolicy.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/orgpolicy/v1/orgpolicy.proto\x12\x19google.cloud.orgpolicy.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8b\x05\n\x06Policy\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x12\n\nconstraint\x18\x02 \x01(\t\x12\x0c\n\x04\x65tag\x18\x03 \x01(\x0c\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0blist_policy\x18\x05 \x01(\x0b\x32,.google.cloud.orgpolicy.v1.Policy.ListPolicyH\x00\x12I\n\x0e\x62oolean_policy\x18\x06 \x01(\x0b\x32/.google.cloud.orgpolicy.v1.Policy.BooleanPolicyH\x00\x12K\n\x0frestore_default\x18\x07 \x01(\x0b\x32\x30.google.cloud.orgpolicy.v1.Policy.RestoreDefaultH\x00\x1a\xfb\x01\n\nListPolicy\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x12\x15\n\rdenied_values\x18\x02 \x03(\t\x12J\n\nall_values\x18\x03 \x01(\x0e\x32\x36.google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues\x12\x17\n\x0fsuggested_value\x18\x04 \x01(\t\x12\x1b\n\x13inherit_from_parent\x18\x05 \x01(\x08\"<\n\tAllValues\x12\x1a\n\x16\x41LL_VALUES_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x1a!\n\rBooleanPolicy\x12\x10\n\x08\x65nforced\x18\x01 \x01(\x08\x1a\x10\n\x0eRestoreDefaultB\r\n\x0bpolicy_typeB\xc5\x01\n\x1d\x63om.google.cloud.orgpolicy.v1B\x0eOrgPolicyProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv1/orgpolicypb;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V1\xca\x02\x19Google\\Cloud\\OrgPolicy\\V1\xea\x02\x1cGoogle::Cloud::OrgPolicy::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module OrgPolicy - module V1 - Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy").msgclass - Policy::ListPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.ListPolicy").msgclass - Policy::ListPolicy::AllValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues").enummodule - Policy::BooleanPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.BooleanPolicy").msgclass - Policy::RestoreDefault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.RestoreDefault").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-asset-v1/proto_docs/README.md deleted file mode 100644 index c6111b54d269..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Asset 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-asset-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/cloud/asset/v1/asset_enrichment_resourceowners.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_enrichment_resourceowners.rb deleted file mode 100644 index 802ee1c375c7..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_enrichment_resourceowners.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Asset - module V1 - # The resource owners information. - # @!attribute [rw] resource_owners - # @return [::Array<::String>] - # List of resource owners. - class ResourceOwners - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_service.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_service.rb deleted file mode 100644 index b63a2feb2db6..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/asset_service.rb +++ /dev/null @@ -1,2646 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Asset - module V1 - # Represents the metadata of the longrunning operation for the - # AnalyzeIamPolicyLongrunning RPC. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - class AnalyzeIamPolicyLongrunningMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Export asset request. - # @!attribute [rw] parent - # @return [::String] - # Required. The relative name of the root asset. This can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"), - # or a folder number (such as "folders/123"). - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp to take an asset snapshot. This can only be set to a timestamp - # between the current time and the current time minus 35 days (inclusive). - # If not specified, the current time will be used. Due to delays in resource - # data collection and indexing, there is a volatile window during which - # running the same query may get different results. - # @!attribute [rw] asset_types - # @return [::Array<::String>] - # A list of asset types to take a snapshot for. For example: - # "compute.googleapis.com/Disk". - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # - # If specified, only matching assets will be returned, otherwise, it will - # snapshot all asset types. See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types. - # @!attribute [rw] content_type - # @return [::Google::Cloud::Asset::V1::ContentType] - # Asset content type. If not specified, no content but the asset name will be - # returned. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Asset::V1::OutputConfig] - # Required. Output configuration indicating where the results will be output - # to. - # @!attribute [rw] relationship_types - # @return [::Array<::String>] - # A list of relationship types to export, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it snapshots specified relationships. It returns an error if - # any of the [relationship_types] doesn't belong to the supported - # relationship types of the [asset_types] or if any of the [asset_types] - # doesn't belong to the source types of the [relationship_types]. - # * Otherwise: - # it snapshots the supported relationships for all [asset_types] or returns - # an error if any of the [asset_types] has no relationship support. - # An unspecified asset types field means all supported asset_types. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - # supported asset types and relationship types. - class ExportAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The export asset response. This message is returned by the - # google.longrunning.Operations.GetOperation - # method in the returned - # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} - # field. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time the snapshot was taken. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Asset::V1::OutputConfig] - # Output configuration indicating where the results were output to. - # @!attribute [rw] output_result - # @return [::Google::Cloud::Asset::V1::OutputResult] - # Output result indicating where the assets were exported to. For example, a - # set of actual Cloud Storage object URIs where the assets are exported to. - # The URIs can be different from what [output_config] has specified, as the - # service will split the output object into multiple ones once it exceeds a - # single Cloud Storage object limit. - class ExportAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListAssets request. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the organization, folder, or project the assets belong - # to. Format: "organizations/[organization-number]" (such as - # "organizations/123"), "projects/[project-id]" (such as - # "projects/my-project-id"), "projects/[project-number]" (such as - # "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp to take an asset snapshot. This can only be set to a timestamp - # between the current time and the current time minus 35 days (inclusive). - # If not specified, the current time will be used. Due to delays in resource - # data collection and indexing, there is a volatile window during which - # running the same query may get different results. - # @!attribute [rw] asset_types - # @return [::Array<::String>] - # A list of asset types to take a snapshot for. For example: - # "compute.googleapis.com/Disk". - # - # Regular expression is also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # - # If specified, only matching assets will be returned, otherwise, it will - # snapshot all asset types. See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types. - # @!attribute [rw] content_type - # @return [::Google::Cloud::Asset::V1::ContentType] - # Asset content type. If not specified, no content but the asset name will - # be returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of assets to be returned in a single response. Default - # is 100, minimum is 1, and maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # The `next_page_token` returned from the previous `ListAssetsResponse`, or - # unspecified for the first `ListAssetsRequest`. It is a continuation of a - # prior `ListAssets` call, and the API should return the next page of assets. - # @!attribute [rw] relationship_types - # @return [::Array<::String>] - # A list of relationship types to output, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it snapshots specified relationships. It returns an error if - # any of the [relationship_types] doesn't belong to the supported - # relationship types of the [asset_types] or if any of the [asset_types] - # doesn't belong to the source types of the [relationship_types]. - # * Otherwise: - # it snapshots the supported relationships for all [asset_types] or returns - # an error if any of the [asset_types] has no relationship support. - # An unspecified asset types field means all supported asset_types. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types and relationship types. - class ListAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListAssets response. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time the snapshot was taken. - # @!attribute [rw] assets - # @return [::Array<::Google::Cloud::Asset::V1::Asset>] - # Assets. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results. It expires 72 hours after the - # page token for the first page is generated. Set to empty if there are no - # remaining results. - class ListAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Batch get assets history request. - # @!attribute [rw] parent - # @return [::String] - # Required. The relative name of the root asset. It can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id")", or a project number (such as "projects/12345"). - # @!attribute [rw] asset_names - # @return [::Array<::String>] - # A list of the full names of the assets. - # See: https://cloud.google.com/asset-inventory/docs/resource-name-format - # Example: - # - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - # - # The request becomes a no-op if the asset name list is empty, and the max - # size of the asset name list is 100 in one request. - # @!attribute [rw] content_type - # @return [::Google::Cloud::Asset::V1::ContentType] - # Optional. The content type. - # @!attribute [rw] read_time_window - # @return [::Google::Cloud::Asset::V1::TimeWindow] - # Optional. The time window for the asset history. Both start_time and - # end_time are optional and if set, it must be after the current time minus - # 35 days. If end_time is not set, it is default to current timestamp. - # If start_time is not set, the snapshot of the assets at end_time will be - # returned. The returned results contain all temporal assets whose time - # window overlap with read_time_window. - # @!attribute [rw] relationship_types - # @return [::Array<::String>] - # Optional. A list of relationship types to output, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it outputs specified relationships' history on the [asset_names]. It - # returns an error if any of the [relationship_types] doesn't belong to the - # supported relationship types of the [asset_names] or if any of the - # [asset_names]'s types doesn't belong to the source types of the - # [relationship_types]. - # * Otherwise: - # it outputs the supported relationships' history on the [asset_names] or - # returns an error if any of the [asset_names]'s types has no relationship - # support. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - # supported asset types and relationship types. - class BatchGetAssetsHistoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Batch get assets history response. - # @!attribute [rw] assets - # @return [::Array<::Google::Cloud::Asset::V1::TemporalAsset>] - # A list of assets with valid time windows. - class BatchGetAssetsHistoryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create asset feed request. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project/folder/organization where this feed - # should be created in. It can only be an organization number (such as - # "organizations/123"), a folder number (such as "folders/123"), a project ID - # (such as "projects/my-project-id"), or a project number (such as - # "projects/12345"). - # @!attribute [rw] feed_id - # @return [::String] - # Required. This is the client-assigned asset feed identifier and it needs to - # be unique under a specific parent project/folder/organization. - # @!attribute [rw] feed - # @return [::Google::Cloud::Asset::V1::Feed] - # Required. The feed details. The field `name` must be empty and it will be - # generated in the format of: projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - class CreateFeedRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get asset feed request. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Feed and it must be in the format of: - # projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - class GetFeedRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List asset feeds request. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project/folder/organization whose feeds are to be - # listed. It can only be using project/folder/organization number (such as - # "folders/12345")", or a project ID (such as "projects/my-project-id"). - class ListFeedsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] feeds - # @return [::Array<::Google::Cloud::Asset::V1::Feed>] - # A list of feeds. - class ListFeedsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update asset feed request. - # @!attribute [rw] feed - # @return [::Google::Cloud::Asset::V1::Feed] - # Required. The new values of feed details. It must match an existing feed - # and the field `name` must be in the format of: - # projects/project_number/feeds/feed_id or - # folders/folder_number/feeds/feed_id or - # organizations/organization_number/feeds/feed_id. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Only updates the `feed` fields indicated by this mask. - # The field mask must not be empty, and it must not contain fields that - # are immutable or only set by the server. - class UpdateFeedRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The name of the feed and it must be in the format of: - # projects/project_number/feeds/feed_id - # folders/folder_number/feeds/feed_id - # organizations/organization_number/feeds/feed_id - class DeleteFeedRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for export assets destination. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::Asset::V1::GcsDestination] - # Destination on Cloud Storage. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::Asset::V1::BigQueryDestination] - # Destination on BigQuery. The output table stores the fields in asset - # Protobuf as columns in BigQuery. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output result of export assets. - # @!attribute [rw] gcs_result - # @return [::Google::Cloud::Asset::V1::GcsOutputResult] - # Export result on Cloud Storage. - class OutputResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Cloud Storage output result. - # @!attribute [rw] uris - # @return [::Array<::String>] - # List of URIs of the Cloud Storage objects. Example: - # "gs://bucket_name/object_name". - class GcsOutputResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Cloud Storage location. - # @!attribute [rw] uri - # @return [::String] - # The URI of the Cloud Storage object. It's the same URI that is used by - # gsutil. Example: "gs://bucket_name/object_name". See [Viewing and - # Editing Object - # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) - # for more information. - # - # If the specified Cloud Storage object already exists and there is no - # [hold](https://cloud.google.com/storage/docs/object-holds), it will be - # overwritten with the exported result. - # - # Note: The following fields are mutually exclusive: `uri`, `uri_prefix`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uri_prefix - # @return [::String] - # The URI prefix of all generated Cloud Storage objects. Example: - # "gs://bucket_name/object_name_prefix". Each object URI is in format: - # "gs://bucket_name/object_name_prefix// and only - # contains assets for that type. starts from 0. Example: - # "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is - # the first shard of output objects containing all - # compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be - # returned if file with the same name "gs://bucket_name/object_name_prefix" - # already exists. - # - # Note: The following fields are mutually exclusive: `uri_prefix`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A BigQuery destination for exporting assets to. - # @!attribute [rw] dataset - # @return [::String] - # Required. The BigQuery dataset in format - # "projects/projectId/datasets/datasetId", to which the snapshot result - # should be exported. If this dataset does not exist, the export call returns - # an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets` - # determines the - # [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema) - # of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also - # influences the schema. - # @!attribute [rw] table - # @return [::String] - # Required. The BigQuery table to which the snapshot result should be - # written. If this table does not exist, a new table with the given name - # will be created. - # @!attribute [rw] force - # @return [::Boolean] - # If the destination table already exists and this flag is `TRUE`, the - # table will be overwritten by the contents of assets snapshot. If the flag - # is `FALSE` or unset and the destination table already exists, the export - # call returns an INVALID_ARGUMEMT error. - # @!attribute [rw] partition_spec - # @return [::Google::Cloud::Asset::V1::PartitionSpec] - # [partition_spec] determines whether to export to partitioned table(s) and - # how to partition the data. - # - # If [partition_spec] is unset or [partition_spec.partition_key] is unset or - # `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to - # non-partitioned table(s). [force] will decide whether to overwrite existing - # table(s). - # - # If [partition_spec] is specified. First, the snapshot results will be - # written to partitioned table(s) with two additional timestamp columns, - # readTime and requestTime, one of which will be the partition key. Secondly, - # in the case when any destination table already exists, it will first try to - # update existing table's schema as necessary by appending additional - # columns. Then, if [force] is `TRUE`, the corresponding partition will be - # overwritten by the snapshot results (data in different partitions will - # remain intact); if [force] is unset or `FALSE`, it will append the data. An - # error will be returned if the schema update or data appension fails. - # @!attribute [rw] separate_tables_per_asset_type - # @return [::Boolean] - # If this flag is `TRUE`, the snapshot results will be written to one or - # multiple tables, each of which contains results of one asset type. The - # [force] and [partition_spec] fields will apply to each of them. - # - # Field [table] will be concatenated with "_" and the asset type names (see - # https://cloud.google.com/asset-inventory/docs/supported-asset-types for - # supported asset types) to construct per-asset-type table names, in which - # all non-alphanumeric characters like "." and "/" will be substituted by - # "_". Example: if field [table] is "mytable" and snapshot results - # contain "storage.googleapis.com/Bucket" assets, the corresponding table - # name will be "mytable_storage_googleapis_com_Bucket". If any of these - # tables does not exist, a new table with the concatenated name will be - # created. - # - # When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of - # each table will include RECORD-type columns mapped to the nested fields in - # the Asset.resource.data field of that asset type (up to the 15 nested level - # BigQuery supports - # (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The - # fields in >15 nested levels will be stored in JSON format string as a child - # column of its parent RECORD column. - # - # If error occurs when exporting to any table, the whole export call will - # return an error but the export results that already succeed will persist. - # Example: if exporting to table_type_A succeeds when exporting to - # table_type_B fails during one export call, the results in table_type_A will - # persist and there will not be partial results persisting in a table. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifications of BigQuery partitioned table as export destination. - # @!attribute [rw] partition_key - # @return [::Google::Cloud::Asset::V1::PartitionSpec::PartitionKey] - # The partition key for BigQuery partitioned table. - class PartitionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This enum is used to determine the partition key column when exporting - # assets to BigQuery partitioned table(s). Note that, if the partition key is - # a timestamp column, the actual partition is based on its date value - # (expressed in UTC. see details in - # https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables). - module PartitionKey - # Unspecified partition key. If used, it means using non-partitioned table. - PARTITION_KEY_UNSPECIFIED = 0 - - # The time when the snapshot is taken. If specified as partition key, the - # result table(s) is partitioned by the additional timestamp column, - # readTime. If [read_time] in ExportAssetsRequest is specified, the - # readTime column's value will be the same as it. Otherwise, its value will - # be the current time that is used to take the snapshot. - READ_TIME = 1 - - # The time when the request is received and started to be processed. If - # specified as partition key, the result table(s) is partitioned by the - # requestTime column, an additional timestamp column representing when the - # request was received. - REQUEST_TIME = 2 - end - end - - # A Pub/Sub destination. - # @!attribute [rw] topic - # @return [::String] - # The name of the Pub/Sub topic to publish to. - # Example: `projects/PROJECT_ID/topics/TOPIC_ID`. - class PubsubDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for asset feed destination. - # @!attribute [rw] pubsub_destination - # @return [::Google::Cloud::Asset::V1::PubsubDestination] - # Destination on Pub/Sub. - class FeedOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An asset feed used to export asset updates to a destinations. - # An asset feed filter controls what updates are exported. - # The asset feed must be created within a project, organization, or - # folder. Supported destinations are: - # Pub/Sub topics. - # @!attribute [rw] name - # @return [::String] - # Required. The format will be - # projects/\\{project_number}/feeds/\\{client-assigned_feed_identifier} or - # folders/\\{folder_number}/feeds/\\{client-assigned_feed_identifier} or - # organizations/\\{organization_number}/feeds/\\{client-assigned_feed_identifier} - # - # The client-assigned feed identifier must be unique within the parent - # project/folder/organization. - # @!attribute [rw] asset_names - # @return [::Array<::String>] - # A list of the full names of the assets to receive updates. You must specify - # either or both of asset_names and asset_types. Only asset updates matching - # specified asset_names or asset_types are exported to the feed. - # Example: - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - # For a list of the full names for supported asset types, see [Resource - # name format](/asset-inventory/docs/resource-name-format). - # @!attribute [rw] asset_types - # @return [::Array<::String>] - # A list of types of the assets to receive updates. You must specify either - # or both of asset_names and asset_types. Only asset updates matching - # specified asset_names or asset_types are exported to the feed. - # Example: `"compute.googleapis.com/Disk"` - # - # For a list of all supported asset types, see - # [Supported asset types](/asset-inventory/docs/supported-asset-types). - # @!attribute [rw] content_type - # @return [::Google::Cloud::Asset::V1::ContentType] - # Asset content type. If not specified, no content but the asset name and - # type will be returned. - # @!attribute [rw] feed_output_config - # @return [::Google::Cloud::Asset::V1::FeedOutputConfig] - # Required. Feed output configuration defining where the asset updates are - # published to. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # A condition which determines whether an asset update should be published. - # If specified, an asset will be returned only when the expression evaluates - # to true. - # When set, `expression` field in the `Expr` must be a valid [CEL expression] - # (https://github.com/google/cel-spec) on a TemporalAsset with name - # `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted - # == true") will only publish Asset deletions. Other fields of `Expr` are - # optional. - # - # See our [user - # guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition) - # for detailed instructions. - # @!attribute [rw] relationship_types - # @return [::Array<::String>] - # A list of relationship types to output, for example: - # `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - # content_type=RELATIONSHIP. - # * If specified: - # it outputs specified relationship updates on the [asset_names] or the - # [asset_types]. It returns an error if any of the [relationship_types] - # doesn't belong to the supported relationship types of the [asset_names] or - # [asset_types], or any of the [asset_names] or the [asset_types] doesn't - # belong to the source types of the [relationship_types]. - # * Otherwise: - # it outputs the supported relationships of the types of [asset_names] and - # [asset_types] or returns an error if any of the [asset_names] or the - # [asset_types] has no replationship support. - # See [Introduction to Cloud Asset - # Inventory](https://cloud.google.com/asset-inventory/docs/overview) - # for all supported asset types and relationship types. - class Feed - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Search all resources request. - # @!attribute [rw] scope - # @return [::String] - # Required. A scope can be a project, a folder, or an organization. The - # search is limited to the resources within the `scope`. The caller must be - # granted the - # [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - # permission on the desired scope. - # - # The allowed values are: - # - # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") - # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") - # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @!attribute [rw] query - # @return [::String] - # Optional. The query statement. See [how to construct a - # query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) - # for more information. If not specified or empty, it will search all the - # resources within the specified `scope`. - # - # Examples: - # - # * `name:Important` to find Google Cloud resources whose name contains - # `Important` as a word. - # * `name=Important` to find the Google Cloud resource whose name is exactly - # `Important`. - # * `displayName:Impor*` to find Google Cloud resources whose display name - # contains `Impor` as a prefix of any word in the field. - # * `location:us-west*` to find Google Cloud resources whose location - # contains both `us` and `west` as prefixes. - # * `labels:prod` to find Google Cloud resources whose labels contain `prod` - # as a key or value. - # * `labels.env:prod` to find Google Cloud resources that have a label `env` - # and its value is `prod`. - # * `labels.env:*` to find Google Cloud resources that have a label `env`. - # * `tagKeys:env` to find Google Cloud resources that have directly - # attached tags where the - # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) - # contains `env`. - # * `tagValues:prod*` to find Google Cloud resources that have directly - # attached tags where the - # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # contains a word prefixed by `prod`. - # * `tagValueIds=tagValues/123` to find Google Cloud resources that have - # directly attached tags where the - # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # is exactly `tagValues/123`. - # * `effectiveTagKeys:env` to find Google Cloud resources that have - # directly attached or inherited tags where the - # [`TagKey.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys#resource:-tagkey) - # contains `env`. - # * `effectiveTagValues:prod*` to find Google Cloud resources that have - # directly attached or inherited tags where the - # [`TagValue.namespacedName`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # contains a word prefixed by `prod`. - # * `effectiveTagValueIds=tagValues/123` to find Google Cloud resources that - # have directly attached or inherited tags where the - # [`TagValue.name`](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues#resource:-tagvalue) - # is exactly `tagValues/123`. - # * `kmsKey:key` to find Google Cloud resources encrypted with a - # customer-managed encryption key whose name contains `key` as a word. This - # field is deprecated. Use the `kmsKeys` field to retrieve Cloud KMS - # key information. - # * `kmsKeys:key` to find Google Cloud resources encrypted with - # customer-managed encryption keys whose name contains the word `key`. - # * `relationships:instance-group-1` to find Google Cloud resources that have - # relationships with `instance-group-1` in the related resource name. - # * `relationships:INSTANCE_TO_INSTANCEGROUP` to find Compute Engine - # instances that have relationships of type `INSTANCE_TO_INSTANCEGROUP`. - # * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find - # Compute Engine instances that have relationships with `instance-group-1` - # in the Compute Engine instance group resource name, for relationship type - # `INSTANCE_TO_INSTANCEGROUP`. - # * `sccSecurityMarks.key=value` to find Cloud resources that are attached - # with security marks whose key is `key` and value is `value`. - # * `sccSecurityMarks.key:*` to find Cloud resources that are attached with - # security marks whose key is `key`. - # * `state:ACTIVE` to find Google Cloud resources whose state contains - # `ACTIVE` as a word. - # * `NOT state:ACTIVE` to find Google Cloud resources whose state doesn't - # contain `ACTIVE` as a word. - # * `createTime<1609459200` to find Google Cloud resources that were created - # before `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of - # `2021-01-01 00:00:00 UTC` in seconds. - # * `updateTime>1609459200` to find Google Cloud resources that were updated - # after `2021-01-01 00:00:00 UTC`. `1609459200` is the epoch timestamp of - # `2021-01-01 00:00:00 UTC` in seconds. - # * `Important` to find Google Cloud resources that contain `Important` as a - # word in any of the searchable fields. - # * `Impor*` to find Google Cloud resources that contain `Impor` as a prefix - # of any word in any of the searchable fields. - # * `Important location:(us-west1 OR global)` to find Google Cloud - # resources that contain `Important` as a word in any of the searchable - # fields and are also located in the `us-west1` region or the `global` - # location. - # @!attribute [rw] asset_types - # @return [::Array<::String>] - # Optional. A list of asset types that this request searches for. If empty, - # it will search all the asset types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots resources whose asset type starts - # with "compute.googleapis.com". - # * ".*Instance" snapshots resources whose asset type ends with "Instance". - # * ".*Instance.*" snapshots resources whose asset type contains "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The page size for search result pagination. Page size is capped - # at 500 even if a larger value is given. If set to zero or a negative value, - # server will pick an appropriate default. Returned results may be fewer than - # requested. When this happens, there could be more results as long as - # `next_page_token` is returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. `page_token` must be the value of - # `next_page_token` from the previous response. The values of all other - # method parameters, must be identical to those in the previous call. - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields specifying the sorting order of - # the results. The default order is ascending. Add " DESC" after the field - # name to indicate descending order. Redundant space characters are ignored. - # Example: "location DESC, name". - # Only the following fields in the response are sortable: - # - # * name - # * assetType - # * project - # * displayName - # * description - # * location - # * createTime - # * updateTime - # * state - # * parentFullResourceName - # * parentAssetType - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. A comma-separated list of fields that you want returned in the - # results. The following fields are returned by default if not specified: - # - # * `name` - # * `assetType` - # * `project` - # * `folders` - # * `organization` - # * `displayName` - # * `description` - # * `location` - # * `labels` - # * `tags` - # * `effectiveTags` - # * `networkTags` - # * `kmsKeys` - # * `createTime` - # * `updateTime` - # * `state` - # * `additionalAttributes` - # * `parentFullResourceName` - # * `parentAssetType` - # - # Some fields of large size, such as `versionedResources`, - # `attachedResources`, `effectiveTags` etc., are not returned by default, but - # you can specify them in the `read_mask` parameter if you want to include - # them. If `"*"` is specified, all [available - # fields](https://cloud.google.com/asset-inventory/docs/reference/rest/v1/TopLevel/searchAllResources#resourcesearchresult) - # are returned. - # Examples: `"name,location"`, `"name,versionedResources"`, `"*"`. - # Any invalid field path will trigger INVALID_ARGUMENT error. - class SearchAllResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Search all resources response. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Asset::V1::ResourceSearchResult>] - # A list of Resources that match the search query. It contains the resource - # standard metadata information. - # @!attribute [rw] next_page_token - # @return [::String] - # If there are more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - class SearchAllResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Search all IAM policies request. - # @!attribute [rw] scope - # @return [::String] - # Required. A scope can be a project, a folder, or an organization. The - # search is limited to the IAM policies within the `scope`. The caller must - # be granted the - # [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - # permission on the desired scope. - # - # The allowed values are: - # - # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") - # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") - # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @!attribute [rw] query - # @return [::String] - # Optional. The query statement. See [how to construct a - # query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) - # for more information. If not specified or empty, it will search all the - # IAM policies within the specified `scope`. Note that the query string is - # compared against each IAM policy binding, including its principals, - # roles, and IAM conditions. The returned IAM policies will only - # contain the bindings that match your query. To learn more about the IAM - # policy structure, see the [IAM policy - # documentation](https://cloud.google.com/iam/help/allow-policies/structure). - # - # Examples: - # - # * `policy:amy@gmail.com` to find IAM policy bindings that specify user - # "amy@gmail.com". - # * `policy:roles/compute.admin` to find IAM policy bindings that specify - # the Compute Admin role. - # * `policy:comp*` to find IAM policy bindings that contain "comp" as a - # prefix of any word in the binding. - # * `policy.role.permissions:storage.buckets.update` to find IAM policy - # bindings that specify a role containing "storage.buckets.update" - # permission. Note that if callers don't have `iam.roles.get` access to a - # role's included permissions, policy bindings that specify this role will - # be dropped from the search results. - # * `policy.role.permissions:upd*` to find IAM policy bindings that specify a - # role containing "upd" as a prefix of any word in the role permission. - # Note that if callers don't have `iam.roles.get` access to a role's - # included permissions, policy bindings that specify this role will be - # dropped from the search results. - # * `resource:organizations/123456` to find IAM policy bindings - # that are set on "organizations/123456". - # * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to - # find IAM policy bindings that are set on the project named "myproject". - # * `Important` to find IAM policy bindings that contain "Important" as a - # word in any of the searchable fields (except for the included - # permissions). - # * `resource:(instance1 OR instance2) policy:amy` to find - # IAM policy bindings that are set on resources "instance1" or - # "instance2" and also specify user "amy". - # * `roles:roles/compute.admin` to find IAM policy bindings that specify the - # Compute Admin role. - # * `memberTypes:user` to find IAM policy bindings that contain the - # principal type "user". - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The page size for search result pagination. Page size is capped - # at 500 even if a larger value is given. If set to zero or a negative value, - # server will pick an appropriate default. Returned results may be fewer than - # requested. When this happens, there could be more results as long as - # `next_page_token` is returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. If present, retrieve the next batch of results from the preceding - # call to this method. `page_token` must be the value of `next_page_token` - # from the previous response. The values of all other method parameters must - # be identical to those in the previous call. - # @!attribute [rw] asset_types - # @return [::Array<::String>] - # Optional. A list of asset types that the IAM policies are attached to. If - # empty, it will search the IAM policies that are attached to all the asset - # types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # - # Regular expressions are also supported. For example: - # - # * "compute.googleapis.com.*" snapshots IAM policies attached to asset type - # starts with "compute.googleapis.com". - # * ".*Instance" snapshots IAM policies attached to asset type ends with - # "Instance". - # * ".*Instance.*" snapshots IAM policies attached to asset type contains - # "Instance". - # - # See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - # regular expression syntax. If the regular expression does not match any - # supported asset type, an INVALID_ARGUMENT error will be returned. - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields specifying the sorting order of - # the results. The default order is ascending. Add " DESC" after the field - # name to indicate descending order. Redundant space characters are ignored. - # Example: "assetType DESC, resource". - # Only singular primitive fields in the response are sortable: - # * resource - # * assetType - # * project - # All the other fields such as repeated fields (e.g., `folders`) and - # non-primitive fields (e.g., `policy`) are not supported. - class SearchAllIamPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Search all IAM policies response. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicySearchResult>] - # A list of IAM policies that match the search query. Related information - # such as the associated resource is returned along with the policy. - # @!attribute [rw] next_page_token - # @return [::String] - # Set if there are more results than those appearing in this response; to get - # the next set of results, call this method again, using this value as the - # `page_token`. - class SearchAllIamPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # IAM policy analysis query message. - # @!attribute [rw] scope - # @return [::String] - # Required. The relative name of the root asset. Only resources and IAM - # policies within the scope will be analyzed. - # - # This can only be an organization number (such as "organizations/123"), a - # folder number (such as "folders/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"). - # - # To know how to get organization ID, visit [here - # ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # - # To know how to get folder or project ID, visit [here - # ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). - # @!attribute [rw] resource_selector - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ResourceSelector] - # Optional. Specifies a resource for analysis. - # @!attribute [rw] identity_selector - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::IdentitySelector] - # Optional. Specifies an identity for analysis. - # @!attribute [rw] access_selector - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::AccessSelector] - # Optional. Specifies roles or permissions for analysis. This is optional. - # @!attribute [rw] options - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options] - # Optional. The query options. - # @!attribute [rw] condition_context - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ConditionContext] - # Optional. The hypothetical context for IAM conditions evaluation. - class IamPolicyAnalysisQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the resource to analyze for access policies, which may be set - # directly on the resource, or on ancestors such as organizations, folders or - # projects. - # @!attribute [rw] full_resource_name - # @return [::String] - # Required. The [full resource name] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of a resource of [supported resource - # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). - class ResourceSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies an identity for which to determine resource access, based on - # roles assigned either directly to them or to the groups they belong to, - # directly or indirectly. - # @!attribute [rw] identity - # @return [::String] - # Required. The identity appear in the form of principals in - # [IAM policy - # binding](https://cloud.google.com/iam/reference/rest/v1/Binding). - # - # The examples of supported forms are: - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com". - # - # Notice that wildcard characters (such as * and ?) are not supported. - # You must give a specific identity. - class IdentitySelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies roles and/or permissions to analyze, to determine both the - # identities possessing them and the resources they control. If multiple - # values are specified, results will include roles or permissions matching - # any of them. The total number of roles and permissions should be equal or - # less than 10. - # @!attribute [rw] roles - # @return [::Array<::String>] - # Optional. The roles to appear in result. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # Optional. The permissions to appear in result. - class AccessSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains query options. - # @!attribute [rw] expand_groups - # @return [::Boolean] - # Optional. If true, the identities section of the result will expand any - # Google groups appearing in an IAM policy binding. - # - # If - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery#identity_selector IamPolicyAnalysisQuery.identity_selector} - # is specified, the identity in the result will be determined by the - # selector, and this flag is not allowed to set. - # - # If true, the default max expansion per group is 1000 for - # AssetService.AnalyzeIamPolicy][]. - # - # Default is false. - # @!attribute [rw] expand_roles - # @return [::Boolean] - # Optional. If true, the access section of result will expand any roles - # appearing in IAM policy bindings to include their permissions. - # - # If - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery#access_selector IamPolicyAnalysisQuery.access_selector} - # is specified, the access section of the result will be determined by the - # selector, and this flag is not allowed to set. - # - # Default is false. - # @!attribute [rw] expand_resources - # @return [::Boolean] - # Optional. If true and - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery#resource_selector IamPolicyAnalysisQuery.resource_selector} - # is not specified, the resource section of the result will expand any - # resource attached to an IAM policy to include resources lower in the - # resource hierarchy. - # - # For example, if the request analyzes for which resources user A has - # permission P, and the results include an IAM policy with P on a Google - # Cloud folder, the results will also include resources in that folder with - # permission P. - # - # If true and - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery#resource_selector IamPolicyAnalysisQuery.resource_selector} - # is specified, the resource section of the result will expand the - # specified resource to include resources lower in the resource hierarchy. - # Only project or lower resources are supported. Folder and organization - # resources cannot be used together with this option. - # - # For example, if the request analyzes for which users have permission P on - # a Google Cloud project with this option enabled, the results will include - # all users who have permission P on that project or any lower resource. - # - # If true, the default max expansion per resource is 1000 for - # AssetService.AnalyzeIamPolicy][] and 100000 for - # AssetService.AnalyzeIamPolicyLongrunning][]. - # - # Default is false. - # @!attribute [rw] output_resource_edges - # @return [::Boolean] - # Optional. If true, the result will output the relevant parent/child - # relationships between resources. Default is false. - # @!attribute [rw] output_group_edges - # @return [::Boolean] - # Optional. If true, the result will output the relevant membership - # relationships between groups and other groups, and between groups and - # principals. Default is false. - # @!attribute [rw] analyze_service_account_impersonation - # @return [::Boolean] - # Optional. If true, the response will include access analysis from - # identities to resources via service account impersonation. This is a very - # expensive operation, because many derived queries will be executed. We - # highly recommend you use - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning AssetService.AnalyzeIamPolicyLongrunning} - # RPC instead. - # - # For example, if the request analyzes for which resources user A has - # permission P, and there's an IAM policy states user A has - # iam.serviceAccounts.getAccessToken permission to a service account SA, - # and there's another IAM policy states service account SA has permission P - # to a Google Cloud folder F, then user A potentially has access to the - # Google Cloud folder F. And those advanced analysis results will be - # included in - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse#service_account_impersonation_analysis AnalyzeIamPolicyResponse.service_account_impersonation_analysis}. - # - # Another example, if the request analyzes for who has - # permission P to a Google Cloud folder F, and there's an IAM policy states - # user A has iam.serviceAccounts.actAs permission to a service account SA, - # and there's another IAM policy states service account SA has permission P - # to the Google Cloud folder F, then user A potentially has access to the - # Google Cloud folder F. And those advanced analysis results will be - # included in - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse#service_account_impersonation_analysis AnalyzeIamPolicyResponse.service_account_impersonation_analysis}. - # - # Only the following permissions are considered in this analysis: - # - # * `iam.serviceAccounts.actAs` - # * `iam.serviceAccounts.signBlob` - # * `iam.serviceAccounts.signJwt` - # * `iam.serviceAccounts.getAccessToken` - # * `iam.serviceAccounts.getOpenIdToken` - # * `iam.serviceAccounts.implicitDelegation` - # - # Default is false. - class Options - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The IAM conditions context. - # @!attribute [rw] access_time - # @return [::Google::Protobuf::Timestamp] - # The hypothetical access timestamp to evaluate IAM conditions. Note that - # this value must not be earlier than the current time; otherwise, an - # INVALID_ARGUMENT error will be returned. - class ConditionContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A request message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy AssetService.AnalyzeIamPolicy}. - # @!attribute [rw] analysis_query - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery] - # Required. The request query. - # @!attribute [rw] saved_analysis_query - # @return [::String] - # Optional. The name of a saved query, which must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # - # If both `analysis_query` and `saved_analysis_query` are provided, they - # will be merged together with the `saved_analysis_query` as base and - # the `analysis_query` as overrides. For more details of the merge behavior, - # refer to the - # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) - # page. - # - # Note that you cannot override primitive fields with default value, such as - # 0 or empty string, etc., because we use proto3, which doesn't support field - # presence yet. - # @!attribute [rw] execution_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Amount of time executable has to complete. See JSON - # representation of - # [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). - # - # If this field is set with a value less than the RPC deadline, and the - # execution of your query hasn't finished in the specified - # execution timeout, you will get a response with partial result. - # Otherwise, your query's execution will continue until the RPC deadline. - # If it's not finished until then, you will get a DEADLINE_EXCEEDED error. - # - # Default is empty. - class AnalyzeIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy AssetService.AnalyzeIamPolicy}. - # @!attribute [rw] main_analysis - # @return [::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse::IamPolicyAnalysis] - # The main analysis that matches the original request. - # @!attribute [rw] service_account_impersonation_analysis - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse::IamPolicyAnalysis>] - # The service account impersonation analysis if - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options#analyze_service_account_impersonation IamPolicyAnalysisQuery.Options.analyze_service_account_impersonation} - # is enabled. - # @!attribute [rw] fully_explored - # @return [::Boolean] - # Represents whether all entries in the - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse#main_analysis main_analysis} - # and - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse#service_account_impersonation_analysis service_account_impersonation_analysis} - # have been fully explored to answer the query in the request. - class AnalyzeIamPolicyResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An analysis message to group the query and results. - # @!attribute [rw] analysis_query - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery] - # The analysis query. - # @!attribute [rw] analysis_results - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult>] - # A list of - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult IamPolicyAnalysisResult} - # that matches the analysis query, or empty if no result is found. - # @!attribute [rw] fully_explored - # @return [::Boolean] - # Represents whether all entries in the - # {::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse::IamPolicyAnalysis#analysis_results analysis_results} - # have been fully explored to answer the query. - # @!attribute [rw] non_critical_errors - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisState>] - # A list of non-critical errors happened during the query handling. - class IamPolicyAnalysis - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Output configuration for export IAM policy analysis destination. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig::GcsDestination] - # Destination on Cloud Storage. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig::BigQueryDestination] - # Destination on BigQuery. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class IamPolicyAnalysisOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A Cloud Storage location. - # @!attribute [rw] uri - # @return [::String] - # Required. The URI of the Cloud Storage object. It's the same URI that is - # used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and - # Editing Object - # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) - # for more information. - # - # If the specified Cloud Storage object already exists and there is no - # [hold](https://cloud.google.com/storage/docs/object-holds), it will be - # overwritten with the analysis result. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A BigQuery destination. - # @!attribute [rw] dataset - # @return [::String] - # Required. The BigQuery dataset in format - # "projects/projectId/datasets/datasetId", to which the analysis results - # should be exported. If this dataset does not exist, the export call will - # return an INVALID_ARGUMENT error. - # @!attribute [rw] table_prefix - # @return [::String] - # Required. The prefix of the BigQuery tables to which the analysis results - # will be written. Tables will be created based on this table_prefix if not - # exist: - # * _analysis table will contain export operation's metadata. - # * _analysis_result will contain all the - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult IamPolicyAnalysisResult}. - # When [partition_key] is specified, both tables will be partitioned based - # on the [partition_key]. - # @!attribute [rw] partition_key - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig::BigQueryDestination::PartitionKey] - # The partition key for BigQuery partitioned table. - # @!attribute [rw] write_disposition - # @return [::String] - # Optional. Specifies the action that occurs if the destination table or - # partition already exists. The following values are supported: - # - # * WRITE_TRUNCATE: If the table or partition already exists, BigQuery - # overwrites the entire table or all the partitions data. - # * WRITE_APPEND: If the table or partition already exists, BigQuery - # appends the data to the table or the latest partition. - # * WRITE_EMPTY: If the table already exists and contains data, an error is - # returned. - # - # The default value is WRITE_APPEND. Each action is atomic and only occurs - # if BigQuery is able to complete the job successfully. Details are at - # https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This enum determines the partition key column for the bigquery tables. - # Partitioning can improve query performance and reduce query cost by - # filtering partitions. Refer to - # https://cloud.google.com/bigquery/docs/partitioned-tables for details. - module PartitionKey - # Unspecified partition key. Tables won't be partitioned using this - # option. - PARTITION_KEY_UNSPECIFIED = 0 - - # The time when the request is received. If specified as partition key, - # the result table(s) is partitioned by the RequestTime column, an - # additional timestamp column representing when the request was received. - REQUEST_TIME = 1 - end - end - end - - # A request message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning AssetService.AnalyzeIamPolicyLongrunning}. - # @!attribute [rw] analysis_query - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery] - # Required. The request query. - # @!attribute [rw] saved_analysis_query - # @return [::String] - # Optional. The name of a saved query, which must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # - # If both `analysis_query` and `saved_analysis_query` are provided, they - # will be merged together with the `saved_analysis_query` as base and - # the `analysis_query` as overrides. For more details of the merge behavior, - # refer to the - # [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) - # doc. - # - # Note that you cannot override primitive fields with default value, such as - # 0 or empty string, etc., because we use proto3, which doesn't support field - # presence yet. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig] - # Required. Output configuration indicating where the results will be output - # to. - class AnalyzeIamPolicyLongrunningRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning AssetService.AnalyzeIamPolicyLongrunning}. - class AnalyzeIamPolicyLongrunningResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A saved query which can be shared with others or used later. - # @!attribute [rw] name - # @return [::String] - # The resource name of the saved query. The format must be: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # @!attribute [rw] description - # @return [::String] - # The description of this saved query. This value should be fewer than 255 - # characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The create time of this saved query. - # @!attribute [r] creator - # @return [::String] - # Output only. The account's email address who has created this saved query. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update time of this saved query. - # @!attribute [r] last_updater - # @return [::String] - # Output only. The account's email address who has updated this saved query - # most recently. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels applied on the resource. - # This value should not contain more than 10 entries. The key and value of - # each entry must be non-empty and fewer than 64 characters. - # @!attribute [rw] content - # @return [::Google::Cloud::Asset::V1::SavedQuery::QueryContent] - # The query content. - class SavedQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The query content. - # @!attribute [rw] iam_policy_analysis_query - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery] - # An IAM Policy Analysis query, which could be used in - # the - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy AssetService.AnalyzeIamPolicy} - # RPC or the - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning AssetService.AnalyzeIamPolicyLongrunning} - # RPC. - class QueryContent - 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 - - # Request to create a saved query. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project/folder/organization where this - # saved_query should be created in. It can only be an organization number - # (such as "organizations/123"), a folder number (such as "folders/123"), a - # project ID (such as "projects/my-project-id"), or a project number (such as - # "projects/12345"). - # @!attribute [rw] saved_query - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # Required. The saved_query details. The `name` field must be empty as it - # will be generated based on the parent and saved_query_id. - # @!attribute [rw] saved_query_id - # @return [::String] - # Required. The ID to use for the saved query, which must be unique in the - # specified parent. It will become the final component of the saved query's - # resource name. - # - # This value should be 4-63 characters, and valid characters - # are `[a-z][0-9]-`. - # - # Notice that this field is required in the saved query creation, and the - # `name` field of the `saved_query` will be ignored. - class CreateSavedQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a saved query. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the saved query and it must be in the format of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - class GetSavedQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list saved queries. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project/folder/organization whose savedQueries are to - # be listed. It can only be using project/folder/organization number (such as - # "folders/12345")", or a project ID (such as "projects/my-project-id"). - # @!attribute [rw] filter - # @return [::String] - # Optional. The expression to filter resources. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. When `AND` and `OR` are both used in the - # expression, parentheses must be appropriately used to group the - # combinations. The expression may also contain regular expressions. - # - # See https://google.aip.dev/160 for more information on the grammar. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of saved queries to return per page. The - # service may return fewer than this value. If unspecified, at most 50 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 `ListSavedQueries` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListSavedQueries` must - # match the call that provided the page token. - class ListSavedQueriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of listing saved queries. - # @!attribute [rw] saved_queries - # @return [::Array<::Google::Cloud::Asset::V1::SavedQuery>] - # A list of savedQueries. - # @!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 ListSavedQueriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a saved query. - # @!attribute [rw] saved_query - # @return [::Google::Cloud::Asset::V1::SavedQuery] - # Required. The saved query to update. - # - # The saved query's `name` field is used to identify the one to update, - # which has format as below: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - class UpdateSavedQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a saved query. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the saved query to delete. It must be in the format - # of: - # - # * projects/project_number/savedQueries/saved_query_id - # * folders/folder_number/savedQueries/saved_query_id - # * organizations/organization_number/savedQueries/saved_query_id - class DeleteSavedQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for performing resource move analysis. - # @!attribute [rw] resource - # @return [::String] - # Required. Name of the resource to perform the analysis against. - # Only Google Cloud projects are supported as of today. Hence, this can only - # be a project ID (such as "projects/my-project-id") or a project number - # (such as "projects/12345"). - # @!attribute [rw] destination_parent - # @return [::String] - # Required. Name of the Google Cloud folder or organization to reparent the - # target resource. The analysis will be performed against hypothetically - # moving the resource to this specified destination parent. This can only be - # a folder number (such as "folders/123") or an organization number (such as - # "organizations/123"). - # @!attribute [rw] view - # @return [::Google::Cloud::Asset::V1::AnalyzeMoveRequest::AnalysisView] - # Analysis view indicating what information should be included in the - # analysis response. If unspecified, the default view is FULL. - class AnalyzeMoveRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # View enum for supporting partial analysis responses. - module AnalysisView - # The default/unset value. - # The API will default to the FULL view. - ANALYSIS_VIEW_UNSPECIFIED = 0 - - # Full analysis including all level of impacts of the specified resource - # move. - FULL = 1 - - # Basic analysis only including blockers which will prevent the specified - # resource move at runtime. - BASIC = 2 - end - end - - # The response message for resource move analysis. - # @!attribute [rw] move_analysis - # @return [::Array<::Google::Cloud::Asset::V1::MoveAnalysis>] - # The list of analyses returned from performing the intended resource move - # analysis. The analysis is grouped by different Google Cloud services. - class AnalyzeMoveResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message to group the analysis information. - # @!attribute [rw] display_name - # @return [::String] - # The user friendly display name of the analysis. E.g. IAM, organization - # policy etc. - # @!attribute [rw] analysis - # @return [::Google::Cloud::Asset::V1::MoveAnalysisResult] - # Analysis result of moving the target resource. - # - # Note: The following fields are mutually exclusive: `analysis`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Description of error encountered when performing the analysis. - # - # Note: The following fields are mutually exclusive: `error`, `analysis`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MoveAnalysis - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An analysis result including blockers and warnings. - # @!attribute [rw] blockers - # @return [::Array<::Google::Cloud::Asset::V1::MoveImpact>] - # Blocking information that would prevent the target resource from moving - # to the specified destination at runtime. - # @!attribute [rw] warnings - # @return [::Array<::Google::Cloud::Asset::V1::MoveImpact>] - # Warning information indicating that moving the target resource to the - # specified destination might be unsafe. This can include important policy - # information and configuration changes, but will not block moves at runtime. - class MoveAnalysisResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message to group impacts of moving the target resource. - # @!attribute [rw] detail - # @return [::String] - # User friendly impact detail in a free form message. - class MoveImpact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration query assets. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig::BigQueryDestination] - # BigQuery destination where the query results will be saved. - class QueryAssetsOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # BigQuery destination. - # @!attribute [rw] dataset - # @return [::String] - # Required. The BigQuery dataset where the query results will be saved. It - # has the format of "projects/\\{projectId}/datasets/\\{datasetId}". - # @!attribute [rw] table - # @return [::String] - # Required. The BigQuery table where the query results will be saved. If - # this table does not exist, a new table with the given name will be - # created. - # @!attribute [rw] write_disposition - # @return [::String] - # Specifies the action that occurs if the destination table or partition - # already exists. The following values are supported: - # - # * WRITE_TRUNCATE: If the table or partition already exists, BigQuery - # overwrites the entire table or all the partitions data. - # * WRITE_APPEND: If the table or partition already exists, BigQuery - # appends the data to the table or the latest partition. - # * WRITE_EMPTY: If the table already exists and contains data, a - # 'duplicate' error is returned in the job result. - # - # The default value is WRITE_EMPTY. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # QueryAssets request. - # @!attribute [rw] parent - # @return [::String] - # Required. The relative name of the root asset. This can only be an - # organization number (such as "organizations/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"), - # or a folder number (such as "folders/123"). - # - # Only assets belonging to the `parent` will be returned. - # @!attribute [rw] statement - # @return [::String] - # Optional. A SQL statement that's compatible with [BigQuery - # SQL](https://cloud.google.com/bigquery/docs/introduction-sql). - # - # Note: The following fields are mutually exclusive: `statement`, `job_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] job_reference - # @return [::String] - # Optional. Reference to the query job, which is from the - # `QueryAssetsResponse` of previous `QueryAssets` call. - # - # Note: The following fields are mutually exclusive: `job_reference`, `statement`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of rows to return in the results. Responses - # are limited to 10 MB and 1000 rows. - # - # By default, the maximum row count is 1000. When the byte or row count limit - # is reached, the rest of the query results will be paginated. - # - # The field will be ignored when [output_config] is specified. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token received from previous `QueryAssets`. - # - # The field will be ignored when [output_config] is specified. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the maximum amount of time that the client is willing - # to wait for the query to complete. By default, this limit is 5 min for the - # first query, and 1 minute for the following queries. If the query is - # complete, the `done` field in the `QueryAssetsResponse` is true, otherwise - # false. - # - # Like BigQuery [jobs.query - # API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) - # The call is not guaranteed to wait for the specified timeout; it typically - # returns after around 200 seconds (200,000 milliseconds), even if the query - # is not complete. - # - # The field will be ignored when [output_config] is specified. - # @!attribute [rw] read_time_window - # @return [::Google::Cloud::Asset::V1::TimeWindow] - # Optional. [start_time] is required. [start_time] must be less than - # [end_time] Defaults [end_time] to now if [start_time] is set and - # [end_time] isn't. Maximum permitted time range is 7 days. - # - # Note: The following fields are mutually exclusive: `read_time_window`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Queries cloud assets as they appeared at the specified point in - # time. - # - # Note: The following fields are mutually exclusive: `read_time`, `read_time_window`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig] - # Optional. Destination where the query results will be saved. - # - # When this field is specified, the query results won't be saved in the - # [QueryAssetsResponse.query_result]. Instead - # [QueryAssetsResponse.output_config] will be set. - # - # Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used - # to check the status of the query job when passed to a following - # [QueryAssets] API call. - class QueryAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # QueryAssets response. - # @!attribute [rw] job_reference - # @return [::String] - # Reference to a query job. - # @!attribute [rw] done - # @return [::Boolean] - # The query response, which can be either an `error` or a valid `response`. - # - # If `done` == `false` and the query result is being saved in an output, the - # output_config field will be set. - # If `done` == `true`, exactly one of - # `error`, `query_result` or `output_config` will be set. - # [done] is unset unless the [QueryAssetsResponse] contains a - # [QueryAssetsResponse.job_reference]. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Error status. - # - # Note: The following fields are mutually exclusive: `error`, `query_result`, `output_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] query_result - # @return [::Google::Cloud::Asset::V1::QueryResult] - # Result of the query. - # - # Note: The following fields are mutually exclusive: `query_result`, `error`, `output_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig] - # Output configuration, which indicates that instead of being returned in - # an API response on the fly, the query result will be saved in a specific - # output. - # - # Note: The following fields are mutually exclusive: `output_config`, `error`, `query_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class QueryAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Execution results of the query. - # - # The result is formatted as rows represented by BigQuery compatible [schema]. - # When pagination is necessary, it will contains the page token to retrieve - # the results of following pages. - # @!attribute [rw] rows - # @return [::Array<::Google::Protobuf::Struct>] - # Each row hold a query result in the format of `Struct`. - # @!attribute [rw] schema - # @return [::Google::Cloud::Asset::V1::TableSchema] - # Describes the format of the [rows]. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of the results. - # @!attribute [rw] total_rows - # @return [::Integer] - # Total rows of the whole query results. - class QueryResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BigQuery Compatible table schema. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Asset::V1::TableFieldSchema>] - # Describes the fields in a table. - class TableSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A field in TableSchema. - # @!attribute [rw] field - # @return [::String] - # The field name. The name must contain only letters (a-z, A-Z), - # numbers (0-9), or underscores (_), and must start with a letter or - # underscore. The maximum length is 128 characters. - # @!attribute [rw] type - # @return [::String] - # The field data type. Possible values include - # * STRING - # * BYTES - # * INTEGER - # * FLOAT - # * BOOLEAN - # * TIMESTAMP - # * DATE - # * TIME - # * DATETIME - # * GEOGRAPHY, - # * NUMERIC, - # * BIGNUMERIC, - # * RECORD - # (where RECORD indicates that the field contains a nested schema). - # @!attribute [rw] mode - # @return [::String] - # The field mode. Possible values include NULLABLE, REQUIRED and - # REPEATED. The default value is NULLABLE. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Asset::V1::TableFieldSchema>] - # Describes the nested schema fields if the type property is set - # to RECORD. - class TableFieldSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request message for - # {::Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies AssetService.BatchGetEffectiveIamPolicies}. - # @!attribute [rw] scope - # @return [::String] - # Required. Only IAM policies on or below the scope will be returned. - # - # This can only be an organization number (such as "organizations/123"), a - # folder number (such as "folders/123"), a project ID (such as - # "projects/my-project-id"), or a project number (such as "projects/12345"). - # - # To know how to get organization ID, visit [here - # ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # - # To know how to get folder or project ID, visit [here - # ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The names refer to the [full_resource_names] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the asset types [supported by search - # APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - # A maximum of 20 resources' effective policies can be retrieved in a batch. - class BatchGetEffectiveIamPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response message for - # {::Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies AssetService.BatchGetEffectiveIamPolicies}. - # @!attribute [rw] policy_results - # @return [::Array<::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy>] - # The effective policies for a batch of resources. Note that the results - # order is the same as the order of - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest#names BatchGetEffectiveIamPoliciesRequest.names}. - # When a resource does not have any effective IAM policies, its corresponding - # policy_result will contain empty - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#policies EffectiveIamPolicy.policies}. - class BatchGetEffectiveIamPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The effective IAM policies on one resource. - # @!attribute [rw] full_resource_name - # @return [::String] - # The [full_resource_name] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) - # for which the - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#policies policies} - # are computed. This is one of the - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest#names BatchGetEffectiveIamPoliciesRequest.names} - # the caller provides in the request. - # @!attribute [rw] policies - # @return [::Array<::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo>] - # The effective policies for the - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#full_resource_name full_resource_name}. - # - # These policies include the policy set on the - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#full_resource_name full_resource_name} - # and those set on its parents and ancestors up to the - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest#scope BatchGetEffectiveIamPoliciesRequest.scope}. - # Note that these policies are not filtered according to the resource type - # of the - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#full_resource_name full_resource_name}. - # - # These policies are hierarchically ordered by - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#attached_resource PolicyInfo.attached_resource} - # starting from - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy#full_resource_name full_resource_name} - # itself to its parents and ancestors, such that policies[i]'s - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#attached_resource PolicyInfo.attached_resource} - # is the child of policies[i+1]'s - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#attached_resource PolicyInfo.attached_resource}, - # if policies[i+1] exists. - class EffectiveIamPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The IAM policy and its attached resource. - # @!attribute [rw] attached_resource - # @return [::String] - # The full resource name the - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#policy policy} - # is directly attached to. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # The IAM policy that's directly attached to the - # {::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy::PolicyInfo#attached_resource attached_resource}. - class PolicyInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # This organization policy message is a modified version of the one defined in - # the Organization Policy system. This message contains several fields defined - # in the original organization policy with some new fields for analysis - # purpose. - # @!attribute [rw] attached_resource - # @return [::String] - # The [full resource name] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of - # an organization/folder/project resource where this organization policy is - # set. - # - # Notice that some type of constraints are defined with default policy. This - # field will be empty for them. - # @!attribute [rw] applied_resource - # @return [::String] - # The [full resource name] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of - # an organization/folder/project resource where this organization policy - # applies to. - # - # For any user defined org policies, this field has the same value as - # the [attached_resource] field. Only for default policy, this field has - # the different value. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicy::Rule>] - # List of rules for this organization policy. - # @!attribute [rw] inherit_from_parent - # @return [::Boolean] - # If `inherit_from_parent` is true, Rules set higher up in the - # hierarchy (up to the closest root) are inherited and present in the - # effective policy. If it is false, then no rules are inherited, and this - # policy becomes the effective root for evaluation. - # @!attribute [rw] reset - # @return [::Boolean] - # Ignores policies set above this resource and restores the default behavior - # of the constraint at this resource. - # This field can be set in policies for either list or boolean - # constraints. If set, `rules` must be empty and `inherit_from_parent` - # must be set to false. - class AnalyzerOrgPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This rule message is a customized version of the one defined in the - # Organization Policy system. In addition to the fields defined in the - # original organization policy, it contains additional field(s) under - # specific circumstances to support analysis results. - # @!attribute [rw] values - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicy::Rule::StringValues] - # List of values to be used for this policy rule. This field can be set - # only in policies for list constraints. - # - # Note: The following fields are mutually exclusive: `values`, `allow_all`, `deny_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] allow_all - # @return [::Boolean] - # Setting this to true means that all values are allowed. This field can - # be set only in Policies for list constraints. - # - # Note: The following fields are mutually exclusive: `allow_all`, `values`, `deny_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deny_all - # @return [::Boolean] - # Setting this to true means that all values are denied. This field can - # be set only in Policies for list constraints. - # - # Note: The following fields are mutually exclusive: `deny_all`, `values`, `allow_all`, `enforce`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] enforce - # @return [::Boolean] - # If `true`, then the `Policy` is enforced. If `false`, then any - # configuration is acceptable. - # This field can be set only in Policies for boolean constraints. - # - # Note: The following fields are mutually exclusive: `enforce`, `values`, `allow_all`, `deny_all`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The evaluating condition for this rule. - # @!attribute [rw] condition_evaluation - # @return [::Google::Cloud::Asset::V1::ConditionEvaluation] - # The condition evaluation result for this rule. - # Only populated if it meets all the following criteria: - # - # * There is a - # {::Google::Cloud::Asset::V1::AnalyzerOrgPolicy::Rule#condition condition} - # defined for this rule. - # * This rule is within - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer#consolidated_policy AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.consolidated_policy}, - # or - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset#consolidated_policy AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.consolidated_policy} - # when the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset} - # has - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset#governed_resource AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.governed_resource}. - class Rule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The string values for the list constraints. - # @!attribute [rw] allowed_values - # @return [::Array<::String>] - # List of values allowed at this resource. - # @!attribute [rw] denied_values - # @return [::Array<::String>] - # List of values denied at this resource. - class StringValues - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # The organization policy constraint definition. - # @!attribute [rw] google_defined_constraint - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::Constraint] - # The definition of the canned constraint defined by Google. - # - # Note: The following fields are mutually exclusive: `google_defined_constraint`, `custom_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_constraint - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint] - # The definition of the custom constraint. - # - # Note: The following fields are mutually exclusive: `custom_constraint`, `google_defined_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AnalyzerOrgPolicyConstraint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The definition of a constraint. - # @!attribute [rw] name - # @return [::String] - # The unique name of the constraint. Format of the name should be - # * `constraints/{constraint_name}` - # - # For example, `constraints/compute.disableSerialPortAccess`. - # @!attribute [rw] display_name - # @return [::String] - # The human readable name of the constraint. - # @!attribute [rw] description - # @return [::String] - # Detailed description of what this `Constraint` controls as well as how - # and where it is enforced. - # @!attribute [rw] constraint_default - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::Constraint::ConstraintDefault] - # The evaluation behavior of this constraint in the absence of 'Policy'. - # @!attribute [rw] list_constraint - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::Constraint::ListConstraint] - # Defines this constraint as being a ListConstraint. - # - # Note: The following fields are mutually exclusive: `list_constraint`, `boolean_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] boolean_constraint - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::Constraint::BooleanConstraint] - # Defines this constraint as being a BooleanConstraint. - # - # Note: The following fields are mutually exclusive: `boolean_constraint`, `list_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Constraint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A `Constraint` that allows or disallows a list of string values, which - # are configured by an organization's policy administrator with a `Policy`. - # @!attribute [rw] supports_in - # @return [::Boolean] - # Indicates whether values grouped into categories can be used in - # `Policy.allowed_values` and `Policy.denied_values`. For example, - # `"in:Python"` would match any value in the 'Python' group. - # @!attribute [rw] supports_under - # @return [::Boolean] - # Indicates whether subtrees of Cloud Resource Manager resource hierarchy - # can be used in `Policy.allowed_values` and `Policy.denied_values`. For - # example, `"under:folders/123"` would match any resource under the - # 'folders/123' folder. - class ListConstraint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A `Constraint` that is either enforced or not. - # - # For example a constraint `constraints/compute.disableSerialPortAccess`. - # If it is enforced on a VM instance, serial port connections will not be - # opened to that instance. - class BooleanConstraint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the default behavior in the absence of any `Policy` for the - # `Constraint`. This must not be `CONSTRAINT_DEFAULT_UNSPECIFIED`. - module ConstraintDefault - # This is only used for distinguishing unset values and should never be - # used. - CONSTRAINT_DEFAULT_UNSPECIFIED = 0 - - # Indicate that all values are allowed for list constraints. - # Indicate that enforcement is off for boolean constraints. - ALLOW = 1 - - # Indicate that all values are denied for list constraints. - # Indicate that enforcement is on for boolean constraints. - DENY = 2 - end - end - - # The definition of a custom constraint. - # @!attribute [rw] name - # @return [::String] - # Name of the constraint. This is unique within the organization. Format of - # the name should be - # * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` - # - # Example : - # "organizations/123/customConstraints/custom.createOnlyE2TypeVms" - # @!attribute [rw] resource_types - # @return [::Array<::String>] - # The Resource Instance type on which this policy applies to. Format will - # be of the form : "/" Example: - # * `compute.googleapis.com/Instance`. - # @!attribute [rw] method_types - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType>] - # All the operations being applied for this constraint. - # @!attribute [rw] condition - # @return [::String] - # Organization Policy condition/expression. For example: - # `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or, - # `resource.management.auto_upgrade == true` - # @!attribute [rw] action_type - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType] - # Allow or deny type. - # @!attribute [rw] display_name - # @return [::String] - # One line display name for the UI. - # @!attribute [rw] description - # @return [::String] - # Detailed information about this custom policy constraint. - class CustomConstraint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The operation in which this constraint will be applied. For example: - # If the constraint applies only when create VMs, the method_types will be - # "CREATE" only. If the constraint applied when create or delete VMs, the - # method_types will be "CREATE" and "DELETE". - module MethodType - # Unspecified. Will results in user error. - METHOD_TYPE_UNSPECIFIED = 0 - - # Constraint applied when creating the resource. - CREATE = 1 - - # Constraint applied when updating the resource. - UPDATE = 2 - - # Constraint applied when deleting the resource. - DELETE = 3 - - # Constraint applied when removing an IAM grant. - REMOVE_GRANT = 4 - - # Constraint applied when enforcing forced tagging. - GOVERN_TAGS = 5 - end - - # Allow or deny type. - module ActionType - # Unspecified. Will results in user error. - ACTION_TYPE_UNSPECIFIED = 0 - - # Allowed action type. - ALLOW = 1 - - # Deny action type. - DENY = 2 - end - end - end - - # A request message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies AssetService.AnalyzeOrgPolicies}. - # @!attribute [rw] scope - # @return [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @!attribute [rw] constraint - # @return [::String] - # Required. The name of the constraint to analyze organization policies for. - # The response only contains analyzed organization policies for the provided - # constraint. - # @!attribute [rw] filter - # @return [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results}. - # Filtering is currently available for bare literal values and the following - # fields: - # * consolidated_policy.attached_resource - # * consolidated_policy.rules.enforce - # - # When filtering by a specific field, the only supported operator is `=`. - # For example, filtering by - # consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" - # will return all the Organization Policy results attached to "folders/001". - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results} - # will contain 20 items with a maximum of 200. - # @!attribute [rw] page_token - # @return [::String] - # The pagination token to retrieve the next page. - class AnalyzeOrgPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies AssetService.AnalyzeOrgPolicies}. - # @!attribute [rw] org_policy_results - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult>] - # The organization policies under the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest#scope AnalyzeOrgPoliciesRequest.scope} - # with the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest#constraint AnalyzeOrgPoliciesRequest.constraint}. - # @!attribute [rw] constraint - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint] - # The definition of the constraint in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The page token to fetch the next page for - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse#org_policy_results AnalyzeOrgPoliciesResponse.org_policy_results}. - class AnalyzeOrgPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The organization policy result to the query. - # @!attribute [rw] consolidated_policy - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicy] - # The consolidated organization policy for the analyzed resource. The - # consolidated organization policy is computed by merging and evaluating - # {::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult#policy_bundle policy_bundle}. - # The evaluation will respect the organization policy [hierarchy - # rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). - # @!attribute [rw] policy_bundle - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicy>] - # The ordered list of all organization policies from the - # {::Google::Cloud::Asset::V1::AnalyzerOrgPolicy#attached_resource consolidated_policy.attached_resource}. - # to the scope specified in the request. - # - # If the constraint is defined with default policy, it will also appear in - # the list. - # @!attribute [rw] project - # @return [::String] - # The project that this consolidated policy belongs to, in the format of - # projects/\\{PROJECT_NUMBER}. This field is available when the consolidated - # policy belongs to a project. - # @!attribute [rw] folders - # @return [::Array<::String>] - # The folder(s) that this consolidated policy belongs to, in the format of - # folders/\\{FOLDER_NUMBER}. This field is available when the consolidated - # policy belongs (directly or cascadingly) to one or more folders. - # @!attribute [rw] organization - # @return [::String] - # The organization that this consolidated policy belongs to, in the format - # of organizations/\\{ORGANIZATION_NUMBER}. This field is available when the - # consolidated policy belongs (directly or cascadingly) to an organization. - class OrgPolicyResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A request message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers AssetService.AnalyzeOrgPolicyGovernedContainers}. - # @!attribute [rw] scope - # @return [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. The output containers will - # also be limited to the ones governed by those in-scope organization - # policies. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @!attribute [rw] constraint - # @return [::String] - # Required. The name of the constraint to analyze governed containers for. - # The analysis only contains organization policies for the provided - # constraint. - # @!attribute [rw] filter - # @return [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers}. - # Filtering is currently available for bare literal values and the following - # fields: - # * parent - # * consolidated_policy.rules.enforce - # - # When filtering by a specific field, the only supported operator is `=`. - # For example, filtering by - # parent="//cloudresourcemanager.googleapis.com/folders/001" - # will return all the containers under "folders/001". - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers} - # will contain 100 items with a maximum of 200. - # @!attribute [rw] page_token - # @return [::String] - # The pagination token to retrieve the next page. - class AnalyzeOrgPolicyGovernedContainersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers AssetService.AnalyzeOrgPolicyGovernedContainers}. - # @!attribute [rw] governed_containers - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer>] - # The list of the analyzed governed containers. - # @!attribute [rw] constraint - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint] - # The definition of the constraint in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The page token to fetch the next page for - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse#governed_containers AnalyzeOrgPolicyGovernedContainersResponse.governed_containers}. - class AnalyzeOrgPolicyGovernedContainersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The organization/folder/project resource governed by organization policies - # of - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest#constraint AnalyzeOrgPolicyGovernedContainersRequest.constraint}. - # @!attribute [rw] full_resource_name - # @return [::String] - # The [full resource name] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of - # an organization/folder/project resource. - # @!attribute [rw] parent - # @return [::String] - # The [full resource name] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of - # the parent of - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer#full_resource_name AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name}. - # @!attribute [rw] consolidated_policy - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicy] - # The consolidated organization policy for the analyzed resource. The - # consolidated organization policy is computed by merging and evaluating - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer#policy_bundle AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle}. - # The evaluation will respect the organization policy [hierarchy - # rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). - # @!attribute [rw] policy_bundle - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicy>] - # The ordered list of all organization policies from the - # {::Google::Cloud::Asset::V1::AnalyzerOrgPolicy#attached_resource consolidated_policy.attached_resource}. - # to the scope specified in the request. - # - # If the constraint is defined with default policy, it will also appear in - # the list. - # @!attribute [rw] project - # @return [::String] - # The project that this resource belongs to, in the format of - # projects/\\{PROJECT_NUMBER}. This field is available when the resource - # belongs to a project. - # @!attribute [rw] folders - # @return [::Array<::String>] - # The folder(s) that this resource belongs to, in the format of - # folders/\\{FOLDER_NUMBER}. This field is available when the resource - # belongs (directly or cascadingly) to one or more folders. - # @!attribute [rw] organization - # @return [::String] - # The organization that this resource belongs to, in the format of - # organizations/\\{ORGANIZATION_NUMBER}. This field is available when the - # resource belongs (directly or cascadingly) to an organization. - # @!attribute [rw] effective_tags - # @return [::Array<::Google::Cloud::Asset::V1::EffectiveTagDetails>] - # The effective tags on this resource. - class GovernedContainer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A request message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets AssetService.AnalyzeOrgPolicyGovernedAssets}. - # @!attribute [rw] scope - # @return [::String] - # Required. The organization to scope the request. Only organization - # policies within the scope will be analyzed. The output assets will - # also be limited to the ones governed by those in-scope organization - # policies. - # - # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - # @!attribute [rw] constraint - # @return [::String] - # Required. The name of the constraint to analyze governed assets for. The - # analysis only contains analyzed organization policies for the provided - # constraint. - # @!attribute [rw] filter - # @return [::String] - # The expression to filter - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets}. - # - # For governed resources, filtering is currently available for bare literal - # values and the following fields: - # * governed_resource.project - # * governed_resource.folders - # * consolidated_policy.rules.enforce - # When filtering by `governed_resource.project` or - # `consolidated_policy.rules.enforce`, the only supported operator is `=`. - # When filtering by `governed_resource.folders`, the supported operators - # are `=` and `:`. - # For example, filtering by `governed_resource.project="projects/12345678"` - # will return all the governed resources under "projects/12345678", - # including the project itself if applicable. - # - # For governed IAM policies, filtering is currently available for bare - # literal values and the following fields: - # * governed_iam_policy.project - # * governed_iam_policy.folders - # * consolidated_policy.rules.enforce - # When filtering by `governed_iam_policy.project` or - # `consolidated_policy.rules.enforce`, the only supported operator is `=`. - # When filtering by `governed_iam_policy.folders`, the supported operators - # are `=` and `:`. - # For example, filtering by `governed_iam_policy.folders:"folders/12345678"` - # will return all the governed IAM policies under "folders/001". - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. If unspecified, - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets} - # will contain 100 items with a maximum of 200. - # @!attribute [rw] page_token - # @return [::String] - # The pagination token to retrieve the next page. - class AnalyzeOrgPolicyGovernedAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # {::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets AssetService.AnalyzeOrgPolicyGovernedAssets}. - # @!attribute [rw] governed_assets - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset>] - # The list of the analyzed governed assets. - # @!attribute [rw] constraint - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint] - # The definition of the constraint in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The page token to fetch the next page for - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse#governed_assets AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets}. - class AnalyzeOrgPolicyGovernedAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The Google Cloud resources governed by the organization policies of the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. - # @!attribute [rw] full_resource_name - # @return [::String] - # The [full resource name] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of - # the Google Cloud resource. - # @!attribute [rw] parent - # @return [::String] - # The [full resource name] - # (https://cloud.google.com/asset-inventory/docs/resource-name-format) of - # the parent of - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedResource#full_resource_name AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource.full_resource_name}. - # @!attribute [rw] project - # @return [::String] - # The project that this resource belongs to, in the format of - # projects/\\{PROJECT_NUMBER}. This field is available when the resource - # belongs to a project. - # @!attribute [rw] folders - # @return [::Array<::String>] - # The folder(s) that this resource belongs to, in the format of - # folders/\\{FOLDER_NUMBER}. This field is available when the resource - # belongs (directly or cascadingly) to one or more folders. - # @!attribute [rw] organization - # @return [::String] - # The organization that this resource belongs to, in the format of - # organizations/\\{ORGANIZATION_NUMBER}. This field is available when the - # resource belongs (directly or cascadingly) to an organization. - # @!attribute [rw] asset_type - # @return [::String] - # The asset type of the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedResource#full_resource_name AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource.full_resource_name} - # Example: - # `cloudresourcemanager.googleapis.com/Project` - # See [Cloud Asset Inventory Supported Asset - # Types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # for all supported asset types. - # @!attribute [rw] effective_tags - # @return [::Array<::Google::Cloud::Asset::V1::EffectiveTagDetails>] - # The effective tags on this resource. - class GovernedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The IAM policies governed by the organization policies of the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. - # @!attribute [rw] attached_resource - # @return [::String] - # The full resource name of the resource on which this IAM policy is set. - # Example: - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - # See [Cloud Asset Inventory Resource Name - # Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # for more information. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # The IAM policy directly set on the given resource. - # @!attribute [rw] project - # @return [::String] - # The project that this IAM policy belongs to, in the format of - # projects/\\{PROJECT_NUMBER}. This field is available when the IAM policy - # belongs to a project. - # @!attribute [rw] folders - # @return [::Array<::String>] - # The folder(s) that this IAM policy belongs to, in the format of - # folders/\\{FOLDER_NUMBER}. This field is available when the IAM policy - # belongs (directly or cascadingly) to one or more folders. - # @!attribute [rw] organization - # @return [::String] - # The organization that this IAM policy belongs to, in the format of - # organizations/\\{ORGANIZATION_NUMBER}. This field is available when the - # IAM policy belongs (directly or cascadingly) to an organization. - # @!attribute [rw] asset_type - # @return [::String] - # The asset type of the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedIamPolicy#attached_resource AnalyzeOrgPolicyGovernedAssetsResponse.GovernedIamPolicy.attached_resource}. - # Example: - # `cloudresourcemanager.googleapis.com/Project` - # See [Cloud Asset Inventory Supported Asset - # Types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # for all supported asset types. - class GovernedIamPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Google Cloud asset(resource or IAM policy) governed by the - # organization policies of the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. - # @!attribute [rw] governed_resource - # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedResource] - # A Google Cloud resource governed by the organization - # policies of the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. - # - # Note: The following fields are mutually exclusive: `governed_resource`, `governed_iam_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] governed_iam_policy - # @return [::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedIamPolicy] - # An IAM policy governed by the organization - # policies of the - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest#constraint AnalyzeOrgPolicyGovernedAssetsRequest.constraint}. - # - # Note: The following fields are mutually exclusive: `governed_iam_policy`, `governed_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] consolidated_policy - # @return [::Google::Cloud::Asset::V1::AnalyzerOrgPolicy] - # The consolidated policy for the analyzed asset. The consolidated - # policy is computed by merging and evaluating - # {::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset#policy_bundle AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.policy_bundle}. - # The evaluation will respect the organization policy [hierarchy - # rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). - # @!attribute [rw] policy_bundle - # @return [::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicy>] - # The ordered list of all organization policies from the - # {::Google::Cloud::Asset::V1::AnalyzerOrgPolicy#attached_resource consolidated_policy.attached_resource} - # to the scope specified in the request. - # - # If the constraint is defined with default policy, it will also appear in - # the list. - class GovernedAsset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Asset content type. - module ContentType - # Unspecified content type. - CONTENT_TYPE_UNSPECIFIED = 0 - - # Resource metadata. - RESOURCE = 1 - - # The actual IAM policy set on a resource. - IAM_POLICY = 2 - - # The organization policy set on an asset. - ORG_POLICY = 4 - - # The Access Context Manager policy set on an asset. - ACCESS_POLICY = 5 - - # The runtime OS Inventory information. - OS_INVENTORY = 6 - - # The related resources. - RELATIONSHIP = 7 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/assets.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/assets.rb deleted file mode 100644 index 8632a1f5f826..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/asset/v1/assets.rb +++ /dev/null @@ -1,1173 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Asset - module V1 - # An asset in Google Cloud and its temporal metadata, including the time window - # when it was observed and its status during that window. - # @!attribute [rw] window - # @return [::Google::Cloud::Asset::V1::TimeWindow] - # The time window when the asset data and state was observed. - # @!attribute [rw] deleted - # @return [::Boolean] - # Whether the asset has been deleted or not. - # @!attribute [rw] asset - # @return [::Google::Cloud::Asset::V1::Asset] - # An asset in Google Cloud. - # @!attribute [rw] prior_asset_state - # @return [::Google::Cloud::Asset::V1::TemporalAsset::PriorAssetState] - # State of prior_asset. - # @!attribute [rw] prior_asset - # @return [::Google::Cloud::Asset::V1::Asset] - # Prior copy of the asset. Populated if prior_asset_state is PRESENT. - # Currently this is only set for responses in Real-Time Feed. - class TemporalAsset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of prior asset. - module PriorAssetState - # prior_asset is not applicable for the current asset. - PRIOR_ASSET_STATE_UNSPECIFIED = 0 - - # prior_asset is populated correctly. - PRESENT = 1 - - # Failed to set prior_asset. - INVALID = 2 - - # Current asset is the first known state. - DOES_NOT_EXIST = 3 - - # prior_asset is a deletion. - DELETED = 4 - end - end - - # A time window specified by its `start_time` and `end_time`. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start time of the time window (exclusive). - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End time of the time window (inclusive). If not specified, the current - # timestamp is used instead. - class TimeWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The enhanced metadata information for a resource. - # @!attribute [rw] resource_owners - # @return [::Google::Cloud::Asset::V1::ResourceOwners] - # The resource owners for a resource. - # - # Note that this field only contains the members that have "roles/owner" - # role in the resource's IAM Policy. - class AssetEnrichment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An asset in Google Cloud. An asset can be any resource in the Google Cloud - # [resource - # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - # a resource outside the Google Cloud resource hierarchy (such as Google - # Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy), - # or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship). - # See [Supported asset - # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # for more information. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update timestamp of an asset. update_time is updated when - # create/update/delete operation is performed. - # @!attribute [rw] name - # @return [::String] - # The full name of the asset. Example: - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` - # - # See [Resource - # names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - # for more information. - # @!attribute [rw] asset_type - # @return [::String] - # The type of the asset. Example: `compute.googleapis.com/Disk` - # - # See [Supported asset - # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # for more information. - # @!attribute [rw] resource - # @return [::Google::Cloud::Asset::V1::Resource] - # A representation of the resource. - # @!attribute [rw] iam_policy - # @return [::Google::Iam::V1::Policy] - # A representation of the IAM policy set on a Google Cloud resource. - # There can be a maximum of one IAM policy set on any given resource. - # In addition, IAM policies inherit their granted access scope from any - # policies set on parent resources in the resource hierarchy. Therefore, the - # effectively policy is the union of both the policy set on this resource - # and each policy set on all of the resource's ancestry resource levels in - # the hierarchy. See - # [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance) - # for more information. - # @!attribute [rw] org_policy - # @return [::Array<::Google::Cloud::OrgPolicy::V1::Policy>] - # A representation of an [organization - # policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). - # There can be more than one organization policy with different constraints - # set on a given resource. - # @!attribute [rw] access_policy - # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy] - # Also refer to the [access policy user - # guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). - # - # Note: The following fields are mutually exclusive: `access_policy`, `access_level`, `service_perimeter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] access_level - # @return [::Google::Identity::AccessContextManager::V1::AccessLevel] - # Also refer to the [access level user - # guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). - # - # Note: The following fields are mutually exclusive: `access_level`, `access_policy`, `service_perimeter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] service_perimeter - # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter] - # Also refer to the [service perimeter user - # guide](https://cloud.google.com/vpc-service-controls/docs/overview). - # - # Note: The following fields are mutually exclusive: `service_perimeter`, `access_policy`, `access_level`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] os_inventory - # @return [::Google::Cloud::OsConfig::V1::Inventory] - # A representation of runtime OS Inventory information. See [this - # topic](https://cloud.google.com/compute/docs/instances/os-inventory-management) - # for more information. - # @!attribute [rw] related_assets - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Asset::V1::RelatedAssets] - # DEPRECATED. This field only presents for the purpose of - # backward-compatibility. The server will never generate responses with this - # field. - # The related assets of the asset of one relationship type. One asset - # only represents one type of relationship. - # @!attribute [rw] related_asset - # @return [::Google::Cloud::Asset::V1::RelatedAsset] - # One related asset of the current asset. - # @!attribute [rw] ancestors - # @return [::Array<::String>] - # The ancestry path of an asset in Google Cloud [resource - # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - # represented as a list of relative resource names. An ancestry path starts - # with the closest ancestor in the hierarchy and ends at root. If the asset - # is a project, folder, or organization, the ancestry path starts from the - # asset itself. - # - # Example: `["projects/123456789", "folders/5432", "organizations/1234"]` - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of a Google Cloud resource. - # @!attribute [rw] version - # @return [::String] - # The API version. Example: `v1` - # @!attribute [rw] discovery_document_uri - # @return [::String] - # The URL of the discovery document containing the resource's JSON schema. - # Example: - # `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` - # - # This value is unspecified for resources that do not have an API based on a - # discovery document, such as Cloud Bigtable. - # @!attribute [rw] discovery_name - # @return [::String] - # The JSON schema name listed in the discovery document. Example: - # `Project` - # - # This value is unspecified for resources that do not have an API based on a - # discovery document, such as Cloud Bigtable. - # @!attribute [rw] resource_url - # @return [::String] - # The REST URL for accessing the resource. An HTTP `GET` request using this - # URL returns the resource itself. Example: - # `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` - # - # This value is unspecified for resources without a REST API. - # @!attribute [rw] parent - # @return [::String] - # The full name of the immediate parent of this resource. See - # [Resource - # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - # for more information. - # - # For Google Cloud assets, this value is the parent resource defined in the - # [IAM policy - # hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). - # Example: - # `//cloudresourcemanager.googleapis.com/projects/my_project_123` - # @!attribute [rw] data - # @return [::Google::Protobuf::Struct] - # The content of the resource, in which some sensitive fields are removed - # and may not be present. - # @!attribute [rw] location - # @return [::String] - # The location of the resource in Google Cloud, such as its zone and region. - # For more information, see https://cloud.google.com/about/locations/. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DEPRECATED. This message only presents for the purpose of - # backward-compatibility. The server will never populate this message in - # responses. - # The detailed related assets with the `relationship_type`. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] relationship_attributes - # @return [::Google::Cloud::Asset::V1::RelationshipAttributes] - # The detailed relationship attributes. - # @!attribute [rw] assets - # @return [::Array<::Google::Cloud::Asset::V1::RelatedAsset>] - # The peer resources of the relationship. - class RelatedAssets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DEPRECATED. This message only presents for the purpose of - # backward-compatibility. The server will never populate this message in - # responses. - # The relationship attributes which include `type`, `source_resource_type`, - # `target_resource_type` and `action`. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] type - # @return [::String] - # The unique identifier of the relationship type. Example: - # `INSTANCE_TO_INSTANCEGROUP` - # @!attribute [rw] source_resource_type - # @return [::String] - # The source asset type. Example: `compute.googleapis.com/Instance` - # @!attribute [rw] target_resource_type - # @return [::String] - # The target asset type. Example: `compute.googleapis.com/Disk` - # @!attribute [rw] action - # @return [::String] - # The detail of the relationship, e.g. `contains`, `attaches` - class RelationshipAttributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An asset identifier in Google Cloud which contains its name, type and - # ancestors. An asset can be any resource in the Google Cloud [resource - # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - # a resource outside the Google Cloud resource hierarchy (such as Google - # Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy). - # See [Supported asset - # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # for more information. - # @!attribute [rw] asset - # @return [::String] - # The full name of the asset. Example: - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` - # - # See [Resource - # names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - # for more information. - # @!attribute [rw] asset_type - # @return [::String] - # The type of the asset. Example: `compute.googleapis.com/Disk` - # - # See [Supported asset - # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # for more information. - # @!attribute [rw] ancestors - # @return [::Array<::String>] - # The ancestors of an asset in Google Cloud [resource - # hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - # represented as a list of relative resource names. An ancestry path starts - # with the closest ancestor in the hierarchy and ends at root. - # - # Example: `["projects/123456789", "folders/5432", "organizations/1234"]` - # @!attribute [rw] relationship_type - # @return [::String] - # The unique identifier of the relationship type. Example: - # `INSTANCE_TO_INSTANCEGROUP` - class RelatedAsset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The key and value for a - # [tag](https://cloud.google.com/resource-manager/docs/tags/tags-overview). - # @!attribute [rw] tag_key - # @return [::String] - # TagKey namespaced name, in the format of \\{ORG_ID}/\\{TAG_KEY_SHORT_NAME}. - # @!attribute [rw] tag_key_id - # @return [::String] - # TagKey ID, in the format of tagKeys/\\{TAG_KEY_ID}. - # @!attribute [rw] tag_value - # @return [::String] - # TagValue namespaced name, in the format of - # \\{ORG_ID}/\\{TAG_KEY_SHORT_NAME}/\\{TAG_VALUE_SHORT_NAME}. - # @!attribute [rw] tag_value_id - # @return [::String] - # TagValue ID, in the format of tagValues/\\{TAG_VALUE_ID}. - class Tag - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The effective tags and the ancestor resources from which they were inherited. - # @!attribute [rw] attached_resource - # @return [::String] - # The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the ancestor from which - # {::Google::Cloud::Asset::V1::EffectiveTagDetails#effective_tags effective_tags} - # are inherited, according to [tag - # inheritance](https://cloud.google.com/resource-manager/docs/tags/tags-overview#inheritance). - # @!attribute [rw] effective_tags - # @return [::Array<::Google::Cloud::Asset::V1::Tag>] - # The effective tags inherited from the - # {::Google::Cloud::Asset::V1::EffectiveTagDetails#attached_resource attached_resource}. - # Note that tags with the same key but different values may attach to - # resources at a different hierarchy levels. The lower hierarchy tag value - # will overwrite the higher hierarchy tag value of the same tag key. In this - # case, the tag value at the higher hierarchy level will be removed. For more - # information, see [tag - # inheritance](https://cloud.google.com/resource-manager/docs/tags/tags-overview#inheritance). - class EffectiveTagDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A result of Resource Search, containing information of a cloud resource. - # @!attribute [rw] name - # @return [::String] - # The full resource name of this resource. Example: - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - # See [Cloud Asset Inventory Resource Name - # Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # for more information. - # - # To search against the `name`: - # - # * Use a field query. Example: `name:instance1` - # * Use a free text query. Example: `instance1` - # @!attribute [rw] asset_type - # @return [::String] - # The type of this resource. Example: `compute.googleapis.com/Disk`. - # - # To search against the `asset_type`: - # - # * Specify the `asset_type` field in your search request. - # @!attribute [rw] project - # @return [::String] - # The project that this resource belongs to, in the form of - # projects/\\{PROJECT_NUMBER}. This field is available when the resource - # belongs to a project. - # - # To search against `project`: - # - # * Use a field query. Example: `project:12345` - # * Use a free text query. Example: `12345` - # * Specify the `scope` field as this project in your search request. - # @!attribute [rw] folders - # @return [::Array<::String>] - # The folder(s) that this resource belongs to, in the form of - # folders/\\{FOLDER_NUMBER}. This field is available when the resource - # belongs to one or more folders. - # - # To search against `folders`: - # - # * Use a field query. Example: `folders:(123 OR 456)` - # * Use a free text query. Example: `123` - # * Specify the `scope` field as this folder in your search request. - # @!attribute [rw] organization - # @return [::String] - # The organization that this resource belongs to, in the form of - # organizations/\\{ORGANIZATION_NUMBER}. This field is available when the - # resource belongs to an organization. - # - # To search against `organization`: - # - # * Use a field query. Example: `organization:123` - # * Use a free text query. Example: `123` - # * Specify the `scope` field as this organization in your search request. - # @!attribute [rw] display_name - # @return [::String] - # The display name of this resource. This field is available only when the - # resource's Protobuf contains it. - # - # To search against the `display_name`: - # - # * Use a field query. Example: `displayName:"My Instance"` - # * Use a free text query. Example: `"My Instance"` - # @!attribute [rw] description - # @return [::String] - # One or more paragraphs of text description of this resource. Maximum length - # could be up to 1M bytes. This field is available only when the resource's - # Protobuf contains it. - # - # To search against the `description`: - # - # * Use a field query. Example: `description:"important instance"` - # * Use a free text query. Example: `"important instance"` - # @!attribute [rw] location - # @return [::String] - # Location can be `global`, regional like `us-east1`, or zonal like - # `us-west1-b`. This field is available only when the resource's Protobuf - # contains it. - # - # To search against the `location`: - # - # * Use a field query. Example: `location:us-west*` - # * Use a free text query. Example: `us-west*` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User labels associated with this resource. See [Labelling and grouping - # Google Cloud - # resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) - # for more information. This field is available only when the resource's - # Protobuf contains it. - # - # To search against the `labels`: - # - # * Use a field query: - # - query on any label's key or value. Example: `labels:prod` - # - query by a given label. Example: `labels.env:prod` - # - query by a given label's existence. Example: `labels.env:*` - # * Use a free text query. Example: `prod` - # @!attribute [rw] network_tags - # @return [::Array<::String>] - # Network tags associated with this resource. Like labels, network tags are a - # type of annotations used to group Google Cloud resources. See [Labelling - # Google Cloud - # resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) - # for more information. This field is available only when the resource's - # Protobuf contains it. - # - # To search against the `network_tags`: - # - # * Use a field query. Example: `networkTags:internal` - # * Use a free text query. Example: `internal` - # @!attribute [rw] kms_key - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # The Cloud KMS - # [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) - # name or - # [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) - # name. - # - # This field only presents for the purpose of backward compatibility. - # Use the `kms_keys` field to retrieve Cloud KMS key information. This field - # is available only when the resource's Protobuf contains it and will only be - # populated for [these resource - # types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field) - # for backward compatible purposes. - # - # To search against the `kms_key`: - # - # * Use a field query. Example: `kmsKey:key` - # * Use a free text query. Example: `key` - # @!attribute [rw] kms_keys - # @return [::Array<::String>] - # The Cloud KMS - # [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) - # names or - # [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) - # names. This field is available only when the resource's Protobuf contains - # it. - # - # To search against the `kms_keys`: - # - # * Use a field query. Example: `kmsKeys:key` - # * Use a free text query. Example: `key` - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The create timestamp of this resource, at which the resource was created. - # The granularity is in seconds. Timestamp.nanos will always be 0. This field - # is available only when the resource's Protobuf contains it. - # - # To search against `create_time`: - # - # * Use a field query. - # - value in seconds since unix epoch. Example: `createTime > 1609459200` - # - value in date string. Example: `createTime > 2021-01-01` - # - value in date-time string (must be quoted). Example: `createTime > - # "2021-01-01T00:00:00"` - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update timestamp of this resource, at which the resource was last - # modified or deleted. The granularity is in seconds. Timestamp.nanos will - # always be 0. This field is available only when the resource's Protobuf - # contains it. - # - # To search against `update_time`: - # - # * Use a field query. - # - value in seconds since unix epoch. Example: `updateTime < 1609459200` - # - value in date string. Example: `updateTime < 2021-01-01` - # - value in date-time string (must be quoted). Example: `updateTime < - # "2021-01-01T00:00:00"` - # @!attribute [rw] state - # @return [::String] - # The state of this resource. Different resources types have different state - # definitions that are mapped from various fields of different resource - # types. This field is available only when the resource's Protobuf contains - # it. - # - # Example: - # If the resource is an instance provided by Compute Engine, - # its state will include PROVISIONING, STAGING, RUNNING, STOPPING, - # SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition - # in [API - # Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). - # If the resource is a project provided by Resource Manager, its state - # will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and - # DELETE_IN_PROGRESS. See `lifecycleState` definition in [API - # Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). - # - # To search against the `state`: - # - # * Use a field query. Example: `state:RUNNING` - # * Use a free text query. Example: `RUNNING` - # @!attribute [rw] additional_attributes - # @return [::Google::Protobuf::Struct] - # The additional searchable attributes of this resource. The attributes may - # vary from one resource type to another. Examples: `projectId` for Project, - # `dnsName` for DNS ManagedZone. This field contains a subset of the resource - # metadata fields that are returned by the List or Get APIs provided by the - # corresponding Google Cloud service (e.g., Compute Engine). see [API - # references and supported searchable - # attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # to see which fields are included. - # - # You can search values of these fields through free text search. However, - # you should not consume the field programically as the field names and - # values may change as the Google Cloud service updates to a new incompatible - # API version. - # - # To search against the `additional_attributes`: - # - # * Use a free text query to match the attributes values. Example: to search - # `additional_attributes = { dnsName: "foobar" }`, you can issue a query - # `foobar`. - # @!attribute [rw] parent_full_resource_name - # @return [::String] - # The full resource name of this resource's parent, if it has one. - # To search against the `parent_full_resource_name`: - # - # * Use a field query. Example: - # `parentFullResourceName:"project-name"` - # * Use a free text query. Example: - # `project-name` - # @!attribute [rw] versioned_resources - # @return [::Array<::Google::Cloud::Asset::V1::VersionedResource>] - # Versioned resource representations of this resource. This is repeated - # because there could be multiple versions of resource representations during - # version migration. - # - # This `versioned_resources` field is not searchable. Some attributes of the - # resource representations are exposed in `additional_attributes` field, so - # as to allow users to search on them. - # @!attribute [rw] attached_resources - # @return [::Array<::Google::Cloud::Asset::V1::AttachedResource>] - # Attached resources of this resource. For example, an OSConfig - # Inventory is an attached resource of a Compute Instance. This field is - # repeated because a resource could have multiple attached resources. - # - # This `attached_resources` field is not searchable. Some attributes - # of the attached resources are exposed in `additional_attributes` field, so - # as to allow users to search on them. - # @!attribute [rw] relationships - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Asset::V1::RelatedResources}] - # A map of related resources of this resource, keyed by the - # relationship type. A relationship type is in the format of - # \\{SourceType}_\\{ACTION}_\\{DestType}. Example: `DISK_TO_INSTANCE`, - # `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`. - # See [supported relationship - # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types). - # @!attribute [rw] tag_keys - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # This field is only present for the purpose of backward compatibility. - # Use the `tags` field instead. - # - # TagKey namespaced names, in the format of \\{ORG_ID}/\\{TAG_KEY_SHORT_NAME}. - # To search against the `tagKeys`: - # - # * Use a field query. Example: - # - `tagKeys:"123456789/env*"` - # - `tagKeys="123456789/env"` - # - `tagKeys:"env"` - # - # * Use a free text query. Example: - # - `env` - # @!attribute [rw] tag_values - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # This field is only present for the purpose of backward compatibility. - # Use the `tags` field instead. - # - # TagValue namespaced names, in the format of - # \\{ORG_ID}/\\{TAG_KEY_SHORT_NAME}/\\{TAG_VALUE_SHORT_NAME}. - # To search against the `tagValues`: - # - # * Use a field query. Example: - # - `tagValues:"env"` - # - `tagValues:"env/prod"` - # - `tagValues:"123456789/env/prod*"` - # - `tagValues="123456789/env/prod"` - # - # * Use a free text query. Example: - # - `prod` - # @!attribute [rw] tag_value_ids - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # This field is only present for the purpose of backward compatibility. - # Use the `tags` field instead. - # - # TagValue IDs, in the format of tagValues/\\{TAG_VALUE_ID}. - # To search against the `tagValueIds`: - # - # * Use a field query. Example: - # - `tagValueIds="tagValues/456"` - # - # * Use a free text query. Example: - # - `456` - # @!attribute [rw] tags - # @return [::Array<::Google::Cloud::Asset::V1::Tag>] - # The tags directly attached to this resource. - # - # To search against the `tags`: - # - # * Use a field query. Example: - # - `tagKeys:"123456789/env*"` - # - `tagKeys="123456789/env"` - # - `tagKeys:"env"` - # - `tagKeyIds="tagKeys/123"` - # - `tagValues:"env"` - # - `tagValues:"env/prod"` - # - `tagValues:"123456789/env/prod*"` - # - `tagValues="123456789/env/prod"` - # - `tagValueIds="tagValues/456"` - # - # * Use a free text query. Example: - # - `env/prod` - # @!attribute [rw] effective_tags - # @return [::Array<::Google::Cloud::Asset::V1::EffectiveTagDetails>] - # The effective tags on this resource. All of the tags that are both attached - # to and inherited by a resource are collectively called the effective - # tags. For more information, see [tag - # inheritance](https://cloud.google.com/resource-manager/docs/tags/tags-overview#inheritance). - # - # To search against the `effective_tags`: - # - # * Use a field query. Example: - # - `effectiveTagKeys:"123456789/env*"` - # - `effectiveTagKeys="123456789/env"` - # - `effectiveTagKeys:"env"` - # - `effectiveTagKeyIds="tagKeys/123"` - # - `effectiveTagValues:"env"` - # - `effectiveTagValues:"env/prod"` - # - `effectiveTagValues:"123456789/env/prod*"` - # - `effectiveTagValues="123456789/env/prod"` - # - `effectiveTagValueIds="tagValues/456"` - # @!attribute [rw] enrichments - # @return [::Array<::Google::Cloud::Asset::V1::AssetEnrichment>] - # Enrichments of the asset. Currently supported enrichment types with - # SearchAllResources API: - # - # * RESOURCE_OWNERS - # - # The corresponding read masks in order to get the enrichment: - # - # * enrichments.resource_owners - # - # The corresponding required permissions: - # - # * cloudasset.assets.searchEnrichmentResourceOwners - # - # Example query to get resource owner enrichment: - # ``` - # scope: "projects/my-project" - # query: "name: my-project" - # assetTypes: "cloudresourcemanager.googleapis.com/Project" - # readMask: { - # paths: "asset_type" - # paths: "name" - # paths: "enrichments.resource_owners" - # } - # ``` - # @!attribute [rw] parent_asset_type - # @return [::String] - # The type of this resource's immediate parent, if there is one. - # - # To search against the `parent_asset_type`: - # - # * Use a field query. Example: - # `parentAssetType:"cloudresourcemanager.googleapis.com/Project"` - # * Use a free text query. Example: - # `cloudresourcemanager.googleapis.com/Project` - # @!attribute [rw] scc_security_marks - # @return [::Google::Protobuf::Map{::String => ::String}] - # The actual content of Security Command Center security marks associated - # with the asset. - # - # - # To search against SCC SecurityMarks field: - # - # * Use a field query: - # - query by a given key value pair. Example: `sccSecurityMarks.foo=bar` - # - query by a given key's existence. Example: `sccSecurityMarks.foo:*` - class ResourceSearchResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Asset::V1::RelatedResources] - class RelationshipsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SccSecurityMarksEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Resource representation as defined by the corresponding service providing the - # resource for a given API version. - # @!attribute [rw] version - # @return [::String] - # API version of the resource. - # - # Example: - # If the resource is an instance provided by Compute Engine v1 API as defined - # in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`, - # version will be "v1". - # @!attribute [rw] resource - # @return [::Google::Protobuf::Struct] - # JSON representation of the resource as defined by the corresponding - # service providing this resource. - # - # Example: - # If the resource is an instance provided by Compute Engine, this field will - # contain the JSON representation of the instance as defined by Compute - # Engine: - # `https://cloud.google.com/compute/docs/reference/rest/v1/instances`. - # - # You can find the resource definition for each supported resource type in - # this table: - # `https://cloud.google.com/asset-inventory/docs/supported-asset-types` - class VersionedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Attached resource representation, which is defined by the corresponding - # service provider. It represents an attached resource's payload. - # @!attribute [rw] asset_type - # @return [::String] - # The type of this attached resource. - # - # Example: `osconfig.googleapis.com/Inventory` - # - # You can find the supported attached asset types of each resource in this - # table: - # `https://cloud.google.com/asset-inventory/docs/supported-asset-types` - # @!attribute [rw] versioned_resources - # @return [::Array<::Google::Cloud::Asset::V1::VersionedResource>] - # Versioned resource representations of this attached resource. This is - # repeated because there could be multiple versions of the attached resource - # representations during version migration. - class AttachedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The related resources of the primary resource. - # @!attribute [rw] related_resources - # @return [::Array<::Google::Cloud::Asset::V1::RelatedResource>] - # The detailed related resources of the primary resource. - class RelatedResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The detailed related resource. - # @!attribute [rw] asset_type - # @return [::String] - # The type of the asset. Example: `compute.googleapis.com/Instance` - # @!attribute [rw] full_resource_name - # @return [::String] - # The full resource name of the related resource. Example: - # `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123` - class RelatedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A result of IAM Policy search, containing information of an IAM policy. - # @!attribute [rw] resource - # @return [::String] - # The full resource name of the resource associated with this IAM policy. - # Example: - # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - # See [Cloud Asset Inventory Resource Name - # Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # for more information. - # - # To search against the `resource`: - # - # * use a field query. Example: `resource:organizations/123` - # @!attribute [rw] asset_type - # @return [::String] - # The type of the resource associated with this IAM policy. Example: - # `compute.googleapis.com/Disk`. - # - # To search against the `asset_type`: - # - # * specify the `asset_types` field in your search request. - # @!attribute [rw] project - # @return [::String] - # The project that the associated Google Cloud resource belongs to, in the - # form of projects/\\{PROJECT_NUMBER}. If an IAM policy is set on a resource - # (like VM instance, Cloud Storage bucket), the project field will indicate - # the project that contains the resource. If an IAM policy is set on a folder - # or organization, this field will be empty. - # - # To search against the `project`: - # - # * specify the `scope` field as this project in your search request. - # @!attribute [rw] folders - # @return [::Array<::String>] - # The folder(s) that the IAM policy belongs to, in the form of - # folders/\\{FOLDER_NUMBER}. This field is available when the IAM policy - # belongs to one or more folders. - # - # To search against `folders`: - # - # * use a field query. Example: `folders:(123 OR 456)` - # * use a free text query. Example: `123` - # * specify the `scope` field as this folder in your search request. - # @!attribute [rw] organization - # @return [::String] - # The organization that the IAM policy belongs to, in the form - # of organizations/\\{ORGANIZATION_NUMBER}. This field is available when the - # IAM policy belongs to an organization. - # - # To search against `organization`: - # - # * use a field query. Example: `organization:123` - # * use a free text query. Example: `123` - # * specify the `scope` field as this organization in your search request. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # The IAM policy directly set on the given resource. Note that the original - # IAM policy can contain multiple bindings. This only contains the bindings - # that match the given query. For queries that don't contain a constrain on - # policies (e.g., an empty query), this contains all the bindings. - # - # To search against the `policy` bindings: - # - # * use a field query: - # - query by the policy contained members. Example: - # `policy:amy@gmail.com` - # - query by the policy contained roles. Example: - # `policy:roles/compute.admin` - # - query by the policy contained roles' included permissions. Example: - # `policy.role.permissions:compute.instances.create` - # @!attribute [rw] explanation - # @return [::Google::Cloud::Asset::V1::IamPolicySearchResult::Explanation] - # Explanation about the IAM policy search result. It contains additional - # information to explain why the search result matches the query. - class IamPolicySearchResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Explanation about the IAM policy search result. - # @!attribute [rw] matched_permissions - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Asset::V1::IamPolicySearchResult::Explanation::Permissions}] - # The map from roles to their included permissions that match the - # permission query (i.e., a query containing `policy.role.permissions:`). - # Example: if query `policy.role.permissions:compute.disk.get` - # matches a policy binding that contains owner role, the - # matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The - # roles can also be found in the returned `policy` bindings. Note that the - # map is populated only for requests with permission queries. - class Explanation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # IAM permissions - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A list of permissions. A sample permission string: `compute.disk.get`. - class Permissions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Asset::V1::IamPolicySearchResult::Explanation::Permissions] - class MatchedPermissionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Represents the detailed state of an entity under analysis, such as a - # resource, an identity or an access. - # @!attribute [rw] code - # @return [::Google::Rpc::Code] - # The Google standard error code that best describes the state. - # For example: - # - OK means the analysis on this entity has been successfully finished; - # - PERMISSION_DENIED means an access denied error is encountered; - # - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started - # in time; - # @!attribute [rw] cause - # @return [::String] - # The human-readable description of the cause of failure. - class IamPolicyAnalysisState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The condition evaluation. - # @!attribute [rw] evaluation_value - # @return [::Google::Cloud::Asset::V1::ConditionEvaluation::EvaluationValue] - # The evaluation result. - class ConditionEvaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value of this expression. - module EvaluationValue - # Reserved for future use. - EVALUATION_VALUE_UNSPECIFIED = 0 - - # The evaluation result is `true`. - TRUE = 1 - - # The evaluation result is `false`. - FALSE = 2 - - # The evaluation result is `conditional` when the condition expression - # contains variables that are either missing input values or have not been - # supported by Policy Analyzer yet. - CONDITIONAL = 3 - end - end - - # IAM Policy analysis result, consisting of one IAM policy binding and derived - # access control lists. - # @!attribute [rw] attached_resource_full_name - # @return [::String] - # The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the resource to which the - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult#iam_binding iam_binding} - # policy attaches. - # @!attribute [rw] iam_binding - # @return [::Google::Iam::V1::Binding] - # The IAM policy binding under analysis. - # @!attribute [rw] access_control_lists - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::AccessControlList>] - # The access control lists derived from the - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult#iam_binding iam_binding} - # that match or potentially match resource and access selectors specified in - # the request. - # @!attribute [rw] identity_list - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::IdentityList] - # The identity list derived from members of the - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult#iam_binding iam_binding} - # that match or potentially match identity selector specified in the request. - # @!attribute [rw] fully_explored - # @return [::Boolean] - # Represents whether all analyses on the - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult#iam_binding iam_binding} - # have successfully finished. - class IamPolicyAnalysisResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A Google Cloud resource under analysis. - # @!attribute [rw] full_resource_name - # @return [::String] - # The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # @!attribute [rw] analysis_state - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisState] - # The analysis state of this resource. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An IAM role or permission under analysis. - # @!attribute [rw] role - # @return [::String] - # The role. - # - # Note: The following fields are mutually exclusive: `role`, `permission`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] permission - # @return [::String] - # The permission. - # - # Note: The following fields are mutually exclusive: `permission`, `role`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] analysis_state - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisState] - # The analysis state of this access. - class Access - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An identity under analysis. - # @!attribute [rw] name - # @return [::String] - # The identity of members, formatted as appear in an - # [IAM policy - # binding](https://cloud.google.com/iam/reference/rest/v1/Binding). For - # example, they might be formatted like the following: - # - # - user:foo@google.com - # - group:group1@google.com - # - serviceAccount:s1@prj1.iam.gserviceaccount.com - # - projectOwner:some_project_id - # - domain:google.com - # - allUsers - # @!attribute [rw] analysis_state - # @return [::Google::Cloud::Asset::V1::IamPolicyAnalysisState] - # The analysis state of this identity. - class Identity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A directional edge. - # @!attribute [rw] source_node - # @return [::String] - # The source node of the edge. For example, it could be a full resource - # name for a resource node or an email of an identity. - # @!attribute [rw] target_node - # @return [::String] - # The target node of the edge. For example, it could be a full resource - # name for a resource node or an email of an identity. - class Edge - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An access control list, derived from the above IAM policy binding, which - # contains a set of resources and accesses. May include one - # item from each set to compose an access control entry. - # - # NOTICE that there could be multiple access control lists for one IAM policy - # binding. The access control lists are created based on resource and access - # combinations. - # - # For example, assume we have the following cases in one IAM policy binding: - # - Permission P1 and P2 apply to resource R1 and R2; - # - Permission P3 applies to resource R2 and R3; - # - # This will result in the following access control lists: - # - AccessControlList 1: [R1, R2], [P1, P2] - # - AccessControlList 2: [R2, R3], [P3] - # @!attribute [rw] resources - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Resource>] - # The resources that match one of the following conditions: - # - The resource_selector, if it is specified in request; - # - Otherwise, resources reachable from the policy attached resource. - # @!attribute [rw] accesses - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Access>] - # The accesses that match one of the following conditions: - # - The access_selector, if it is specified in request; - # - Otherwise, access specifiers reachable from the policy binding's role. - # @!attribute [rw] resource_edges - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge>] - # Resource edges of the graph starting from the policy attached - # resource to any descendant resources. The - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge#source_node Edge.source_node} - # contains the full resource name of a parent resource and - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge#target_node Edge.target_node} - # contains the full resource name of a child resource. This field is - # present only if the output_resource_edges option is enabled in request. - # @!attribute [rw] condition_evaluation - # @return [::Google::Cloud::Asset::V1::ConditionEvaluation] - # Condition evaluation for this AccessControlList, if there is a condition - # defined in the above IAM policy binding. - class AccessControlList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The identities and group edges. - # @!attribute [rw] identities - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Identity>] - # Only the identities that match one of the following conditions will be - # presented: - # - The identity_selector, if it is specified in request; - # - Otherwise, identities reachable from the policy binding's members. - # @!attribute [rw] group_edges - # @return [::Array<::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge>] - # Group identity edges of the graph starting from the binding's - # group members to any node of the - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::IdentityList#identities identities}. - # The - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge#source_node Edge.source_node} - # contains a group, such as `group:parent@google.com`. The - # {::Google::Cloud::Asset::V1::IamPolicyAnalysisResult::Edge#target_node Edge.target_node} - # contains a member of the group, such as `group:child@google.com` or - # `user:foo@google.com`. This field is present only if the - # output_group_edges option is enabled in request. - class IdentityList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb deleted file mode 100644 index cdf85c94569e..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb +++ /dev/null @@ -1,313 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module OrgPolicy - module V1 - # Defines a Cloud Organization `Policy` which is used to specify `Constraints` - # for configurations of Cloud Platform resources. - # @!attribute [rw] version - # @return [::Integer] - # Version of the `Policy`. Default version is 0; - # @!attribute [rw] constraint - # @return [::String] - # The name of the `Constraint` the `Policy` is configuring, for example, - # `constraints/serviceuser.services`. - # - # Immutable after creation. - # @!attribute [rw] etag - # @return [::String] - # An opaque tag indicating the current version of the `Policy`, used for - # concurrency control. - # - # When the `Policy` is returned from either a `GetPolicy` or a - # `ListOrgPolicy` request, this `etag` indicates the version of the current - # `Policy` to use when executing a read-modify-write loop. - # - # When the `Policy` is returned from a `GetEffectivePolicy` request, the - # `etag` will be unset. - # - # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value - # that was returned from a `GetOrgPolicy` request as part of a - # read-modify-write loop for concurrency control. Not setting the `etag`in a - # `SetOrgPolicy` request will result in an unconditional write of the - # `Policy`. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time stamp the `Policy` was previously updated. This is set by the - # server, not specified by the caller, and represents the last time a call to - # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will - # be ignored. - # @!attribute [rw] list_policy - # @return [::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy] - # List of values either allowed or disallowed. - # - # Note: The following fields are mutually exclusive: `list_policy`, `boolean_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] boolean_policy - # @return [::Google::Cloud::OrgPolicy::V1::Policy::BooleanPolicy] - # For boolean `Constraints`, whether to enforce the `Constraint` or not. - # - # Note: The following fields are mutually exclusive: `boolean_policy`, `list_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] restore_default - # @return [::Google::Cloud::OrgPolicy::V1::Policy::RestoreDefault] - # Restores the default behavior of the constraint; independent of - # `Constraint` type. - # - # Note: The following fields are mutually exclusive: `restore_default`, `list_policy`, `boolean_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Used in `policy_type` to specify how `list_policy` behaves at this - # resource. - # - # `ListPolicy` can define specific values and subtrees of Cloud Resource - # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that - # are allowed or denied by setting the `allowed_values` and `denied_values` - # fields. This is achieved by using the `under:` and optional `is:` prefixes. - # The `under:` prefix is used to denote resource subtree values. - # The `is:` prefix is used to denote specific values, and is required only - # if the value contains a ":". Values prefixed with "is:" are treated the - # same as values with no prefix. - # Ancestry subtrees must be in one of the following formats: - # - "projects/", e.g. "projects/tokyo-rain-123" - # - "folders/", e.g. "folders/1234" - # - "organizations/", e.g. "organizations/1234" - # The `supports_under` field of the associated `Constraint` defines whether - # ancestry prefixes can be used. You can set `allowed_values` and - # `denied_values` in the same `Policy` if `all_values` is - # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all - # values. If `all_values` is set to either `ALLOW` or `DENY`, - # `allowed_values` and `denied_values` must be unset. - # @!attribute [rw] allowed_values - # @return [::Array<::String>] - # List of values allowed at this resource. Can only be set if `all_values` - # is set to `ALL_VALUES_UNSPECIFIED`. - # @!attribute [rw] denied_values - # @return [::Array<::String>] - # List of values denied at this resource. Can only be set if `all_values` - # is set to `ALL_VALUES_UNSPECIFIED`. - # @!attribute [rw] all_values - # @return [::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy::AllValues] - # The policy all_values state. - # @!attribute [rw] suggested_value - # @return [::String] - # Optional. The Google Cloud Console will try to default to a configuration - # that matches the value specified in this `Policy`. If `suggested_value` - # is not set, it will inherit the value specified higher in the hierarchy, - # unless `inherit_from_parent` is `false`. - # @!attribute [rw] inherit_from_parent - # @return [::Boolean] - # Determines the inheritance behavior for this `Policy`. - # - # By default, a `ListPolicy` set at a resource supercedes any `Policy` set - # anywhere up the resource hierarchy. However, if `inherit_from_parent` is - # set to `true`, then the values from the effective `Policy` of the parent - # resource are inherited, meaning the values set in this `Policy` are - # added to the values inherited up the hierarchy. - # - # Setting `Policy` hierarchies that inherit both allowed values and denied - # values isn't recommended in most circumstances to keep the configuration - # simple and understandable. However, it is possible to set a `Policy` with - # `allowed_values` set that inherits a `Policy` with `denied_values` set. - # In this case, the values that are allowed must be in `allowed_values` and - # not present in `denied_values`. - # - # For example, suppose you have a `Constraint` - # `constraints/serviceuser.services`, which has a `constraint_type` of - # `list_constraint`, and with `constraint_default` set to `ALLOW`. - # Suppose that at the Organization level, a `Policy` is applied that - # restricts the allowed API activations to \\{`E1`, `E2`}. Then, if a - # `Policy` is applied to a project below the Organization that has - # `inherit_from_parent` set to `false` and field all_values set to DENY, - # then an attempt to activate any API will be denied. - # - # The following examples demonstrate different possible layerings for - # `projects/bar` parented by `organizations/foo`: - # - # Example 1 (no inherited values): - # `organizations/foo` has a `Policy` with values: - # \\{allowed_values: "E1" allowed_values:"E2"} - # `projects/bar` has `inherit_from_parent` `false` and values: - # \\{allowed_values: "E3" allowed_values: "E4"} - # The accepted values at `organizations/foo` are `E1`, `E2`. - # The accepted values at `projects/bar` are `E3`, and `E4`. - # - # Example 2 (inherited values): - # `organizations/foo` has a `Policy` with values: - # \\{allowed_values: "E1" allowed_values:"E2"} - # `projects/bar` has a `Policy` with values: - # \\{value: "E3" value: "E4" inherit_from_parent: true} - # The accepted values at `organizations/foo` are `E1`, `E2`. - # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. - # - # Example 3 (inheriting both allowed and denied values): - # `organizations/foo` has a `Policy` with values: - # \\{allowed_values: "E1" allowed_values: "E2"} - # `projects/bar` has a `Policy` with: - # \\{denied_values: "E1"} - # The accepted values at `organizations/foo` are `E1`, `E2`. - # The value accepted at `projects/bar` is `E2`. - # - # Example 4 (RestoreDefault): - # `organizations/foo` has a `Policy` with values: - # \\{allowed_values: "E1" allowed_values:"E2"} - # `projects/bar` has a `Policy` with values: - # \\{RestoreDefault: \\{}} - # The accepted values at `organizations/foo` are `E1`, `E2`. - # The accepted values at `projects/bar` are either all or none depending on - # the value of `constraint_default` (if `ALLOW`, all; if - # `DENY`, none). - # - # Example 5 (no policy inherits parent policy): - # `organizations/foo` has no `Policy` set. - # `projects/bar` has no `Policy` set. - # The accepted values at both levels are either all or none depending on - # the value of `constraint_default` (if `ALLOW`, all; if - # `DENY`, none). - # - # Example 6 (ListConstraint allowing all): - # `organizations/foo` has a `Policy` with values: - # \\{allowed_values: "E1" allowed_values: "E2"} - # `projects/bar` has a `Policy` with: - # \\{all: ALLOW} - # The accepted values at `organizations/foo` are `E1`, E2`. - # Any value is accepted at `projects/bar`. - # - # Example 7 (ListConstraint allowing none): - # `organizations/foo` has a `Policy` with values: - # \\{allowed_values: "E1" allowed_values: "E2"} - # `projects/bar` has a `Policy` with: - # \\{all: DENY} - # The accepted values at `organizations/foo` are `E1`, E2`. - # No value is accepted at `projects/bar`. - # - # Example 10 (allowed and denied subtrees of Resource Manager hierarchy): - # Given the following resource hierarchy - # O1->\\{F1, F2}; F1->\\{P1}; F2->\\{P2, P3}, - # `organizations/foo` has a `Policy` with values: - # \\{allowed_values: "under:organizations/O1"} - # `projects/bar` has a `Policy` with: - # \\{allowed_values: "under:projects/P3"} - # \\{denied_values: "under:folders/F2"} - # The accepted values at `organizations/foo` are `organizations/O1`, - # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, - # `projects/P3`. - # The accepted values at `projects/bar` are `organizations/O1`, - # `folders/F1`, `projects/P1`. - class ListPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This enum can be used to set `Policies` that apply to all possible - # configuration values rather than specific values in `allowed_values` or - # `denied_values`. - # - # Settting this to `ALLOW` will mean this `Policy` allows all values. - # Similarly, setting it to `DENY` will mean no values are allowed. If - # set to either `ALLOW` or `DENY, `allowed_values` and `denied_values` - # must be unset. Setting this to `ALL_VALUES_UNSPECIFIED` allows for - # setting `allowed_values` and `denied_values`. - module AllValues - # Indicates that allowed_values or denied_values must be set. - ALL_VALUES_UNSPECIFIED = 0 - - # A policy with this set allows all values. - ALLOW = 1 - - # A policy with this set denies all values. - DENY = 2 - end - end - - # Used in `policy_type` to specify how `boolean_policy` will behave at this - # resource. - # @!attribute [rw] enforced - # @return [::Boolean] - # If `true`, then the `Policy` is enforced. If `false`, then any - # configuration is acceptable. - # - # Suppose you have a `Constraint` - # `constraints/compute.disableSerialPortAccess` with `constraint_default` - # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following - # behavior: - # - If the `Policy` at this resource has enforced set to `false`, serial - # port connection attempts will be allowed. - # - If the `Policy` at this resource has enforced set to `true`, serial - # port connection attempts will be refused. - # - If the `Policy` at this resource is `RestoreDefault`, serial port - # connection attempts will be allowed. - # - If no `Policy` is set at this resource or anywhere higher in the - # resource hierarchy, serial port connection attempts will be allowed. - # - If no `Policy` is set at this resource, but one exists higher in the - # resource hierarchy, the behavior is as if the`Policy` were set at - # this resource. - # - # The following examples demonstrate the different possible layerings: - # - # Example 1 (nearest `Constraint` wins): - # `organizations/foo` has a `Policy` with: - # \\{enforced: false} - # `projects/bar` has no `Policy` set. - # The constraint at `projects/bar` and `organizations/foo` will not be - # enforced. - # - # Example 2 (enforcement gets replaced): - # `organizations/foo` has a `Policy` with: - # \\{enforced: false} - # `projects/bar` has a `Policy` with: - # \\{enforced: true} - # The constraint at `organizations/foo` is not enforced. - # The constraint at `projects/bar` is enforced. - # - # Example 3 (RestoreDefault): - # `organizations/foo` has a `Policy` with: - # \\{enforced: true} - # `projects/bar` has a `Policy` with: - # \\{RestoreDefault: \\{}} - # The constraint at `organizations/foo` is enforced. - # The constraint at `projects/bar` is not enforced, because - # `constraint_default` for the `Constraint` is `ALLOW`. - class BooleanPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Ignores policies set above this resource and restores the - # `constraint_default` enforcement behavior of the specific `Constraint` at - # this resource. - # - # Suppose that `constraint_default` is set to `ALLOW` for the - # `Constraint` `constraints/serviceuser.services`. Suppose that organization - # foo.com sets a `Policy` at their Organization resource node that restricts - # the allowed service activations to deny all service activations. They - # could then set a `Policy` with the `policy_type` `restore_default` on - # several experimental projects, restoring the `constraint_default` - # enforcement of the `Constraint` for only those projects, allowing those - # projects to have all services activated. - class RestoreDefault - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/osconfig/v1/inventory.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/osconfig/v1/inventory.rb deleted file mode 100644 index 583eaf029959..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/cloud/osconfig/v1/inventory.rb +++ /dev/null @@ -1,425 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module OsConfig - module V1 - # This API resource represents the available inventory data for a - # Compute Engine virtual machine (VM) instance at a given point in time. - # - # You can use this API resource to determine the inventory data of your VM. - # - # For more information, see [Information provided by OS inventory - # management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected). - # @!attribute [r] name - # @return [::String] - # Output only. The `Inventory` API resource name. - # - # Format: - # `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` - # @!attribute [rw] os_info - # @return [::Google::Cloud::OsConfig::V1::Inventory::OsInfo] - # Base level operating system information for the VM. - # @!attribute [rw] items - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::OsConfig::V1::Inventory::Item}] - # Inventory items related to the VM keyed by an opaque unique identifier for - # each inventory item. The identifier is unique to each distinct and - # addressable inventory item and will change, when there is a new package - # version. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the last reported inventory for the VM. - class Inventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Operating system information for the VM. - # @!attribute [rw] hostname - # @return [::String] - # The VM hostname. - # @!attribute [rw] long_name - # @return [::String] - # The operating system long name. - # For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 - # Datacenter'. - # @!attribute [rw] short_name - # @return [::String] - # The operating system short name. - # For example, 'windows' or 'debian'. - # @!attribute [rw] version - # @return [::String] - # The version of the operating system. - # @!attribute [rw] architecture - # @return [::String] - # The system architecture of the operating system. - # @!attribute [rw] kernel_version - # @return [::String] - # The kernel version of the operating system. - # @!attribute [rw] kernel_release - # @return [::String] - # The kernel release of the operating system. - # @!attribute [rw] osconfig_agent_version - # @return [::String] - # The current version of the OS Config agent running on the VM. - class OsInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single piece of inventory on a VM. - # @!attribute [rw] id - # @return [::String] - # Identifier for this item, unique across items for this VM. - # @!attribute [rw] origin_type - # @return [::Google::Cloud::OsConfig::V1::Inventory::Item::OriginType] - # The origin of this inventory item. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # When this inventory item was first detected. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # When this inventory item was last modified. - # @!attribute [rw] type - # @return [::Google::Cloud::OsConfig::V1::Inventory::Item::Type] - # The specific type of inventory, correlating to its specific details. - # @!attribute [rw] installed_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::SoftwarePackage] - # Software package present on the VM instance. - # - # Note: The following fields are mutually exclusive: `installed_package`, `available_package`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] available_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::SoftwarePackage] - # Software package available to be installed on the VM instance. - # - # Note: The following fields are mutually exclusive: `available_package`, `installed_package`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Item - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The origin of a specific inventory item. - module OriginType - # Invalid. An origin type must be specified. - ORIGIN_TYPE_UNSPECIFIED = 0 - - # This inventory item was discovered as the result of the agent - # reporting inventory via the reporting API. - INVENTORY_REPORT = 1 - end - - # The different types of inventory that are tracked on a VM. - module Type - # Invalid. An type must be specified. - TYPE_UNSPECIFIED = 0 - - # This represents a package that is installed on the VM. - INSTALLED_PACKAGE = 1 - - # This represents an update that is available for a package. - AVAILABLE_PACKAGE = 2 - end - end - - # Software package information of the operating system. - # @!attribute [rw] yum_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] - # Yum package info. - # For details about the yum package manager, see - # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. - # - # Note: The following fields are mutually exclusive: `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] apt_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] - # Details of an APT package. - # For details about the apt package manager, see - # https://wiki.debian.org/Apt. - # - # Note: The following fields are mutually exclusive: `apt_package`, `yum_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] zypper_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] - # Details of a Zypper package. - # For details about the Zypper package manager, see - # https://en.opensuse.org/SDB:Zypper_manual. - # - # Note: The following fields are mutually exclusive: `zypper_package`, `yum_package`, `apt_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] googet_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] - # Details of a Googet package. - # For details about the googet package manager, see - # https://github.com/google/googet. - # - # Note: The following fields are mutually exclusive: `googet_package`, `yum_package`, `apt_package`, `zypper_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] zypper_patch - # @return [::Google::Cloud::OsConfig::V1::Inventory::ZypperPatch] - # Details of a Zypper patch. - # For details about the Zypper package manager, see - # https://en.opensuse.org/SDB:Zypper_manual. - # - # Note: The following fields are mutually exclusive: `zypper_patch`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `wua_package`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] wua_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::WindowsUpdatePackage] - # Details of a Windows Update package. - # See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for - # information about Windows Update. - # - # Note: The following fields are mutually exclusive: `wua_package`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `qfe_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] qfe_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::WindowsQuickFixEngineeringPackage] - # Details of a Windows Quick Fix engineering package. - # See - # https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering - # for info in Windows Quick Fix Engineering. - # - # Note: The following fields are mutually exclusive: `qfe_package`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `cos_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cos_package - # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage] - # Details of a COS package. - # - # Note: The following fields are mutually exclusive: `cos_package`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `windows_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] windows_application - # @return [::Google::Cloud::OsConfig::V1::Inventory::WindowsApplication] - # Details of Windows Application. - # - # Note: The following fields are mutually exclusive: `windows_application`, `yum_package`, `apt_package`, `zypper_package`, `googet_package`, `zypper_patch`, `wua_package`, `qfe_package`, `cos_package`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SoftwarePackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information related to the a standard versioned package. This includes - # package info for APT, Yum, Zypper, and Googet package managers. - # @!attribute [rw] package_name - # @return [::String] - # The name of the package. - # @!attribute [rw] architecture - # @return [::String] - # The system architecture this package is intended for. - # @!attribute [rw] version - # @return [::String] - # The version of the package. - class VersionedPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details related to a Zypper Patch. - # @!attribute [rw] patch_name - # @return [::String] - # The name of the patch. - # @!attribute [rw] category - # @return [::String] - # The category of the patch. - # @!attribute [rw] severity - # @return [::String] - # The severity specified for this patch - # @!attribute [rw] summary - # @return [::String] - # Any summary information provided about this patch. - class ZypperPatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details related to a Windows Update package. - # Field data and names are taken from Windows Update API IUpdate Interface: - # https://docs.microsoft.com/en-us/windows/win32/api/_wua/ - # Descriptive fields like title, and description are localized based on - # the locale of the VM being updated. - # @!attribute [rw] title - # @return [::String] - # The localized title of the update package. - # @!attribute [rw] description - # @return [::String] - # The localized description of the update package. - # @!attribute [rw] categories - # @return [::Array<::Google::Cloud::OsConfig::V1::Inventory::WindowsUpdatePackage::WindowsUpdateCategory>] - # The categories that are associated with this update package. - # @!attribute [rw] kb_article_ids - # @return [::Array<::String>] - # A collection of Microsoft Knowledge Base article IDs that are associated - # with the update package. - # @!attribute [rw] support_url - # @return [::String] - # A hyperlink to the language-specific support information for the update. - # @!attribute [rw] more_info_urls - # @return [::Array<::String>] - # A collection of URLs that provide more information about the update - # package. - # @!attribute [rw] update_id - # @return [::String] - # Gets the identifier of an update package. Stays the same across - # revisions. - # @!attribute [rw] revision_number - # @return [::Integer] - # The revision number of this update package. - # @!attribute [rw] last_deployment_change_time - # @return [::Google::Protobuf::Timestamp] - # The last published date of the update, in (UTC) date and time. - class WindowsUpdatePackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Categories specified by the Windows Update. - # @!attribute [rw] id - # @return [::String] - # The identifier of the windows update category. - # @!attribute [rw] name - # @return [::String] - # The name of the windows update category. - class WindowsUpdateCategory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Information related to a Quick Fix Engineering package. - # Fields are taken from Windows QuickFixEngineering Interface and match - # the source names: - # https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering - # @!attribute [rw] caption - # @return [::String] - # A short textual description of the QFE update. - # @!attribute [rw] description - # @return [::String] - # A textual description of the QFE update. - # @!attribute [rw] hot_fix_id - # @return [::String] - # Unique identifier associated with a particular QFE update. - # @!attribute [rw] install_time - # @return [::Google::Protobuf::Timestamp] - # Date that the QFE update was installed. Mapped from installed_on field. - class WindowsQuickFixEngineeringPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains information about a Windows application that is retrieved from the - # Windows Registry. For more information about these fields, see: - # https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key - # @!attribute [rw] display_name - # @return [::String] - # The name of the application or product. - # @!attribute [rw] display_version - # @return [::String] - # The version of the product or application in string format. - # @!attribute [rw] publisher - # @return [::String] - # The name of the manufacturer for the product or application. - # @!attribute [rw] install_date - # @return [::Google::Type::Date] - # The last time this product received service. The value of this property - # is replaced each time a patch is applied or removed from the product or - # the command-line option is used to repair the product. - # @!attribute [rw] help_link - # @return [::String] - # The internet address for technical support. - class WindowsApplication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::OsConfig::V1::Inventory::Item] - class ItemsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A request message for getting inventory data for the specified VM. - # @!attribute [rw] name - # @return [::String] - # Required. API resource name for inventory resource. - # - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/inventory` - # - # For `{project}`, either `project-number` or `project-id` can be provided. - # For `{instance}`, either Compute Engine `instance-id` or `instance-name` - # can be provided. - # @!attribute [rw] view - # @return [::Google::Cloud::OsConfig::V1::InventoryView] - # Inventory view indicating what information should be included in the - # inventory resource. If unspecified, the default view is BASIC. - class GetInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request message for listing inventory data for all VMs in the specified - # location. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # - # Format: `projects/{project}/locations/{location}/instances/-` - # - # For `{project}`, either `project-number` or `project-id` can be provided. - # @!attribute [rw] view - # @return [::Google::Cloud::OsConfig::V1::InventoryView] - # Inventory view indicating what information should be included in the - # inventory resource. If unspecified, the default view is BASIC. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # A pagination token returned from a previous call to - # `ListInventories` that indicates where this listing - # should continue from. - # @!attribute [rw] filter - # @return [::String] - # If provided, this field specifies the criteria that must be met by a - # `Inventory` API resource to be included in the response. - class ListInventoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response message for listing inventory data for all VMs in a specified - # location. - # @!attribute [rw] inventories - # @return [::Array<::Google::Cloud::OsConfig::V1::Inventory>] - # List of inventory objects. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token to retrieve the next page of inventory objects. - class ListInventoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The view for inventory objects. - module InventoryView - # The default value. - # The API defaults to the BASIC view. - INVENTORY_VIEW_UNSPECIFIED = 0 - - # Returns the basic inventory information that includes `os_info`. - BASIC = 1 - - # Returns all fields. - FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/type/device_resources.rb deleted file mode 100644 index 98103f9a8eb2..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb deleted file mode 100644 index 263cc28aa3d0..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb deleted file mode 100644 index b034d49fe22d..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb deleted file mode 100644 index be4e39e46ef2..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-cloud-asset-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/code.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/code.rb deleted file mode 100644 index 8cf36e815510..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/code.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 Rpc - # The canonical error codes for gRPC APIs. - # - # - # Sometimes multiple error codes may apply. Services should return - # the most specific error code that applies. For example, prefer - # `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. - # Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. - module Code - # Not an error; returned on success. - # - # HTTP Mapping: 200 OK - OK = 0 - - # The operation was cancelled, typically by the caller. - # - # HTTP Mapping: 499 Client Closed Request - CANCELLED = 1 - - # Unknown error. For example, this error may be returned when - # a `Status` value received from another address space belongs to - # an error space that is not known in this address space. Also - # errors raised by APIs that do not return enough error information - # may be converted to this error. - # - # HTTP Mapping: 500 Internal Server Error - UNKNOWN = 2 - - # The client specified an invalid argument. Note that this differs - # from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - # that are problematic regardless of the state of the system - # (e.g., a malformed file name). - # - # HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT = 3 - - # The deadline expired before the operation could complete. For operations - # that change the state of the system, this error may be returned - # even if the operation has completed successfully. For example, a - # successful response from a server could have been delayed long - # enough for the deadline to expire. - # - # HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED = 4 - - # Some requested entity (e.g., file or directory) was not found. - # - # Note to server developers: if a request is denied for an entire class - # of users, such as gradual feature rollout or undocumented allowlist, - # `NOT_FOUND` may be used. If a request is denied for some users within - # a class of users, such as user-based access control, `PERMISSION_DENIED` - # must be used. - # - # HTTP Mapping: 404 Not Found - NOT_FOUND = 5 - - # The entity that a client attempted to create (e.g., file or directory) - # already exists. - # - # HTTP Mapping: 409 Conflict - ALREADY_EXISTS = 6 - - # The caller does not have permission to execute the specified - # operation. `PERMISSION_DENIED` must not be used for rejections - # caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - # instead for those errors). `PERMISSION_DENIED` must not be - # used if the caller can not be identified (use `UNAUTHENTICATED` - # instead for those errors). This error code does not imply the - # request is valid or the requested entity exists or satisfies - # other pre-conditions. - # - # HTTP Mapping: 403 Forbidden - PERMISSION_DENIED = 7 - - # The request does not have valid authentication credentials for the - # operation. - # - # HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED = 16 - - # Some resource has been exhausted, perhaps a per-user quota, or - # perhaps the entire file system is out of space. - # - # HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED = 8 - - # The operation was rejected because the system is not in a state - # required for the operation's execution. For example, the directory - # to be deleted is non-empty, an rmdir operation is applied to - # a non-directory, etc. - # - # Service implementors can use the following guidelines to decide - # between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - # (a) Use `UNAVAILABLE` if the client can retry just the failing call. - # (b) Use `ABORTED` if the client should retry at a higher level. For - # example, when a client-specified test-and-set fails, indicating the - # client should restart a read-modify-write sequence. - # (c) Use `FAILED_PRECONDITION` if the client should not retry until - # the system state has been explicitly fixed. For example, if an "rmdir" - # fails because the directory is non-empty, `FAILED_PRECONDITION` - # should be returned since the client should not retry unless - # the files are deleted from the directory. - # - # HTTP Mapping: 400 Bad Request - FAILED_PRECONDITION = 9 - - # The operation was aborted, typically due to a concurrency issue such as - # a sequencer check failure or transaction abort. - # - # See the guidelines above for deciding between `FAILED_PRECONDITION`, - # `ABORTED`, and `UNAVAILABLE`. - # - # HTTP Mapping: 409 Conflict - ABORTED = 10 - - # The operation was attempted past the valid range. E.g., seeking or - # reading past end-of-file. - # - # Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - # be fixed if the system state changes. For example, a 32-bit file - # system will generate `INVALID_ARGUMENT` if asked to read at an - # offset that is not in the range [0,2^32-1], but it will generate - # `OUT_OF_RANGE` if asked to read from an offset past the current - # file size. - # - # There is a fair bit of overlap between `FAILED_PRECONDITION` and - # `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - # error) when it applies so that callers who are iterating through - # a space can easily look for an `OUT_OF_RANGE` error to detect when - # they are done. - # - # HTTP Mapping: 400 Bad Request - OUT_OF_RANGE = 11 - - # The operation is not implemented or is not supported/enabled in this - # service. - # - # HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED = 12 - - # Internal errors. This means that some invariants expected by the - # underlying system have been broken. This error code is reserved - # for serious errors. - # - # HTTP Mapping: 500 Internal Server Error - INTERNAL = 13 - - # The service is currently unavailable. This is most likely a - # transient condition, which can be corrected by retrying with - # a backoff. Note that it is not always safe to retry - # non-idempotent operations. - # - # See the guidelines above for deciding between `FAILED_PRECONDITION`, - # `ABORTED`, and `UNAVAILABLE`. - # - # HTTP Mapping: 503 Service Unavailable - UNAVAILABLE = 14 - - # Unrecoverable data loss or corruption. - # - # HTTP Mapping: 500 Internal Server Error - DATA_LOSS = 15 - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index 3c630675d70b..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/type/date.rb deleted file mode 100644 index a52275cebf89..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/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-cloud-asset-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-asset-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-asset-v1/snippets/Gemfile deleted file mode 100644 index 016da50341ca..000000000000 --- a/owl-bot-staging/google-cloud-asset-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-asset-v1", path: "../" -else - gem "google-cloud-asset-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-asset-v1/snippets/asset_service/analyze_iam_policy.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy.rb deleted file mode 100644 index 8317b08502c9..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_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 cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the analyze_iam_policy call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy. -# -def analyze_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new - - # Call the analyze_iam_policy method. - result = client.analyze_iam_policy request - - # The returned object is of type Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse. - p result -end -# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy_longrunning.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy_longrunning.rb deleted file mode 100644 index da476199d159..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_iam_policy_longrunning.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the analyze_iam_policy_longrunning call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning. -# -def analyze_iam_policy_longrunning - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new - - # Call the analyze_iam_policy_longrunning method. - result = client.analyze_iam_policy_longrunning request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_move.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_move.rb deleted file mode 100644 index 2058f68a557e..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_move.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_AnalyzeMove_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the analyze_move call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#analyze_move. -# -def analyze_move - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::AnalyzeMoveRequest.new - - # Call the analyze_move method. - result = client.analyze_move request - - # The returned object is of type Google::Cloud::Asset::V1::AnalyzeMoveResponse. - p result -end -# [END cloudasset_v1_generated_AssetService_AnalyzeMove_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policies.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policies.rb deleted file mode 100644 index 2dfbc70eb98f..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_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 cloudasset_v1_generated_AssetService_AnalyzeOrgPolicies_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the analyze_org_policies call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies. -# -def analyze_org_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new - - # Call the analyze_org_policies method. - result = client.analyze_org_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::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult. - p item - end -end -# [END cloudasset_v1_generated_AssetService_AnalyzeOrgPolicies_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_assets.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_assets.rb deleted file mode 100644 index 8a63275fb823..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedAssets_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the analyze_org_policy_governed_assets call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets. -# -def analyze_org_policy_governed_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new - - # Call the analyze_org_policy_governed_assets method. - result = client.analyze_org_policy_governed_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset. - p item - end -end -# [END cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedAssets_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_containers.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_containers.rb deleted file mode 100644 index 473b472ff343..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/analyze_org_policy_governed_containers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedContainers_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the analyze_org_policy_governed_containers call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers. -# -def analyze_org_policy_governed_containers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new - - # Call the analyze_org_policy_governed_containers method. - result = client.analyze_org_policy_governed_containers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer. - p item - end -end -# [END cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedContainers_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_assets_history.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_assets_history.rb deleted file mode 100644 index 1c6fe8fa2fc9..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_assets_history.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the batch_get_assets_history call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#batch_get_assets_history. -# -def batch_get_assets_history - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new - - # Call the batch_get_assets_history method. - result = client.batch_get_assets_history request - - # The returned object is of type Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse. - p result -end -# [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_effective_iam_policies.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_effective_iam_policies.rb deleted file mode 100644 index 2b4a4fc1cf5d..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/batch_get_effective_iam_policies.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the batch_get_effective_iam_policies call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies. -# -def batch_get_effective_iam_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new - - # Call the batch_get_effective_iam_policies method. - result = client.batch_get_effective_iam_policies request - - # The returned object is of type Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse. - p result -end -# [END cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_feed.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_feed.rb deleted file mode 100644 index bfe499e41160..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_feed.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_CreateFeed_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the create_feed call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#create_feed. -# -def create_feed - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::CreateFeedRequest.new - - # Call the create_feed method. - result = client.create_feed request - - # The returned object is of type Google::Cloud::Asset::V1::Feed. - p result -end -# [END cloudasset_v1_generated_AssetService_CreateFeed_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_saved_query.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_saved_query.rb deleted file mode 100644 index 3e607840bc4e..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/create_saved_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 cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the create_saved_query call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#create_saved_query. -# -def create_saved_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::CreateSavedQueryRequest.new - - # Call the create_saved_query method. - result = client.create_saved_query request - - # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - p result -end -# [END cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_feed.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_feed.rb deleted file mode 100644 index b881f0e713c1..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_feed.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_DeleteFeed_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the delete_feed call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#delete_feed. -# -def delete_feed - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::DeleteFeedRequest.new - - # Call the delete_feed method. - result = client.delete_feed request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudasset_v1_generated_AssetService_DeleteFeed_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_saved_query.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_saved_query.rb deleted file mode 100644 index 478f2f3a23f8..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/delete_saved_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 cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the delete_saved_query call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#delete_saved_query. -# -def delete_saved_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new - - # Call the delete_saved_query method. - result = client.delete_saved_query request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/export_assets.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/export_assets.rb deleted file mode 100644 index 4e287d8e3537..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/export_assets.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_ExportAssets_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the export_assets call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#export_assets. -# -def export_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::ExportAssetsRequest.new - - # Call the export_assets method. - result = client.export_assets request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudasset_v1_generated_AssetService_ExportAssets_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_feed.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_feed.rb deleted file mode 100644 index 927394ec22c9..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_feed.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_GetFeed_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the get_feed call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#get_feed. -# -def get_feed - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::GetFeedRequest.new - - # Call the get_feed method. - result = client.get_feed request - - # The returned object is of type Google::Cloud::Asset::V1::Feed. - p result -end -# [END cloudasset_v1_generated_AssetService_GetFeed_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_saved_query.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_saved_query.rb deleted file mode 100644 index dbcbe2aed600..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/get_saved_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 cloudasset_v1_generated_AssetService_GetSavedQuery_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the get_saved_query call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#get_saved_query. -# -def get_saved_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::GetSavedQueryRequest.new - - # Call the get_saved_query method. - result = client.get_saved_query request - - # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - p result -end -# [END cloudasset_v1_generated_AssetService_GetSavedQuery_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_assets.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_assets.rb deleted file mode 100644 index 95904aa790a3..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_ListAssets_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the list_assets call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#list_assets. -# -def list_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::ListAssetsRequest.new - - # Call the list_assets method. - result = client.list_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Asset::V1::Asset. - p item - end -end -# [END cloudasset_v1_generated_AssetService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_feeds.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_feeds.rb deleted file mode 100644 index 851f2fdf0355..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_feeds.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_ListFeeds_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the list_feeds call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#list_feeds. -# -def list_feeds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::ListFeedsRequest.new - - # Call the list_feeds method. - result = client.list_feeds request - - # The returned object is of type Google::Cloud::Asset::V1::ListFeedsResponse. - p result -end -# [END cloudasset_v1_generated_AssetService_ListFeeds_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_saved_queries.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_saved_queries.rb deleted file mode 100644 index 26f0bc586a38..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/list_saved_queries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_ListSavedQueries_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the list_saved_queries call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#list_saved_queries. -# -def list_saved_queries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::ListSavedQueriesRequest.new - - # Call the list_saved_queries method. - result = client.list_saved_queries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Asset::V1::SavedQuery. - p item - end -end -# [END cloudasset_v1_generated_AssetService_ListSavedQueries_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/query_assets.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/query_assets.rb deleted file mode 100644 index 3139d5fabbe7..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/query_assets.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_QueryAssets_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the query_assets call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#query_assets. -# -def query_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::QueryAssetsRequest.new - - # Call the query_assets method. - result = client.query_assets request - - # The returned object is of type Google::Cloud::Asset::V1::QueryAssetsResponse. - p result -end -# [END cloudasset_v1_generated_AssetService_QueryAssets_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_iam_policies.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_iam_policies.rb deleted file mode 100644 index 24e36f119cda..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_iam_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 cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the search_all_iam_policies call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#search_all_iam_policies. -# -def search_all_iam_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new - - # Call the search_all_iam_policies method. - result = client.search_all_iam_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::Cloud::Asset::V1::IamPolicySearchResult. - p item - end -end -# [END cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_resources.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_resources.rb deleted file mode 100644 index dbf8eb79bf0b..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/search_all_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 cloudasset_v1_generated_AssetService_SearchAllResources_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the search_all_resources call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#search_all_resources. -# -def search_all_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::SearchAllResourcesRequest.new - - # Call the search_all_resources method. - result = client.search_all_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::Asset::V1::ResourceSearchResult. - p item - end -end -# [END cloudasset_v1_generated_AssetService_SearchAllResources_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_feed.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_feed.rb deleted file mode 100644 index 677f83d06d0a..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_feed.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudasset_v1_generated_AssetService_UpdateFeed_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the update_feed call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#update_feed. -# -def update_feed - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::UpdateFeedRequest.new - - # Call the update_feed method. - result = client.update_feed request - - # The returned object is of type Google::Cloud::Asset::V1::Feed. - p result -end -# [END cloudasset_v1_generated_AssetService_UpdateFeed_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_saved_query.rb b/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_saved_query.rb deleted file mode 100644 index 99b68ac1455b..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/asset_service/update_saved_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 cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] -require "google/cloud/asset/v1" - -## -# Snippet for the update_saved_query call in the AssetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Asset::V1::AssetService::Client#update_saved_query. -# -def update_saved_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Asset::V1::AssetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new - - # Call the update_saved_query method. - result = client.update_saved_query request - - # The returned object is of type Google::Cloud::Asset::V1::SavedQuery. - p result -end -# [END cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] diff --git a/owl-bot-staging/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json b/owl-bot-staging/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json deleted file mode 100644 index e68fe106d181..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/snippets/snippet_metadata_google.cloud.asset.v1.json +++ /dev/null @@ -1,935 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-asset-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.asset.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudasset_v1_generated_AssetService_ExportAssets_sync", - "title": "Snippet for the export_assets call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#export_assets.", - "file": "asset_service/export_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_assets", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#export_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::ExportAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "ExportAssets", - "full_name": "google.cloud.asset.v1.AssetService.ExportAssets", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_ListAssets_sync", - "title": "Snippet for the list_assets call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#list_assets.", - "file": "asset_service/list_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assets", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#list_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::ListAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::ListAssetsResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "ListAssets", - "full_name": "google.cloud.asset.v1.AssetService.ListAssets", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync", - "title": "Snippet for the batch_get_assets_history call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#batch_get_assets_history.", - "file": "asset_service/batch_get_assets_history.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_get_assets_history", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#batch_get_assets_history", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "BatchGetAssetsHistory", - "full_name": "google.cloud.asset.v1.AssetService.BatchGetAssetsHistory", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_CreateFeed_sync", - "title": "Snippet for the create_feed call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#create_feed.", - "file": "asset_service/create_feed.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_feed", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#create_feed", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::CreateFeedRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::Feed", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "CreateFeed", - "full_name": "google.cloud.asset.v1.AssetService.CreateFeed", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_GetFeed_sync", - "title": "Snippet for the get_feed call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#get_feed.", - "file": "asset_service/get_feed.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_feed", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#get_feed", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::GetFeedRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::Feed", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "GetFeed", - "full_name": "google.cloud.asset.v1.AssetService.GetFeed", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_ListFeeds_sync", - "title": "Snippet for the list_feeds call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#list_feeds.", - "file": "asset_service/list_feeds.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_feeds", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#list_feeds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::ListFeedsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::ListFeedsResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "ListFeeds", - "full_name": "google.cloud.asset.v1.AssetService.ListFeeds", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_UpdateFeed_sync", - "title": "Snippet for the update_feed call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#update_feed.", - "file": "asset_service/update_feed.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_feed", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#update_feed", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::UpdateFeedRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::Feed", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "UpdateFeed", - "full_name": "google.cloud.asset.v1.AssetService.UpdateFeed", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_DeleteFeed_sync", - "title": "Snippet for the delete_feed call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#delete_feed.", - "file": "asset_service/delete_feed.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_feed", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#delete_feed", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::DeleteFeedRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "DeleteFeed", - "full_name": "google.cloud.asset.v1.AssetService.DeleteFeed", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_SearchAllResources_sync", - "title": "Snippet for the search_all_resources call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#search_all_resources.", - "file": "asset_service/search_all_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_all_resources", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#search_all_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::SearchAllResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::SearchAllResourcesResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "SearchAllResources", - "full_name": "google.cloud.asset.v1.AssetService.SearchAllResources", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync", - "title": "Snippet for the search_all_iam_policies call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#search_all_iam_policies.", - "file": "asset_service/search_all_iam_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_all_iam_policies", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#search_all_iam_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "SearchAllIamPolicies", - "full_name": "google.cloud.asset.v1.AssetService.SearchAllIamPolicies", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync", - "title": "Snippet for the analyze_iam_policy call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy.", - "file": "asset_service/analyze_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "analyze_iam_policy", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "AnalyzeIamPolicy", - "full_name": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicy", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync", - "title": "Snippet for the analyze_iam_policy_longrunning call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning.", - "file": "asset_service/analyze_iam_policy_longrunning.rb", - "language": "RUBY", - "client_method": { - "short_name": "analyze_iam_policy_longrunning", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_iam_policy_longrunning", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "AnalyzeIamPolicyLongrunning", - "full_name": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeMove_sync", - "title": "Snippet for the analyze_move call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_move.", - "file": "asset_service/analyze_move.rb", - "language": "RUBY", - "client_method": { - "short_name": "analyze_move", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_move", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::AnalyzeMoveRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::AnalyzeMoveResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "AnalyzeMove", - "full_name": "google.cloud.asset.v1.AssetService.AnalyzeMove", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_QueryAssets_sync", - "title": "Snippet for the query_assets call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#query_assets.", - "file": "asset_service/query_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "query_assets", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#query_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::QueryAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::QueryAssetsResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "QueryAssets", - "full_name": "google.cloud.asset.v1.AssetService.QueryAssets", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_sync", - "title": "Snippet for the create_saved_query call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#create_saved_query.", - "file": "asset_service/create_saved_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_saved_query", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#create_saved_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::CreateSavedQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::SavedQuery", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "CreateSavedQuery", - "full_name": "google.cloud.asset.v1.AssetService.CreateSavedQuery", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_GetSavedQuery_sync", - "title": "Snippet for the get_saved_query call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#get_saved_query.", - "file": "asset_service/get_saved_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_saved_query", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#get_saved_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::GetSavedQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::SavedQuery", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "GetSavedQuery", - "full_name": "google.cloud.asset.v1.AssetService.GetSavedQuery", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_ListSavedQueries_sync", - "title": "Snippet for the list_saved_queries call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#list_saved_queries.", - "file": "asset_service/list_saved_queries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_saved_queries", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#list_saved_queries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::ListSavedQueriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::ListSavedQueriesResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "ListSavedQueries", - "full_name": "google.cloud.asset.v1.AssetService.ListSavedQueries", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync", - "title": "Snippet for the update_saved_query call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#update_saved_query.", - "file": "asset_service/update_saved_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_saved_query", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#update_saved_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::UpdateSavedQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::SavedQuery", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "UpdateSavedQuery", - "full_name": "google.cloud.asset.v1.AssetService.UpdateSavedQuery", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync", - "title": "Snippet for the delete_saved_query call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#delete_saved_query.", - "file": "asset_service/delete_saved_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_saved_query", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#delete_saved_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::DeleteSavedQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "DeleteSavedQuery", - "full_name": "google.cloud.asset.v1.AssetService.DeleteSavedQuery", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync", - "title": "Snippet for the batch_get_effective_iam_policies call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies.", - "file": "asset_service/batch_get_effective_iam_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_get_effective_iam_policies", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "BatchGetEffectiveIamPolicies", - "full_name": "google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeOrgPolicies_sync", - "title": "Snippet for the analyze_org_policies call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies.", - "file": "asset_service/analyze_org_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "analyze_org_policies", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "AnalyzeOrgPolicies", - "full_name": "google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedContainers_sync", - "title": "Snippet for the analyze_org_policy_governed_containers call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers.", - "file": "asset_service/analyze_org_policy_governed_containers.rb", - "language": "RUBY", - "client_method": { - "short_name": "analyze_org_policy_governed_containers", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_containers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "AnalyzeOrgPolicyGovernedContainers", - "full_name": "google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudasset_v1_generated_AssetService_AnalyzeOrgPolicyGovernedAssets_sync", - "title": "Snippet for the analyze_org_policy_governed_assets call in the AssetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets.", - "file": "asset_service/analyze_org_policy_governed_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "analyze_org_policy_governed_assets", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client#analyze_org_policy_governed_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse", - "client": { - "short_name": "AssetService::Client", - "full_name": "::Google::Cloud::Asset::V1::AssetService::Client" - }, - "method": { - "short_name": "AnalyzeOrgPolicyGovernedAssets", - "full_name": "google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets", - "service": { - "short_name": "AssetService", - "full_name": "google.cloud.asset.v1.AssetService" - } - } - }, - "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-asset-v1/test/google/cloud/asset/v1/asset_service_operations_test.rb b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_operations_test.rb deleted file mode 100644 index 20f323f4e53d..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/asset/v1/asset_service_pb" -require "google/cloud/asset/v1/asset_service_services_pb" -require "google/cloud/asset/v1/asset_service" - -class ::Google::Cloud::Asset::V1::AssetService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Asset::V1::AssetService::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::Asset::V1::AssetService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_paths_test.rb b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_paths_test.rb deleted file mode 100644 index 9a032c5309f8..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_paths_test.rb +++ /dev/null @@ -1,115 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/asset/v1/asset_service" - -class ::Google::Cloud::Asset::V1::AssetService::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_feed_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.feed_path project: "value0", feed: "value1" - assert_equal "projects/value0/feeds/value1", path - - path = client.feed_path folder: "value0", feed: "value1" - assert_equal "folders/value0/feeds/value1", path - - path = client.feed_path organization: "value0", feed: "value1" - assert_equal "organizations/value0/feeds/value1", path - end - end - - def test_folder_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_path folder: "value0" - assert_equal "folders/value0", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", 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::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_saved_query_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.saved_query_path project: "value0", saved_query: "value1" - assert_equal "projects/value0/savedQueries/value1", path - - path = client.saved_query_path folder: "value0", saved_query: "value1" - assert_equal "folders/value0/savedQueries/value1", path - - path = client.saved_query_path organization: "value0", saved_query: "value1" - assert_equal "organizations/value0/savedQueries/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_rest_test.rb b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_rest_test.rb deleted file mode 100644 index 7934fd46b9ba..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_rest_test.rb +++ /dev/null @@ -1,1401 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/asset/v1/asset_service_pb" -require "google/cloud/asset/v1/asset_service/rest" - - -class ::Google::Cloud::Asset::V1::AssetService::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_export_assets - # Create test objects. - 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" - read_time = {} - asset_types = ["hello world"] - content_type = :CONTENT_TYPE_UNSPECIFIED - output_config = {} - relationship_types = ["hello world"] - - export_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_export_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_assets_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_assets parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_assets ::Google::Cloud::Asset::V1::ExportAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_assets(::Google::Cloud::Asset::V1::ExportAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_assets_client_stub.call_count - end - end - end - - def test_list_assets - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::ListAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_time = {} - asset_types = ["hello world"] - content_type = :CONTENT_TYPE_UNSPECIFIED - page_size = 42 - page_token = "hello world" - relationship_types = ["hello world"] - - list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_assets parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Asset::V1::ListAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Asset::V1::ListAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_count - end - end - end - - def test_batch_get_assets_history - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset_names = ["hello world"] - content_type = :CONTENT_TYPE_UNSPECIFIED - read_time_window = {} - relationship_types = ["hello world"] - - batch_get_assets_history_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_batch_get_assets_history_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_get_assets_history_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_get_assets_history({ parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_get_assets_history parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_get_assets_history ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new(parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_get_assets_history({ parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_get_assets_history(::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new(parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_get_assets_history_client_stub.call_count - end - end - end - - def test_create_feed - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::Feed.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - feed_id = "hello world" - feed = {} - - create_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_create_feed_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_feed_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_feed({ parent: parent, feed_id: feed_id, feed: feed }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_feed parent: parent, feed_id: feed_id, feed: feed do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_feed ::Google::Cloud::Asset::V1::CreateFeedRequest.new(parent: parent, feed_id: feed_id, feed: feed) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_feed({ parent: parent, feed_id: feed_id, feed: feed }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_feed(::Google::Cloud::Asset::V1::CreateFeedRequest.new(parent: parent, feed_id: feed_id, feed: feed), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_feed_client_stub.call_count - end - end - end - - def test_get_feed - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::Feed.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_get_feed_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_feed_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_feed({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_feed name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_feed ::Google::Cloud::Asset::V1::GetFeedRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_feed({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_feed(::Google::Cloud::Asset::V1::GetFeedRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_feed_client_stub.call_count - end - end - end - - def test_list_feeds - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::ListFeedsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_feeds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_list_feeds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_feeds_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_feeds({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_feeds parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_feeds ::Google::Cloud::Asset::V1::ListFeedsRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_feeds({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_feeds(::Google::Cloud::Asset::V1::ListFeedsRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_feeds_client_stub.call_count - end - end - end - - def test_update_feed - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::Feed.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - feed = {} - update_mask = {} - - update_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_update_feed_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_feed_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_feed({ feed: feed, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_feed feed: feed, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_feed ::Google::Cloud::Asset::V1::UpdateFeedRequest.new(feed: feed, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_feed({ feed: feed, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_feed(::Google::Cloud::Asset::V1::UpdateFeedRequest.new(feed: feed, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_feed_client_stub.call_count - end - end - end - - def test_delete_feed - # 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_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_delete_feed_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_feed_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_feed({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_feed name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_feed ::Google::Cloud::Asset::V1::DeleteFeedRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_feed({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_feed(::Google::Cloud::Asset::V1::DeleteFeedRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_feed_client_stub.call_count - end - end - end - - def test_search_all_resources - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::SearchAllResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - query = "hello world" - asset_types = ["hello world"] - page_size = 42 - page_token = "hello world" - order_by = "hello world" - read_mask = {} - - search_all_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::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_search_all_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_all_resources_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_all_resources({ scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_all_resources scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_all_resources ::Google::Cloud::Asset::V1::SearchAllResourcesRequest.new(scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_all_resources({ scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_all_resources(::Google::Cloud::Asset::V1::SearchAllResourcesRequest.new(scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_all_resources_client_stub.call_count - end - end - end - - def test_search_all_iam_policies - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - asset_types = ["hello world"] - order_by = "hello world" - - search_all_iam_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_search_all_iam_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_all_iam_policies_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_all_iam_policies({ scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_all_iam_policies scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_all_iam_policies ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new(scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_all_iam_policies({ scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_all_iam_policies(::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new(scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_all_iam_policies_client_stub.call_count - end - end - end - - def test_analyze_iam_policy - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - analysis_query = {} - saved_analysis_query = "hello world" - execution_timeout = {} - - analyze_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, analyze_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.analyze_iam_policy({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.analyze_iam_policy analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.analyze_iam_policy ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.analyze_iam_policy({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.analyze_iam_policy(::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, analyze_iam_policy_client_stub.call_count - end - end - end - - def test_analyze_iam_policy_longrunning - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - analysis_query = {} - saved_analysis_query = "hello world" - output_config = {} - - analyze_iam_policy_longrunning_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_iam_policy_longrunning_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, analyze_iam_policy_longrunning_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.analyze_iam_policy_longrunning({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.analyze_iam_policy_longrunning analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.analyze_iam_policy_longrunning ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.analyze_iam_policy_longrunning({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.analyze_iam_policy_longrunning(::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, analyze_iam_policy_longrunning_client_stub.call_count - end - end - end - - def test_analyze_move - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::AnalyzeMoveResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - destination_parent = "hello world" - view = :ANALYSIS_VIEW_UNSPECIFIED - - analyze_move_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_move_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, analyze_move_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.analyze_move({ resource: resource, destination_parent: destination_parent, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.analyze_move resource: resource, destination_parent: destination_parent, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.analyze_move ::Google::Cloud::Asset::V1::AnalyzeMoveRequest.new(resource: resource, destination_parent: destination_parent, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.analyze_move({ resource: resource, destination_parent: destination_parent, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.analyze_move(::Google::Cloud::Asset::V1::AnalyzeMoveRequest.new(resource: resource, destination_parent: destination_parent, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, analyze_move_client_stub.call_count - end - end - end - - def test_query_assets - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::QueryAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - statement = "hello world" - page_size = 42 - page_token = "hello world" - timeout = {} - read_time_window = {} - output_config = {} - - query_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_query_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, query_assets_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.query_assets({ parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.query_assets parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.query_assets ::Google::Cloud::Asset::V1::QueryAssetsRequest.new(parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.query_assets({ parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.query_assets(::Google::Cloud::Asset::V1::QueryAssetsRequest.new(parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, query_assets_client_stub.call_count - end - end - end - - def test_create_saved_query - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::SavedQuery.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - saved_query = {} - saved_query_id = "hello world" - - create_saved_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_create_saved_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_saved_query_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_saved_query({ parent: parent, saved_query: saved_query, saved_query_id: saved_query_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_saved_query parent: parent, saved_query: saved_query, saved_query_id: saved_query_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_saved_query ::Google::Cloud::Asset::V1::CreateSavedQueryRequest.new(parent: parent, saved_query: saved_query, saved_query_id: saved_query_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_saved_query({ parent: parent, saved_query: saved_query, saved_query_id: saved_query_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_saved_query(::Google::Cloud::Asset::V1::CreateSavedQueryRequest.new(parent: parent, saved_query: saved_query, saved_query_id: saved_query_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_saved_query_client_stub.call_count - end - end - end - - def test_get_saved_query - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::SavedQuery.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_saved_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_get_saved_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_saved_query_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_saved_query({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_saved_query name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_saved_query ::Google::Cloud::Asset::V1::GetSavedQueryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_saved_query({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_saved_query(::Google::Cloud::Asset::V1::GetSavedQueryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_saved_query_client_stub.call_count - end - end - end - - def test_list_saved_queries - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::ListSavedQueriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_saved_queries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_list_saved_queries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_saved_queries_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_saved_queries({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_saved_queries parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_saved_queries ::Google::Cloud::Asset::V1::ListSavedQueriesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_saved_queries({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_saved_queries(::Google::Cloud::Asset::V1::ListSavedQueriesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_saved_queries_client_stub.call_count - end - end - end - - def test_update_saved_query - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::SavedQuery.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - saved_query = {} - update_mask = {} - - update_saved_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_update_saved_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_saved_query_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_saved_query({ saved_query: saved_query, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_saved_query saved_query: saved_query, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_saved_query ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new(saved_query: saved_query, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_saved_query({ saved_query: saved_query, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_saved_query(::Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new(saved_query: saved_query, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_saved_query_client_stub.call_count - end - end - end - - def test_delete_saved_query - # 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_saved_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_delete_saved_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_saved_query_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_saved_query({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_saved_query name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_saved_query ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_saved_query({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_saved_query(::Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_saved_query_client_stub.call_count - end - end - end - - def test_batch_get_effective_iam_policies - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - names = ["hello world"] - - batch_get_effective_iam_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_batch_get_effective_iam_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_get_effective_iam_policies_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_get_effective_iam_policies({ scope: scope, names: names }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_get_effective_iam_policies scope: scope, names: names do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_get_effective_iam_policies ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new(scope: scope, names: names) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_get_effective_iam_policies({ scope: scope, names: names }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_get_effective_iam_policies(::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new(scope: scope, names: names), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_get_effective_iam_policies_client_stub.call_count - end - end - end - - def test_analyze_org_policies - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - constraint = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - analyze_org_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::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_org_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, analyze_org_policies_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.analyze_org_policies({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.analyze_org_policies scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.analyze_org_policies ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.analyze_org_policies({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.analyze_org_policies(::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, analyze_org_policies_client_stub.call_count - end - end - end - - def test_analyze_org_policy_governed_containers - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - constraint = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - analyze_org_policy_governed_containers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_org_policy_governed_containers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, analyze_org_policy_governed_containers_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.analyze_org_policy_governed_containers({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.analyze_org_policy_governed_containers scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.analyze_org_policy_governed_containers ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.analyze_org_policy_governed_containers({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.analyze_org_policy_governed_containers(::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, analyze_org_policy_governed_containers_client_stub.call_count - end - end - end - - def test_analyze_org_policy_governed_assets - # Create test objects. - client_result = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - constraint = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - analyze_org_policy_governed_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Asset::V1::AssetService::Rest::ServiceStub.stub :transcode_analyze_org_policy_governed_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, analyze_org_policy_governed_assets_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.analyze_org_policy_governed_assets({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.analyze_org_policy_governed_assets scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.analyze_org_policy_governed_assets ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.analyze_org_policy_governed_assets({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.analyze_org_policy_governed_assets(::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, analyze_org_policy_governed_assets_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::Asset::V1::AssetService::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::Asset::V1::AssetService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb b/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb deleted file mode 100644 index e30ee04961cb..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/test/google/cloud/asset/v1/asset_service_test.rb +++ /dev/null @@ -1,1622 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/asset/v1/asset_service_pb" -require "google/cloud/asset/v1/asset_service" - -class ::Google::Cloud::Asset::V1::AssetService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_export_assets - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_time = {} - asset_types = ["hello world"] - content_type = :CONTENT_TYPE_UNSPECIFIED - output_config = {} - relationship_types = ["hello world"] - - export_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_assets, name - assert_kind_of ::Google::Cloud::Asset::V1::ExportAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal ["hello world"], request["asset_types"] - assert_equal :CONTENT_TYPE_UNSPECIFIED, request["content_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::OutputConfig), request["output_config"] - assert_equal ["hello world"], request["relationship_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_assets_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_assets parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_assets ::Google::Cloud::Asset::V1::ExportAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_assets(::Google::Cloud::Asset::V1::ExportAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, output_config: output_config, relationship_types: relationship_types), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_assets_client_stub.call_rpc_count - end - end - - def test_list_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::ListAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_time = {} - asset_types = ["hello world"] - content_type = :CONTENT_TYPE_UNSPECIFIED - page_size = 42 - page_token = "hello world" - relationship_types = ["hello world"] - - list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assets, name - assert_kind_of ::Google::Cloud::Asset::V1::ListAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal ["hello world"], request["asset_types"] - assert_equal :CONTENT_TYPE_UNSPECIFIED, request["content_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal ["hello world"], request["relationship_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_assets parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Asset::V1::ListAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_assets({ parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Asset::V1::ListAssetsRequest.new(parent: parent, read_time: read_time, asset_types: asset_types, content_type: content_type, page_size: page_size, page_token: page_token, relationship_types: relationship_types), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_rpc_count - end - end - - def test_batch_get_assets_history - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset_names = ["hello world"] - content_type = :CONTENT_TYPE_UNSPECIFIED - read_time_window = {} - relationship_types = ["hello world"] - - batch_get_assets_history_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_get_assets_history, name - assert_kind_of ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["asset_names"] - assert_equal :CONTENT_TYPE_UNSPECIFIED, request["content_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::TimeWindow), request["read_time_window"] - assert_equal ["hello world"], request["relationship_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_get_assets_history_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_get_assets_history({ parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_get_assets_history parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_get_assets_history ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new(parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_get_assets_history({ parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_get_assets_history(::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new(parent: parent, asset_names: asset_names, content_type: content_type, read_time_window: read_time_window, relationship_types: relationship_types), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_get_assets_history_client_stub.call_rpc_count - end - end - - def test_create_feed - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::Feed.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - feed_id = "hello world" - feed = {} - - create_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_feed, name - assert_kind_of ::Google::Cloud::Asset::V1::CreateFeedRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["feed_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::Feed), request["feed"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_feed_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_feed({ parent: parent, feed_id: feed_id, feed: feed }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_feed parent: parent, feed_id: feed_id, feed: feed do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_feed ::Google::Cloud::Asset::V1::CreateFeedRequest.new(parent: parent, feed_id: feed_id, feed: feed) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_feed({ parent: parent, feed_id: feed_id, feed: feed }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_feed(::Google::Cloud::Asset::V1::CreateFeedRequest.new(parent: parent, feed_id: feed_id, feed: feed), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_feed_client_stub.call_rpc_count - end - end - - def test_get_feed - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::Feed.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_feed, name - assert_kind_of ::Google::Cloud::Asset::V1::GetFeedRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_feed_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_feed({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_feed name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_feed ::Google::Cloud::Asset::V1::GetFeedRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_feed({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_feed(::Google::Cloud::Asset::V1::GetFeedRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_feed_client_stub.call_rpc_count - end - end - - def test_list_feeds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::ListFeedsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_feeds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_feeds, name - assert_kind_of ::Google::Cloud::Asset::V1::ListFeedsRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_feeds_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_feeds({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_feeds parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_feeds ::Google::Cloud::Asset::V1::ListFeedsRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_feeds({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_feeds(::Google::Cloud::Asset::V1::ListFeedsRequest.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_feeds_client_stub.call_rpc_count - end - end - - def test_update_feed - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::Feed.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - feed = {} - update_mask = {} - - update_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_feed, name - assert_kind_of ::Google::Cloud::Asset::V1::UpdateFeedRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::Feed), request["feed"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_feed_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_feed({ feed: feed, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_feed feed: feed, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_feed ::Google::Cloud::Asset::V1::UpdateFeedRequest.new(feed: feed, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_feed({ feed: feed, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_feed(::Google::Cloud::Asset::V1::UpdateFeedRequest.new(feed: feed, 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_feed_client_stub.call_rpc_count - end - end - - def test_delete_feed - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_feed, name - assert_kind_of ::Google::Cloud::Asset::V1::DeleteFeedRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_feed_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_feed({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_feed name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_feed ::Google::Cloud::Asset::V1::DeleteFeedRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_feed({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_feed(::Google::Cloud::Asset::V1::DeleteFeedRequest.new(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_feed_client_stub.call_rpc_count - end - end - - def test_search_all_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::SearchAllResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - query = "hello world" - asset_types = ["hello world"] - page_size = 42 - page_token = "hello world" - order_by = "hello world" - read_mask = {} - - search_all_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_all_resources, name - assert_kind_of ::Google::Cloud::Asset::V1::SearchAllResourcesRequest, request - assert_equal "hello world", request["scope"] - assert_equal "hello world", request["query"] - assert_equal ["hello world"], request["asset_types"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_all_resources_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_all_resources({ scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_all_resources scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_all_resources ::Google::Cloud::Asset::V1::SearchAllResourcesRequest.new(scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_all_resources({ scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_all_resources(::Google::Cloud::Asset::V1::SearchAllResourcesRequest.new(scope: scope, query: query, asset_types: asset_types, page_size: page_size, page_token: page_token, order_by: order_by, read_mask: read_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_all_resources_client_stub.call_rpc_count - end - end - - def test_search_all_iam_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - asset_types = ["hello world"] - order_by = "hello world" - - search_all_iam_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_all_iam_policies, name - assert_kind_of ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, request - assert_equal "hello world", request["scope"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal ["hello world"], request["asset_types"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_all_iam_policies_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_all_iam_policies({ scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_all_iam_policies scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_all_iam_policies ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new(scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_all_iam_policies({ scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_all_iam_policies(::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new(scope: scope, query: query, page_size: page_size, page_token: page_token, asset_types: asset_types, 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, search_all_iam_policies_client_stub.call_rpc_count - end - end - - def test_analyze_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - analysis_query = {} - saved_analysis_query = "hello world" - execution_timeout = {} - - analyze_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :analyze_iam_policy, name - assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery), request["analysis_query"] - assert_equal "hello world", request["saved_analysis_query"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["execution_timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, analyze_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.analyze_iam_policy({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.analyze_iam_policy analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.analyze_iam_policy ::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.analyze_iam_policy({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.analyze_iam_policy(::Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, execution_timeout: execution_timeout), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, analyze_iam_policy_client_stub.call_rpc_count - end - end - - def test_analyze_iam_policy_longrunning - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - analysis_query = {} - saved_analysis_query = "hello world" - output_config = {} - - analyze_iam_policy_longrunning_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :analyze_iam_policy_longrunning, name - assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery), request["analysis_query"] - assert_equal "hello world", request["saved_analysis_query"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::IamPolicyAnalysisOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, analyze_iam_policy_longrunning_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.analyze_iam_policy_longrunning({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.analyze_iam_policy_longrunning analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.analyze_iam_policy_longrunning ::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.analyze_iam_policy_longrunning({ analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.analyze_iam_policy_longrunning(::Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new(analysis_query: analysis_query, saved_analysis_query: saved_analysis_query, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, analyze_iam_policy_longrunning_client_stub.call_rpc_count - end - end - - def test_analyze_move - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::AnalyzeMoveResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - destination_parent = "hello world" - view = :ANALYSIS_VIEW_UNSPECIFIED - - analyze_move_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :analyze_move, name - assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeMoveRequest, request - assert_equal "hello world", request["resource"] - assert_equal "hello world", request["destination_parent"] - assert_equal :ANALYSIS_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, analyze_move_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.analyze_move({ resource: resource, destination_parent: destination_parent, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.analyze_move resource: resource, destination_parent: destination_parent, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.analyze_move ::Google::Cloud::Asset::V1::AnalyzeMoveRequest.new(resource: resource, destination_parent: destination_parent, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.analyze_move({ resource: resource, destination_parent: destination_parent, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.analyze_move(::Google::Cloud::Asset::V1::AnalyzeMoveRequest.new(resource: resource, destination_parent: destination_parent, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, analyze_move_client_stub.call_rpc_count - end - end - - def test_query_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::QueryAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - statement = "hello world" - page_size = 42 - page_token = "hello world" - timeout = {} - read_time_window = {} - output_config = {} - - query_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :query_assets, name - assert_kind_of ::Google::Cloud::Asset::V1::QueryAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["statement"] - assert_equal :statement, request.query - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::TimeWindow), request["read_time_window"] - assert_equal :read_time_window, request.time - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::QueryAssetsOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, query_assets_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.query_assets({ parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.query_assets parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.query_assets ::Google::Cloud::Asset::V1::QueryAssetsRequest.new(parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.query_assets({ parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.query_assets(::Google::Cloud::Asset::V1::QueryAssetsRequest.new(parent: parent, statement: statement, page_size: page_size, page_token: page_token, timeout: timeout, read_time_window: read_time_window, output_config: output_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, query_assets_client_stub.call_rpc_count - end - end - - def test_create_saved_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::SavedQuery.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - saved_query = {} - saved_query_id = "hello world" - - create_saved_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_saved_query, name - assert_kind_of ::Google::Cloud::Asset::V1::CreateSavedQueryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::SavedQuery), request["saved_query"] - assert_equal "hello world", request["saved_query_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_saved_query_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_saved_query({ parent: parent, saved_query: saved_query, saved_query_id: saved_query_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_saved_query parent: parent, saved_query: saved_query, saved_query_id: saved_query_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_saved_query ::Google::Cloud::Asset::V1::CreateSavedQueryRequest.new(parent: parent, saved_query: saved_query, saved_query_id: saved_query_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_saved_query({ parent: parent, saved_query: saved_query, saved_query_id: saved_query_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_saved_query(::Google::Cloud::Asset::V1::CreateSavedQueryRequest.new(parent: parent, saved_query: saved_query, saved_query_id: saved_query_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_saved_query_client_stub.call_rpc_count - end - end - - def test_get_saved_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::SavedQuery.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_saved_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_saved_query, name - assert_kind_of ::Google::Cloud::Asset::V1::GetSavedQueryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_saved_query_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_saved_query({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_saved_query name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_saved_query ::Google::Cloud::Asset::V1::GetSavedQueryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_saved_query({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_saved_query(::Google::Cloud::Asset::V1::GetSavedQueryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_saved_query_client_stub.call_rpc_count - end - end - - def test_list_saved_queries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::ListSavedQueriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_saved_queries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_saved_queries, name - assert_kind_of ::Google::Cloud::Asset::V1::ListSavedQueriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_saved_queries_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_saved_queries({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_saved_queries parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_saved_queries ::Google::Cloud::Asset::V1::ListSavedQueriesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_saved_queries({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_saved_queries(::Google::Cloud::Asset::V1::ListSavedQueriesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_saved_queries_client_stub.call_rpc_count - end - end - - def test_update_saved_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::SavedQuery.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - saved_query = {} - update_mask = {} - - update_saved_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_saved_query, name - assert_kind_of ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Asset::V1::SavedQuery), request["saved_query"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_saved_query_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_saved_query({ saved_query: saved_query, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_saved_query saved_query: saved_query, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_saved_query ::Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new(saved_query: saved_query, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_saved_query({ saved_query: saved_query, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_saved_query(::Google::Cloud::Asset::V1::UpdateSavedQueryRequest.new(saved_query: saved_query, 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_saved_query_client_stub.call_rpc_count - end - end - - def test_delete_saved_query - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_saved_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_saved_query, name - assert_kind_of ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_saved_query_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_saved_query({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_saved_query name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_saved_query ::Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_saved_query({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_saved_query(::Google::Cloud::Asset::V1::DeleteSavedQueryRequest.new(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_saved_query_client_stub.call_rpc_count - end - end - - def test_batch_get_effective_iam_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - names = ["hello world"] - - batch_get_effective_iam_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_get_effective_iam_policies, name - assert_kind_of ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest, request - assert_equal "hello world", request["scope"] - assert_equal ["hello world"], request["names"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_get_effective_iam_policies_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_get_effective_iam_policies({ scope: scope, names: names }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_get_effective_iam_policies scope: scope, names: names do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_get_effective_iam_policies ::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new(scope: scope, names: names) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_get_effective_iam_policies({ scope: scope, names: names }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_get_effective_iam_policies(::Google::Cloud::Asset::V1::BatchGetEffectiveIamPoliciesRequest.new(scope: scope, names: names), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_get_effective_iam_policies_client_stub.call_rpc_count - end - end - - def test_analyze_org_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - constraint = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - analyze_org_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :analyze_org_policies, name - assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest, request - assert_equal "hello world", request["scope"] - assert_equal "hello world", request["constraint"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert request.has_page_size? - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, analyze_org_policies_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.analyze_org_policies({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.analyze_org_policies scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.analyze_org_policies ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.analyze_org_policies({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.analyze_org_policies(::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, analyze_org_policies_client_stub.call_rpc_count - end - end - - def test_analyze_org_policy_governed_containers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - constraint = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - analyze_org_policy_governed_containers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :analyze_org_policy_governed_containers, name - assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest, request - assert_equal "hello world", request["scope"] - assert_equal "hello world", request["constraint"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert request.has_page_size? - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, analyze_org_policy_governed_containers_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.analyze_org_policy_governed_containers({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.analyze_org_policy_governed_containers scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.analyze_org_policy_governed_containers ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.analyze_org_policy_governed_containers({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.analyze_org_policy_governed_containers(::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, analyze_org_policy_governed_containers_client_stub.call_rpc_count - end - end - - def test_analyze_org_policy_governed_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - constraint = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - analyze_org_policy_governed_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :analyze_org_policy_governed_assets, name - assert_kind_of ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest, request - assert_equal "hello world", request["scope"] - assert_equal "hello world", request["constraint"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert request.has_page_size? - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, analyze_org_policy_governed_assets_client_stub do - # Create client - client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.analyze_org_policy_governed_assets({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.analyze_org_policy_governed_assets scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.analyze_org_policy_governed_assets ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.analyze_org_policy_governed_assets({ scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.analyze_org_policy_governed_assets(::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsRequest.new(scope: scope, constraint: constraint, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, analyze_org_policy_governed_assets_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Asset::V1::AssetService::Client.new do |config| - 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::Asset::V1::AssetService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::Asset::V1::AssetService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Asset::V1::AssetService::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::Asset::V1::AssetService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Asset::V1::AssetService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-asset-v1/test/helper.rb b/owl-bot-staging/google-cloud-asset-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-asset-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json deleted file mode 100644 index 69650035435c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "assuredworkloads.googleapis.com", - "api_shortname": "assuredworkloads", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1/latest", - "distribution_name": "google-cloud-assured_workloads-v1", - "is_cloud": true, - "language": "ruby", - "name": "assuredworkloads", - "name_pretty": "Assured Workloads for Government V1 API", - "product_documentation": "https://cloud.google.com/assured-workloads/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", - "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml deleted file mode 100644 index 1a84e3a85a74..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-assured_workloads-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-assured_workloads-v1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts deleted file mode 100644 index fd857a4e0231..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Assured Workloads for Government V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md deleted file mode 100644 index 3fba6040c2eb..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-assured_workloads-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-assured_workloads-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/assured_workloads/v1" - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/assured_workloads/v1" - -::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-assured_workloads-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/assured_workloads/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1/README.md deleted file mode 100644 index a0bb594d8639..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Assured Workloads for Government V1 API - -API Client library for the Assured Workloads for Government V1 API - -Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Assured Workloads for Government V1 API. Most users should consider using -the main client gem, -[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-assured_workloads-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/assuredworkloads.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/assured_workloads/v1" - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new -request = ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new # (request fields as keyword arguments...) -response = client.create_workload request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/assured-workloads/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/assured_workloads/v1" -require "logger" - -client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-assured_workloads`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-assured_workloads-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-assured_workloads`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-assured_workloads-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile deleted file mode 100644 index e8a4e1de245c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-assured_workloads-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ASSURED_WORKLOADS_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ASSURED_WORKLOADS_PROJECT"] = project - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project - ENV["ASSURED_WORKLOADS_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-assured_workloads-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-assured_workloads-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-assured_workloads-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-assured_workloads-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-assured_workloads-v1" - header "google-cloud-assured_workloads-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-assured_workloads-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-assured_workloads-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-assured_workloads-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-assured_workloads-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json deleted file mode 100644 index 4117f432b2e3..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.assuredworkloads.v1", - "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1", - "services": { - "AssuredWorkloadsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client", - "rpcs": { - "CreateWorkload": { - "methods": [ - "create_workload" - ] - }, - "UpdateWorkload": { - "methods": [ - "update_workload" - ] - }, - "RestrictAllowedResources": { - "methods": [ - "restrict_allowed_resources" - ] - }, - "DeleteWorkload": { - "methods": [ - "delete_workload" - ] - }, - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - }, - "ListViolations": { - "methods": [ - "list_violations" - ] - }, - "GetViolation": { - "methods": [ - "get_violation" - ] - }, - "AcknowledgeViolation": { - "methods": [ - "acknowledge_violation" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec deleted file mode 100644 index 0b9428d770a4..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/google-cloud-assured_workloads-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/assured_workloads/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-assured_workloads-v1" - gem.version = Google::Cloud::AssuredWorkloads::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." - gem.summary = "API Client library for the Assured Workloads for Government V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb deleted file mode 100644 index 24f2ce22bdb4..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google-cloud-assured_workloads-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/assured_workloads/v1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb deleted file mode 100644 index 8a860900f3a7..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/assured_workloads/v1/assured_workloads_service" -require "google/cloud/assured_workloads/v1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/assured_workloads/v1" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/assured_workloads/v1" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/assured_workloads/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb deleted file mode 100644 index ea39cd61c3bf..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/assured_workloads/v1/version" - -require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1/assured_workloads_service/operations" -require "google/cloud/assured_workloads/v1/assured_workloads_service/client" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" - -module Google - module Cloud - module AssuredWorkloads - module V1 - ## - # Service to manage AssuredWorkloads. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/assured_workloads/v1/assured_workloads_service" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - module AssuredWorkloadsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" -require "google/cloud/assured_workloads/v1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb deleted file mode 100644 index 3768d9cc92e3..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/client.rb +++ /dev/null @@ -1,1303 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - ## - # Client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AssuredWorkloads", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @assured_workloads_service_stub.universe_domain - end - - ## - # Create a new AssuredWorkloadsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/assuredworkloads/v1/assuredworkloads_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @assured_workloads_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @assured_workloads_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @assured_workloads_service_stub.logger - end - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workload(workload: nil, update_mask: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - # p result - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workload&.name - header_params["workload.name"] = request.workload.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - # - # @overload restrict_allowed_resources(request, options = nil) - # Pass arguments to `restrict_allowed_resources` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restrict_allowed_resources(name: nil, restriction_type: nil) - # Pass arguments to `restrict_allowed_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new - # - # # Call the restrict_allowed_resources method. - # result = client.restrict_allowed_resources request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. - # p result - # - def restrict_allowed_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets Assured Workload associated with a CRM Node - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload to fetch. This is the workload's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Assured Workloads under a CRM Node. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @param filter [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Violations in the AssuredWorkload Environment. - # Callers may also choose to read across multiple Workloads as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of workload-id in the parent. - # Format `organizations/{org_id}/locations/{location}/workloads/-` - # - # @overload list_violations(request, options = nil) - # Pass arguments to `list_violations` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_violations(parent: nil, interval: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_violations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Workload name. - # Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. - # @param interval [::Google::Cloud::AssuredWorkloads::V1::TimeWindow, ::Hash] - # Optional. Specifies the time window for retrieving active Violations. - # When specified, retrieves Violations that were active between start_time - # and end_time. - # @param page_size [::Integer] - # Optional. Page size. - # @param page_token [::String] - # Optional. Page token returned from previous request. - # @param filter [::String] - # Optional. A custom filter for filtering by the Violations properties. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Violation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Violation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new - # - # # Call the list_violations method. - # result = client.list_violations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Violation. - # p item - # end - # - def list_violations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_violations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_violations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_violations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :list_violations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_violations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves Assured Workload Violation based on ID. - # - # @overload get_violation(request, options = nil) - # Pass arguments to `get_violation` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_violation(name: nil) - # Pass arguments to `get_violation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Violation to fetch (ie. Violation.name). - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::Violation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new - # - # # Call the get_violation method. - # result = client.get_violation request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Violation. - # p result - # - def get_violation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_violation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_violation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_violation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :get_violation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Acknowledges an existing violation. By acknowledging a violation, users - # acknowledge the existence of a compliance violation in their workload and - # decide to ignore it due to a valid business justification. Acknowledgement - # is a permanent operation and it cannot be reverted. - # - # @overload acknowledge_violation(request, options = nil) - # Pass arguments to `acknowledge_violation` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload acknowledge_violation(name: nil, comment: nil, non_compliant_org_policy: nil) - # Pass arguments to `acknowledge_violation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Violation to acknowledge. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} - # @param comment [::String] - # Required. Business justification explaining the need for violation acknowledgement - # @param non_compliant_org_policy [::String] - # Optional. This field is deprecated and will be removed in future version of the API. - # Name of the OrgPolicy which was modified with non-compliant change and - # resulted in this violation. - # Format: - # projects/\\{project_number}/policies/\\{constraint_name} - # folders/\\{folder_id}/policies/\\{constraint_name} - # organizations/\\{organization_id}/policies/\\{constraint_name} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new - # - # # Call the acknowledge_violation method. - # result = client.acknowledge_violation request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse. - # p result - # - def acknowledge_violation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.acknowledge_violation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.acknowledge_violation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.acknowledge_violation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :acknowledge_violation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService API. - # - # This class represents the configuration for AssuredWorkloadsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `restrict_allowed_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :restrict_allowed_resources - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `list_violations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_violations - ## - # RPC-specific configuration for `get_violation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_violation - ## - # RPC-specific configuration for `acknowledge_violation` - # @return [::Gapic::Config::Method] - # - attr_reader :acknowledge_violation - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources - @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations - @list_violations = ::Gapic::Config::Method.new list_violations_config - get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation - @get_violation = ::Gapic::Config::Method.new get_violation_config - acknowledge_violation_config = parent_rpcs.acknowledge_violation if parent_rpcs.respond_to? :acknowledge_violation - @acknowledge_violation = ::Gapic::Config::Method.new acknowledge_violation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb deleted file mode 100644 index 51ac08fa7943..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - # Credentials for the AssuredWorkloadsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "ASSURED_WORKLOADS_CREDENTIALS", - "ASSURED_WORKLOADS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ASSURED_WORKLOADS_CREDENTIALS_JSON", - "ASSURED_WORKLOADS_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb deleted file mode 100644 index 6265a323b487..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb deleted file mode 100644 index 14045503975a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/paths.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - # Path helper methods for the AssuredWorkloadsService API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified Violation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}` - # - # @param organization [String] - # @param location [String] - # @param workload [String] - # @param violation [String] - # - # @return [::String] - def violation_path organization:, location:, workload:, violation: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workload cannot contain /" if workload.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/workloads/#{workload}/violations/#{violation}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb deleted file mode 100644 index 277bb37f1f6d..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/assured_workloads/v1/version" - -require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/client" - -module Google - module Cloud - module AssuredWorkloads - module V1 - ## - # Service to manage AssuredWorkloads. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - module AssuredWorkloadsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb deleted file mode 100644 index 5b3e53ac531c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/client.rb +++ /dev/null @@ -1,928 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - module Rest - ## - # REST client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AssuredWorkloads", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @assured_workloads_service_stub.universe_domain - end - - ## - # Create a new AssuredWorkloadsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @assured_workloads_service_stub = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @assured_workloads_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @assured_workloads_service_stub.logger - end - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.create_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workload(workload: nil, update_mask: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workload [::Google::Cloud::AssuredWorkloads::V1::Workload, ::Hash] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - # p result - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.update_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - # - # @overload restrict_allowed_resources(request, options = nil) - # Pass arguments to `restrict_allowed_resources` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restrict_allowed_resources(name: nil, restriction_type: nil) - # Pass arguments to `restrict_allowed_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new - # - # # Call the restrict_allowed_resources method. - # result = client.restrict_allowed_resources request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. - # p result - # - def restrict_allowed_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.restrict_allowed_resources request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.delete_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets Assured Workload associated with a CRM Node - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload to fetch. This is the workload's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.get_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Assured Workloads under a CRM Node. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @param filter [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.list_workloads request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, "workloads", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService REST API. - # - # This class represents the configuration for AssuredWorkloadsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `restrict_allowed_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :restrict_allowed_resources - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources - @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb deleted file mode 100644 index 5b5c5978bb21..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb deleted file mode 100644 index 54af58066810..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/assured_workloads_service/rest/service_stub.rb +++ /dev/null @@ -1,450 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - module Rest - ## - # REST service stub for the AssuredWorkloadsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # A result object deserialized from the server's reply - def update_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1::Workload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restrict_allowed_resources REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse] - # A result object deserialized from the server's reply - def restrict_allowed_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restrict_allowed_resources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restrict_allowed_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # A result object deserialized from the server's reply - def get_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1::Workload.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse] - # A result object deserialized from the server's reply - def list_workloads request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_workloads", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workloads", - body: "workload", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{workload.name}", - body: "workload", - matches: [ - ["workload.name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restrict_allowed_resources REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restrict_allowed_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:restrictAllowedResources", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workloads_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workloads", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb deleted file mode 100644 index 159eef6467bf..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" -require "google/cloud/assured_workloads/v1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/assured_workloads/v1/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb deleted file mode 100644 index 43514745eb32..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assured_workloads/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb deleted file mode 100644 index 1695e94ae30e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/assuredworkloads/v1/assuredworkloads.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n7google/cloud/assuredworkloads/v1/assuredworkloads.proto\x12 google.cloud.assuredworkloads.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb6\x01\n\x15\x43reateWorkloadRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x41\n\x08workload\x18\x02 \x01(\x0b\x32*.google.cloud.assuredworkloads.v1.WorkloadB\x03\xe0\x41\x02\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x15UpdateWorkloadRequest\x12\x41\n\x08workload\x18\x01 \x01(\x0b\x32*.google.cloud.assuredworkloads.v1.WorkloadB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"j\n\x15\x44\x65leteWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x12GetWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\"\x8f\x01\n\x14ListWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"o\n\x15ListWorkloadsResponse\x12=\n\tworkloads\x18\x01 \x03(\x0b\x32*.google.cloud.assuredworkloads.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x15\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\tresources\x18\x03 \x03(\x0b\x32\x37.google.cloud.assuredworkloads.v1.Workload.ResourceInfoB\x03\xe0\x41\x03\x12^\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32;.google.cloud.assuredworkloads.v1.Workload.ComplianceRegimeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x37\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1c\n\x0f\x62illing_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.assuredworkloads.v1.Workload.LabelsEntryB\x03\xe0\x41\x01\x12)\n\x1cprovisioned_resources_parent\x18\r \x01(\tB\x03\xe0\x41\x04\x12S\n\x0ckms_settings\x18\x0e \x01(\x0b\x32\x36.google.cloud.assuredworkloads.v1.Workload.KMSSettingsB\x05\x18\x01\xe0\x41\x04\x12[\n\x11resource_settings\x18\x0f \x03(\x0b\x32;.google.cloud.assuredworkloads.v1.Workload.ResourceSettingsB\x03\xe0\x41\x04\x12`\n\x14kaj_enrollment_state\x18\x11 \x01(\x0e\x32=.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentStateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_sovereign_controls\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12\x66\n\x17saa_enrollment_response\x18\x14 \x01(\x0b\x32@.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponseB\x03\xe0\x41\x03\x12.\n!compliant_but_disallowed_services\x18\x18 \x03(\tB\x03\xe0\x41\x03\x12H\n\x07partner\x18\x19 \x01(\x0e\x32\x32.google.cloud.assuredworkloads.v1.Workload.PartnerB\x03\xe0\x41\x01\x1a\x89\x02\n\x0cResourceInfo\x12\x13\n\x0bresource_id\x18\x01 \x01(\x03\x12[\n\rresource_type\x18\x02 \x01(\x0e\x32\x44.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType\"\x86\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10\x43ONSUMER_PROJECT\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0f\x43ONSUMER_FOLDER\x10\x04\x12\x1b\n\x17\x45NCRYPTION_KEYS_PROJECT\x10\x02\x12\x0b\n\x07KEYRING\x10\x03\x1a\x93\x01\n\x0bKMSSettings\x12\x41\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05\x12=\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1a\x9a\x01\n\x10ResourceSettings\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12[\n\rresource_type\x18\x02 \x01(\x0e\x32\x44.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1a\xfc\x03\n\x15SaaEnrollmentResponse\x12\x66\n\x0csetup_status\x18\x01 \x01(\x0e\x32K.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupStateH\x00\x88\x01\x01\x12\x61\n\x0csetup_errors\x18\x02 \x03(\x0e\x32K.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError\"R\n\nSetupState\x12\x1b\n\x17SETUP_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_PENDING\x10\x01\x12\x13\n\x0fSTATUS_COMPLETE\x10\x02\"\xb2\x01\n\nSetupError\x12\x1b\n\x17SETUP_ERROR_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45RROR_INVALID_BASE_SETUP\x10\x01\x12&\n\"ERROR_MISSING_EXTERNAL_SIGNING_KEY\x10\x02\x12#\n\x1f\x45RROR_NOT_ALL_SERVICES_ENROLLED\x10\x03\x12\x1c\n\x18\x45RROR_SETUP_CHECK_FAILED\x10\x04\x42\x0f\n\r_setup_status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa5\x02\n\x10\x43omplianceRegime\x12!\n\x1d\x43OMPLIANCE_REGIME_UNSPECIFIED\x10\x00\x12\x07\n\x03IL4\x10\x01\x12\x08\n\x04\x43JIS\x10\x02\x12\x10\n\x0c\x46\x45\x44RAMP_HIGH\x10\x03\x12\x14\n\x10\x46\x45\x44RAMP_MODERATE\x10\x04\x12\x16\n\x12US_REGIONAL_ACCESS\x10\x05\x12\t\n\x05HIPAA\x10\x06\x12\x0b\n\x07HITRUST\x10\x07\x12\x1a\n\x16\x45U_REGIONS_AND_SUPPORT\x10\x08\x12\x1a\n\x16\x43\x41_REGIONS_AND_SUPPORT\x10\t\x12\x08\n\x04ITAR\x10\n\x12\x1d\n\x19\x41U_REGIONS_AND_US_SUPPORT\x10\x0b\x12\"\n\x1e\x41SSURED_WORKLOADS_FOR_PARTNERS\x10\x0c\"\x7f\n\x12KajEnrollmentState\x12$\n KAJ_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cKAJ_ENROLLMENT_STATE_PENDING\x10\x01\x12!\n\x1dKAJ_ENROLLMENT_STATE_COMPLETE\x10\x02\">\n\x07Partner\x12\x17\n\x13PARTNER_UNSPECIFIED\x10\x00\x12\x1a\n\x16LOCAL_CONTROLS_BY_S3NS\x10\x01:u\xea\x41r\n(assuredworkloads.googleapis.com/Workload\x12\x46organizations/{organization}/locations/{location}/workloads/{workload}\"\xe4\x01\n\x1f\x43reateWorkloadOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12[\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32;.google.cloud.assuredworkloads.v1.Workload.ComplianceRegimeB\x03\xe0\x41\x01\"\x97\x02\n\x1fRestrictAllowedResourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12p\n\x10restriction_type\x18\x02 \x01(\x0e\x32Q.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionTypeB\x03\xe0\x41\x02\"o\n\x0fRestrictionType\x12 \n\x1cRESTRICTION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41LLOW_ALL_GCP_RESOURCES\x10\x01\x12\x1d\n\x19\x41LLOW_COMPLIANT_RESOURCES\x10\x02\"\"\n RestrictAllowedResourcesResponse\"o\n\x1b\x41\x63knowledgeViolationRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63omment\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x18non_compliant_org_policy\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x01\"\x1e\n\x1c\x41\x63knowledgeViolationResponse\"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe5\x01\n\x15ListViolationsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)assuredworkloads.googleapis.com/Violation\x12\x43\n\x08interval\x18\x02 \x01(\x0b\x32,.google.cloud.assuredworkloads.v1.TimeWindowB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"r\n\x16ListViolationsResponse\x12?\n\nviolations\x18\x01 \x03(\x0b\x32+.google.cloud.assuredworkloads.v1.Violation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x13GetViolationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)assuredworkloads.googleapis.com/Violation\"\x8e\x0e\n\tViolation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nbegin_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0cresolve_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x07 \x01(\x0e\x32\x31.google.cloud.assuredworkloads.v1.Violation.StateB\x03\xe0\x41\x03\x12%\n\x15org_policy_constraint\x18\x08 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1e\n\x0e\x61udit_log_link\x18\x0b \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12(\n\x18non_compliant_org_policy\x18\x0c \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12Q\n\x0bremediation\x18\r \x01(\x0b\x32\x37.google.cloud.assuredworkloads.v1.Violation.RemediationB\x03\xe0\x41\x03\x12\x19\n\x0c\x61\x63knowledged\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12\x42\n\x14\x61\x63knowledgement_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12(\n\x18\x65xception_audit_log_link\x18\x10 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x1a\x8c\x07\n\x0bRemediation\x12_\n\x0cinstructions\x18\x01 \x01(\x0b\x32\x44.google.cloud.assuredworkloads.v1.Violation.Remediation.InstructionsB\x03\xe0\x41\x02\x12\x18\n\x10\x63ompliant_values\x18\x02 \x03(\t\x12\x66\n\x10remediation_type\x18\x03 \x01(\x0e\x32G.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationTypeB\x03\xe0\x41\x03\x1a\xfa\x02\n\x0cInstructions\x12h\n\x13gcloud_instructions\x18\x01 \x01(\x0b\x32K.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud\x12j\n\x14\x63onsole_instructions\x18\x02 \x01(\x0b\x32L.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console\x1aJ\n\x06Gcloud\x12\x17\n\x0fgcloud_commands\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\x1aH\n\x07\x43onsole\x12\x14\n\x0c\x63onsole_uris\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\"\x9c\x02\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12,\n(REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION\x10\x01\x12\x38\n4REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION\x10\x02\x12\x37\n3REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION\x10\x03\x12\x46\nBREMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION\x10\x04\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOLVED\x10\x02\x12\x0e\n\nUNRESOLVED\x10\x03\x12\r\n\tEXCEPTION\x10\x04:\x8e\x01\xea\x41\x8a\x01\n)assuredworkloads.googleapis.com/Violation\x12]organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}B\x17\n\x15_acknowledgement_time2\x86\x0e\n\x17\x41ssuredWorkloadsService\x12\xef\x01\n\x0e\x43reateWorkload\x12\x37.google.cloud.assuredworkloads.v1.CreateWorkloadRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41+\n\x08Workload\x12\x1f\x43reateWorkloadOperationMetadata\xda\x41\x0fparent,workload\x82\xd3\xe4\x93\x02>\"2/v1/{parent=organizations/*/locations/*}/workloads:\x08workload\x12\xdb\x01\n\x0eUpdateWorkload\x12\x37.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest\x1a*.google.cloud.assuredworkloads.v1.Workload\"d\xda\x41\x14workload,update_mask\x82\xd3\xe4\x93\x02G2;/v1/{workload.name=organizations/*/locations/*/workloads/*}:\x08workload\x12\xf9\x01\n\x18RestrictAllowedResources\x12\x41.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest\x1a\x42.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{name=organizations/*/locations/*/workloads/*}:restrictAllowedResources:\x01*\x12\xa4\x01\n\x0e\x44\x65leteWorkload\x12\x37.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/locations/*/workloads/*}\x12\xb2\x01\n\x0bGetWorkload\x12\x34.google.cloud.assuredworkloads.v1.GetWorkloadRequest\x1a*.google.cloud.assuredworkloads.v1.Workload\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/locations/*/workloads/*}\x12\xc5\x01\n\rListWorkloads\x12\x36.google.cloud.assuredworkloads.v1.ListWorkloadsRequest\x1a\x37.google.cloud.assuredworkloads.v1.ListWorkloadsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*/locations/*}/workloads\x12\x8e\x01\n\x0eListViolations\x12\x37.google.cloud.assuredworkloads.v1.ListViolationsRequest\x1a\x38.google.cloud.assuredworkloads.v1.ListViolationsResponse\"\t\xda\x41\x06parent\x12{\n\x0cGetViolation\x12\x35.google.cloud.assuredworkloads.v1.GetViolationRequest\x1a+.google.cloud.assuredworkloads.v1.Violation\"\x07\xda\x41\x04name\x12\x97\x01\n\x14\x41\x63knowledgeViolation\x12=.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest\x1a>.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse\"\x00\x1aS\xca\x41\x1f\x61ssuredworkloads.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdd\x02\n$com.google.cloud.assuredworkloads.v1B\x15\x41ssuredworkloadsProtoP\x01ZPcloud.google.com/go/assuredworkloads/apiv1/assuredworkloadspb;assuredworkloadspb\xaa\x02 Google.Cloud.AssuredWorkloads.V1\xca\x02 Google\\Cloud\\AssuredWorkloads\\V1\xea\x02#Google::Cloud::AssuredWorkloads::V1\xea\x41]\n(assuredworkloads.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AssuredWorkloads - module V1 - CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadRequest").msgclass - UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.UpdateWorkloadRequest").msgclass - DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.DeleteWorkloadRequest").msgclass - GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetWorkloadRequest").msgclass - ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsRequest").msgclass - ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsResponse").msgclass - Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload").msgclass - Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo").msgclass - Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType").enummodule - Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KMSSettings").msgclass - Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceSettings").msgclass - Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse").msgclass - Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState").enummodule - Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError").enummodule - Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ComplianceRegime").enummodule - Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState").enummodule - Workload::Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.Partner").enummodule - CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata").msgclass - RestrictAllowedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest").msgclass - RestrictAllowedResourcesRequest::RestrictionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest.RestrictionType").enummodule - RestrictAllowedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse").msgclass - AcknowledgeViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest").msgclass - AcknowledgeViolationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse").msgclass - TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.TimeWindow").msgclass - ListViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListViolationsRequest").msgclass - ListViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListViolationsResponse").msgclass - GetViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetViolationRequest").msgclass - Violation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation").msgclass - Violation::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation").msgclass - Violation::Remediation::Instructions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions").msgclass - Violation::Remediation::Instructions::Gcloud = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud").msgclass - Violation::Remediation::Instructions::Console = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console").msgclass - Violation::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType").enummodule - Violation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Violation.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb deleted file mode 100644 index 438ddf9b93f1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/lib/google/cloud/assuredworkloads/v1/assuredworkloads_services_pb.rb +++ /dev/null @@ -1,78 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/assuredworkloads/v1/assuredworkloads.proto for package 'Google.Cloud.AssuredWorkloads.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/assuredworkloads/v1/assuredworkloads_pb' - -module Google - module Cloud - module AssuredWorkloads - module V1 - module AssuredWorkloadsService - # Service to manage AssuredWorkloads. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.assuredworkloads.v1.AssuredWorkloadsService' - - # Creates Assured Workload. - rpc :CreateWorkload, ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Google::Longrunning::Operation - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - rpc :UpdateWorkload, ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - rpc :RestrictAllowedResources, ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse - # Deletes the workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - rpc :DeleteWorkload, ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Google::Protobuf::Empty - # Gets Assured Workload associated with a CRM Node - rpc :GetWorkload, ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload - # Lists Assured Workloads under a CRM Node. - rpc :ListWorkloads, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse - # Lists the Violations in the AssuredWorkload Environment. - # Callers may also choose to read across multiple Workloads as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of workload-id in the parent. - # Format `organizations/{org_id}/locations/{location}/workloads/-` - rpc :ListViolations, ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse - # Retrieves Assured Workload Violation based on ID. - rpc :GetViolation, ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, ::Google::Cloud::AssuredWorkloads::V1::Violation - # Acknowledges an existing violation. By acknowledging a violation, users - # acknowledge the existence of a compliance violation in their workload and - # decide to ignore it due to a valid business justification. Acknowledgement - # is a permanent operation and it cannot be reverted. - rpc :AcknowledgeViolation, ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md deleted file mode 100644 index f6053cce5a45..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Assured Workloads for Government V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb deleted file mode 100644 index 29b652613713..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/cloud/assuredworkloads/v1/assuredworkloads.rb +++ /dev/null @@ -1,720 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1 - # Request for creating a workload. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # Required. Assured Workload to create - # @!attribute [rw] external_id - # @return [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - class CreateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for Updating a workload. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - class UpdateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Workload. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - class DeleteWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching a workload. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload to fetch. This is the workload's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching workloads in an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @!attribute [rw] filter - # @return [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of ListWorkloads endpoint. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload>] - # List of Workloads under a given parent. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. Return empty if reached the last page. - class ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Workload object for managing highly regulated workloads of cloud - # customers. - # @!attribute [rw] name - # @return [::String] - # Optional. The resource name of the workload. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} - # - # Read-only. - # @!attribute [rw] display_name - # @return [::String] - # Required. The user-assigned display name of the Workload. - # When present it must be between 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, and spaces. - # - # Example: My Workload - # @!attribute [r] resources - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo>] - # Output only. The resources associated with this workload. - # These resources will be created when creating the workload. - # If any of the projects already exist, the workload creation will fail. - # Always read only. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ComplianceRegime] - # Required. Immutable. Compliance Regime associated with this workload. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Immutable. The Workload creation timestamp. - # @!attribute [rw] billing_account - # @return [::String] - # Optional. The billing account used for the resources which are - # direct children of workload. This billing account is initially associated - # with the resources created as part of Workload creation. - # After the initial creation of these resources, the customer can change - # the assigned billing account. - # The resource name has the form - # `billingAccounts/{billing_account_id}`. For example, - # `billingAccounts/012345-567890-ABCDEF`. - # @!attribute [rw] etag - # @return [::String] - # Optional. ETag of the workload, it is calculated on the basis - # of the Workload contents. It will be used in Update & Delete operations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels applied to the workload. - # @!attribute [rw] provisioned_resources_parent - # @return [::String] - # Input only. The parent resource for the resources managed by this Assured Workload. May - # be either empty or a folder resource which is a child of the - # Workload parent. If not specified all resources are created under the - # parent organization. - # Format: - # folders/\\{folder_id} - # @!attribute [rw] kms_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::KMSSettings] - # Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS - # CMEK key is provisioned. - # This field is deprecated as of Feb 28, 2022. - # In order to create a Keyring, callers should specify, - # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. - # @!attribute [rw] resource_settings - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceSettings>] - # Input only. Resource properties that are used to customize workload resources. - # These properties (such as custom project id) will be used to create - # workload resources if possible. This field is optional. - # @!attribute [r] kaj_enrollment_state - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::KajEnrollmentState] - # Output only. Represents the KAJ enrollment state of the given workload. - # @!attribute [rw] enable_sovereign_controls - # @return [::Boolean] - # Optional. Indicates the sovereignty status of the given workload. - # Currently meant to be used by Europe/Canada customers. - # @!attribute [r] saa_enrollment_response - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse] - # Output only. Represents the SAA enrollment response of the given workload. - # SAA enrollment response is queried during GetWorkload call. - # In failure cases, user friendly error message is shown in SAA details page. - # @!attribute [r] compliant_but_disallowed_services - # @return [::Array<::String>] - # Output only. Urls for services which are compliant for this Assured Workload, but which - # are currently disallowed by the ResourceUsageRestriction org policy. - # Invoke RestrictAllowedResources endpoint to allow your project developers - # to use these services in their environment." - # @!attribute [rw] partner - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::Partner] - # Optional. Compliance Regime associated with this workload. - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represent the resources that are children of this Workload. - # @!attribute [rw] resource_id - # @return [::Integer] - # Resource identifier. - # For a project this represents project_number. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of resource. - module ResourceType - # Unknown resource type. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # Consumer project. - # AssuredWorkloads Projects are no longer supported. This field will be - # ignored only in CreateWorkload requests. ListWorkloads and GetWorkload - # will continue to provide projects information. - # Use CONSUMER_FOLDER instead. - CONSUMER_PROJECT = 1 - - # Consumer Folder. - CONSUMER_FOLDER = 4 - - # Consumer project containing encryption keys. - ENCRYPTION_KEYS_PROJECT = 2 - - # Keyring resource that hosts encryption keys. - KEYRING = 3 - end - end - - # Settings specific to the Key Management Service. - # This message is deprecated. - # In order to create a Keyring, callers should specify, - # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] next_rotation_time - # @return [::Google::Protobuf::Timestamp] - # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a - # new version of the crypto key and mark it as the primary. - # @!attribute [rw] rotation_period - # @return [::Google::Protobuf::Duration] - # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key - # Management Service automatically rotates a key. Must be at least 24 hours - # and at most 876,000 hours. - class KMSSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represent the custom settings for the resources to be created. - # @!attribute [rw] resource_id - # @return [::String] - # Resource identifier. - # For a project this represents project_id. If the project is already - # taken, the workload creation will fail. - # For KeyRing, this represents the keyring_id. - # For a folder, don't set this value as folder_id is assigned by Google. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. This field should be specified to - # correspond the id to the right resource type (CONSUMER_FOLDER or - # ENCRYPTION_KEYS_PROJECT) - # @!attribute [rw] display_name - # @return [::String] - # User-assigned resource display name. - # If not empty it will be used to create a resource with the specified - # name. - class ResourceSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Signed Access Approvals (SAA) enrollment response. - # @!attribute [rw] setup_status - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse::SetupState] - # Indicates SAA enrollment status of a given workload. - # @!attribute [rw] setup_errors - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Workload::SaaEnrollmentResponse::SetupError>] - # Indicates SAA enrollment setup error if any. - class SaaEnrollmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Setup state of SAA enrollment. - module SetupState - # Unspecified. - SETUP_STATE_UNSPECIFIED = 0 - - # SAA enrollment pending. - STATUS_PENDING = 1 - - # SAA enrollment comopleted. - STATUS_COMPLETE = 2 - end - - # Setup error of SAA enrollment. - module SetupError - # Unspecified. - SETUP_ERROR_UNSPECIFIED = 0 - - # Invalid states for all customers, to be redirected to AA UI for - # additional details. - ERROR_INVALID_BASE_SETUP = 1 - - # Returned when there is not an EKM key configured. - ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 - - # Returned when there are no enrolled services or the customer is - # enrolled in CAA only for a subset of services. - ERROR_NOT_ALL_SERVICES_ENROLLED = 3 - - # Returned when exception was encountered during evaluation of other - # criteria. - ERROR_SETUP_CHECK_FAILED = 4 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Supported Compliance Regimes. - module ComplianceRegime - # Unknown compliance regime. - COMPLIANCE_REGIME_UNSPECIFIED = 0 - - # Information protection as per DoD IL4 requirements. - IL4 = 1 - - # Criminal Justice Information Services (CJIS) Security policies. - CJIS = 2 - - # FedRAMP High data protection controls - FEDRAMP_HIGH = 3 - - # FedRAMP Moderate data protection controls - FEDRAMP_MODERATE = 4 - - # Assured Workloads For US Regions data protection controls - US_REGIONAL_ACCESS = 5 - - # Health Insurance Portability and Accountability Act controls - HIPAA = 6 - - # Health Information Trust Alliance controls - HITRUST = 7 - - # Assured Workloads For EU Regions and Support controls - EU_REGIONS_AND_SUPPORT = 8 - - # Assured Workloads For Canada Regions and Support controls - CA_REGIONS_AND_SUPPORT = 9 - - # International Traffic in Arms Regulations - ITAR = 10 - - # Assured Workloads for Australia Regions and Support controls - # Available for public preview consumption. - # Don't create production workloads. - AU_REGIONS_AND_US_SUPPORT = 11 - - # Assured Workloads for Partners - ASSURED_WORKLOADS_FOR_PARTNERS = 12 - end - - # Key Access Justifications(KAJ) Enrollment State. - module KajEnrollmentState - # Default State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Pending State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_PENDING = 1 - - # Complete State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_COMPLETE = 2 - end - - # Supported Assured Workloads Partners. - module Partner - # Unknown partner regime/controls. - PARTNER_UNSPECIFIED = 0 - - # S3NS regime/controls. - LOCAL_CONTROLS_BY_S3NS = 1 - end - end - - # Operation metadata to give request details of CreateWorkload. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time when the operation was created. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the workload. - # @!attribute [rw] parent - # @return [::String] - # Optional. The parent of the workload. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1::Workload::ComplianceRegime] - # Optional. Compliance controls that should be applied to the resources managed by - # the workload. - class CreateWorkloadOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for restricting list of available resources in Workload environment. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @!attribute [rw] restriction_type - # @return [::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - class RestrictAllowedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of restriction. - module RestrictionType - # Unknown restriction type. - RESTRICTION_TYPE_UNSPECIFIED = 0 - - # Allow the use all of all gcp products, irrespective of the compliance - # posture. This effectively removes gcp.restrictServiceUsage OrgPolicy - # on the AssuredWorkloads Folder. - ALLOW_ALL_GCP_RESOURCES = 1 - - # Based on Workload's compliance regime, allowed list changes. - # See - https://cloud.google.com/assured-workloads/docs/supported-products - # for the list of supported resources. - ALLOW_COMPLIANT_RESOURCES = 2 - end - end - - # Response for restricting the list of allowed resources. - class RestrictAllowedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for acknowledging the violation - # Next Id: 4 - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Violation to acknowledge. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} - # @!attribute [rw] comment - # @return [::String] - # Required. Business justification explaining the need for violation acknowledgement - # @!attribute [rw] non_compliant_org_policy - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. This field is deprecated and will be removed in future version of the API. - # Name of the OrgPolicy which was modified with non-compliant change and - # resulted in this violation. - # Format: - # projects/\\{project_number}/policies/\\{constraint_name} - # folders/\\{folder_id}/policies/\\{constraint_name} - # organizations/\\{organization_id}/policies/\\{constraint_name} - class AcknowledgeViolationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for violation acknowledgement - class AcknowledgeViolationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Interval defining a time window. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The start of the time window. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The end of the time window. - class TimeWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching violations in an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. The Workload name. - # Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. - # @!attribute [rw] interval - # @return [::Google::Cloud::AssuredWorkloads::V1::TimeWindow] - # Optional. Specifies the time window for retrieving active Violations. - # When specified, retrieves Violations that were active between start_time - # and end_time. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Page size. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token returned from previous request. - # @!attribute [rw] filter - # @return [::String] - # Optional. A custom filter for filtering by the Violations properties. - class ListViolationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of ListViolations endpoint. - # @!attribute [rw] violations - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1::Violation>] - # List of Violations under a Workload. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. Returns empty if reached the last page. - class ListViolationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching a Workload Violation. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Violation to fetch (ie. Violation.name). - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload}/violations/\\{violation} - class GetViolationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Workload monitoring Violation. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. Name of the Violation. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload_id}/violations/\\{violations_id} - # @!attribute [r] description - # @return [::String] - # Output only. Description for the Violation. - # e.g. OrgPolicy gcp.resourceLocations has non compliant value. - # @!attribute [r] begin_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the event which triggered the Violation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time when the Violation record was updated. - # @!attribute [r] resolve_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the event which fixed the Violation. - # If the violation is ACTIVE this will be empty. - # @!attribute [r] category - # @return [::String] - # Output only. Category under which this violation is mapped. - # e.g. Location, Service Usage, Access, Encryption, etc. - # @!attribute [r] state - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::State] - # Output only. State of the violation - # @!attribute [r] org_policy_constraint - # @return [::String] - # Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in - # this violation. - # @!attribute [r] audit_log_link - # @return [::String] - # Output only. Immutable. Audit Log Link for violated resource - # Format: - # https://console.cloud.google.com/logs/query;query=\\{logName}\\{protoPayload.resourceName}\\{timeRange}\\{folder} - # @!attribute [r] non_compliant_org_policy - # @return [::String] - # Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and - # resulted this violation. - # Format: - # projects/\\{project_number}/policies/\\{constraint_name} - # folders/\\{folder_id}/policies/\\{constraint_name} - # organizations/\\{organization_id}/policies/\\{constraint_name} - # @!attribute [r] remediation - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation] - # Output only. Compliance violation remediation - # @!attribute [r] acknowledged - # @return [::Boolean] - # Output only. A boolean that indicates if the violation is acknowledged - # @!attribute [rw] acknowledgement_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp when this violation was acknowledged last. - # This will be absent when acknowledged field is marked as false. - # @!attribute [r] exception_audit_log_link - # @return [::String] - # Output only. Immutable. Audit Log link to find business justification provided for violation - # exception. Format: - # https://console.cloud.google.com/logs/query;query=\\{logName}\\{protoPayload.resourceName}\\{protoPayload.methodName}\\{timeRange}\\{organization} - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents remediation guidance to resolve compliance violation for - # AssuredWorkload - # @!attribute [rw] instructions - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions] - # Required. Remediation instructions to resolve violations - # @!attribute [rw] compliant_values - # @return [::Array<::String>] - # Values that can resolve the violation - # For example: for list org policy violations, this will either be the list - # of allowed or denied values - # @!attribute [r] remediation_type - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::RemediationType] - # Output only. Reemediation type based on the type of org policy values violated - class Remediation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Instructions to remediate violation - # @!attribute [rw] gcloud_instructions - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions::Gcloud] - # Remediation instructions to resolve violation via gcloud cli - # @!attribute [rw] console_instructions - # @return [::Google::Cloud::AssuredWorkloads::V1::Violation::Remediation::Instructions::Console] - # Remediation instructions to resolve violation via cloud console - class Instructions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Remediation instructions to resolve violation via gcloud cli - # @!attribute [rw] gcloud_commands - # @return [::Array<::String>] - # Gcloud command to resolve violation - # @!attribute [rw] steps - # @return [::Array<::String>] - # Steps to resolve violation via gcloud cli - # @!attribute [rw] additional_links - # @return [::Array<::String>] - # Additional urls for more information about steps - class Gcloud - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Remediation instructions to resolve violation via cloud console - # @!attribute [rw] console_uris - # @return [::Array<::String>] - # Link to console page where violations can be resolved - # @!attribute [rw] steps - # @return [::Array<::String>] - # Steps to resolve violation via cloud console - # @!attribute [rw] additional_links - # @return [::Array<::String>] - # Additional urls for more information about steps - class Console - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Classifying remediation into various types based on the kind of - # violation. For example, violations caused due to changes in boolean org - # policy requires different remediation instructions compared to violation - # caused due to changes in allowed values of list org policy. - module RemediationType - # Unspecified remediation type - REMEDIATION_TYPE_UNSPECIFIED = 0 - - # Remediation type for boolean org policy - REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1 - - # Remediation type for list org policy which have allowed values in the - # monitoring rule - REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2 - - # Remediation type for list org policy which have denied values in the - # monitoring rule - REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3 - - # Remediation type for gcp.restrictCmekCryptoKeyProjects - REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4 - end - end - - # Violation State Values - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # Violation is resolved. - RESOLVED = 2 - - # Violation is Unresolved - UNRESOLVED = 3 - - # Violation is Exception - EXCEPTION = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile deleted file mode 100644 index 49bd814d146e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-assured_workloads-v1", path: "../" -else - gem "google-cloud-assured_workloads-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb deleted file mode 100644 index e2828db3324c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/acknowledge_violation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the acknowledge_violation call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation. -# -def acknowledge_violation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new - - # Call the acknowledge_violation method. - result = client.acknowledge_violation request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb deleted file mode 100644 index c3ab7fb1bcf6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/create_workload.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the create_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload. -# -def create_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new - - # Call the create_workload method. - result = client.create_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb deleted file mode 100644 index 9b95aca15297..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/delete_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the delete_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload. -# -def delete_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new - - # Call the delete_workload method. - result = client.delete_workload request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb deleted file mode 100644 index c957fe2e6f20..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_violation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the get_violation call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation. -# -def get_violation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new - - # Call the get_violation method. - result = client.get_violation request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Violation. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb deleted file mode 100644 index 4c570c4bf025..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/get_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the get_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload. -# -def get_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new - - # Call the get_workload method. - result = client.get_workload request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb deleted file mode 100644 index 8592a9b4a1c6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_violations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the list_violations call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations. -# -def list_violations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new - - # Call the list_violations method. - result = client.list_violations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Violation. - p item - end -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb deleted file mode 100644 index 480c6982ac6a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/list_workloads.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the list_workloads call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads. -# -def list_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new - - # Call the list_workloads method. - result = client.list_workloads request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AssuredWorkloads::V1::Workload. - p item - end -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb deleted file mode 100644 index e6804ae174be..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/restrict_allowed_resources.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources. -# -def restrict_allowed_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new - - # Call the restrict_allowed_resources method. - result = client.restrict_allowed_resources request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb deleted file mode 100644 index 6a0d2952fd66..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/assured_workloads_service/update_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync] -require "google/cloud/assured_workloads/v1" - -## -# Snippet for the update_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload. -# -def update_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new - - # Call the update_workload method. - result = client.update_workload request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1::Workload. - p result -end -# [END assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json b/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json deleted file mode 100644 index 95dad32c09ec..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1.json +++ /dev/null @@ -1,375 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-assured_workloads-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.assuredworkloads.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_CreateWorkload_sync", - "title": "Snippet for the create_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload.", - "file": "assured_workloads_service/create_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#create_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "CreateWorkload", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.CreateWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_UpdateWorkload_sync", - "title": "Snippet for the update_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload.", - "file": "assured_workloads_service/update_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#update_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::Workload", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "UpdateWorkload", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.UpdateWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", - "title": "Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources.", - "file": "assured_workloads_service/restrict_allowed_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "restrict_allowed_resources", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#restrict_allowed_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "RestrictAllowedResources", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.RestrictAllowedResources", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_DeleteWorkload_sync", - "title": "Snippet for the delete_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload.", - "file": "assured_workloads_service/delete_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#delete_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "DeleteWorkload", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.DeleteWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetWorkload_sync", - "title": "Snippet for the get_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload.", - "file": "assured_workloads_service/get_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::Workload", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "GetWorkload", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListWorkloads_sync", - "title": "Snippet for the list_workloads call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads.", - "file": "assured_workloads_service/list_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workloads", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "ListWorkloads", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListWorkloads", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_ListViolations_sync", - "title": "Snippet for the list_violations call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations.", - "file": "assured_workloads_service/list_violations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_violations", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#list_violations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "ListViolations", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.ListViolations", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_GetViolation_sync", - "title": "Snippet for the get_violation call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation.", - "file": "assured_workloads_service/get_violation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_violation", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#get_violation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::Violation", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "GetViolation", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.GetViolation", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1_generated_AssuredWorkloadsService_AcknowledgeViolation_sync", - "title": "Snippet for the acknowledge_violation call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation.", - "file": "assured_workloads_service/acknowledge_violation.rb", - "language": "RUBY", - "client_method": { - "short_name": "acknowledge_violation", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client#acknowledge_violation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "AcknowledgeViolation", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService.AcknowledgeViolation", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb deleted file mode 100644 index cd74cbc66c3a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assuredworkloads/v1/assuredworkloads_services_pb" -require "google/cloud/assured_workloads/v1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb deleted file mode 100644 index a6a2edfb3038..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assured_workloads/v1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_violation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.violation_path organization: "value0", location: "value1", workload: "value2", violation: "value3" - assert_equal "organizations/value0/locations/value1/workloads/value2/violations/value3", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", workload: "value2" - assert_equal "organizations/value0/locations/value1/workloads/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb deleted file mode 100644 index a33fcdd0c1ee..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_rest_test.rb +++ /dev/null @@ -1,431 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assured_workloads/v1/assured_workloads_service/rest" - - -class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_workload - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workload parent: parent, workload: workload, external_id: external_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workload ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workload({ parent: parent, workload: workload, external_id: external_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workload(::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_count - end - end - end - - def test_update_workload - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1::Workload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workload = {} - update_mask = {} - - update_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_update_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workload({ workload: workload, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workload workload: workload, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workload ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workload({ workload: workload, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workload(::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workload_client_stub.call_count - end - end - end - - def test_restrict_allowed_resources - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - restriction_type = :RESTRICTION_TYPE_UNSPECIFIED - - restrict_allowed_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_restrict_allowed_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restrict_allowed_resources_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.restrict_allowed_resources name: name, restriction_type: restriction_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restrict_allowed_resources_client_stub.call_count - end - end - end - - def test_delete_workload - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workload({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workload name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workload ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workload({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workload(::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workload_client_stub.call_count - end - end - end - - def test_get_workload - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1::Workload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workload ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workload(::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_count - end - end - end - - def test_list_workloads - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_workloads_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workloads ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workloads(::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_workloads_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb deleted file mode 100644 index 42ad9d058624..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/google/cloud/assured_workloads/v1/assured_workloads_service_test.rb +++ /dev/null @@ -1,683 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assuredworkloads/v1/assuredworkloads_pb" -require "google/cloud/assured_workloads/v1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::Workload), request["workload"] - assert_equal "hello world", request["external_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workload parent: parent, workload: workload, external_id: external_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workload ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workload({ parent: parent, workload: workload, external_id: external_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workload(::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_rpc_count - end - end - - def test_update_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workload = {} - update_mask = {} - - update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::Workload), request["workload"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_workload workload: workload, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_workload ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_workload({ workload: workload, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_workload(::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_workload_client_stub.call_rpc_count - end - end - - def test_restrict_allowed_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - restriction_type = :RESTRICTION_TYPE_UNSPECIFIED - - restrict_allowed_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restrict_allowed_resources, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest, request - assert_equal "hello world", request["name"] - assert_equal :RESTRICTION_TYPE_UNSPECIFIED, request["restriction_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restrict_allowed_resources_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.restrict_allowed_resources name: name, restriction_type: restriction_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restrict_allowed_resources_client_stub.call_rpc_count - end - end - - def test_delete_workload - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workload({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workload name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workload ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workload({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workload(::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_workload_client_stub.call_rpc_count - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workload ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workload(::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workloads_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workloads ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workloads(::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_workloads_client_stub.call_rpc_count - end - end - - def test_list_violations - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::ListViolationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - interval = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_violations, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1::TimeWindow), request["interval"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_violations_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_violations({ parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_violations parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_violations ::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new(parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_violations({ parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_violations(::Google::Cloud::AssuredWorkloads::V1::ListViolationsRequest.new(parent: parent, interval: interval, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_violations_client_stub.call_rpc_count - end - end - - def test_get_violation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::Violation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_violation, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_violation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_violation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_violation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_violation ::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_violation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_violation(::Google::Cloud::AssuredWorkloads::V1::GetViolationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_violation_client_stub.call_rpc_count - end - end - - def test_acknowledge_violation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - comment = "hello world" - non_compliant_org_policy = "hello world" - - acknowledge_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :acknowledge_violation, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["comment"] - assert_equal "hello world", request["non_compliant_org_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, acknowledge_violation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.acknowledge_violation({ name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.acknowledge_violation name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.acknowledge_violation ::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new(name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.acknowledge_violation({ name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.acknowledge_violation(::Google::Cloud::AssuredWorkloads::V1::AcknowledgeViolationRequest.new(name: name, comment: comment, non_compliant_org_policy: non_compliant_org_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, acknowledge_violation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json deleted file mode 100644 index f2e12959542e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "assuredworkloads.googleapis.com", - "api_shortname": "assuredworkloads", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1beta1/latest", - "distribution_name": "google-cloud-assured_workloads-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "assuredworkloads", - "name_pretty": "Assured Workloads for Government V1beta1 API", - "product_documentation": "https://cloud.google.com/assured-workloads/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", - "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml deleted file mode 100644 index 81a9ba91c667..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-assured_workloads-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-assured_workloads-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts deleted file mode 100644 index a6fffa2ff6ae..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Assured Workloads for Government V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 741738ed213d..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-assured_workloads-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-assured_workloads-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-assured_workloads-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md deleted file mode 100644 index dda13ffaf93b..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Assured Workloads for Government V1beta1 API - -API Client library for the Assured Workloads for Government V1beta1 API - -Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Assured Workloads for Government V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-assured_workloads-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/assuredworkloads.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new -request = ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new # (request fields as keyword arguments...) -response = client.create_workload request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-assured_workloads-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/assured-workloads/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/assured_workloads/v1beta1" -require "logger" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-assured_workloads`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-assured_workloads-v1beta1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-assured_workloads`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-assured_workloads-v1beta1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile deleted file mode 100644 index d453b207ad79..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-assured_workloads-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ASSURED_WORKLOADS_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ASSURED_WORKLOADS_PROJECT"] = project - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project - ENV["ASSURED_WORKLOADS_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-assured_workloads-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-assured_workloads-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-assured_workloads-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-assured_workloads-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-assured_workloads-v1beta1" - header "google-cloud-assured_workloads-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-assured_workloads-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-assured_workloads-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-assured_workloads-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-assured_workloads-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json deleted file mode 100644 index 578c2e88d018..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.assuredworkloads.v1beta1", - "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1beta1", - "services": { - "AssuredWorkloadsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client", - "rpcs": { - "CreateWorkload": { - "methods": [ - "create_workload" - ] - }, - "UpdateWorkload": { - "methods": [ - "update_workload" - ] - }, - "RestrictAllowedResources": { - "methods": [ - "restrict_allowed_resources" - ] - }, - "DeleteWorkload": { - "methods": [ - "delete_workload" - ] - }, - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "AnalyzeWorkloadMove": { - "methods": [ - "analyze_workload_move" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec deleted file mode 100644 index 8dedf87ccf7d..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/assured_workloads/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-assured_workloads-v1beta1" - gem.version = Google::Cloud::AssuredWorkloads::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." - gem.summary = "API Client library for the Assured Workloads for Government V1beta1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb deleted file mode 100644 index 4b23acdd7178..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/assured_workloads/v1beta1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb deleted file mode 100644 index 4395df713d7c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" -require "google/cloud/assured_workloads/v1beta1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/assured_workloads/v1beta1" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/assured_workloads/v1beta1" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/assured_workloads/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb deleted file mode 100644 index 077d6ddf1b47..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/assured_workloads/v1beta1/version" - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/client" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - ## - # Service to manage AssuredWorkloads. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - module AssuredWorkloadsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb deleted file mode 100644 index 212fa3d35a99..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb +++ /dev/null @@ -1,1121 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - ## - # Client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AssuredWorkloads", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.update_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - default_config.rpcs.delete_workload.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.analyze_workload_move.timeout = 60.0 - default_config.rpcs.analyze_workload_move.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @assured_workloads_service_stub.universe_domain - end - - ## - # Create a new AssuredWorkloadsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @assured_workloads_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @assured_workloads_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @assured_workloads_service_stub.logger - end - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workload(workload: nil, update_mask: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p result - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - # - # @overload restrict_allowed_resources(request, options = nil) - # Pass arguments to `restrict_allowed_resources` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restrict_allowed_resources(name: nil, restriction_type: nil) - # Pass arguments to `restrict_allowed_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new - # - # # Call the restrict_allowed_resources method. - # result = client.restrict_allowed_resources request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. - # p result - # - def restrict_allowed_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :restrict_allowed_resources, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # In addition to assuredworkloads.workload.delete permission, the user should - # also have orgpolicy.policy.set permission on the deleted folder to remove - # Assured Workloads OrgPolicies. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets Assured Workload associated with a CRM Node - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload to fetch. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Analyze if the source Assured Workloads can be moved to the target Assured - # Workload - # - # @overload analyze_workload_move(request, options = nil) - # Pass arguments to `analyze_workload_move` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload analyze_workload_move(source: nil, project: nil, target: nil) - # Pass arguments to `analyze_workload_move` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::String] - # The source type is a project-based workload. Specify the workloads's - # relative resource name, formatted as: - # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" - # For example: - # "organizations/123/locations/us-east1/workloads/assured-workload-1" - # - # Note: The following parameters are mutually exclusive: `source`, `project`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param project [::String] - # The source type is a project. Specify the project's relative resource - # name, formatted as either a project number or a project ID: - # "projects/\\{PROJECT_NUMBER}" or "projects/\\{PROJECT_ID}" - # For example: - # "projects/951040570662" when specifying a project number, or - # "projects/my-project-123" when specifying a project ID. - # - # Note: The following parameters are mutually exclusive: `project`, `source`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param target [::String] - # Required. The resource ID of the folder-based destination workload. This workload is - # where the source project will hypothetically be moved to. Specify the - # workload's relative resource name, formatted as: - # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" - # For example: - # "organizations/123/locations/us-east1/workloads/assured-workload-2" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new - # - # # Call the analyze_workload_move method. - # result = client.analyze_workload_move request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse. - # p result - # - def analyze_workload_move request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.analyze_workload_move.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.analyze_workload_move.timeout, - metadata: metadata, - retry_policy: @config.rpcs.analyze_workload_move.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :analyze_workload_move, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Assured Workloads under a CRM Node. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @param filter [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService API. - # - # This class represents the configuration for AssuredWorkloadsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `restrict_allowed_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :restrict_allowed_resources - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `analyze_workload_move` - # @return [::Gapic::Config::Method] - # - attr_reader :analyze_workload_move - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources - @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - analyze_workload_move_config = parent_rpcs.analyze_workload_move if parent_rpcs.respond_to? :analyze_workload_move - @analyze_workload_move = ::Gapic::Config::Method.new analyze_workload_move_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb deleted file mode 100644 index c940ead393b1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Credentials for the AssuredWorkloadsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "ASSURED_WORKLOADS_CREDENTIALS", - "ASSURED_WORKLOADS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ASSURED_WORKLOADS_CREDENTIALS_JSON", - "ASSURED_WORKLOADS_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb deleted file mode 100644 index 6e78e5af7c28..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb deleted file mode 100644 index abdcfdd68cde..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Path helper methods for the AssuredWorkloadsService API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb deleted file mode 100644 index 6c4602274f15..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/assured_workloads/v1beta1/version" - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - ## - # Service to manage AssuredWorkloads. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - module AssuredWorkloadsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb deleted file mode 100644 index c298b223e881..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/client.rb +++ /dev/null @@ -1,653 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - module Rest - ## - # REST client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AssuredWorkloads", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - default_config.rpcs.delete_workload.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @assured_workloads_service_stub.universe_domain - end - - ## - # Create a new AssuredWorkloadsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @assured_workloads_service_stub = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @assured_workloads_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @assured_workloads_service_stub.logger - end - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.create_workload request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restrict the list of resources allowed in the Workload environment. - # The current list of allowed products can be found at - # https://cloud.google.com/assured-workloads/docs/supported-products - # In addition to assuredworkloads.workload.update permission, the user should - # also have orgpolicy.policy.set permission on the folder resource - # to use this functionality. - # - # @overload restrict_allowed_resources(request, options = nil) - # Pass arguments to `restrict_allowed_resources` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restrict_allowed_resources(name: nil, restriction_type: nil) - # Pass arguments to `restrict_allowed_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @param restriction_type [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new - # - # # Call the restrict_allowed_resources method. - # result = client.restrict_allowed_resources request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. - # p result - # - def restrict_allowed_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restrict_allowed_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restrict_allowed_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restrict_allowed_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.restrict_allowed_resources request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # In addition to assuredworkloads.workload.delete permission, the user should - # also have orgpolicy.policy.set permission on the deleted folder to remove - # Assured Workloads OrgPolicies. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workload.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.delete_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService REST API. - # - # This class represents the configuration for AssuredWorkloadsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `restrict_allowed_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :restrict_allowed_resources - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - restrict_allowed_resources_config = parent_rpcs.restrict_allowed_resources if parent_rpcs.respond_to? :restrict_allowed_resources - @restrict_allowed_resources = ::Gapic::Config::Method.new restrict_allowed_resources_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb deleted file mode 100644 index 6a9e2cb34ffd..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "assuredworkloads.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "assuredworkloads.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}/operations", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb deleted file mode 100644 index e3b6724a99f7..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest/service_stub.rb +++ /dev/null @@ -1,266 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - module Rest - ## - # REST service stub for the AssuredWorkloadsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restrict_allowed_resources REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse] - # A result object deserialized from the server's reply - def restrict_allowed_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restrict_allowed_resources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restrict_allowed_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workload_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/workloads", - body: "workload", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restrict_allowed_resources REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restrict_allowed_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:restrictAllowedResources", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workload REST call - # - # @param request_pb [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb deleted file mode 100644 index 8e2c6c93872f..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" -require "google/cloud/assured_workloads/v1beta1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/assured_workloads/v1beta1/rest" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new - # - module V1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb deleted file mode 100644 index 871b2223ff1d..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb deleted file mode 100644 index 8c8ba5ca8ba8..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x12GetWorkloadRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(assuredworkloads.googleapis.com/Workload\"s\n\x1a\x41nalyzeWorkloadMoveRequest\x12\x10\n\x06source\x18\x01 \x01(\tH\x00\x12\x11\n\x07project\x18\x03 \x01(\tH\x00\x12\x13\n\x06target\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x1b\n\x19projectOrWorkloadResource\"/\n\x1b\x41nalyzeWorkloadMoveResponse\x12\x10\n\x08\x62lockers\x18\x01 \x03(\t\"\x8f\x01\n\x14ListWorkloadsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(assuredworkloads.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"t\n\x15ListWorkloadsResponse\x12\x42\n\tworkloads\x18\x01 \x03(\x0b\x32/.google.cloud.assuredworkloads.v1beta1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd2\x1b\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\tresources\x18\x03 \x03(\x0b\x32<.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfoB\x03\xe0\x41\x03\x12\x63\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegimeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x37\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x03\xe0\x41\x05\x12\x1c\n\x0f\x62illing_account\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0cil4_settings\x18\x07 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.IL4SettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12_\n\rcjis_settings\x18\x08 \x01(\x0b\x32<.google.cloud.assuredworkloads.v1beta1.Workload.CJISSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12n\n\x15\x66\x65\x64ramp_high_settings\x18\x0b \x01(\x0b\x32\x43.google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12v\n\x19\x66\x65\x64ramp_moderate_settings\x18\x0c \x01(\x0b\x32G.google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettingsB\x08\x18\x01\xe0\x41\x04\xe0\x41\x05H\x00\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\n \x03(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.LabelsEntryB\x03\xe0\x41\x01\x12)\n\x1cprovisioned_resources_parent\x18\r \x01(\tB\x03\xe0\x41\x04\x12X\n\x0ckms_settings\x18\x0e \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x05\x18\x01\xe0\x41\x04\x12`\n\x11resource_settings\x18\x0f \x03(\x0b\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettingsB\x03\xe0\x41\x04\x12\x65\n\x14kaj_enrollment_state\x18\x11 \x01(\x0e\x32\x42.google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentStateB\x03\xe0\x41\x03\x12&\n\x19\x65nable_sovereign_controls\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x12k\n\x17saa_enrollment_response\x18\x14 \x01(\x0b\x32\x45.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponseB\x03\xe0\x41\x03\x12.\n!compliant_but_disallowed_services\x18\x18 \x03(\tB\x03\xe0\x41\x03\x1a\x8e\x02\n\x0cResourceInfo\x12\x13\n\x0bresource_id\x18\x01 \x01(\x03\x12`\n\rresource_type\x18\x02 \x01(\x0e\x32I.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType\"\x86\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x10\x43ONSUMER_PROJECT\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0f\x43ONSUMER_FOLDER\x10\x04\x12\x1b\n\x17\x45NCRYPTION_KEYS_PROJECT\x10\x02\x12\x0b\n\x07KEYRING\x10\x03\x1a\x93\x01\n\x0bKMSSettings\x12\x41\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05\x12=\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\t\xe0\x41\x02\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1al\n\x0bIL4Settings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1am\n\x0c\x43JISSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1at\n\x13\x46\x65\x64rampHighSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1ax\n\x17\x46\x65\x64rampModerateSettings\x12Y\n\x0ckms_settings\x18\x01 \x01(\x0b\x32;.google.cloud.assuredworkloads.v1beta1.Workload.KMSSettingsB\x06\xe0\x41\x04\xe0\x41\x05:\x02\x18\x01\x1a\x9f\x01\n\x10ResourceSettings\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12`\n\rresource_type\x18\x02 \x01(\x0e\x32I.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1a\x86\x04\n\x15SaaEnrollmentResponse\x12k\n\x0csetup_status\x18\x01 \x01(\x0e\x32P.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupStateH\x00\x88\x01\x01\x12\x66\n\x0csetup_errors\x18\x02 \x03(\x0e\x32P.google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError\"R\n\nSetupState\x12\x1b\n\x17SETUP_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_PENDING\x10\x01\x12\x13\n\x0fSTATUS_COMPLETE\x10\x02\"\xb2\x01\n\nSetupError\x12\x1b\n\x17SETUP_ERROR_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45RROR_INVALID_BASE_SETUP\x10\x01\x12&\n\"ERROR_MISSING_EXTERNAL_SIGNING_KEY\x10\x02\x12#\n\x1f\x45RROR_NOT_ALL_SERVICES_ENROLLED\x10\x03\x12\x1c\n\x18\x45RROR_SETUP_CHECK_FAILED\x10\x04\x42\x0f\n\r_setup_status\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x81\x02\n\x10\x43omplianceRegime\x12!\n\x1d\x43OMPLIANCE_REGIME_UNSPECIFIED\x10\x00\x12\x07\n\x03IL4\x10\x01\x12\x08\n\x04\x43JIS\x10\x02\x12\x10\n\x0c\x46\x45\x44RAMP_HIGH\x10\x03\x12\x14\n\x10\x46\x45\x44RAMP_MODERATE\x10\x04\x12\x16\n\x12US_REGIONAL_ACCESS\x10\x05\x12\t\n\x05HIPAA\x10\x06\x12\x0b\n\x07HITRUST\x10\x07\x12\x1a\n\x16\x45U_REGIONS_AND_SUPPORT\x10\x08\x12\x1a\n\x16\x43\x41_REGIONS_AND_SUPPORT\x10\t\x12\x08\n\x04ITAR\x10\n\x12\x1d\n\x19\x41U_REGIONS_AND_US_SUPPORT\x10\x0b\"\x7f\n\x12KajEnrollmentState\x12$\n KAJ_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cKAJ_ENROLLMENT_STATE_PENDING\x10\x01\x12!\n\x1dKAJ_ENROLLMENT_STATE_COMPLETE\x10\x02:u\xea\x41r\n(assuredworkloads.googleapis.com/Workload\x12\x46organizations/{organization}/locations/{location}/workloads/{workload}B\x1c\n\x1a\x63ompliance_regime_settings\"\xcb\x02\n\x1f\x43reateWorkloadOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12`\n\x11\x63ompliance_regime\x18\x04 \x01(\x0e\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegimeB\x03\xe0\x41\x01\x12`\n\x11resource_settings\x18\x05 \x03(\x0b\x32@.google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettingsB\x03\xe0\x41\x01\x42\xf6\x02\n)com.google.cloud.assuredworkloads.v1beta1B\x15\x41ssuredworkloadsProtoP\x01ZUcloud.google.com/go/assuredworkloads/apiv1beta1/assuredworkloadspb;assuredworkloadspb\xaa\x02%Google.Cloud.AssuredWorkloads.V1Beta1\xca\x02%Google\\Cloud\\AssuredWorkloads\\V1beta1\xea\x02(Google::Cloud::AssuredWorkloads::V1beta1\xea\x41]\n(assuredworkloads.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest").msgclass - UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest").msgclass - RestrictAllowedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest").msgclass - RestrictAllowedResourcesRequest::RestrictionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest.RestrictionType").enummodule - RestrictAllowedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse").msgclass - DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest").msgclass - GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest").msgclass - AnalyzeWorkloadMoveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest").msgclass - AnalyzeWorkloadMoveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveResponse").msgclass - ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest").msgclass - ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse").msgclass - Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload").msgclass - Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo").msgclass - Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType").enummodule - Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings").msgclass - Workload::IL4Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings").msgclass - Workload::CJISSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings").msgclass - Workload::FedrampHighSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings").msgclass - Workload::FedrampModerateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings").msgclass - Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings").msgclass - Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse").msgclass - Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState").enummodule - Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError").enummodule - Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime").enummodule - Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState").enummodule - CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb deleted file mode 100644 index 99b60a0169c0..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/cloud/assuredworkloads/v1beta1/assuredworkloads_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\nDgoogle/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto\x12%google.cloud.assuredworkloads.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb deleted file mode 100644 index dac4e9559b55..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads.rb +++ /dev/null @@ -1,557 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - # Request for creating a workload. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # Required. Assured Workload to create - # @!attribute [rw] external_id - # @return [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - class CreateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for Updating a workload. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # Required. The workload to update. - # The workload's `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - class UpdateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for restricting list of available resources in Workload environment. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # @!attribute [rw] restriction_type - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest::RestrictionType] - # Required. The type of restriction for using gcp products in the Workload environment. - class RestrictAllowedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of restriction. - module RestrictionType - # Unknown restriction type. - RESTRICTION_TYPE_UNSPECIFIED = 0 - - # Allow the use all of all gcp products, irrespective of the compliance - # posture. This effectively removes gcp.restrictServiceUsage OrgPolicy - # on the AssuredWorkloads Folder. - ALLOW_ALL_GCP_RESOURCES = 1 - - # Based on Workload's compliance regime, allowed list changes. - # See - https://cloud.google.com/assured-workloads/docs/supported-products - # for the list of supported resources. - ALLOW_COMPLIANT_RESOURCES = 2 - end - end - - # Response for restricting the list of allowed resources. - class RestrictAllowedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Workload. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - class DeleteWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching a workload. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload to fetch. This is the workloads's - # relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to analyze a hypothetical move of a source project or project-based - # workload to a target (destination) folder-based workload. - # @!attribute [rw] source - # @return [::String] - # The source type is a project-based workload. Specify the workloads's - # relative resource name, formatted as: - # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" - # For example: - # "organizations/123/locations/us-east1/workloads/assured-workload-1" - # - # Note: The following fields are mutually exclusive: `source`, `project`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] project - # @return [::String] - # The source type is a project. Specify the project's relative resource - # name, formatted as either a project number or a project ID: - # "projects/\\{PROJECT_NUMBER}" or "projects/\\{PROJECT_ID}" - # For example: - # "projects/951040570662" when specifying a project number, or - # "projects/my-project-123" when specifying a project ID. - # - # Note: The following fields are mutually exclusive: `project`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target - # @return [::String] - # Required. The resource ID of the folder-based destination workload. This workload is - # where the source project will hypothetically be moved to. Specify the - # workload's relative resource name, formatted as: - # "organizations/\\{ORGANIZATION_ID}/locations/\\{LOCATION_ID}/workloads/\\{WORKLOAD_ID}" - # For example: - # "organizations/123/locations/us-east1/workloads/assured-workload-2" - class AnalyzeWorkloadMoveRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response that includes the analysis of the hypothetical resource move. - # @!attribute [rw] blockers - # @return [::Array<::String>] - # A list of blockers that should be addressed before moving the source - # project or project-based workload to the destination folder-based workload. - class AnalyzeWorkloadMoveResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching workloads in an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @!attribute [rw] filter - # @return [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of ListWorkloads endpoint. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # List of Workloads under a given parent. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. Return empty if reached the last page. - class ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Workload object for managing highly regulated workloads of cloud - # customers. - # @!attribute [rw] name - # @return [::String] - # Optional. The resource name of the workload. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} - # - # Read-only. - # @!attribute [rw] display_name - # @return [::String] - # Required. The user-assigned display name of the Workload. - # When present it must be between 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, and spaces. - # - # Example: My Workload - # @!attribute [r] resources - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo>] - # Output only. The resources associated with this workload. - # These resources will be created when creating the workload. - # If any of the projects already exist, the workload creation will fail. - # Always read only. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] - # Required. Immutable. Compliance Regime associated with this workload. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Immutable. The Workload creation timestamp. - # @!attribute [r] billing_account - # @return [::String] - # Output only. The billing account used for the resources which are - # direct children of workload. This billing account is initially associated - # with the resources created as part of Workload creation. - # After the initial creation of these resources, the customer can change - # the assigned billing account. - # The resource name has the form - # `billingAccounts/{billing_account_id}`. For example, - # `billingAccounts/012345-567890-ABCDEF`. - # @!attribute [rw] il4_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::IL4Settings] - # Input only. Immutable. Settings specific to resources needed for IL4. - # - # Note: The following fields are mutually exclusive: `il4_settings`, `cjis_settings`, `fedramp_high_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cjis_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::CJISSettings] - # Input only. Immutable. Settings specific to resources needed for CJIS. - # - # Note: The following fields are mutually exclusive: `cjis_settings`, `il4_settings`, `fedramp_high_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] fedramp_high_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampHighSettings] - # Input only. Immutable. Settings specific to resources needed for FedRAMP High. - # - # Note: The following fields are mutually exclusive: `fedramp_high_settings`, `il4_settings`, `cjis_settings`, `fedramp_moderate_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] fedramp_moderate_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampModerateSettings] - # Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. - # - # Note: The following fields are mutually exclusive: `fedramp_moderate_settings`, `il4_settings`, `cjis_settings`, `fedramp_high_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] etag - # @return [::String] - # Optional. ETag of the workload, it is calculated on the basis - # of the Workload contents. It will be used in Update & Delete operations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels applied to the workload. - # @!attribute [rw] provisioned_resources_parent - # @return [::String] - # Input only. The parent resource for the resources managed by this Assured Workload. May - # be either empty or a folder resource which is a child of the - # Workload parent. If not specified all resources are created under the - # parent organization. - # Format: - # folders/\\{folder_id} - # @!attribute [rw] kms_settings - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS - # CMEK key is provisioned. - # This field is deprecated as of Feb 28, 2022. - # In order to create a Keyring, callers should specify, - # ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. - # @!attribute [rw] resource_settings - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] - # Input only. Resource properties that are used to customize workload resources. - # These properties (such as custom project id) will be used to create - # workload resources if possible. This field is optional. - # @!attribute [r] kaj_enrollment_state - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KajEnrollmentState] - # Output only. Represents the KAJ enrollment state of the given workload. - # @!attribute [rw] enable_sovereign_controls - # @return [::Boolean] - # Optional. Indicates the sovereignty status of the given workload. - # Currently meant to be used by Europe/Canada customers. - # @!attribute [r] saa_enrollment_response - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse] - # Output only. Represents the SAA enrollment response of the given workload. - # SAA enrollment response is queried during GetWorkload call. - # In failure cases, user friendly error message is shown in SAA details page. - # @!attribute [r] compliant_but_disallowed_services - # @return [::Array<::String>] - # Output only. Urls for services which are compliant for this Assured Workload, but which - # are currently disallowed by the ResourceUsageRestriction org policy. - # Invoke RestrictAllowedResources endpoint to allow your project developers - # to use these services in their environment." - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represent the resources that are children of this Workload. - # @!attribute [rw] resource_id - # @return [::Integer] - # Resource identifier. - # For a project this represents project_number. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of resource. - module ResourceType - # Unknown resource type. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # Deprecated. Existing workloads will continue to support this, but new - # CreateWorkloadRequests should not specify this as an input value. - CONSUMER_PROJECT = 1 - - # Consumer Folder. - CONSUMER_FOLDER = 4 - - # Consumer project containing encryption keys. - ENCRYPTION_KEYS_PROJECT = 2 - - # Keyring resource that hosts encryption keys. - KEYRING = 3 - end - end - - # Settings specific to the Key Management Service. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] next_rotation_time - # @return [::Google::Protobuf::Timestamp] - # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a - # new version of the crypto key and mark it as the primary. - # @!attribute [rw] rotation_period - # @return [::Google::Protobuf::Duration] - # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key - # Management Service automatically rotates a key. Must be at least 24 hours - # and at most 876,000 hours. - class KMSSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for IL4. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Immutable. Settings used to create a CMEK crypto key. - class IL4Settings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for CJIS. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Immutable. Settings used to create a CMEK crypto key. - class CJISSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for FedRAMP High. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Immutable. Settings used to create a CMEK crypto key. - class FedrampHighSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for FedRAMP Moderate. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Immutable. Settings used to create a CMEK crypto key. - class FedrampModerateSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represent the custom settings for the resources to be created. - # @!attribute [rw] resource_id - # @return [::String] - # Resource identifier. - # For a project this represents project_id. If the project is already - # taken, the workload creation will fail. - # For KeyRing, this represents the keyring_id. - # For a folder, don't set this value as folder_id is assigned by Google. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. This field should be specified to - # correspond the id to the right project type (CONSUMER_PROJECT or - # ENCRYPTION_KEYS_PROJECT) - # @!attribute [rw] display_name - # @return [::String] - # User-assigned resource display name. - # If not empty it will be used to create a resource with the specified - # name. - class ResourceSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Signed Access Approvals (SAA) enrollment response. - # @!attribute [rw] setup_status - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupState] - # Indicates SAA enrollment status of a given workload. - # @!attribute [rw] setup_errors - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupError>] - # Indicates SAA enrollment setup error if any. - class SaaEnrollmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Setup state of SAA enrollment. - module SetupState - # Unspecified. - SETUP_STATE_UNSPECIFIED = 0 - - # SAA enrollment pending. - STATUS_PENDING = 1 - - # SAA enrollment comopleted. - STATUS_COMPLETE = 2 - end - - # Setup error of SAA enrollment. - module SetupError - # Unspecified. - SETUP_ERROR_UNSPECIFIED = 0 - - # Invalid states for all customers, to be redirected to AA UI for - # additional details. - ERROR_INVALID_BASE_SETUP = 1 - - # Returned when there is not an EKM key configured. - ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 - - # Returned when there are no enrolled services or the customer is - # enrolled in CAA only for a subset of services. - ERROR_NOT_ALL_SERVICES_ENROLLED = 3 - - # Returned when exception was encountered during evaluation of other - # criteria. - ERROR_SETUP_CHECK_FAILED = 4 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Supported Compliance Regimes. - module ComplianceRegime - # Unknown compliance regime. - COMPLIANCE_REGIME_UNSPECIFIED = 0 - - # Information protection as per DoD IL4 requirements. - IL4 = 1 - - # Criminal Justice Information Services (CJIS) Security policies. - CJIS = 2 - - # FedRAMP High data protection controls - FEDRAMP_HIGH = 3 - - # FedRAMP Moderate data protection controls - FEDRAMP_MODERATE = 4 - - # Assured Workloads For US Regions data protection controls - US_REGIONAL_ACCESS = 5 - - # Health Insurance Portability and Accountability Act controls - HIPAA = 6 - - # Health Information Trust Alliance controls - HITRUST = 7 - - # Assured Workloads For EU Regions and Support controls - EU_REGIONS_AND_SUPPORT = 8 - - # Assured Workloads For Canada Regions and Support controls - CA_REGIONS_AND_SUPPORT = 9 - - # International Traffic in Arms Regulations - ITAR = 10 - - # Assured Workloads for Australia Regions and Support controls - AU_REGIONS_AND_US_SUPPORT = 11 - end - - # Key Access Justifications(KAJ) Enrollment State. - module KajEnrollmentState - # Default State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Pending State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_PENDING = 1 - - # Complete State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_COMPLETE = 2 - end - end - - # Operation metadata to give request details of CreateWorkload. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time when the operation was created. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the workload. - # @!attribute [rw] parent - # @return [::String] - # Optional. The parent of the workload. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] - # Optional. Compliance controls that should be applied to the resources managed by - # the workload. - # @!attribute [rw] resource_settings - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] - # Optional. Resource properties in the input that are used for creating/customizing - # workload resources. - class CreateWorkloadOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile deleted file mode 100644 index fa17d8d9c654..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-assured_workloads-v1beta1", path: "../" -else - gem "google-cloud-assured_workloads-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb deleted file mode 100644 index 81b408eee261..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/analyze_workload_move.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the analyze_workload_move call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move. -# -def analyze_workload_move - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new - - # Call the analyze_workload_move method. - result = client.analyze_workload_move request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb deleted file mode 100644 index 014d6ac23a14..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the create_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload. -# -def create_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new - - # Call the create_workload method. - result = client.create_workload request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb deleted file mode 100644 index 4f48c90e6969..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the delete_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload. -# -def delete_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new - - # Call the delete_workload method. - result = client.delete_workload request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb deleted file mode 100644 index 32cce0425b59..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the get_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload. -# -def get_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new - - # Call the get_workload method. - result = client.get_workload request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb deleted file mode 100644 index f5978bf7a2ef..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the list_workloads call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads. -# -def list_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new - - # Call the list_workloads method. - result = client.list_workloads request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. - p item - end -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb deleted file mode 100644 index 4323e4795eac..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/restrict_allowed_resources.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources. -# -def restrict_allowed_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new - - # Call the restrict_allowed_resources method. - result = client.restrict_allowed_resources request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb deleted file mode 100644 index 3f066388fe20..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -## -# Snippet for the update_workload call in the AssuredWorkloadsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload. -# -def update_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new - - # Call the update_workload method. - result = client.update_workload request - - # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - p result -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json deleted file mode 100644 index 5156be35c227..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-assured_workloads-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.assuredworkloads.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync", - "title": "Snippet for the create_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload.", - "file": "assured_workloads_service/create_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#create_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "CreateWorkload", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.CreateWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync", - "title": "Snippet for the update_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload.", - "file": "assured_workloads_service/update_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#update_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::Workload", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "UpdateWorkload", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.UpdateWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_RestrictAllowedResources_sync", - "title": "Snippet for the restrict_allowed_resources call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources.", - "file": "assured_workloads_service/restrict_allowed_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "restrict_allowed_resources", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#restrict_allowed_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "RestrictAllowedResources", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.RestrictAllowedResources", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync", - "title": "Snippet for the delete_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload.", - "file": "assured_workloads_service/delete_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#delete_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "DeleteWorkload", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.DeleteWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync", - "title": "Snippet for the get_workload call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload.", - "file": "assured_workloads_service/get_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workload", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#get_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::Workload", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "GetWorkload", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.GetWorkload", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_AnalyzeWorkloadMove_sync", - "title": "Snippet for the analyze_workload_move call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move.", - "file": "assured_workloads_service/analyze_workload_move.rb", - "language": "RUBY", - "client_method": { - "short_name": "analyze_workload_move", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#analyze_workload_move", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "AnalyzeWorkloadMove", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.AnalyzeWorkloadMove", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync", - "title": "Snippet for the list_workloads call in the AssuredWorkloadsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads.", - "file": "assured_workloads_service/list_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workloads", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client#list_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse", - "client": { - "short_name": "AssuredWorkloadsService::Client", - "full_name": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client" - }, - "method": { - "short_name": "ListWorkloads", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.ListWorkloads", - "service": { - "short_name": "AssuredWorkloadsService", - "full_name": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb deleted file mode 100644 index 1a2b200419f8..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_services_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb deleted file mode 100644 index e911089b4572..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", workload: "value2" - assert_equal "organizations/value0/locations/value1/workloads/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb deleted file mode 100644 index 873d4d761657..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_rest_test.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/rest" - - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_workload - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_create_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workload parent: parent, workload: workload, external_id: external_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workload({ parent: parent, workload: workload, external_id: external_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_count - end - end - end - - def test_restrict_allowed_resources - # Create test objects. - client_result = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - restriction_type = :RESTRICTION_TYPE_UNSPECIFIED - - restrict_allowed_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_restrict_allowed_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restrict_allowed_resources_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.restrict_allowed_resources name: name, restriction_type: restriction_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restrict_allowed_resources_client_stub.call_count - end - end - end - - def test_delete_workload - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_workload_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::ServiceStub.stub :transcode_delete_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workload({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workload name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workload({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workload_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb deleted file mode 100644 index 7b2dced5c32a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb +++ /dev/null @@ -1,553 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] - assert_equal "hello world", request["external_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workload parent: parent, workload: workload, external_id: external_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workload({ parent: parent, workload: workload, external_id: external_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_rpc_count - end - end - - def test_update_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workload = {} - update_mask = {} - - update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_workload workload: workload, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_workload ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_workload({ workload: workload, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_workload(::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_workload_client_stub.call_rpc_count - end - end - - def test_restrict_allowed_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - restriction_type = :RESTRICTION_TYPE_UNSPECIFIED - - restrict_allowed_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restrict_allowed_resources, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest, request - assert_equal "hello world", request["name"] - assert_equal :RESTRICTION_TYPE_UNSPECIFIED, request["restriction_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restrict_allowed_resources_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.restrict_allowed_resources name: name, restriction_type: restriction_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.restrict_allowed_resources ::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.restrict_allowed_resources({ name: name, restriction_type: restriction_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.restrict_allowed_resources(::Google::Cloud::AssuredWorkloads::V1beta1::RestrictAllowedResourcesRequest.new(name: name, restriction_type: restriction_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restrict_allowed_resources_client_stub.call_rpc_count - end - end - - def test_delete_workload - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workload({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workload name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workload({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_workload_client_stub.call_rpc_count - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workload ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workload(::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_rpc_count - end - end - - def test_analyze_workload_move - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - source = "hello world" - target = "hello world" - - analyze_workload_move_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :analyze_workload_move, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest, request - assert_equal "hello world", request["source"] - assert_equal :source, request.projectOrWorkloadResource - assert_equal "hello world", request["target"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, analyze_workload_move_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.analyze_workload_move({ source: source, target: target }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.analyze_workload_move source: source, target: target do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.analyze_workload_move ::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new(source: source, target: target) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.analyze_workload_move({ source: source, target: target }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.analyze_workload_move(::Google::Cloud::AssuredWorkloads::V1beta1::AnalyzeWorkloadMoveRequest.new(source: source, target: target), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, analyze_workload_move_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workloads_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workloads ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workloads(::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_workloads_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-automl-v1/.gitignore b/owl-bot-staging/google-cloud-automl-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json deleted file mode 100644 index d22539d020e5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/.repo-metadata.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "api_id": "automl.googleapis.com", - "api_shortname": "automl", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest", - "distribution_name": "google-cloud-automl-v1", - "is_cloud": true, - "language": "ruby", - "name": "automl", - "name_pretty": "Cloud AutoML V1 API", - "product_documentation": "https://cloud.google.com/automl", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", - "ruby-cloud-env-prefix": "AUTOML", - "ruby-cloud-product-url": "https://cloud.google.com/automl", - "ruby-cloud-path-override": "auto_ml=automl", - "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml b/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml deleted file mode 100644 index 622056ff5619..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-automl-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-automl-v1.rb" diff --git a/owl-bot-staging/google-cloud-automl-v1/.toys.rb b/owl-bot-staging/google-cloud-automl-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-automl-v1/.yardopts b/owl-bot-staging/google-cloud-automl-v1/.yardopts deleted file mode 100644 index cecfd779ab86..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud AutoML V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md deleted file mode 100644 index 5381a147f986..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-automl-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-automl-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/automl/v1" - -client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/automl/v1" - -::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-automl-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/automl/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-automl-v1/Gemfile b/owl-bot-staging/google-cloud-automl-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-automl-v1/LICENSE.md b/owl-bot-staging/google-cloud-automl-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-automl-v1/README.md b/owl-bot-staging/google-cloud-automl-v1/README.md deleted file mode 100644 index 139a73148b10..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud AutoML V1 API - -Train high-quality custom machine learning models with minimum effort and machine learning expertise. - -AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud AutoML V1 API. Most users should consider using -the main client gem, -[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-automl-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/automl.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/automl/v1" - -client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new -request = ::Google::Cloud::AutoML::V1::PredictRequest.new # (request fields as keyword arguments...) -response = client.predict request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/automl) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/automl/v1" -require "logger" - -client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-automl`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-automl-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-automl`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-automl-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-automl-v1/Rakefile b/owl-bot-staging/google-cloud-automl-v1/Rakefile deleted file mode 100644 index 9dd468f3830e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/Rakefile +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-automl-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["AUTOML_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["AUTOML_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["AUTOML_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/automl/v1/prediction_service/credentials" - ::Google::Cloud::AutoML::V1::PredictionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["AUTOML_PROJECT"] = project - ENV["AUTOML_TEST_PROJECT"] = project - ENV["AUTOML_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-automl-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-automl-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-automl-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-automl-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-automl-v1" - header "google-cloud-automl-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-automl-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-automl-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-automl-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-automl-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json deleted file mode 100644 index e3b4d840f3ac..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/gapic_metadata.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.automl.v1", - "libraryPackage": "::Google::Cloud::AutoML::V1", - "services": { - "PredictionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1::PredictionService::Client", - "rpcs": { - "Predict": { - "methods": [ - "predict" - ] - }, - "BatchPredict": { - "methods": [ - "batch_predict" - ] - } - } - } - } - }, - "AutoMl": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1::AutoML::Client", - "rpcs": { - "CreateDataset": { - "methods": [ - "create_dataset" - ] - }, - "GetDataset": { - "methods": [ - "get_dataset" - ] - }, - "ListDatasets": { - "methods": [ - "list_datasets" - ] - }, - "UpdateDataset": { - "methods": [ - "update_dataset" - ] - }, - "DeleteDataset": { - "methods": [ - "delete_dataset" - ] - }, - "ImportData": { - "methods": [ - "import_data" - ] - }, - "ExportData": { - "methods": [ - "export_data" - ] - }, - "GetAnnotationSpec": { - "methods": [ - "get_annotation_spec" - ] - }, - "CreateModel": { - "methods": [ - "create_model" - ] - }, - "GetModel": { - "methods": [ - "get_model" - ] - }, - "ListModels": { - "methods": [ - "list_models" - ] - }, - "DeleteModel": { - "methods": [ - "delete_model" - ] - }, - "UpdateModel": { - "methods": [ - "update_model" - ] - }, - "DeployModel": { - "methods": [ - "deploy_model" - ] - }, - "UndeployModel": { - "methods": [ - "undeploy_model" - ] - }, - "ExportModel": { - "methods": [ - "export_model" - ] - }, - "GetModelEvaluation": { - "methods": [ - "get_model_evaluation" - ] - }, - "ListModelEvaluations": { - "methods": [ - "list_model_evaluations" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec b/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec deleted file mode 100644 index 03c962859907..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/google-cloud-automl-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/automl/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-automl-v1" - gem.version = Google::Cloud::AutoML::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." - gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb deleted file mode 100644 index 0639f3bfe935..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google-cloud-automl-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/automl/v1" diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb deleted file mode 100644 index 70b770d6ce68..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1/prediction_service" -require "google/cloud/automl/v1/automl" -require "google/cloud/automl/v1/version" - -module Google - module Cloud - module AutoML - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/automl/v1" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/automl/v1" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/automl/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb deleted file mode 100644 index 5429cd0a0e66..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_payload_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/annotation_payload.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/classification_pb' -require 'google/cloud/automl/v1/detection_pb' -require 'google/cloud/automl/v1/text_extraction_pb' -require 'google/cloud/automl/v1/text_sentiment_pb' -require 'google/cloud/automl/v1/translation_pb' - - -descriptor_data = "\n/google/cloud/automl/v1/annotation_payload.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\"\xd3\x03\n\x11\x41nnotationPayload\x12\x44\n\x0btranslation\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1.TranslationAnnotationH\x00\x12J\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x30.google.cloud.automl.v1.ClassificationAnnotationH\x00\x12X\n\x16image_object_detection\x18\x04 \x01(\x0b\x32\x36.google.cloud.automl.v1.ImageObjectDetectionAnnotationH\x00\x12K\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x30.google.cloud.automl.v1.TextExtractionAnnotationH\x00\x12I\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32/.google.cloud.automl.v1.TextSentimentAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.AnnotationPayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb deleted file mode 100644 index 1570c5e4ceeb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/annotation_spec_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/annotation_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n,google/cloud/automl/v1/annotation_spec.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.AnnotationSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb deleted file mode 100644 index 62e9c8a5a030..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1/version" - -require "google/cloud/automl/v1/automl/credentials" -require "google/cloud/automl/v1/automl/paths" -require "google/cloud/automl/v1/automl/operations" -require "google/cloud/automl/v1/automl/client" -require "google/cloud/automl/v1/automl/rest" - -module Google - module Cloud - module AutoML - module V1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1/automl" - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1/automl/rest" - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - module AutoML - end - end - end - end -end - -helper_path = ::File.join __dir__, "automl", "helpers.rb" -require "google/cloud/automl/v1/automl/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb deleted file mode 100644 index f665fd989f3c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/client.rb +++ /dev/null @@ -1,2349 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1/service_pb" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - ## - # Client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1::AutoML::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1::AutoML::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_dataset.timeout = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_model.timeout = 5.0 - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - default_config.rpcs.list_model_evaluations.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1::AutoML::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/automl/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @auto_ml_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1::AutoMl::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @auto_ml_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1::AutoML::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] - # Required. The dataset to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_dataset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.dataset&.name - header_params["dataset.name"] = request.dataset.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset. - # @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash] - # Required. The desired output location. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the annotation spec to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::AnnotationSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_annotation_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] - # Required. The model to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_models.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a model. - # - # @overload update_model(request, options = nil) - # Pass arguments to `update_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_model(model: nil, update_mask: nil) - # Pass arguments to `update_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] - # Required. The model which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new - # - # # Call the update_model method. - # result = client.update_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Model. - # p result - # - def update_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.model&.name - header_params["model.name"] = request.model.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_model, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param name [::String] - # Required. Resource name of the model to deploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model to export. - # @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::ModelEvaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # Required. An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutoMl API. - # - # This class represents the configuration for AutoMl, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1::AutoML::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1::AutoML::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `update_model` - # @return [::Gapic::Config::Method] - # - attr_reader :update_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model - @update_model = ::Gapic::Config::Method.new update_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb deleted file mode 100644 index bafb75c5f4ab..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - # Credentials for the AutoMl API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb deleted file mode 100644 index a23adc9a2811..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/operations.rb +++ /dev/null @@ -1,849 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb deleted file mode 100644 index 7cfa7f1b018d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/paths.rb +++ /dev/null @@ -1,130 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - module AutoML - # Path helper methods for the AutoMl API. - module Paths - ## - # Create a fully-qualified AnnotationSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param annotation_spec [String] - # - # @return [::String] - def annotation_spec_path project:, location:, dataset:, annotation_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, location:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - ## - # Create a fully-qualified ModelEvaluation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # @param model_evaluation [String] - # - # @return [::String] - def model_evaluation_path project:, location:, model:, model_evaluation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb deleted file mode 100644 index fe9133837455..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1/version" - -require "google/cloud/automl/v1/automl/credentials" -require "google/cloud/automl/v1/automl/paths" -require "google/cloud/automl/v1/automl/rest/operations" -require "google/cloud/automl/v1/automl/rest/client" - -module Google - module Cloud - module AutoML - module V1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1/automl/rest" - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - module AutoML - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1/automl/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb deleted file mode 100644 index 817c63a5cd37..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/client.rb +++ /dev/null @@ -1,2180 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1/service_pb" -require "google/cloud/automl/v1/automl/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - module Rest - ## - # REST client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_dataset.timeout = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_model.timeout = 5.0 - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - default_config.rpcs.list_model_evaluations.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @auto_ml_stub = ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @auto_ml_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1::AutoML::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] - # Required. The dataset to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_dataset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_dataset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.import_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset. - # @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash] - # Required. The desired output location. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the annotation spec to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_annotation_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] - # Required. The model to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_models.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_models request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a model. - # - # @overload update_model(request, options = nil) - # Pass arguments to `update_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_model(model: nil, update_mask: nil) - # Pass arguments to `update_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param model [::Google::Cloud::AutoML::V1::Model, ::Hash] - # Required. The model which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new - # - # # Call the update_model method. - # result = client.update_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1::Model. - # p result - # - def update_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_model request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param name [::String] - # Required. Resource name of the model to deploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.deploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.undeploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model to export. - # @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # Required. An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_model_evaluations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutoMl REST API. - # - # This class represents the configuration for AutoMl REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `update_model` - # @return [::Gapic::Config::Method] - # - attr_reader :update_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model - @update_model = ::Gapic::Config::Method.new update_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb deleted file mode 100644 index 6d5126afad95..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/operations.rb +++ /dev/null @@ -1,1093 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.wait_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "wait_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:wait", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb deleted file mode 100644 index 55b031b23a36..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +++ /dev/null @@ -1,1188 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1/service_pb" - -module Google - module Cloud - module AutoML - module V1 - module AutoML - module Rest - ## - # REST service stub for the AutoMl service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # A result object deserialized from the server's reply - def get_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ListDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ListDatasetsResponse] - # A result object deserialized from the server's reply - def list_datasets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_datasets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Dataset] - # A result object deserialized from the server's reply - def update_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::AnnotationSpec] - # A result object deserialized from the server's reply - def get_annotation_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_annotation_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::AnnotationSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # A result object deserialized from the server's reply - def get_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::Model.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ListModelsResponse] - # A result object deserialized from the server's reply - def list_models request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_models", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::ListModelsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::Model] - # A result object deserialized from the server's reply - def update_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::Model.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def deploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "deploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def undeploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undeploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ModelEvaluation] - # A result object deserialized from the server's reply - def get_model_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::ModelEvaluation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse] - # A result object deserialized from the server's reply - def list_model_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_model_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/datasets", - body: "dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_datasets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/datasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{dataset.name}", - body: "dataset", - matches: [ - ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:importData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:exportData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_annotation_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/models", - body: "model", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_models_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/models", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{model.name}", - body: "model", - matches: [ - ["model.name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_deploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:deploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undeploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:undeploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:export", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_model_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/modelEvaluations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb deleted file mode 100644 index 333190be5c39..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/classification_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/classification.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/automl/v1/classification.proto\x12\x16google.cloud.automl.v1\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\x81\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12p\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32N.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x61\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xbb\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12X\n\x03row\x18\x02 \x03(\x0b\x32K.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xb5\x01\n\x1a\x63om.google.cloud.automl.v1B\x13\x43lassificationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationAnnotation").msgclass - ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics").msgclass - ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass - ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ClassificationType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb deleted file mode 100644 index 06071be6eda6..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/data_items_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/data_items.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/geometry_pb' -require 'google/cloud/automl/v1/io_pb' -require 'google/cloud/automl/v1/text_segment_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1/data_items.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a)google/cloud/automl/v1/text_segment.proto\"=\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xea\x01\n\x12\x44ocumentDimensions\x12N\n\x04unit\x18\x01 \x01(\x0e\x32@.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xd6\x05\n\x08\x44ocument\x12\x41\n\x0cinput_config\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1.DocumentInputConfig\x12:\n\rdocument_text\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippet\x12\x37\n\x06layout\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1.Document.Layout\x12G\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32*.google.cloud.automl.v1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xb4\x03\n\x06Layout\x12\x39\n\x0ctext_segment\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12;\n\rbounding_poly\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12R\n\x11text_segment_type\x18\x04 \x01(\x0e\x32\x37.google.cloud.automl.v1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"\xbe\x01\n\x0e\x45xamplePayload\x12.\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ImageH\x00\x12;\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetH\x00\x12\x34\n\x08\x64ocument\x18\x04 \x01(\x0b\x32 .google.cloud.automl.v1.DocumentH\x00\x42\t\n\x07payloadB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Image").msgclass - TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSnippet").msgclass - DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentDimensions").msgclass - DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit").enummodule - Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document").msgclass - Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document.Layout").msgclass - Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Document.Layout.TextSegmentType").enummodule - ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExamplePayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb deleted file mode 100644 index af1155523150..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/dataset_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/dataset.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/image_pb' -require 'google/cloud/automl/v1/text_pb' -require 'google/cloud/automl/v1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n$google/cloud/automl/v1/dataset.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x07\n\x07\x44\x61taset\x12Z\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x32.google.cloud.automl.v1.TranslationDatasetMetadataH\x00\x12k\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32:.google.cloud.automl.v1.ImageClassificationDatasetMetadataH\x00\x12i\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32\x39.google.cloud.automl.v1.TextClassificationDatasetMetadataH\x00\x12n\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32;.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadataH\x00\x12\x61\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32\x35.google.cloud.automl.v1.TextExtractionDatasetMetadataH\x00\x12_\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x34.google.cloud.automl.v1.TextSentimentDatasetMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12;\n\x06labels\x18\' \x03(\x0b\x32+.google.cloud.automl.v1.Dataset.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Dataset").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb deleted file mode 100644 index 644c36eb549f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/detection_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/detection.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/geometry_pb' - - -descriptor_data = "\n&google/cloud/automl/v1/detection.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\"k\n\x1eImageObjectDetectionAnnotation\x12:\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xa9\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12j\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32\x46.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd1\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12U\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32/.google.cloud.automl.v1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionAnnotation").msgclass - BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingBoxMetricsEntry").msgclass - BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass - ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb deleted file mode 100644 index 7d463bb0a1e4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/geometry_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/geometry.proto - -require 'google/protobuf' - - -descriptor_data = "\n%google/cloud/automl/v1/geometry.proto\x12\x16google.cloud.automl.v1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"U\n\x0c\x42oundingPoly\x12\x45\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32(.google.cloud.automl.v1.NormalizedVertexB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.NormalizedVertex").msgclass - BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BoundingPoly").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb deleted file mode 100644 index 537e7a464184..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/image_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/image.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/automl/v1/classification_pb' - - -descriptor_data = "\n\"google/cloud/automl/v1/image.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a+google/cloud/automl/v1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationTypeB\x03\xe0\x41\x02\"%\n#ImageObjectDetectionDatasetMetadata\"\xf7\x01\n ImageClassificationModelMetadata\x12\x1a\n\rbase_model_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12*\n\x1dtrain_budget_milli_node_hours\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12(\n\x1btrain_cost_milli_node_hours\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bstop_reason\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nmodel_type\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08node_qps\x18\r \x01(\x01\x42\x03\xe0\x41\x03\x12\x17\n\nnode_count\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\"\xdc\x01\n!ImageObjectDetectionModelMetadata\x12\x17\n\nmodel_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08node_qps\x18\x04 \x01(\x01\x42\x03\xe0\x41\x03\x12\x18\n\x0bstop_reason\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12*\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01\x12(\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\"E\n*ImageClassificationModelDeploymentMetadata\x12\x17\n\nnode_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x04\"F\n+ImageObjectDetectionModelDeploymentMetadata\x12\x17\n\nnode_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x04\x42\xac\x01\n\x1a\x63om.google.cloud.automl.v1B\nImageProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationDatasetMetadata").msgclass - ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata").msgclass - ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationModelMetadata").msgclass - ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionModelMetadata").msgclass - ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata").msgclass - ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb deleted file mode 100644 index 3eabed59230d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/io_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/io.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\x1fgoogle/cloud/automl/v1/io.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xc0\x01\n\x0bInputConfig\x12\x37\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSourceH\x00\x12?\n\x06params\x18\x02 \x03(\x0b\x32/.google.cloud.automl.v1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"a\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSourceB\x03\xe0\x41\x02H\x00\x42\x08\n\x06source\"L\n\x13\x44ocumentInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.automl.v1.GcsSource\"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"q\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x82\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1.GcsDestinationB\x03\xe0\x41\x02H\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12K\n\x06params\x18\x02 \x03(\x0b\x32;.google.cloud.automl.v1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"$\n\tGcsSource\x12\x17\n\ninput_uris\x18\x01 \x03(\tB\x03\xe0\x41\x02\"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.InputConfig").msgclass - BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictInputConfig").msgclass - DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DocumentInputConfig").msgclass - OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.OutputConfig").msgclass - BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOutputConfig").msgclass - ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ModelExportOutputConfig").msgclass - GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GcsSource").msgclass - GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GcsDestination").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb deleted file mode 100644 index 7a64d0c09e95..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_evaluation_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/model_evaluation.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/classification_pb' -require 'google/cloud/automl/v1/detection_pb' -require 'google/cloud/automl/v1/text_extraction_pb' -require 'google/cloud/automl/v1/text_sentiment_pb' -require 'google/cloud/automl/v1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/automl/v1/model_evaluation.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x06\n\x0fModelEvaluation\x12\x64\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32\x37.google.cloud.automl.v1.ClassificationEvaluationMetricsH\x00\x12^\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x34.google.cloud.automl.v1.TranslationEvaluationMetricsH\x00\x12r\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32=.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsH\x00\x12\x63\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32\x36.google.cloud.automl.v1.TextSentimentEvaluationMetricsH\x00\x12\x65\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32\x37.google.cloud.automl.v1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ModelEvaluation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb deleted file mode 100644 index 813290824876..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/model_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/model.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/image_pb' -require 'google/cloud/automl/v1/text_pb' -require 'google/cloud/automl/v1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\"google/cloud/automl/v1/model.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf1\x08\n\x05Model\x12V\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x30.google.cloud.automl.v1.TranslationModelMetadataH\x00\x12g\n#image_classification_model_metadata\x18\r \x01(\x0b\x32\x38.google.cloud.automl.v1.ImageClassificationModelMetadataH\x00\x12\x65\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32\x37.google.cloud.automl.v1.TextClassificationModelMetadataH\x00\x12j\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32\x39.google.cloud.automl.v1.ImageObjectDetectionModelMetadataH\x00\x12]\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x33.google.cloud.automl.v1.TextExtractionModelMetadataH\x00\x12[\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x32.google.cloud.automl.v1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12G\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32-.google.cloud.automl.v1.Model.DeploymentState\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12\x39\n\x06labels\x18\" \x03(\x0b\x32).google.cloud.automl.v1.Model.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Model").msgclass - Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.Model.DeploymentState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb deleted file mode 100644 index f253d09dfae0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/operations_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/operations.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/io_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1/operations.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xc9\x07\n\x11OperationMetadata\x12I\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32/.google.cloud.automl.v1.DeleteOperationMetadataH\x00\x12T\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x34.google.cloud.automl.v1.DeployModelOperationMetadataH\x00\x12X\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32\x36.google.cloud.automl.v1.UndeployModelOperationMetadataH\x00\x12T\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x34.google.cloud.automl.v1.CreateModelOperationMetadataH\x00\x12X\n\x16\x63reate_dataset_details\x18\x1e \x01(\x0b\x32\x36.google.cloud.automl.v1.CreateDatasetOperationMetadataH\x00\x12R\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x33.google.cloud.automl.v1.ImportDataOperationMetadataH\x00\x12V\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32\x35.google.cloud.automl.v1.BatchPredictOperationMetadataH\x00\x12R\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x33.google.cloud.automl.v1.ExportDataOperationMetadataH\x00\x12T\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x34.google.cloud.automl.v1.ExportModelOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\" \n\x1e\x43reateDatasetOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xc7\x01\n\x1b\x45xportDataOperationMetadata\x12]\n\x0boutput_info\x18\x01 \x01(\x0b\x32H.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo\x1aI\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\x96\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12\x45\n\x0cinput_config\x18\x01 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfig\x12\x61\n\x0boutput_info\x18\x02 \x01(\x0b\x32L.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1aK\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xb6\x01\n\x1c\x45xportModelOperationMetadata\x12_\n\x0boutput_info\x18\x02 \x01(\x0b\x32J.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\tB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.OperationMetadata").msgclass - DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteOperationMetadata").msgclass - DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeployModelOperationMetadata").msgclass - UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UndeployModelOperationMetadata").msgclass - CreateDatasetOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateDatasetOperationMetadata").msgclass - CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateModelOperationMetadata").msgclass - ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImportDataOperationMetadata").msgclass - ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataOperationMetadata").msgclass - ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass - BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOperationMetadata").msgclass - BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass - ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelOperationMetadata").msgclass - ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb deleted file mode 100644 index 6c5045916cb7..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1/version" - -require "google/cloud/automl/v1/prediction_service/credentials" -require "google/cloud/automl/v1/prediction_service/paths" -require "google/cloud/automl/v1/prediction_service/operations" -require "google/cloud/automl/v1/prediction_service/client" -require "google/cloud/automl/v1/prediction_service/rest" - -module Google - module Cloud - module AutoML - module V1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1/prediction_service" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - module PredictionService - end - end - end - end -end - -helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" -require "google/cloud/automl/v1/prediction_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb deleted file mode 100644 index dd765b396a80..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/client.rb +++ /dev/null @@ -1,768 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - ## - # Client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/automl/v1/prediction_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @prediction_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1::PredictionService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @prediction_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1::PredictionService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result is directly - # returned in the response. - # Available for following ML scenarios, and their expected request payloads: - # - # AutoML Vision Classification - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Vision Object Detection - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Natural Language Classification - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Natural Language Entity Extraction - # - # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document - # in .PDF, .TIF or .TIFF format with size upto 20MB. - # - # AutoML Natural Language Sentiment Analysis - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Translation - # - # * A TextSnippet up to 25,000 characters, UTF-8 encoded. - # - # AutoML Tables - # - # * A row with column values matching - # the columns of the model, up to 5MB. Not available for FORECASTING - # `prediction_type`. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned. The default is 100. The - # number of returned bounding boxes might be limited by the server. - # - # AutoML Tables - # - # `feature_importance` - # : (boolean) Whether - # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] - # is populated in the returned list of - # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] - # objects. The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1::PredictResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML scenarios: - # - # * AutoML Vision Classification - # * AutoML Vision Object Detection - # * AutoML Video Intelligence Classification - # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification - # * AutoML Natural Language Entity Extraction - # * AutoML Natural Language Sentiment Analysis - # * AutoML Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # AutoML Natural Language Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # AutoML Video Intelligence Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # `segment_classification` - # : (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is true. - # - # `shot_classification` - # : (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # The default is false. - # - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. - # - # `1s_interval_classification` - # : (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. The default is false. - # - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # AutoML Video Intelligence Object Tracking - # - # `score_threshold` - # : (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # - # `min_bounding_box_size` - # : (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size are - # returned. Value in 0 to 1 range. Default is 0. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PredictionService API. - # - # This class represents the configuration for PredictionService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb deleted file mode 100644 index 4fe31b05d81c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - # Credentials for the PredictionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb deleted file mode 100644 index dcbcbbe84e2c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/operations.rb +++ /dev/null @@ -1,849 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb deleted file mode 100644 index b529a1fcf51f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - # Path helper methods for the PredictionService API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb deleted file mode 100644 index 566a8b946d44..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1/version" - -require "google/cloud/automl/v1/prediction_service/credentials" -require "google/cloud/automl/v1/prediction_service/paths" -require "google/cloud/automl/v1/prediction_service/rest/operations" -require "google/cloud/automl/v1/prediction_service/rest/client" - -module Google - module Cloud - module AutoML - module V1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - module PredictionService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb deleted file mode 100644 index bff89880da69..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +++ /dev/null @@ -1,711 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - module Rest - ## - # REST client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @prediction_service_stub = ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @prediction_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1::PredictionService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result is directly - # returned in the response. - # Available for following ML scenarios, and their expected request payloads: - # - # AutoML Vision Classification - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Vision Object Detection - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Natural Language Classification - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Natural Language Entity Extraction - # - # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document - # in .PDF, .TIF or .TIFF format with size upto 20MB. - # - # AutoML Natural Language Sentiment Analysis - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Translation - # - # * A TextSnippet up to 25,000 characters, UTF-8 encoded. - # - # AutoML Tables - # - # * A row with column values matching - # the columns of the model, up to 5MB. Not available for FORECASTING - # `prediction_type`. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned. The default is 100. The - # number of returned bounding boxes might be limited by the server. - # - # AutoML Tables - # - # `feature_importance` - # : (boolean) Whether - # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] - # is populated in the returned list of - # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] - # objects. The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.predict request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML scenarios: - # - # * AutoML Vision Classification - # * AutoML Vision Object Detection - # * AutoML Video Intelligence Classification - # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification - # * AutoML Natural Language Entity Extraction - # * AutoML Natural Language Sentiment Analysis - # * AutoML Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # AutoML Natural Language Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # AutoML Video Intelligence Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # `segment_classification` - # : (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is true. - # - # `shot_classification` - # : (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # The default is false. - # - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. - # - # `1s_interval_classification` - # : (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. The default is false. - # - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # AutoML Video Intelligence Object Tracking - # - # `score_threshold` - # : (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # - # `min_bounding_box_size` - # : (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size are - # returned. Value in 0 to 1 range. Default is 0. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.batch_predict request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PredictionService REST API. - # - # This class represents the configuration for PredictionService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb deleted file mode 100644 index 55a08a1cae80..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +++ /dev/null @@ -1,1093 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.wait_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "wait_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:wait", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb deleted file mode 100644 index ed831fb87e44..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - module Rest - ## - # REST service stub for the PredictionService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::PredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1::PredictResponse] - # A result object deserialized from the server's reply - def predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1::PredictResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::BatchPredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::PredictRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:predict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1::BatchPredictRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:batchPredict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb deleted file mode 100644 index bd25b445ea06..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/prediction_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/annotation_payload_pb' -require 'google/cloud/automl/v1/data_items_pb' -require 'google/cloud/automl/v1/io_pb' -require 'google/longrunning/operations_pb' - - -descriptor_data = "\n/google/cloud/automl/v1/prediction_service.proto\x12\x16google.cloud.automl.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/automl/v1/annotation_payload.proto\x1a\'google/cloud/automl/v1/data_items.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a#google/longrunning/operations.proto\"\xf4\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12<\n\x07payload\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayloadB\x03\xe0\x41\x02\x12\x42\n\x06params\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x02\n\x0fPredictResponse\x12:\n\x07payload\x18\x01 \x03(\x0b\x32).google.cloud.automl.v1.AnnotationPayload\x12\x42\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayload\x12G\n\x08metadata\x18\x02 \x03(\x0b\x32\x35.google.cloud.automl.v1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xda\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12J\n\x0cinput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.automl.v1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12G\n\x06params\x18\x05 \x03(\x0b\x32\x37.google.cloud.automl.v1.BatchPredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x12\x42\x61tchPredictResult\x12J\n\x08metadata\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x85\x04\n\x11PredictionService\x12\xaf\x01\n\x07Predict\x12&.google.cloud.automl.v1.PredictRequest\x1a\'.google.cloud.automl.v1.PredictResponse\"S\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xf2\x01\n\x0c\x42\x61tchPredict\x12+.google.cloud.automl.v1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/models/*}:batchPredict:\x01*\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n\x1a\x63om.google.cloud.automl.v1B\x16PredictionServiceProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - PredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.PredictRequest").msgclass - PredictResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.PredictResponse").msgclass - BatchPredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictRequest").msgclass - BatchPredictResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.BatchPredictResult").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb deleted file mode 100644 index fa9f4cd6c333..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/prediction_service_services_pb.rb +++ /dev/null @@ -1,99 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/automl/v1/prediction_service.proto for package 'Google.Cloud.AutoML.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/automl/v1/prediction_service_pb' - -module Google - module Cloud - module AutoML - module V1 - module PredictionService - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.automl.v1.PredictionService' - - # Perform an online prediction. The prediction result is directly - # returned in the response. - # Available for following ML scenarios, and their expected request payloads: - # - # AutoML Vision Classification - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Vision Object Detection - # - # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. - # - # AutoML Natural Language Classification - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Natural Language Entity Extraction - # - # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document - # in .PDF, .TIF or .TIFF format with size upto 20MB. - # - # AutoML Natural Language Sentiment Analysis - # - # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in - # .PDF, .TIF or .TIFF format with size upto 2MB. - # - # AutoML Translation - # - # * A TextSnippet up to 25,000 characters, UTF-8 encoded. - # - # AutoML Tables - # - # * A row with column values matching - # the columns of the model, up to 5MB. Not available for FORECASTING - # `prediction_type`. - rpc :Predict, ::Google::Cloud::AutoML::V1::PredictRequest, ::Google::Cloud::AutoML::V1::PredictResponse - # Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1.PredictionService.Predict], batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via [GetOperation][google.longrunning.Operations.GetOperation] - # method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1.BatchPredictResult] is returned in - # the [response][google.longrunning.Operation.response] field. - # Available for following ML scenarios: - # - # * AutoML Vision Classification - # * AutoML Vision Object Detection - # * AutoML Video Intelligence Classification - # * AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification - # * AutoML Natural Language Entity Extraction - # * AutoML Natural Language Sentiment Analysis - # * AutoML Tables - rpc :BatchPredict, ::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb deleted file mode 100644 index e7f6441bacb9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1/prediction_service/rest" -require "google/cloud/automl/v1/automl/rest" -require "google/cloud/automl/v1/version" - -module Google - module Cloud - module AutoML - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/automl/v1/rest" - # client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb deleted file mode 100644 index 965c37c6de4c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/automl/v1/annotation_payload_pb' -require 'google/cloud/automl/v1/annotation_spec_pb' -require 'google/cloud/automl/v1/dataset_pb' -require 'google/cloud/automl/v1/image_pb' -require 'google/cloud/automl/v1/io_pb' -require 'google/cloud/automl/v1/model_pb' -require 'google/cloud/automl/v1/model_evaluation_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n$google/cloud/automl/v1/service.proto\x12\x16google.cloud.automl.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/automl/v1/annotation_payload.proto\x1a,google/cloud/automl/v1/annotation_spec.proto\x1a$google/cloud/automl/v1/dataset.proto\x1a\"google/cloud/automl/v1/image.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\"google/cloud/automl/v1/model.proto\x1a-google/cloud/automl/v1/model_evaluation.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x88\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\"H\n\x11GetDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x87\x01\n\x13ListDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"b\n\x14ListDatasetsResponse\x12\x31\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.automl.v1.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x14UpdateDatasetRequest\x12\x35\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"K\n\x14\x44\x65leteDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x88\x01\n\x11ImportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12>\n\x0cinput_config\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.InputConfigB\x03\xe0\x41\x02\"\x8a\x01\n\x11\x45xportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12@\n\routput_config\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.OutputConfigB\x03\xe0\x41\x02\"V\n\x18GetAnnotationSpecRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$automl.googleapis.com/AnnotationSpec\"\x82\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x31\n\x05model\x18\x04 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\"D\n\x0fGetModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x85\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"[\n\x12ListModelsResponse\x12,\n\x05model\x18\x01 \x03(\x0b\x32\x1d.google.cloud.automl.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x12\x44\x65leteModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"}\n\x12UpdateModelRequest\x12\x31\n\x05model\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe3\x02\n\x12\x44\x65ployModelRequest\x12\x7f\n0image_object_detection_model_deployment_metadata\x18\x02 \x01(\x0b\x32\x43.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataH\x00\x12|\n.image_classification_model_deployment_metadata\x18\x04 \x01(\x0b\x32\x42.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataH\x00\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/ModelB\x1b\n\x19model_deployment_metadata\"I\n\x14UndeployModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x94\x01\n\x12\x45xportModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12K\n\routput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.ModelExportOutputConfigB\x03\xe0\x41\x02\"X\n\x19GetModelEvaluationRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%automl.googleapis.com/ModelEvaluation\"\x8e\x01\n\x1bListModelEvaluationsRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"z\n\x1cListModelEvaluationsResponse\x12\x41\n\x10model_evaluation\x18\x01 \x03(\x0b\x32\'.google.cloud.automl.v1.ModelEvaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe8\x1b\n\x06\x41utoMl\x12\xcb\x01\n\rCreateDataset\x12,.google.cloud.automl.v1.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\xda\x41\x0eparent,dataset\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\x12\x95\x01\n\nGetDataset\x12).google.cloud.automl.v1.GetDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/datasets/*}\x12\xa8\x01\n\x0cListDatasets\x12+.google.cloud.automl.v1.ListDatasetsRequest\x1a,.google.cloud.automl.v1.ListDatasetsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/datasets\x12\xbb\x01\n\rUpdateDataset\x12,.google.cloud.automl.v1.UpdateDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\"[\xda\x41\x13\x64\x61taset,update_mask\x82\xd3\xe4\x93\x02?24/v1/{dataset.name=projects/*/locations/*/datasets/*}:\x07\x64\x61taset\x12\xc6\x01\n\rDeleteDataset\x12,.google.cloud.automl.v1.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/datasets/*}\x12\xdc\x01\n\nImportData\x12).google.cloud.automl.v1.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x11name,input_config\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:importData:\x01*\x12\xdd\x01\n\nExportData\x12).google.cloud.automl.v1.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:exportData:\x01*\x12\xbc\x01\n\x11GetAnnotationSpec\x12\x30.google.cloud.automl.v1.GetAnnotationSpecRequest\x1a&.google.cloud.automl.v1.AnnotationSpec\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}\x12\xbf\x01\n\x0b\x43reateModel\x12*.google.cloud.automl.v1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/models:\x05model\x12\x8d\x01\n\x08GetModel\x12\'.google.cloud.automl.v1.GetModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/models/*}\x12\xa0\x01\n\nListModels\x12).google.cloud.automl.v1.ListModelsRequest\x1a*.google.cloud.automl.v1.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/models\x12\xc0\x01\n\x0b\x44\x65leteModel\x12*.google.cloud.automl.v1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/models/*}\x12\xad\x01\n\x0bUpdateModel\x12*.google.cloud.automl.v1.UpdateModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"S\xda\x41\x11model,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{model.name=projects/*/locations/*/models/*}:\x05model\x12\xca\x01\n\x0b\x44\x65ployModel\x12*.google.cloud.automl.v1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xd0\x01\n\rUndeployModel\x12,.google.cloud.automl.v1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xd8\x01\n\x0b\x45xportModel\x12*.google.cloud.automl.v1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\xbe\x01\n\x12GetModelEvaluation\x12\x31.google.cloud.automl.v1.GetModelEvaluationRequest\x1a\'.google.cloud.automl.v1.ModelEvaluation\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xd8\x01\n\x14ListModelEvaluations\x12\x33.google.cloud.automl.v1.ListModelEvaluationsRequest\x1a\x34.google.cloud.automl.v1.ListModelEvaluationsResponse\"U\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xad\x01\n\x1a\x63om.google.cloud.automl.v1B\x0b\x41utoMlProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateDatasetRequest").msgclass - GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetDatasetRequest").msgclass - ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListDatasetsRequest").msgclass - ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListDatasetsResponse").msgclass - UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UpdateDatasetRequest").msgclass - DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteDatasetRequest").msgclass - ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ImportDataRequest").msgclass - ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportDataRequest").msgclass - GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetAnnotationSpecRequest").msgclass - CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.CreateModelRequest").msgclass - GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetModelRequest").msgclass - ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelsRequest").msgclass - ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelsResponse").msgclass - DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeleteModelRequest").msgclass - UpdateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UpdateModelRequest").msgclass - DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.DeployModelRequest").msgclass - UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.UndeployModelRequest").msgclass - ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ExportModelRequest").msgclass - GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.GetModelEvaluationRequest").msgclass - ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelEvaluationsRequest").msgclass - ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.ListModelEvaluationsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb deleted file mode 100644 index da906eec628a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/service_services_pb.rb +++ /dev/null @@ -1,136 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/automl/v1/service.proto for package 'Google.Cloud.AutoML.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/automl/v1/service_pb' - -module Google - module Cloud - module AutoML - module V1 - module AutoMl - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or dash-case, either of those cases is accepted. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.automl.v1.AutoMl' - - # Creates a dataset. - rpc :CreateDataset, ::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Google::Longrunning::Operation - # Gets a dataset. - rpc :GetDataset, ::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset - # Lists datasets in a project. - rpc :ListDatasets, ::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1::ListDatasetsResponse - # Updates a dataset. - rpc :UpdateDataset, ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset - # Deletes a dataset and all of its contents. - # Returns empty response in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteDataset, ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Google::Longrunning::Operation - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # [schema_inference_version][google.cloud.automl.v1.InputConfig.params] - # parameter must be explicitly set. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ImportData, ::Google::Cloud::AutoML::V1::ImportDataRequest, ::Google::Longrunning::Operation - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportData, ::Google::Cloud::AutoML::V1::ExportDataRequest, ::Google::Longrunning::Operation - # Gets an annotation spec. - rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1::AnnotationSpec - # Creates a model. - # Returns a Model in the [response][google.longrunning.Operation.response] - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - rpc :CreateModel, ::Google::Cloud::AutoML::V1::CreateModelRequest, ::Google::Longrunning::Operation - # Gets a model. - rpc :GetModel, ::Google::Cloud::AutoML::V1::GetModelRequest, ::Google::Cloud::AutoML::V1::Model - # Lists models. - rpc :ListModels, ::Google::Cloud::AutoML::V1::ListModelsRequest, ::Google::Cloud::AutoML::V1::ListModelsResponse - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteModel, ::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Google::Longrunning::Operation - # Updates a model. - rpc :UpdateModel, ::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Google::Cloud::AutoML::V1::Model - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :DeployModel, ::Google::Cloud::AutoML::V1::DeployModelRequest, ::Google::Longrunning::Operation - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :UndeployModel, ::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Google::Longrunning::Operation - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig]. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportModel, ::Google::Cloud::AutoML::V1::ExportModelRequest, ::Google::Longrunning::Operation - # Gets a model evaluation. - rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1::ModelEvaluation - # Lists model evaluations. - rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb deleted file mode 100644 index 97da0ef8bb22..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_extraction_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/text_extraction.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/text_segment_pb' - - -descriptor_data = "\n,google/cloud/automl/v1/text_extraction.proto\x12\x16google.cloud.automl.v1\x1a)google/cloud/automl/v1/text_segment.proto\"t\n\x18TextExtractionAnnotation\x12;\n\x0ctext_segment\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x92\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12r\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32N.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionAnnotation").msgclass - TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionEvaluationMetrics").msgclass - TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb deleted file mode 100644 index 92ccffaa6e09..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/text.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/classification_pb' - - -descriptor_data = "\n!google/cloud/automl/v1/text.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\"l\n!TextClassificationDatasetMetadata\x12G\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"j\n\x1fTextClassificationModelMetadata\x12G\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"\x1d\n\x1bTextExtractionModelMetadata\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xab\x01\n\x1a\x63om.google.cloud.automl.v1B\tTextProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextClassificationDatasetMetadata").msgclass - TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextClassificationModelMetadata").msgclass - TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionDatasetMetadata").msgclass - TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextExtractionModelMetadata").msgclass - TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentDatasetMetadata").msgclass - TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentModelMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb deleted file mode 100644 index f8ac0e311fe0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_segment_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/text_segment.proto - -require 'google/protobuf' - - -descriptor_data = "\n)google/cloud/automl/v1/text_segment.proto\x12\x16google.cloud.automl.v1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TextSegmentProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSegment").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb deleted file mode 100644 index 4f4061a1a5e2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/text_sentiment_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/text_sentiment.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1/classification_pb' - - -descriptor_data = "\n+google/cloud/automl/v1/text_sentiment.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xa0\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x61\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrixB\xb4\x01\n\x1a\x63om.google.cloud.automl.v1B\x12TextSentimentProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentAnnotation").msgclass - TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TextSentimentEvaluationMetrics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb deleted file mode 100644 index 728635fe1c9a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/translation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1/translation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/automl/v1/data_items_pb' - - -descriptor_data = "\n(google/cloud/automl/v1/translation.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\'google/cloud/automl/v1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"X\n\x15TranslationAnnotation\x12?\n\x12translated_content\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetB\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TranslationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1 - TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationDatasetMetadata").msgclass - TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationEvaluationMetrics").msgclass - TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationModelMetadata").msgclass - TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1.TranslationAnnotation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb b/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb deleted file mode 100644 index 33b9ec43d3df..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/lib/google/cloud/automl/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md deleted file mode 100644 index fcbf60ce5647..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud AutoML V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb deleted file mode 100644 index 9bd24ebc2a4b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_payload.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Contains annotation information that is relevant to AutoML. - # @!attribute [rw] translation - # @return [::Google::Cloud::AutoML::V1::TranslationAnnotation] - # Annotation details for translation. - # - # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] classification - # @return [::Google::Cloud::AutoML::V1::ClassificationAnnotation] - # Annotation details for content or image classification. - # - # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionAnnotation] - # Annotation details for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction - # @return [::Google::Cloud::AutoML::V1::TextExtractionAnnotation] - # Annotation details for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment - # @return [::Google::Cloud::AutoML::V1::TextSentimentAnnotation] - # Annotation details for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `text_extraction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only . The resource ID of the annotation spec that - # this annotation pertains to. The annotation spec comes from either an - # ancestor dataset, or the dataset that was used to train the model in use. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1::AnnotationSpec#display_name display_name} - # when the model was trained. Because this field returns a value at model - # training time, for different models trained using the same dataset, the - # returned value could be different as model owner could update the - # `display_name` between any two model training. - class AnnotationPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb deleted file mode 100644 index 942cbd6b09ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/annotation_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # A definition of an annotation spec. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the annotation spec. - # Form: - # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the annotation spec to show in the interface. The name can be - # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the parent dataset - # labeled by the annotation spec. - class AnnotationSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb deleted file mode 100644 index 9044a0c41bef..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/classification.rb +++ /dev/null @@ -1,189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Contains annotation details specific to classification. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence that the annotation is positive. If a user - # approves an annotation as negative or positive, the score value remains - # unchanged. If a user creates an annotation, the score is 0 for negative or - # 1 for positive. - class ClassificationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for classification problems. - # Note: For Video Classification this metrics only describe quality of the - # Video Classification predictions of "segment_classification" type. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged - # for the overall evaluation. - # @!attribute [rw] au_roc - # @return [::Float] - # Output only. The Area Under Receiver Operating Characteristic curve metric. - # Micro-averaged for the overall evaluation. - # @!attribute [rw] log_loss - # @return [::Float] - # Output only. The Log Loss metric. - # @!attribute [rw] confidence_metrics_entry - # @return [::Array<::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics for each confidence_threshold in - # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and - # position_threshold = INT32_MAX_VALUE. - # ROC and precision-recall curves, and other aggregated metrics are derived - # from them. The confidence metrics entries may also be supplied for - # additional values of position_threshold, but from these no aggregated - # metrics are computed. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for MULTICLASS classification problems where number - # of labels is no more than 10. - # Only set for model level evaluation, not for evaluation per label. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. The annotation spec ids used for this evaluation. - class ClassificationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. Metrics are computed with an assumption that the model - # never returns predictions with score lower than this value. - # @!attribute [rw] position_threshold - # @return [::Integer] - # Output only. Metrics are computed with an assumption that the model - # always returns at most this many predictions (ordered by their score, - # descendingly), but they all still need to meet the confidence_threshold. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall (True Positive Rate) for the given confidence - # threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision for the given confidence threshold. - # @!attribute [rw] false_positive_rate - # @return [::Float] - # Output only. False Positive Rate for the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] recall_at1 - # @return [::Float] - # Output only. The Recall (True Positive Rate) when only considering the - # label that has the highest prediction score and not below the confidence - # threshold for each example. - # @!attribute [rw] precision_at1 - # @return [::Float] - # Output only. The precision when only considering the label that has the - # highest prediction score and not below the confidence threshold for each - # example. - # @!attribute [rw] false_positive_rate_at1 - # @return [::Float] - # Output only. The False Positive Rate when only considering the label that - # has the highest prediction score and not below the confidence threshold - # for each example. - # @!attribute [rw] f1_score_at1 - # @return [::Float] - # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. - # @!attribute [rw] true_positive_count - # @return [::Integer] - # Output only. The number of model created labels that match a ground truth - # label. - # @!attribute [rw] false_positive_count - # @return [::Integer] - # Output only. The number of model created labels that do not match a - # ground truth label. - # @!attribute [rw] false_negative_count - # @return [::Integer] - # Output only. The number of ground truth labels that are not matched - # by a model created label. - # @!attribute [rw] true_negative_count - # @return [::Integer] - # Output only. The number of labels that were not created by the model, - # but if they would, they would not match a ground truth label. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Confusion matrix of the model running the classification. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. IDs of the annotation specs used in the confusion matrix. - # For Tables CLASSIFICATION - # [prediction_type][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type] - # only list of [annotation_spec_display_name-s][] is populated. - # @!attribute [rw] display_name - # @return [::Array<::String>] - # Output only. Display name of the annotation specs used in the confusion - # matrix, as they were at the moment of the evaluation. For Tables - # CLASSIFICATION - # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type], - # distinct values of the target column at the moment of the model - # evaluation are populated here. - # @!attribute [rw] row - # @return [::Array<::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] - # Output only. Rows in the confusion matrix. The number of rows is equal to - # the size of `annotation_spec_id`. - # `row[i].example_count[j]` is the number of examples that have ground - # truth of the `annotation_spec_id[i]` and are predicted as - # `annotation_spec_id[j]` by the model being evaluated. - class ConfusionMatrix - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. A row in the confusion matrix. - # @!attribute [rw] example_count - # @return [::Array<::Integer>] - # Output only. Value of the specific cell in the confusion matrix. - # The number of values each row has (i.e. the length of the row) is equal - # to the length of the `annotation_spec_id` field or, if that one is not - # populated, length of the {::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Type of the classification problem. - module ClassificationType - # An un-set value of this enum. - CLASSIFICATION_TYPE_UNSPECIFIED = 0 - - # At most one label is allowed per example. - MULTICLASS = 1 - - # Multiple labels are allowed for one example. - MULTILABEL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb deleted file mode 100644 index 27054977211d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/data_items.rb +++ /dev/null @@ -1,202 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # A representation of an image. - # Only images up to 30MB in size are supported. - # @!attribute [rw] image_bytes - # @return [::String] - # Image content represented as a stream of bytes. - # Note: As with all `bytes` fields, protobuffers use a pure binary - # representation, whereas JSON representations use base64. - # @!attribute [rw] thumbnail_uri - # @return [::String] - # Output only. HTTP URI to the thumbnail image. - class Image - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of a text snippet. - # @!attribute [rw] content - # @return [::String] - # Required. The content of the text snippet as a string. Up to 250000 - # characters long. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. The format of {::Google::Cloud::AutoML::V1::TextSnippet#content content}. Currently the only two allowed - # values are "text/html" and "text/plain". If left blank, the format is - # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1::TextSnippet#content content}. - # @!attribute [rw] content_uri - # @return [::String] - # Output only. HTTP URI where you can download the content. - class TextSnippet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message that describes dimension of a document. - # @!attribute [rw] unit - # @return [::Google::Cloud::AutoML::V1::DocumentDimensions::DocumentDimensionUnit] - # Unit of the dimension. - # @!attribute [rw] width - # @return [::Float] - # Width value of the document, works together with the unit. - # @!attribute [rw] height - # @return [::Float] - # Height value of the document, works together with the unit. - class DocumentDimensions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit of the document dimension. - module DocumentDimensionUnit - # Should not be used. - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 - - # Document dimension is measured in inches. - INCH = 1 - - # Document dimension is measured in centimeters. - CENTIMETER = 2 - - # Document dimension is measured in points. 72 points = 1 inch. - POINT = 3 - end - end - - # A structured text document e.g. a PDF. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1::DocumentInputConfig] - # An input config specifying the content of the document. - # @!attribute [rw] document_text - # @return [::Google::Cloud::AutoML::V1::TextSnippet] - # The plain text version of this document. - # @!attribute [rw] layout - # @return [::Array<::Google::Cloud::AutoML::V1::Document::Layout>] - # Describes the layout of the document. - # Sorted by [page_number][]. - # @!attribute [rw] document_dimensions - # @return [::Google::Cloud::AutoML::V1::DocumentDimensions] - # The dimensions of the page in the document. - # @!attribute [rw] page_count - # @return [::Integer] - # Number of pages in the document. - class Document - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the layout information of a {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the document. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1::TextSegment] - # Text Segment that represents a segment in - # [document_text][google.cloud.automl.v1p1beta.Document.document_text]. - # @!attribute [rw] page_number - # @return [::Integer] - # Page number of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the original document, starts - # from 1. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::AutoML::V1::BoundingPoly] - # The position of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in the page. - # Contains exactly 4 - # [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] - # and they are connected by edges in the order provided, which will - # represent a rectangle parallel to the frame. The - # [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are - # relative to the page. - # Coordinates are based on top-left as point (0,0). - # @!attribute [rw] text_segment_type - # @return [::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType] - # The type of the {::Google::Cloud::AutoML::V1::Document::Layout#text_segment text_segment} in document. - class Layout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of TextSegment in the context of the original document. - module TextSegmentType - # Should not be used. - TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 - - # The text segment is a token. e.g. word. - TOKEN = 1 - - # The text segment is a paragraph. - PARAGRAPH = 2 - - # The text segment is a form field. - FORM_FIELD = 3 - - # The text segment is the name part of a form field. It will be treated - # as child of another FORM_FIELD TextSegment if its span is subspan of - # another TextSegment with type FORM_FIELD. - FORM_FIELD_NAME = 4 - - # The text segment is the text content part of a form field. It will be - # treated as child of another FORM_FIELD TextSegment if its span is - # subspan of another TextSegment with type FORM_FIELD. - FORM_FIELD_CONTENTS = 5 - - # The text segment is a whole table, including headers, and all rows. - TABLE = 6 - - # The text segment is a table's headers. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_HEADER = 7 - - # The text segment is a row in table. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_ROW = 8 - - # The text segment is a cell in table. It will be treated as child of - # another TABLE_ROW TextSegment if its span is subspan of another - # TextSegment with type TABLE_ROW. - TABLE_CELL = 9 - end - end - end - - # Example data used for training or prediction. - # @!attribute [rw] image - # @return [::Google::Cloud::AutoML::V1::Image] - # Example image. - # - # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_snippet - # @return [::Google::Cloud::AutoML::V1::TextSnippet] - # Example text. - # - # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document - # @return [::Google::Cloud::AutoML::V1::Document] - # Example document. - # - # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExamplePayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb deleted file mode 100644 index afaccfc1a7d1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/dataset.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # A workspace for solving a single, particular machine learning (ML) problem. - # A workspace contains examples that may be annotated. - # @!attribute [rw] translation_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::TranslationDatasetMetadata] - # Metadata for a dataset used for translation. - # - # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::ImageClassificationDatasetMetadata] - # Metadata for a dataset used for image classification. - # - # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::TextClassificationDatasetMetadata] - # Metadata for a dataset used for text classification. - # - # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionDatasetMetadata] - # Metadata for a dataset used for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::TextExtractionDatasetMetadata] - # Metadata for a dataset used for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_dataset_metadata - # @return [::Google::Cloud::AutoML::V1::TextSentimentDatasetMetadata] - # Metadata for a dataset used for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `text_extraction_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the dataset. - # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the dataset to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. - # @!attribute [rw] description - # @return [::String] - # User-provided description of the dataset. The description can be up to - # 25000 characters long. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the dataset. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was created. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata to organize your dataset. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://goo.gl/xmQnxf for more information on and examples of labels. - class Dataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb deleted file mode 100644 index 3a1323a1c88d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/detection.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Annotation details for image object detection. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::AutoML::V1::BoundingPoly] - # Output only. The rectangle representing the object location. - # @!attribute [rw] score - # @return [::Float] - # Output only. The confidence that this annotation is positive for the parent example, - # value in [0, 1], higher means higher positivity confidence. - class ImageObjectDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bounding box matching model metrics for a single intersection-over-union - # threshold and multiple label match confidence thresholds. - # @!attribute [rw] iou_threshold - # @return [::Float] - # Output only. The intersection-over-union threshold value used to compute - # this metrics entry. - # @!attribute [rw] mean_average_precision - # @return [::Float] - # Output only. The mean average precision, most often close to au_prc. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] - # Output only. Metrics for each label-match confidence_threshold from - # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is - # derived from them. - class BoundingBoxMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Model evaluation metrics for image object detection problems. - # Evaluates prediction quality of labeled bounding boxes. - # @!attribute [rw] evaluated_bounding_box_count - # @return [::Integer] - # Output only. The total number of bounding boxes (i.e. summed over all - # images) the ground truth used to create this evaluation had. - # @!attribute [rw] bounding_box_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1::BoundingBoxMetricsEntry>] - # Output only. The bounding boxes match metrics for each - # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # pair. - # @!attribute [rw] bounding_box_mean_average_precision - # @return [::Float] - # Output only. The single metric for bounding boxes evaluation: - # the mean_average_precision averaged over all bounding_box_metrics_entries. - class ImageObjectDetectionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb deleted file mode 100644 index 74a562769bfa..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/geometry.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # A vertex represents a 2D point in the image. - # The normalized vertex coordinates are between 0 to 1 fractions relative to - # the original plane (image, video). E.g. if the plane (e.g. whole image) would - # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would - # be at the position (1, 6) on that plane. - # @!attribute [rw] x - # @return [::Float] - # Required. Horizontal coordinate. - # @!attribute [rw] y - # @return [::Float] - # Required. Vertical coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A bounding polygon of a detected object on a plane. - # On output both vertices and normalized_vertices are provided. - # The polygon is formed by connecting vertices in the order they are listed. - # @!attribute [rw] normalized_vertices - # @return [::Array<::Google::Cloud::AutoML::V1::NormalizedVertex>] - # Output only . The bounding polygon normalized vertices. - class BoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb deleted file mode 100644 index 4e520cdd2e8b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/image.rb +++ /dev/null @@ -1,215 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Dataset metadata that is specific to image classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1::ClassificationType] - # Required. Type of the classification problem. - class ImageClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata specific to image object detection. - class ImageObjectDetectionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata for image classification. - # @!attribute [rw] base_model_id - # @return [::String] - # Optional. The ID of the `base` model. If it is specified, the new model - # will be created based on the `base` model. Otherwise, the new model will be - # created from scratch. The `base` model must be in the same - # `project` and `location` as the new model to create, and have the same - # `model_type`. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # Optional. The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. The actual - # `train_cost` will be equal or less than this value. If further model - # training ceases to provide any improvements, it will stop without using - # full budget and the stop_reason will be `MODEL_CONVERGED`. - # Note, node_hour = actual_hour * number_of_nodes_invovled. - # For model type `cloud`(default), the train budget must be between 8,000 - # and 800,000 milli node hours, inclusive. The default value is 192, 000 - # which represents one day in wall time. For model type - # `mobile-low-latency-1`, `mobile-versatile-1`, `mobile-high-accuracy-1`, - # `mobile-core-ml-low-latency-1`, `mobile-core-ml-versatile-1`, - # `mobile-core-ml-high-accuracy-1`, the train budget must be between 1,000 - # and 100,000 milli node hours, inclusive. The default value is 24, 000 which - # represents one day in wall time. - # @!attribute [r] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # milli node hours, i.e. 1,000 value in this field means 1 node hour. - # Guaranteed to not exceed the train budget. - # @!attribute [r] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud` - Model to be used via prediction calls to AutoML API. - # This is the default value. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. Expected to have low latency, but may have - # lower prediction quality than other models. - # * `mobile-core-ml-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. - # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to - # providing prediction via AutoML API, can also be exported - # (see {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with - # Core ML afterwards. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # @!attribute [r] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [r] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the node_qps field. - class ImageClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to image object detection. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud-high-accuracy-1` - (default) A model to be used via prediction - # calls to AutoML API. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # * `cloud-low-latency-1` - A model to be used via prediction - # calls to AutoML API. Expected to have low latency, but may - # have lower prediction quality than other models. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # @!attribute [r] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the qps_per_node field. - # @!attribute [r] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [r] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # Optional. The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. The actual - # `train_cost` will be equal or less than this value. If further model - # training ceases to provide any improvements, it will stop without using - # full budget and the stop_reason will be `MODEL_CONVERGED`. - # Note, node_hour = actual_hour * number_of_nodes_invovled. - # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, - # the train budget must be between 20,000 and 900,000 milli node hours, - # inclusive. The default value is 216, 000 which represents one day in - # wall time. - # For model type `mobile-low-latency-1`, `mobile-versatile-1`, - # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, - # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train - # budget must be between 1,000 and 100,000 milli node hours, inclusive. - # The default value is 24, 000 which represents one day in wall time. - # @!attribute [r] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # milli node hours, i.e. 1,000 value in this field means 1 node hour. - # Guaranteed to not exceed the train budget. - class ImageObjectDetectionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Classification. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # {::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata#node_qps node_qps}. - # Must be between 1 and 100, inclusive on both ends. - class ImageClassificationModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Object Detection. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # [qps_per_node][google.cloud.automl.v1.ImageObjectDetectionModelMetadata.qps_per_node]. - # Must be between 1 and 100, inclusive on both ends. - class ImageObjectDetectionModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb deleted file mode 100644 index 07e37b650808..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/io.rb +++ /dev/null @@ -1,1345 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Input configuration for - # {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData} action. - # - # The format of input depends on dataset_metadata the Dataset into which - # the import is happening has. As input source the - # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. Additionally any input .CSV file - # by itself must be 100MB or smaller, unless specified otherwise. - # If an "example" file (that is, image, video etc.) with identical content - # (even if it had different `GCS_FILE_PATH`) is mentioned multiple times, then - # its label, bounding boxes etc. are appended. The same file should be always - # provided with the same `ML_USE` and `GCS_FILE_PATH`, if it is not, then - # these values are nondeterministically selected from the given ones. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats are: - # - # #### AutoML Vision - # - # - # ##### Classification - # - # See [Preparing your training - # data](https://cloud.google.com/vision/automl/docs/prepare) for more - # information. - # - # CSV file(s) with each line in format: - # - # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing. - # - # * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to - # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, - # .TIFF, .ICO. - # - # * `LABEL` - A label that identifies the object in the image. - # - # For the `MULTICLASS` classification type, at most one `LABEL` is allowed - # per image. If an image has not yet been labeled, then it should be - # mentioned just once with no `LABEL`. - # - # Some sample rows: - # - # TRAIN,gs://folder/image1.jpg,daisy - # TEST,gs://folder/image2.jpg,dandelion,tulip,rose - # UNASSIGNED,gs://folder/image3.jpg,daisy - # UNASSIGNED,gs://folder/image4.jpg - # - # - # ##### Object Detection - # See [Preparing your training - # data](https://cloud.google.com/vision/automl/object-detection/docs/prepare) - # for more information. - # - # A CSV file(s) with each line in format: - # - # ML_USE,GCS_FILE_PATH,[LABEL],(BOUNDING_BOX | ,,,,,,,) - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing. - # - # * `GCS_FILE_PATH` - The Google Cloud Storage location of an image of up to - # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. Each image - # is assumed to be exhaustively labeled. - # - # * `LABEL` - A label that identifies the object in the image specified by the - # `BOUNDING_BOX`. - # - # * `BOUNDING BOX` - The vertices of an object in the example image. - # The minimum allowed `BOUNDING_BOX` edge length is 0.01, and no more than - # 500 `BOUNDING_BOX` instances per image are allowed (one `BOUNDING_BOX` - # per line). If an image has no looked for objects then it should be - # mentioned just once with no LABEL and the ",,,,,,," in place of the - # `BOUNDING_BOX`. - # - # **Four sample rows:** - # - # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, - # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, - # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 - # TEST,gs://folder/im3.png,,,,,,,,, - # - # - # - # - # #### AutoML Video Intelligence - # - # - # ##### Classification - # - # See [Preparing your training - # data](https://cloud.google.com/video-intelligence/automl/docs/prepare) for - # more information. - # - # CSV file(s) with each line in format: - # - # ML_USE,GCS_FILE_PATH - # - # For `ML_USE`, do not use `VALIDATE`. - # - # `GCS_FILE_PATH` is the path to another .csv file that describes training - # example for a given `ML_USE`, using the following row format: - # - # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) - # - # Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # - # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - # length of the video, and the end time must be after the start time. Any - # segment of a video which has one or more labels on it, is considered a - # hard negative for all other labels. Any segment with no labels on - # it is considered to be unknown. If a whole video is unknown, then - # it should be mentioned just once with ",," in place of `LABEL, - # TIME_SEGMENT_START,TIME_SEGMENT_END`. - # - # Sample top level CSV file: - # - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # - # Sample rows of a CSV file for a particular ML_USE: - # - # gs://folder/video1.avi,car,120,180.000021 - # gs://folder/video1.avi,bike,150,180.000021 - # gs://folder/vid2.avi,car,0,60.5 - # gs://folder/vid3.avi,,, - # - # - # - # ##### Object Tracking - # - # See [Preparing your training - # data](/video-intelligence/automl/object-tracking/docs/prepare) for more - # information. - # - # CSV file(s) with each line in format: - # - # ML_USE,GCS_FILE_PATH - # - # For `ML_USE`, do not use `VALIDATE`. - # - # `GCS_FILE_PATH` is the path to another .csv file that describes training - # example for a given `ML_USE`, using the following row format: - # - # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX - # - # or - # - # GCS_FILE_PATH,,,,,,,,,, - # - # Here `GCS_FILE_PATH` leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # Providing `INSTANCE_ID`s can help to obtain a better model. When - # a specific labeled entity leaves the video frame, and shows up - # afterwards it is not required, albeit preferable, that the same - # `INSTANCE_ID` is given to it. - # - # `TIMESTAMP` must be within the length of the video, the - # `BOUNDING_BOX` is assumed to be drawn on the closest video's frame - # to the `TIMESTAMP`. Any mentioned by the `TIMESTAMP` frame is expected - # to be exhaustively labeled and no more than 500 `BOUNDING_BOX`-es per - # frame are allowed. If a whole video is unknown, then it should be - # mentioned just once with ",,,,,,,,,," in place of `LABEL, - # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX`. - # - # Sample top level CSV file: - # - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # - # Seven sample rows of a CSV file for a particular ML_USE: - # - # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 - # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 - # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 - # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, - # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, - # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, - # gs://folder/video2.avi,,,,,,,,,,, - # - # - # #### AutoML Natural Language - # - # - # ##### Entity Extraction - # - # See [Preparing your training - # data](/natural-language/automl/entity-analysis/docs/prepare) for more - # information. - # - # One or more CSV file(s) with each line in the following format: - # - # ML_USE,GCS_FILE_PATH - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing.. - # - # * `GCS_FILE_PATH` - a Identifies JSON Lines (.JSONL) file stored in - # Google Cloud Storage that contains in-line text in-line as documents - # for model training. - # - # After the training data set has been determined from the `TRAIN` and - # `UNASSIGNED` CSV files, the training data is divided into train and - # validation data sets. 70% for training and 30% for validation. - # - # For example: - # - # TRAIN,gs://folder/file1.jsonl - # VALIDATE,gs://folder/file2.jsonl - # TEST,gs://folder/file3.jsonl - # - # **In-line JSONL files** - # - # In-line .JSONL files contain, per line, a JSON document that wraps a - # {::Google::Cloud::AutoML::V1::TextSnippet `text_snippet`} field followed by - # one or more {::Google::Cloud::AutoML::V1::AnnotationPayload `annotations`} - # fields, which have `display_name` and `text_extraction` fields to describe - # the entity from the text snippet. Multiple JSON documents can be separated - # using line breaks (\n). - # - # The supplied text must be annotated exhaustively. For example, if you - # include the text "horse", but do not label it as "animal", - # then "horse" is assumed to not be an "animal". - # - # Any given text snippet content must have 30,000 characters or - # less, and also be UTF-8 NFC encoded. ASCII is accepted as it is - # UTF-8 NFC encoded. - # - # For example: - # - # { - # "text_snippet": { - # "content": "dog car cat" - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 0, "end_offset": 2} - # } - # }, - # { - # "display_name": "vehicle", - # "text_extraction": { - # "text_segment": {"start_offset": 4, "end_offset": 6} - # } - # }, - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 8, "end_offset": 10} - # } - # } - # ] - # }\n - # { - # "text_snippet": { - # "content": "This dog is good." - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 5, "end_offset": 7} - # } - # } - # ] - # } - # - # **JSONL files that reference documents** - # - # .JSONL files contain, per line, a JSON document that wraps a - # `input_config` that contains the path to a source document. - # Multiple JSON documents can be separated using line breaks (\n). - # - # Supported document extensions: .PDF, .TIF, .TIFF - # - # For example: - # - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] - # } - # } - # } - # } - # - # **In-line JSONL files with document layout information** - # - # **Note:** You can only annotate documents using the UI. The format described - # below applies to annotated documents exported using the UI or `exportData`. - # - # In-line .JSONL files for documents contain, per line, a JSON document - # that wraps a `document` field that provides the textual content of the - # document and the layout information. - # - # For example: - # - # { - # "document": { - # "document_text": { - # "content": "dog car cat" - # } - # "layout": [ - # { - # "text_segment": { - # "start_offset": 0, - # "end_offset": 11, - # }, - # "page_number": 1, - # "bounding_poly": { - # "normalized_vertices": [ - # {"x": 0.1, "y": 0.1}, - # {"x": 0.1, "y": 0.3}, - # {"x": 0.3, "y": 0.3}, - # {"x": 0.3, "y": 0.1}, - # ], - # }, - # "text_segment_type": TOKEN, - # } - # ], - # "document_dimensions": { - # "width": 8.27, - # "height": 11.69, - # "unit": INCH, - # } - # "page_count": 3, - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 0, "end_offset": 3} - # } - # }, - # { - # "display_name": "vehicle", - # "text_extraction": { - # "text_segment": {"start_offset": 4, "end_offset": 7} - # } - # }, - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": {"start_offset": 8, "end_offset": 11} - # } - # }, - # ], - # - # - # - # - # ##### Classification - # - # See [Preparing your training - # data](https://cloud.google.com/natural-language/automl/docs/prepare) for more - # information. - # - # One or more CSV file(s) with each line in the following format: - # - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing. - # - # * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If - # the column content is a valid Google Cloud Storage file path, that is, - # prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if - # the content is enclosed in double quotes (""), it is treated as a - # `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a - # file with supported extension and UTF-8 encoding, for example, - # "gs://folder/content.txt" AutoML imports the file content - # as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content - # excluding quotes. In both cases, size of the content must be 10MB or - # less in size. For zip files, the size of each file inside the zip must be - # 10MB or less in size. - # - # For the `MULTICLASS` classification type, at most one `LABEL` is allowed. - # - # The `ML_USE` and `LABEL` columns are optional. - # Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP - # - # A maximum of 100 unique labels are allowed per CSV row. - # - # Sample rows: - # - # TRAIN,"They have bad food and very rude",RudeService,BadFood - # gs://folder/content.txt,SlowService - # TEST,gs://folder/document.pdf - # VALIDATE,gs://folder/text_files.zip,BadFood - # - # - # - # ##### Sentiment Analysis - # - # See [Preparing your training - # data](https://cloud.google.com/natural-language/automl/docs/prepare) for more - # information. - # - # CSV file(s) with each line in format: - # - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT - # - # * `ML_USE` - Identifies the data set that the current row (file) applies - # to. - # This value can be one of the following: - # * `TRAIN` - Rows in this file are used to train the model. - # * `TEST` - Rows in this file are used to test the model during training. - # * `UNASSIGNED` - Rows in this file are not categorized. They are - # Automatically divided into train and test data. 80% for training and - # 20% for testing. - # - # * `TEXT_SNIPPET` and `GCS_FILE_PATH` are distinguished by a pattern. If - # the column content is a valid Google Cloud Storage file path, that is, - # prefixed by "gs://", it is treated as a `GCS_FILE_PATH`. Otherwise, if - # the content is enclosed in double quotes (""), it is treated as a - # `TEXT_SNIPPET`. For `GCS_FILE_PATH`, the path must lead to a - # file with supported extension and UTF-8 encoding, for example, - # "gs://folder/content.txt" AutoML imports the file content - # as a text snippet. For `TEXT_SNIPPET`, AutoML imports the column content - # excluding quotes. In both cases, size of the content must be 128kB or - # less in size. For zip files, the size of each file inside the zip must be - # 128kB or less in size. - # - # The `ML_USE` and `SENTIMENT` columns are optional. - # Supported file extensions: .TXT, .PDF, .TIF, .TIFF, .ZIP - # - # * `SENTIMENT` - An integer between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max - # (inclusive). Describes the ordinal of the sentiment - higher - # value means a more positive sentiment. All the values are - # completely relative, i.e. neither 0 needs to mean a negative or - # neutral sentiment nor sentiment_max needs to mean a positive one - - # it is just required that 0 is the least positive sentiment - # in the data, and sentiment_max is the most positive one. - # The SENTIMENT shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - # All SENTIMENT values between 0 and sentiment_max must be - # represented in the imported data. On prediction the same 0 to - # sentiment_max range will be used. The difference between - # neighboring sentiment values needs not to be uniform, e.g. 1 and - # 2 may be similar whereas the difference between 2 and 3 may be - # large. - # - # Sample rows: - # - # TRAIN,"@freewrytin this is way too good for your product",2 - # gs://folder/content.txt,3 - # TEST,gs://folder/document.pdf - # VALIDATE,gs://folder/text_files.zip,2 - # - # - # - # #### AutoML Tables - # - # See [Preparing your training - # data](https://cloud.google.com/automl-tables/docs/prepare) for more - # information. - # - # You can use either - # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} or - # [bigquery_source][google.cloud.automl.v1.InputConfig.bigquery_source]. - # All input is concatenated into a - # single - # [primary_table_spec_id][google.cloud.automl.v1.TablesDatasetMetadata.primary_table_spec_id] - # - # **For gcs_source:** - # - # CSV file(s), where the first row of the first file is the header, - # containing unique column names. If the first row of a subsequent - # file is the same as the header, then it is also treated as a - # header. All other rows contain values for the corresponding - # columns. - # - # Each .CSV file by itself must be 10GB or smaller, and their total - # size must be 100GB or smaller. - # - # First three sample rows of a CSV file: - #

-        # "Id","First Name","Last Name","Dob","Addresses"
-        # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
-        # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
-        # 
- # **For bigquery_source:** - # - # An URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # - # An imported table must have between 2 and 1,000 columns, inclusive, - # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 - # import data running in parallel. - # - # - # - # **Input field definitions:** - # - # `ML_USE` - # : ("TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED") - # Describes how the given example (file) should be used for model - # training. "UNASSIGNED" can be used when user has no preference. - # - # `GCS_FILE_PATH` - # : The path to a file on Google Cloud Storage. For example, - # "gs://folder/image1.png". - # - # `LABEL` - # : A display name of an object on an image, video etc., e.g. "dog". - # Must be up to 32 characters long and can consist only of ASCII - # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. - # For each label an AnnotationSpec is created which display_name - # becomes the label; AnnotationSpecs are given back in predictions. - # - # `INSTANCE_ID` - # : A positive integer that identifies a specific instance of a - # labeled entity on an example. Used e.g. to track two cars on - # a video while being able to tell apart which one is which. - # - # `BOUNDING_BOX` - # : (`VERTEX,VERTEX,VERTEX,VERTEX` | `VERTEX,,,VERTEX,,`) - # A rectangle parallel to the frame of the example (image, - # video). If 4 vertices are given they are connected by edges - # in the order provided, if 2 are given they are recognized - # as diagonally opposite vertices of the rectangle. - # - # `VERTEX` - # : (`COORDINATE,COORDINATE`) - # First coordinate is horizontal (x), the second is vertical (y). - # - # `COORDINATE` - # : A float in 0 to 1 range, relative to total length of - # image or video in given dimension. For fractions the - # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). - # Point 0,0 is in top left. - # - # `TIME_SEGMENT_START` - # : (`TIME_OFFSET`) - # Expresses a beginning, inclusive, of a time segment - # within an example that has a time dimension - # (e.g. video). - # - # `TIME_SEGMENT_END` - # : (`TIME_OFFSET`) - # Expresses an end, exclusive, of a time segment within - # n example that has a time dimension (e.g. video). - # - # `TIME_OFFSET` - # : A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed, and it means the end - # of the example. - # - # `TEXT_SNIPPET` - # : The content of a text snippet, UTF-8 encoded, enclosed within - # double quotes (""). - # - # `DOCUMENT` - # : A field that provides the textual content with document and the layout - # information. - # - # - # **Errors:** - # - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # nothing is imported. Regardless of overall success or failure the per-row - # failures, up to a certain count cap, is listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1::GcsSource] - # The Google Cloud Storage location for the input content. - # For {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData}, - # `gcs_source` points to a CSV file with a structure described in - # {::Google::Cloud::AutoML::V1::InputConfig InputConfig}. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters describing the semantic of the - # imported data, any string must be up to 25000 - # characters long. - # - # #### AutoML Tables - # - # `schema_inference_version` - # : (integer) This value must be supplied. - # The version of the - # algorithm to use for the initial inference of the - # column data types of the imported table. Allowed values: "1". - class InputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Input configuration for BatchPredict Action. - # - # The format of input depends on the ML problem of the model used for - # prediction. As input source the - # {::Google::Cloud::AutoML::V1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats - # are: - # - # #### AutoML Vision - # ##### Classification - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH - # - # The Google Cloud Storage location of an image of up to - # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. - # This path is treated as the ID in the batch predict output. - # - # Sample rows: - # - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # - # ##### Object Detection - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH - # - # The Google Cloud Storage location of an image of up to - # 30MB in size. Supported extensions: .JPEG, .GIF, .PNG. - # This path is treated as the ID in the batch predict output. - # - # Sample rows: - # - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # - # #### AutoML Video Intelligence - # ##### Classification - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # - # `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in - # size and up to 3h in duration duration. - # Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # - # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - # length of the video, and the end time must be after the start time. - # - # Sample rows: - # - # gs://folder/video1.mp4,10,40 - # gs://folder/video1.mp4,20,60 - # gs://folder/vid2.mov,0,inf - # - # ##### Object Tracking - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # - # `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in - # size and up to 3h in duration duration. - # Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # - # `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the - # length of the video, and the end time must be after the start time. - # - # Sample rows: - # - # gs://folder/video1.mp4,10,40 - # gs://folder/video1.mp4,20,60 - # gs://folder/vid2.mov,0,inf - # - # #### AutoML Natural Language - # ##### Classification - # - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH - # - # `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. - # Supported file extensions: .TXT, .PDF, .TIF, .TIFF - # - # Text files can be no larger than 10MB in size. - # - # Sample rows: - # - # gs://folder/text1.txt - # gs://folder/text2.pdf - # gs://folder/text3.tif - # - # ##### Sentiment Analysis - # One or more CSV files where each line is a single column: - # - # GCS_FILE_PATH - # - # `GCS_FILE_PATH` is the Google Cloud Storage location of a text file. - # Supported file extensions: .TXT, .PDF, .TIF, .TIFF - # - # Text files can be no larger than 128kB in size. - # - # Sample rows: - # - # gs://folder/text1.txt - # gs://folder/text2.pdf - # gs://folder/text3.tif - # - # ##### Entity Extraction - # - # One or more JSONL (JSON Lines) files that either provide inline text or - # documents. You can only use one format, either inline text or documents, - # for a single call to [AutoMl.BatchPredict]. - # - # Each JSONL file contains a per line a proto that - # wraps a temporary user-assigned TextSnippet ID (string up to 2000 - # characters long) called "id", a TextSnippet proto (in - # JSON representation) and zero or more TextFeature protos. Any given - # text snippet content must have 30,000 characters or less, and also - # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be - # unique. - # - # Each document JSONL file contains, per line, a proto that wraps a Document - # proto with `input_config` set. Each document cannot exceed 2MB in size. - # - # Supported document extensions: .PDF, .TIF, .TIFF - # - # Each JSONL file must not exceed 100MB in size, and no more than 20 - # JSONL files may be passed. - # - # Sample inline JSONL file (Shown with artificial line - # breaks. Actual line breaks are denoted by "\n".): - # - # { - # "id": "my_first_id", - # "text_snippet": { "content": "dog car cat"}, - # "text_features": [ - # { - # "text_segment": \\{"start_offset": 4, "end_offset": 6}, - # "structural_type": PARAGRAPH, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.1, "y": 0.1}, - # \\{"x": 0.1, "y": 0.3}, - # \\{"x": 0.3, "y": 0.3}, - # \\{"x": 0.3, "y": 0.1}, - # ] - # }, - # } - # ], - # }\n - # { - # "id": "2", - # "text_snippet": { - # "content": "Extended sample content", - # "mime_type": "text/plain" - # } - # } - # - # Sample document JSONL file (Shown with artificial line - # breaks. Actual line breaks are denoted by "\n".): - # - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ] - # } - # } - # } - # } - # - # #### AutoML Tables - # - # See [Preparing your training - # data](https://cloud.google.com/automl-tables/docs/predict-batch) for more - # information. - # - # You can use either - # {::Google::Cloud::AutoML::V1::BatchPredictInputConfig#gcs_source gcs_source} - # or - # [bigquery_source][BatchPredictInputConfig.bigquery_source]. - # - # **For gcs_source:** - # - # CSV file(s), each by itself 10GB or smaller and total size must be - # 100GB or smaller, where first file must have a header containing - # column names. If the first row of a subsequent file is the same as - # the header, then it is also treated as a header. All other rows - # contain values for the corresponding columns. - # - # The column names must contain the model's - # [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] - # [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows, i.e. the CSV - # lines, will be attempted. - # - # - # Sample rows from a CSV file: - #
-        # "First Name","Last Name","Dob","Addresses"
-        # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
-        # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
-        # 
- # **For bigquery_source:** - # - # The URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # - # The column names must contain the model's - # [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs] - # [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name] - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows of the table - # will be attempted. - # - # **Input field definitions:** - # - # `GCS_FILE_PATH` - # : The path to a file on Google Cloud Storage. For example, - # "gs://folder/video.avi". - # - # `TIME_SEGMENT_START` - # : (`TIME_OFFSET`) - # Expresses a beginning, inclusive, of a time segment - # within an example that has a time dimension - # (e.g. video). - # - # `TIME_SEGMENT_END` - # : (`TIME_OFFSET`) - # Expresses an end, exclusive, of a time segment within - # n example that has a time dimension (e.g. video). - # - # `TIME_OFFSET` - # : A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed, and it means the end - # of the example. - # - # **Errors:** - # - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # prediction does not happen. Regardless of overall success or failure the - # per-row failures, up to a certain count cap, will be listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1::GcsSource] - # Required. The Google Cloud Storage location for the input content. - class BatchPredictInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input configuration of a {::Google::Cloud::AutoML::V1::Document Document}. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1::GcsSource] - # The Google Cloud Storage location of the document file. Only a single path - # should be given. - # - # Max supported size: 512MB. - # - # Supported extensions: .PDF. - class DocumentInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # * For Translation: - # CSV file `translation.csv`, with each line in format: - # ML_USE,GCS_FILE_PATH - # GCS_FILE_PATH leads to a .TSV file which describes examples that have - # given ML_USE, using the following row format per line: - # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target - # language) - # - # * For Tables: - # Output depends on whether the dataset was imported from Google Cloud - # Storage or BigQuery. - # Google Cloud Storage case: - # [gcs_destination][google.cloud.automl.v1p1beta.OutputConfig.gcs_destination] - # must be set. Exported are CSV file(s) `tables_1.csv`, - # `tables_2.csv`,...,`tables_N.csv` with each having as header line - # the table's column names, and all other lines contain values for - # the header columns. - # BigQuery case: - # [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # `export_data__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that - # dataset a new table called `primary_table` will be created, and - # filled with precisely the same data as this obtained on import. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1::GcsDestination] - # Required. The Google Cloud Storage location where the output is to be - # written to. For Image Object Detection, Text Extraction, Video - # Classification and Tables, in the given directory a new directory will be - # created with name: - # export_data-- where - # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export - # output will be written into that directory. - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for BatchPredict Action. - # - # As destination the - # {::Google::Cloud::AutoML::V1::BatchPredictOutputConfig#gcs_destination gcs_destination} - # must be set unless specified otherwise for a domain. If gcs_destination is - # set then in the given directory a new directory is created. Its name - # will be - # "prediction--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents - # of it depends on the ML problem the predictions are made for. - # - # * For Image Classification: - # In the created directory files `image_classification_1.jsonl`, - # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # A single image will be listed only once with all its annotations, - # and its annotations will never be split across files. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. - # If prediction for any image failed (partially or completely), then an - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # - # * For Image Object Detection: - # In the created directory files `image_object_detection_1.jsonl`, - # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have image_object_detection detail populated. A single image will - # be listed only once with all its annotations, and its annotations - # will never be split across files. - # If prediction for any image failed (partially or completely), then - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # * For Video Classification: - # In the created directory a video_classification.csv file, and a .JSON - # file per each video classification requested in the input (i.e. each - # line in given CSV(s)), will be created. - # - # The format of video_classification.csv is: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_classification.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error code - # with message otherwise. If STATUS is not "OK" then the .JSON file - # for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for the video time segment the file is assigned to in the - # video_classification.csv. All AnnotationPayload protos will have - # video_classification field set, and will be sorted by - # video_classification.type field (note that the returned types are - # governed by `classifaction_types` parameter in - # [PredictService.BatchPredictRequest.params][]). - # - # * For Video Object Tracking: - # In the created directory a video_object_tracking.csv file will be - # created, and multiple files video_object_trackinng_1.json, - # video_object_trackinng_2.json,..., video_object_trackinng_N.json, - # where N is the number of requests in the input (i.e. the number of - # lines in given CSV(s)). - # - # The format of video_object_tracking.csv is: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_object_tracking.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error - # code with message otherwise. If STATUS is not "OK" then the .JSON - # file for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for each frame of the video time segment the file is assigned to in - # video_object_tracking.csv. All AnnotationPayload protos will have - # video_object_tracking field set. - # * For Text Classification: - # In the created directory files `text_classification_1.jsonl`, - # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text file (or document) in - # the text snippet (or document) proto and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. A single text file (or - # document) will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any input file (or document) failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input file followed by exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Sentiment: - # In the created directory files `text_sentiment_1.jsonl`, - # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text file (or document) in - # the text snippet (or document) proto and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have text_sentiment detail populated. A single text file (or - # document) will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any input file (or document) failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input file followed by exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Extraction: - # In the created directory files `text_extraction_1.jsonl`, - # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # The contents of these .JSONL file(s) depend on whether the input - # used inline text, or documents. - # If input was inline, then each .JSONL file will contain, per line, - # a JSON representation of a proto that wraps given in request text - # snippet's "id" (if specified), followed by input text snippet, - # and a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated. A single text snippet will be - # listed only once with all its annotations, and its annotations will - # never be split across files. - # If input used documents, then each .JSONL file will contain, per - # line, a JSON representation of a proto that wraps given in request - # document proto, followed by its OCR-ed representation in the form - # of a text snippet, finally followed by a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated and refer, via their indices, to - # the OCR-ed text snippet. A single document (and its text snippet) - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # If prediction for any text snippet failed (partially or completely), - # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps either the "id" : "" (in case of inline) - # or the document proto (in case of document) but here followed by - # exactly one - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Tables: - # Output depends on whether - # [gcs_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.gcs_destination] - # or - # [bigquery_destination][google.cloud.automl.v1p1beta.BatchPredictOutputConfig.bigquery_destination] - # is set (either is allowed). - # Google Cloud Storage case: - # In the created directory files `tables_1.csv`, `tables_2.csv`,..., - # `tables_N.csv` will be created, where N may be 1, and depends on - # the total number of the successfully predicted rows. - # For all CLASSIFICATION - # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] - # given on input followed by M target column names in the format of - # "<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] - # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>__score" where M is the number of distinct target values, - # i.e. number of distinct values in the target column of the table - # used to train the model. Subsequent lines will contain the - # respective values of successfully predicted rows, with the last, - # i.e. the target, columns having the corresponding prediction - # [scores][google.cloud.automl.v1p1beta.TablesAnnotation.score]. - # For REGRESSION and FORECASTING - # [prediction_type-s][google.cloud.automl.v1p1beta.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # [display_name-s][google.cloud.automl.v1p1beta.display_name] - # given on input followed by the predicted target column with name - # in the format of - # "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] - # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" - # Subsequent lines will contain the respective values of - # successfully predicted rows, with the last, i.e. the target, - # column having the predicted target value. - # If prediction for any rows failed, then an additional - # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be - # created (N depends on total number of failed rows). These files - # will have analogous format as `tables_*.csv`, but always with a - # single target column having - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a JSON string, and containing only `code` and - # `message`. - # BigQuery case: - # [bigquery_destination][google.cloud.automl.v1p1beta.OutputConfig.bigquery_destination] - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # `prediction__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset - # two tables will be created, `predictions`, and `errors`. - # The `predictions` table's column names will be the input columns' - # [display_name-s][google.cloud.automl.v1p1beta.ColumnSpec.display_name] - # followed by the target column with name in the format of - # "predicted_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] - # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>" - # The input feature columns will contain the respective values of - # successfully predicted rows, with the target column having an - # ARRAY of - # [AnnotationPayloads][google.cloud.automl.v1p1beta.AnnotationPayload], - # represented as STRUCT-s, containing - # [TablesAnnotation][google.cloud.automl.v1p1beta.TablesAnnotation]. - # The `errors` table contains rows for which the prediction has - # failed, it has analogous input columns while the target column name - # is in the format of - # "errors_<[target_column_specs][google.cloud.automl.v1p1beta.TablesModelMetadata.target_column_spec] - # [display_name][google.cloud.automl.v1p1beta.ColumnSpec.display_name]>", - # and as a value has - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a STRUCT, and containing only `code` and `message`. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1::GcsDestination] - # Required. The Google Cloud Storage location of the directory where the - # output is to be written to. - class BatchPredictOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for ModelExport Action. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1::GcsDestination] - # Required. The Google Cloud Storage location where the model is to be - # written to. This location may only be set for the following model - # formats: - # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". - # - # Under the directory given as the destination a new one with name - # "model-export--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, - # will be created. Inside the model and any of its supporting files - # will be written. - # @!attribute [rw] model_format - # @return [::String] - # The format in which the model must be exported. The available, and default, - # formats depend on the problem and model type (if given problem and type - # combination doesn't have a format listed, it means its models are not - # exportable): - # - # * For Image Classification mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", - # "docker". - # - # * For Image Classification mobile-core-ml-low-latency-1, - # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: - # "core_ml" (default). - # - # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite", "tf_saved_model", "tf_js". - # Formats description: - # - # * tflite - Used for Android mobile devices. - # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) - # devices. - # * tf_saved_model - A tensorflow model in SavedModel format. - # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can - # be used in the browser and in Node.js using JavaScript. - # * docker - Used for Docker containers. Use the params field to customize - # the container. The container is verified to work correctly on - # ubuntu 16.04 operating system. See more at - # [containers - # quickstart](https://cloud.google.com/vision/automl/docs/containers-gcs-quickstart) - # * core_ml - Used for iOS mobile devices. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional model-type and format specific parameters describing the - # requirements for the to be exported model files, any string must be up to - # 25000 characters long. - # - # * For `docker` format: - # `cpu_architecture` - (string) "x86_64" (default). - # `gpu_architecture` - (string) "none" (default), "nvidia". - class ModelExportOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The Google Cloud Storage location for the input content. - # @!attribute [rw] input_uris - # @return [::Array<::String>] - # Required. Google Cloud Storage URIs to input files, up to 2000 - # characters long. Accepted forms: - # * Full object path, e.g. gs://bucket/directory/object.csv - class GcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location where the output is to be written to. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Required. Google Cloud Storage URI to output directory, up to 2000 - # characters long. - # Accepted forms: - # * Prefix path: gs://bucket/directory - # The requesting user must have write permission to the bucket. - # The directory is created if it doesn't exist. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb deleted file mode 100644 index 37165c8fbf69..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # API proto representing a trained machine learning model. - # @!attribute [rw] translation_model_metadata - # @return [::Google::Cloud::AutoML::V1::TranslationModelMetadata] - # Metadata for translation models. - # - # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata] - # Metadata for image classification models. - # - # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1::TextClassificationModelMetadata] - # Metadata for text classification models. - # - # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_model_metadata - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata] - # Metadata for image object detection models. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_model_metadata - # @return [::Google::Cloud::AutoML::V1::TextExtractionModelMetadata] - # Metadata for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_model_metadata - # @return [::Google::Cloud::AutoML::V1::TextSentimentModelMetadata] - # Metadata for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model. - # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the model to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. It must start with a letter. - # @!attribute [rw] dataset_id - # @return [::String] - # Required. The resource ID of the dataset used to create the model. The dataset must - # come from the same ancestor project and location. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the model training finished and can be used for prediction. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model was last updated. - # @!attribute [rw] deployment_state - # @return [::Google::Cloud::AutoML::V1::Model::DeploymentState] - # Output only. Deployment state of the model. A model can only serve - # prediction requests after it gets deployed. - # @!attribute [rw] etag - # @return [::String] - # Used to perform a consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata to organize your model. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://goo.gl/xmQnxf for more information on and examples of labels. - class Model - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deployment state of the model. - module DeploymentState - # Should not be used, an un-set enum has this value by default. - DEPLOYMENT_STATE_UNSPECIFIED = 0 - - # Model is deployed. - DEPLOYED = 1 - - # Model is not deployed. - UNDEPLOYED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb deleted file mode 100644 index 729817ff4233..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/model_evaluation.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Evaluation results of a model. - # @!attribute [rw] classification_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics] - # Model evaluation metrics for image, text, video and tables - # classification. - # Tables problem is considered a classification when the target column - # is CATEGORY DataType. - # - # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::TranslationEvaluationMetrics] - # Model evaluation metrics for translation. - # - # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionEvaluationMetrics] - # Model evaluation metrics for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::TextSentimentEvaluationMetrics] - # Evaluation metrics for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1::TextExtractionEvaluationMetrics] - # Evaluation metrics for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model evaluation. - # Format: - # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only. The ID of the annotation spec that the model evaluation applies to. The - # The ID is empty for the overall model evaluation. - # For Tables annotation specs in the dataset do not exist and this ID is - # always not set, but for CLASSIFICATION - # [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] - # the - # {::Google::Cloud::AutoML::V1::ModelEvaluation#display_name display_name} - # field is used. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1::AnnotationSpec#display_name display_name} - # at the moment when the model was trained. Because this field returns a - # value at model training time, for different models trained from the same - # dataset, the values may differ, since display names could had been changed - # between the two model's trainings. For Tables CLASSIFICATION - # [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] - # distinct values of the target column at the moment of the model evaluation - # are populated here. - # The display_name is empty for the overall model evaluation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model evaluation was created. - # @!attribute [rw] evaluated_example_count - # @return [::Integer] - # Output only. The number of examples used for model evaluation, i.e. for - # which ground truth from time of model creation is compared against the - # predicted annotations created by the model. - # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is - # the total number of all examples used for evaluation. - # Otherwise, this is the count of examples that according to the ground - # truth were annotated by the - # {::Google::Cloud::AutoML::V1::ModelEvaluation#annotation_spec_id annotation_spec_id}. - class ModelEvaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb deleted file mode 100644 index 78d79e45a942..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/operations.rb +++ /dev/null @@ -1,197 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Metadata used across all long running operations returned by AutoML API. - # @!attribute [rw] delete_details - # @return [::Google::Cloud::AutoML::V1::DeleteOperationMetadata] - # Details of a Delete operation. - # - # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deploy_model_details - # @return [::Google::Cloud::AutoML::V1::DeployModelOperationMetadata] - # Details of a DeployModel operation. - # - # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] undeploy_model_details - # @return [::Google::Cloud::AutoML::V1::UndeployModelOperationMetadata] - # Details of an UndeployModel operation. - # - # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_model_details - # @return [::Google::Cloud::AutoML::V1::CreateModelOperationMetadata] - # Details of CreateModel operation. - # - # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_dataset_details - # @return [::Google::Cloud::AutoML::V1::CreateDatasetOperationMetadata] - # Details of CreateDataset operation. - # - # Note: The following fields are mutually exclusive: `create_dataset_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] import_data_details - # @return [::Google::Cloud::AutoML::V1::ImportDataOperationMetadata] - # Details of ImportData operation. - # - # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] batch_predict_details - # @return [::Google::Cloud::AutoML::V1::BatchPredictOperationMetadata] - # Details of BatchPredict operation. - # - # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_data_details - # @return [::Google::Cloud::AutoML::V1::ExportDataOperationMetadata] - # Details of ExportData operation. - # - # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_model_details - # @return [::Google::Cloud::AutoML::V1::ExportModelOperationMetadata] - # Details of ExportModel operation. - # - # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `create_dataset_details`, `import_data_details`, `batch_predict_details`, `export_data_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Output only. Progress of operation. Range: [0, 100]. - # Not used currently. - # @!attribute [rw] partial_failures - # @return [::Array<::Google::Rpc::Status>] - # Output only. Partial failures encountered. - # E.g. single files that couldn't be read. - # This field should never exceed 20 entries. - # Status details field will contain standard GCP error details. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was updated for the last time. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of operations that perform deletes of any entities. - class DeleteOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of DeployModel operation. - class DeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of UndeployModel operation. - class UndeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of CreateDataset operation. - class CreateDatasetOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of CreateModel operation. - class CreateModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ImportData operation. - class ImportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ExportData operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1::ExportDataOperationMetadata::ExportDataOutputInfo] - # Output only. Information further describing this export data's output. - class ExportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this export data's output. - # Supplements - # {::Google::Cloud::AutoML::V1::OutputConfig OutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the exported data is written. - class ExportDataOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of BatchPredict operation. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1::BatchPredictInputConfig] - # Output only. The input config that was given upon starting this - # batch predict operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1::BatchPredictOperationMetadata::BatchPredictOutputInfo] - # Output only. Information further describing this batch predict's output. - class BatchPredictOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this batch predict's output. - # Supplements - # {::Google::Cloud::AutoML::V1::BatchPredictOutputConfig BatchPredictOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the prediction output is written. - class BatchPredictOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of ExportModel operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1::ExportModelOperationMetadata::ExportModelOutputInfo] - # Output only. Information further describing the output of this model - # export. - class ExportModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes the output of model export. - # Supplements - # {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the model will be exported. - class ExportModelOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb deleted file mode 100644 index 0811f3318b09..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/prediction_service.rb +++ /dev/null @@ -1,270 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Request message for {::Google::Cloud::AutoML::V1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the prediction. - # @!attribute [rw] payload - # @return [::Google::Cloud::AutoML::V1::ExamplePayload] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned. The default is 100. The - # number of returned bounding boxes might be limited by the server. - # - # AutoML Tables - # - # `feature_importance` - # : (boolean) Whether - # [feature_importance][google.cloud.automl.v1.TablesModelColumnInfo.feature_importance] - # is populated in the returned list of - # [TablesAnnotation][google.cloud.automl.v1.TablesAnnotation] - # objects. The default is false. - class PredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for {::Google::Cloud::AutoML::V1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] payload - # @return [::Array<::Google::Cloud::AutoML::V1::AnnotationPayload>] - # Prediction result. - # AutoML Translation and AutoML Natural Language Sentiment Analysis - # return precisely one payload. - # @!attribute [rw] preprocessed_input - # @return [::Google::Cloud::AutoML::V1::ExamplePayload] - # The preprocessed example that AutoML actually makes prediction on. - # Empty if AutoML does not preprocess the input example. - # - # For AutoML Natural Language (Classification, Entity Extraction, and - # Sentiment Analysis), if the input is a document, the recognized text is - # returned in the - # {::Google::Cloud::AutoML::V1::Document#document_text document_text} - # property. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # AutoML Vision Object Detection - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding boxes to return per image. - # - # AutoML Natural Language Sentiment Analysis - # - # `sentiment_score` - # : (float, deprecated) A value between -1 and 1, - # -1 maps to least positive sentiment, while 1 maps to the most positive - # one and the higher the score, the more positive the sentiment in the - # document is. Yet these values are relative to the training data, so - # e.g. if all data was positive then -1 is also positive (though - # the least). - # `sentiment_score` is not the same as "score" and "magnitude" - # from Sentiment Analysis in the Natural Language API. - class PredictResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for {::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the batch prediction. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1::BatchPredictInputConfig] - # Required. The input configuration for batch prediction. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig] - # Required. The Configuration specifying where output predictions should - # be written. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # AutoML Natural Language Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # - # AutoML Vision Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # AutoML Vision Object Detection - # - # `score_threshold` - # : (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # AutoML Video Intelligence Classification - # - # `score_threshold` - # : (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # `segment_classification` - # : (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is true. - # - # `shot_classification` - # : (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # The default is false. - # - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. - # - # `1s_interval_classification` - # : (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. The default is false. - # - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # AutoML Video Intelligence Object Tracking - # - # `score_threshold` - # : (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding - # boxes returned per image. The default is 100, the - # number of bounding boxes returned might be limited by the server. - # - # `min_bounding_box_size` - # : (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size are - # returned. Value in 0 to 1 range. Default is 0. - class BatchPredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the Batch Predict. This message is returned in - # {::Google::Longrunning::Operation#response response} of the operation returned - # by the {::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # AutoML Vision Object Detection - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding boxes returned per image. - # - # AutoML Video Intelligence Object Tracking - # - # `max_bounding_box_count` - # : (int64) The maximum number of bounding boxes returned per frame. - class BatchPredictResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb deleted file mode 100644 index 3185ecd7a149..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/service.rb +++ /dev/null @@ -1,326 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#create_dataset AutoMl.CreateDataset}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project to create the dataset for. - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1::Dataset] - # Required. The dataset to create. - class CreateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_dataset AutoMl.GetDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to retrieve. - class GetDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project from which to list datasets. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - class ListDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::AutoML::V1::Dataset>] - # The datasets read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. - class ListDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#update_dataset AutoMl.UpdateDataset} - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1::Dataset] - # Required. The dataset which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. - class UpdateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to delete. - class DeleteDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData}. - # @!attribute [rw] name - # @return [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1::InputConfig] - # Required. The desired input location and its domain specific semantics, - # if any. - class ImportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#export_data AutoMl.ExportData}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1::OutputConfig] - # Required. The desired output location. - class ExportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the annotation spec to retrieve. - class GetAnnotationSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#create_model AutoMl.CreateModel}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent project where the model is being created. - # @!attribute [rw] model - # @return [::Google::Cloud::AutoML::V1::Model] - # Required. The model to create. - class CreateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_model AutoMl.GetModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model. - class GetModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project, from which to list the models. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels} call. - class ListModelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] model - # @return [::Array<::Google::Cloud::AutoML::V1::Model>] - # List of models in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. - class ListModelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#delete_model AutoMl.DeleteModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model being deleted. - class DeleteModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#update_model AutoMl.UpdateModel} - # @!attribute [rw] model - # @return [::Google::Cloud::AutoML::V1::Model] - # Required. The model which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. - class UpdateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#deploy_model AutoMl.DeployModel}. - # @!attribute [rw] image_object_detection_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata] - # Model deployment metadata specific to Image Classification. - # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to deploy. - class DeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to undeploy. - class UndeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#export_model AutoMl.ExportModel}. - # Models need to be enabled for exporting, otherwise an error code will be - # returned. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model to export. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1::ModelExportOutputConfig] - # Required. The desired output location and configuration. - class ExportModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the model evaluation. - class GetModelEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @!attribute [rw] filter - # @return [::String] - # Required. An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - class ListModelEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] model_evaluation - # @return [::Array<::Google::Cloud::AutoML::V1::ModelEvaluation>] - # List of model evaluations in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to the {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new - # {::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. - class ListModelEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb deleted file mode 100644 index aa705d31cb5d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Dataset metadata for classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1::ClassificationType] - # Required. Type of the classification problem. - class TextClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1::ClassificationType] - # Output only. Classification type of the dataset used to train this model. - class TextClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata that is specific to text extraction - class TextExtractionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text extraction. - class TextExtractionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata for text sentiment. - # @!attribute [rw] sentiment_max - # @return [::Integer] - # Required. A sentiment is expressed as an integer ordinal, where higher value - # means a more positive sentiment. The range of sentiments that will be used - # is between 0 and sentiment_max (inclusive on both ends), and all the values - # in the range must be represented in the dataset before a model can be - # created. - # sentiment_max value must be between 1 and 10 (inclusive). - class TextSentimentDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text sentiment. - class TextSentimentModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb deleted file mode 100644 index 817c0921c657..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_extraction.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Annotation for identifying spans of text. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1::TextSegment] - # An entity annotation will set this, which is the part of the original - # text to which the annotation pertains. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence in correctness of the annotation. - class TextExtractionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text extraction problems. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area under precision recall curve metric. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics that have confidence thresholds. - # Precision-recall curve can be derived from it. - class TextExtractionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # Only annotations with score of at least this threshold are considered to - # be ones the model would return. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb deleted file mode 100644 index 93eddac0a79f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_segment.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. - # @!attribute [rw] content - # @return [::String] - # Output only. The content of the TextSegment. - # @!attribute [rw] start_offset - # @return [::Integer] - # Required. Zero-based character index of the first character of the text - # segment (counting characters from the beginning of the text). - # @!attribute [rw] end_offset - # @return [::Integer] - # Required. Zero-based character index of the first character past the end of - # the text segment (counting character from the beginning of the text). - # The character at the end_offset is NOT included in the text segment. - class TextSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb deleted file mode 100644 index 1c4bc080ceb3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/text_sentiment.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Contains annotation details specific to text sentiment. - # @!attribute [rw] sentiment - # @return [::Integer] - # Output only. The sentiment with the semantic, as given to the - # {::Google::Cloud::AutoML::V1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used - # for the prediction had been trained. - # The sentiment values are between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), - # with higher value meaning more positive sentiment. They are completely - # relative, i.e. 0 means least positive sentiment and sentiment_max means - # the most positive from the sentiments present in the train data. Therefore - # e.g. if train data had only negative sentiment, then sentiment_max, would - # be still negative (although least negative). - # The sentiment shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - class TextSentimentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text sentiment problems. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] mean_absolute_error - # @return [::Float] - # Output only. Mean absolute error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] mean_squared_error - # @return [::Float] - # Output only. Mean squared error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] linear_kappa - # @return [::Float] - # Output only. Linear weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] quadratic_kappa - # @return [::Float] - # Output only. Quadratic weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for the overall model evaluation, not for evaluation of a single - # annotation spec. - class TextSentimentEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb deleted file mode 100644 index b41617bc0ea1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/cloud/automl/v1/translation.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1 - # Dataset metadata that is specific to translation. - # @!attribute [rw] source_language_code - # @return [::String] - # Required. The BCP-47 language code of the source language. - # @!attribute [rw] target_language_code - # @return [::String] - # Required. The BCP-47 language code of the target language. - class TranslationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluation metrics for the dataset. - # @!attribute [rw] bleu_score - # @return [::Float] - # Output only. BLEU score. - # @!attribute [rw] base_bleu_score - # @return [::Float] - # Output only. BLEU score for base model. - class TranslationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to translation. - # @!attribute [rw] base_model - # @return [::String] - # The resource name of the model to use as a baseline to train the custom - # model. If unset, we use the default base model provided by Google - # Translate. Format: - # `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] source_language_code - # @return [::String] - # Output only. Inferred from the dataset. - # The source language (The BCP-47 language code) that is used for training. - # @!attribute [rw] target_language_code - # @return [::String] - # Output only. The target language (The BCP-47 language code) that is used - # for training. - class TranslationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation details specific to translation. - # @!attribute [rw] translated_content - # @return [::Google::Cloud::AutoML::V1::TextSnippet] - # Output only . The translated content. - class TranslationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile deleted file mode 100644 index a30bcdf1095a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-automl-v1", path: "../" -else - gem "google-cloud-automl-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb deleted file mode 100644 index b5039ab44d72..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_dataset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_CreateDataset_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the create_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#create_dataset. -# -def create_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new - - # Call the create_dataset method. - result = client.create_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb deleted file mode 100644 index 5d3c31c2a84e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/create_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_CreateModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the create_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#create_model. -# -def create_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::CreateModelRequest.new - - # Call the create_model method. - result = client.create_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb deleted file mode 100644 index 5d9f3bddfa4c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_dataset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_DeleteDataset_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the delete_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset. -# -def delete_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new - - # Call the delete_dataset method. - result = client.delete_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb deleted file mode 100644 index 31d572dc4ae4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/delete_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_DeleteModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the delete_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#delete_model. -# -def delete_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::DeleteModelRequest.new - - # Call the delete_model method. - result = client.delete_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb deleted file mode 100644 index 6bf6b9d1894a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/deploy_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_DeployModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the deploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#deploy_model. -# -def deploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::DeployModelRequest.new - - # Call the deploy_model method. - result = client.deploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_DeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb deleted file mode 100644 index 0c6ccde37676..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_data.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_ExportData_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the export_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#export_data. -# -def export_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ExportDataRequest.new - - # Call the export_data method. - result = client.export_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb deleted file mode 100644 index a8d8b903e76d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/export_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_ExportModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the export_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#export_model. -# -def export_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ExportModelRequest.new - - # Call the export_model method. - result = client.export_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_ExportModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb deleted file mode 100644 index 1370dd7f6de2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_annotation_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_GetAnnotationSpec_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the get_annotation_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec. -# -def get_annotation_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new - - # Call the get_annotation_spec method. - result = client.get_annotation_spec request - - # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. - p result -end -# [END automl_v1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb deleted file mode 100644 index 653b941b6763..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_GetDataset_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the get_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#get_dataset. -# -def get_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::GetDatasetRequest.new - - # Call the get_dataset method. - result = client.get_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - p result -end -# [END automl_v1_generated_AutoML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb deleted file mode 100644 index 3cfec8bd9f5b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_GetModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the get_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#get_model. -# -def get_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::GetModelRequest.new - - # Call the get_model method. - result = client.get_model request - - # The returned object is of type Google::Cloud::AutoML::V1::Model. - p result -end -# [END automl_v1_generated_AutoML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb deleted file mode 100644 index 66b9f5107d85..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/get_model_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_GetModelEvaluation_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the get_model_evaluation call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation. -# -def get_model_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new - - # Call the get_model_evaluation method. - result = client.get_model_evaluation request - - # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. - p result -end -# [END automl_v1_generated_AutoML_GetModelEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb deleted file mode 100644 index 69bb6c83c5dc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/import_data.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_ImportData_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the import_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#import_data. -# -def import_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ImportDataRequest.new - - # Call the import_data method. - result = client.import_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb deleted file mode 100644 index c5a76dbcd997..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_datasets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_ListDatasets_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the list_datasets call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#list_datasets. -# -def list_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new - - # Call the list_datasets method. - result = client.list_datasets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. - p item - end -end -# [END automl_v1_generated_AutoML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb deleted file mode 100644 index c9798178e36c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_model_evaluations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_ListModelEvaluations_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the list_model_evaluations call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations. -# -def list_model_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new - - # Call the list_model_evaluations method. - result = client.list_model_evaluations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. - p item - end -end -# [END automl_v1_generated_AutoML_ListModelEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb deleted file mode 100644 index 9b3102e77406..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/list_models.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_ListModels_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the list_models call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#list_models. -# -def list_models - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::ListModelsRequest.new - - # Call the list_models method. - result = client.list_models request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1::Model. - p item - end -end -# [END automl_v1_generated_AutoML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb deleted file mode 100644 index 9044e6b31e6d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/undeploy_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_UndeployModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the undeploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model. -# -def undeploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::UndeployModelRequest.new - - # Call the undeploy_model method. - result = client.undeploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_AutoML_UndeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb deleted file mode 100644 index 097b11573307..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_UpdateDataset_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the update_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#update_dataset. -# -def update_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new - - # Call the update_dataset method. - result = client.update_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1::Dataset. - p result -end -# [END automl_v1_generated_AutoML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb deleted file mode 100644 index 8b945e7f28c5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/automl/update_model.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_AutoML_UpdateModel_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the update_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::AutoML::Client#update_model. -# -def update_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::UpdateModelRequest.new - - # Call the update_model method. - result = client.update_model request - - # The returned object is of type Google::Cloud::AutoML::V1::Model. - p result -end -# [END automl_v1_generated_AutoML_UpdateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb deleted file mode 100644 index 97f5c94f0b1a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/batch_predict.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_PredictionService_BatchPredict_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the batch_predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict. -# -def batch_predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::BatchPredictRequest.new - - # Call the batch_predict method. - result = client.batch_predict request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1_generated_PredictionService_BatchPredict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb b/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb deleted file mode 100644 index bc742b1e85e0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/prediction_service/predict.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1_generated_PredictionService_Predict_sync] -require "google/cloud/automl/v1" - -## -# Snippet for the predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1::PredictionService::Client#predict. -# -def predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1::PredictRequest.new - - # Call the predict method. - result = client.predict request - - # The returned object is of type Google::Cloud::AutoML::V1::PredictResponse. - p result -end -# [END automl_v1_generated_PredictionService_Predict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json b/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json deleted file mode 100644 index 96e1da944c03..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/snippets/snippet_metadata_google.cloud.automl.v1.json +++ /dev/null @@ -1,815 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-automl-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.automl.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "automl_v1_generated_PredictionService_Predict_sync", - "title": "Snippet for the predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::PredictionService::Client#predict.", - "file": "prediction_service/predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "predict", - "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client#predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::PredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::PredictResponse", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client" - }, - "method": { - "short_name": "Predict", - "full_name": "google.cloud.automl.v1.PredictionService.Predict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_PredictionService_BatchPredict_sync", - "title": "Snippet for the batch_predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict.", - "file": "prediction_service/batch_predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_predict", - "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client#batch_predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::BatchPredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1::PredictionService::Client" - }, - "method": { - "short_name": "BatchPredict", - "full_name": "google.cloud.automl.v1.PredictionService.BatchPredict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_CreateDataset_sync", - "title": "Snippet for the create_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#create_dataset.", - "file": "automl/create_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dataset", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#create_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::CreateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "CreateDataset", - "full_name": "google.cloud.automl.v1.AutoMl.CreateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_GetDataset_sync", - "title": "Snippet for the get_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_dataset.", - "file": "automl/get_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dataset", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::GetDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "GetDataset", - "full_name": "google.cloud.automl.v1.AutoMl.GetDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ListDatasets_sync", - "title": "Snippet for the list_datasets call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_datasets.", - "file": "automl/list_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_datasets", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ListDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::ListDatasetsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ListDatasets", - "full_name": "google.cloud.automl.v1.AutoMl.ListDatasets", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_UpdateDataset_sync", - "title": "Snippet for the update_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#update_dataset.", - "file": "automl/update_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_dataset", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#update_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::UpdateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "UpdateDataset", - "full_name": "google.cloud.automl.v1.AutoMl.UpdateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_DeleteDataset_sync", - "title": "Snippet for the delete_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset.", - "file": "automl/delete_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dataset", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#delete_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::DeleteDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "DeleteDataset", - "full_name": "google.cloud.automl.v1.AutoMl.DeleteDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ImportData_sync", - "title": "Snippet for the import_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#import_data.", - "file": "automl/import_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_data", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#import_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ImportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ImportData", - "full_name": "google.cloud.automl.v1.AutoMl.ImportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ExportData_sync", - "title": "Snippet for the export_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#export_data.", - "file": "automl/export_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_data", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#export_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ExportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ExportData", - "full_name": "google.cloud.automl.v1.AutoMl.ExportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_GetAnnotationSpec_sync", - "title": "Snippet for the get_annotation_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec.", - "file": "automl/get_annotation_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_annotation_spec", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_annotation_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::AnnotationSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "GetAnnotationSpec", - "full_name": "google.cloud.automl.v1.AutoMl.GetAnnotationSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_CreateModel_sync", - "title": "Snippet for the create_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#create_model.", - "file": "automl/create_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#create_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::CreateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "CreateModel", - "full_name": "google.cloud.automl.v1.AutoMl.CreateModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_GetModel_sync", - "title": "Snippet for the get_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_model.", - "file": "automl/get_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::GetModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::Model", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "GetModel", - "full_name": "google.cloud.automl.v1.AutoMl.GetModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ListModels_sync", - "title": "Snippet for the list_models call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_models.", - "file": "automl/list_models.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_models", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_models", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ListModelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::ListModelsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ListModels", - "full_name": "google.cloud.automl.v1.AutoMl.ListModels", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_DeleteModel_sync", - "title": "Snippet for the delete_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#delete_model.", - "file": "automl/delete_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#delete_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::DeleteModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "DeleteModel", - "full_name": "google.cloud.automl.v1.AutoMl.DeleteModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_UpdateModel_sync", - "title": "Snippet for the update_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#update_model.", - "file": "automl/update_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#update_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::UpdateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::Model", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "UpdateModel", - "full_name": "google.cloud.automl.v1.AutoMl.UpdateModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_DeployModel_sync", - "title": "Snippet for the deploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#deploy_model.", - "file": "automl/deploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "deploy_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#deploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::DeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "DeployModel", - "full_name": "google.cloud.automl.v1.AutoMl.DeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_UndeployModel_sync", - "title": "Snippet for the undeploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model.", - "file": "automl/undeploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "undeploy_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#undeploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::UndeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "UndeployModel", - "full_name": "google.cloud.automl.v1.AutoMl.UndeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ExportModel_sync", - "title": "Snippet for the export_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#export_model.", - "file": "automl/export_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_model", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#export_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ExportModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ExportModel", - "full_name": "google.cloud.automl.v1.AutoMl.ExportModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_GetModelEvaluation_sync", - "title": "Snippet for the get_model_evaluation call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation.", - "file": "automl/get_model_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model_evaluation", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#get_model_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::GetModelEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::ModelEvaluation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "GetModelEvaluation", - "full_name": "google.cloud.automl.v1.AutoMl.GetModelEvaluation", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1_generated_AutoML_ListModelEvaluations_sync", - "title": "Snippet for the list_model_evaluations call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations.", - "file": "automl/list_model_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_model_evaluations", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client#list_model_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1::AutoML::Client" - }, - "method": { - "short_name": "ListModelEvaluations", - "full_name": "google.cloud.automl.v1.AutoMl.ListModelEvaluations", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb deleted file mode 100644 index be42c2eb5950..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1/service_pb" -require "google/cloud/automl/v1/service_services_pb" -require "google/cloud/automl/v1/automl" - -class ::Google::Cloud::AutoML::V1::AutoML::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb deleted file mode 100644 index be60ed069bd5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_paths_test.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1/automl" - -class ::Google::Cloud::AutoML::V1::AutoML::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_annotation_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" - assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", location: "value1", dataset: "value2" - assert_equal "projects/value0/locations/value1/datasets/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end - - def test_model_evaluation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" - assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb deleted file mode 100644 index 83adbd02e4b9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_rest_test.rb +++ /dev/null @@ -1,1088 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/automl/v1/service_pb" -require "google/cloud/automl/v1/automl/rest" - - -class ::Google::Cloud::AutoML::V1::AutoML::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_dataset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_dataset parent: parent, dataset: dataset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_dataset ::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_dataset(::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_count - end - end - end - - def test_get_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_dataset ::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_dataset(::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_count - end - end - end - - def test_list_datasets - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_datasets ::Google::Cloud::AutoML::V1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_datasets(::Google::Cloud::AutoML::V1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_datasets_client_stub.call_count - end - end - end - - def test_update_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_dataset ::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_dataset(::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_count - end - end - end - - def test_delete_dataset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_dataset ::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_dataset(::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_count - end - end - end - - def test_import_data - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_data_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_data({ name: name, input_config: input_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_data name: name, input_config: input_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_data ::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_data(::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_count - end - end - end - - def test_export_data - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_data_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_data({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_data name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_data ::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_data(::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_count - end - end - end - - def test_get_annotation_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::AnnotationSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_annotation_spec({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_annotation_spec name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_annotation_spec ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_annotation_spec({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_annotation_spec(::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_annotation_spec_client_stub.call_count - end - end - end - - def test_create_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = {} - - create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_model({ parent: parent, model: model }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_model parent: parent, model: model do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_model ::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_model({ parent: parent, model: model }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_model(::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_count - end - end - end - - def test_get_model - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::Model.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_model ::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_model(::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_count - end - end - end - - def test_list_models - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::ListModelsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_models_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_models ::Google::Cloud::AutoML::V1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_models(::Google::Cloud::AutoML::V1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_models_client_stub.call_count - end - end - end - - def test_delete_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_model ::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_model(::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_count - end - end - end - - def test_update_model - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::Model.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - model = {} - update_mask = {} - - update_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_update_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_model({ model: model, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_model model: model, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_model ::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_model({ model: model, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_model(::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_model_client_stub.call_count - end - end - end - - def test_deploy_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.deploy_model ::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.deploy_model(::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, deploy_model_client_stub.call_count - end - end - end - - def test_undeploy_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.undeploy_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.undeploy_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.undeploy_model ::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.undeploy_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.undeploy_model(::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undeploy_model_client_stub.call_count - end - end - end - - def test_export_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_model({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_model name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_model ::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_model(::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_count - end - end - end - - def test_get_model_evaluation - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::ModelEvaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_model_evaluation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_model_evaluation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_model_evaluation ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_model_evaluation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_model_evaluation(::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_evaluation_client_stub.call_count - end - end - end - - def test_list_model_evaluations - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_model_evaluations ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_model_evaluations(::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_model_evaluations_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb deleted file mode 100644 index e3dd2a583ba3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/automl_test.rb +++ /dev/null @@ -1,1257 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1/service_pb" -require "google/cloud/automl/v1/automl" - -class ::Google::Cloud::AutoML::V1::AutoML::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1::CreateDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Dataset), request["dataset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_dataset({ parent: parent, dataset: dataset }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_dataset parent: parent, dataset: dataset do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_dataset ::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_dataset(::Google::Cloud::AutoML::V1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_rpc_count - end - end - - def test_get_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1::GetDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_dataset ::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_dataset({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_dataset(::Google::Cloud::AutoML::V1::GetDatasetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_rpc_count - end - end - - def test_list_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_datasets, name - assert_kind_of ::Google::Cloud::AutoML::V1::ListDatasetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_datasets_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_datasets ::Google::Cloud::AutoML::V1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_datasets(::Google::Cloud::AutoML::V1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_datasets_client_stub.call_rpc_count - end - end - - def test_update_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Dataset), request["dataset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_dataset ::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_dataset({ dataset: dataset, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_dataset(::Google::Cloud::AutoML::V1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_rpc_count - end - end - - def test_delete_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_dataset({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_dataset name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_dataset ::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_dataset({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_dataset(::Google::Cloud::AutoML::V1::DeleteDatasetRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_rpc_count - end - end - - def test_import_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_data, name - assert_kind_of ::Google::Cloud::AutoML::V1::ImportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::InputConfig), request["input_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_data_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_data({ name: name, input_config: input_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_data name: name, input_config: input_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_data ::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_data({ name: name, input_config: input_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_data(::Google::Cloud::AutoML::V1::ImportDataRequest.new(name: name, input_config: input_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_rpc_count - end - end - - def test_export_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_data, name - assert_kind_of ::Google::Cloud::AutoML::V1::ExportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::OutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_data_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_data({ name: name, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_data name: name, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_data ::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_data({ name: name, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_data(::Google::Cloud::AutoML::V1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_rpc_count - end - end - - def test_get_annotation_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::AnnotationSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_annotation_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_annotation_spec({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_annotation_spec name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_annotation_spec ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_annotation_spec({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_annotation_spec(::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_annotation_spec_client_stub.call_rpc_count - end - end - - def test_create_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = {} - - create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::CreateModelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Model), request["model"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_model({ parent: parent, model: model }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_model parent: parent, model: model do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_model ::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_model({ parent: parent, model: model }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_model(::Google::Cloud::AutoML::V1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_rpc_count - end - end - - def test_get_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::Model.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::GetModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_model({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_model name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_model ::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_model({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_model(::Google::Cloud::AutoML::V1::GetModelRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_rpc_count - end - end - - def test_list_models - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::ListModelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_models, name - assert_kind_of ::Google::Cloud::AutoML::V1::ListModelsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_models_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_models ::Google::Cloud::AutoML::V1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_models(::Google::Cloud::AutoML::V1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_models_client_stub.call_rpc_count - end - end - - def test_delete_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::DeleteModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_model({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_model name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_model ::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_model({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_model(::Google::Cloud::AutoML::V1::DeleteModelRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_rpc_count - end - end - - def test_update_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::Model.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - model = {} - update_mask = {} - - update_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::UpdateModelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::Model), request["model"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_model({ model: model, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_model model: model, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_model ::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_model({ model: model, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_model(::Google::Cloud::AutoML::V1::UpdateModelRequest.new(model: model, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_model_client_stub.call_rpc_count - end - end - - def test_deploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :deploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::DeployModelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] - assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, deploy_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.deploy_model ::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.deploy_model(::Google::Cloud::AutoML::V1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, deploy_model_client_stub.call_rpc_count - end - end - - def test_undeploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undeploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::UndeployModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undeploy_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.undeploy_model({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.undeploy_model name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.undeploy_model ::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.undeploy_model({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.undeploy_model(::Google::Cloud::AutoML::V1::UndeployModelRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undeploy_model_client_stub.call_rpc_count - end - end - - def test_export_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_model, name - assert_kind_of ::Google::Cloud::AutoML::V1::ExportModelRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ModelExportOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_model({ name: name, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_model name: name, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_model ::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_model({ name: name, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_model(::Google::Cloud::AutoML::V1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_rpc_count - end - end - - def test_get_model_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::ModelEvaluation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model_evaluation, name - assert_kind_of ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_model_evaluation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_model_evaluation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_model_evaluation ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_model_evaluation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_model_evaluation(::Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_model_evaluation_client_stub.call_rpc_count - end - end - - def test_list_model_evaluations - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_model_evaluations, name - assert_kind_of ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_model_evaluations_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_model_evaluations ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_model_evaluations(::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_model_evaluations_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1::AutoML::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb deleted file mode 100644 index 365a660da971..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service_services_pb" -require "google/cloud/automl/v1/prediction_service" - -class ::Google::Cloud::AutoML::V1::PredictionService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb deleted file mode 100644 index f5f666866b67..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1/prediction_service" - -class ::Google::Cloud::AutoML::V1::PredictionService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb deleted file mode 100644 index 9485c201e2ff..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_rest_test.rb +++ /dev/null @@ -1,212 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service/rest" - - -class ::Google::Cloud::AutoML::V1::PredictionService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_predict - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1::PredictResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, predict_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.predict({ name: name, payload: payload, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.predict name: name, payload: payload, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.predict ::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.predict(::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_count - end - end - end - - def test_batch_predict - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_predict ::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_predict(::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_predict_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb b/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb deleted file mode 100644 index 30de3c8b6bf9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/google/cloud/automl/v1/prediction_service_test.rb +++ /dev/null @@ -1,249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1/prediction_service_pb" -require "google/cloud/automl/v1/prediction_service" - -class ::Google::Cloud::AutoML::V1::PredictionService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_predict - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1::PredictResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :predict, name - assert_kind_of ::Google::Cloud::AutoML::V1::PredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::ExamplePayload), request["payload"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, predict_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.predict({ name: name, payload: payload, params: params }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.predict name: name, payload: payload, params: params do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.predict ::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.predict(::Google::Cloud::AutoML::V1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_rpc_count - end - end - - def test_batch_predict - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_predict, name - assert_kind_of ::Google::Cloud::AutoML::V1::BatchPredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::BatchPredictInputConfig), request["input_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1::BatchPredictOutputConfig), request["output_config"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_predict_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_predict ::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_predict(::Google::Cloud::AutoML::V1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_predict_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1::PredictionService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1/test/helper.rb b/owl-bot-staging/google-cloud-automl-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.gitignore b/owl-bot-staging/google-cloud-automl-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json deleted file mode 100644 index 4b715a4588d1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "api_id": "automl.googleapis.com", - "api_shortname": "automl", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest", - "distribution_name": "google-cloud-automl-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "automl", - "name_pretty": "Cloud AutoML V1beta1 API", - "product_documentation": "https://cloud.google.com/automl", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", - "ruby-cloud-env-prefix": "AUTOML", - "ruby-cloud-product-url": "https://cloud.google.com/automl", - "ruby-cloud-path-override": "auto_ml=automl", - "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml deleted file mode 100644 index bf48a3e31581..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-automl-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-automl-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts b/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts deleted file mode 100644 index 0e8b7f5e7acd..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud AutoML V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 038f994f5360..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-automl-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-automl-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/automl/v1beta1" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/automl/v1beta1" - -::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-automl-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/automl/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile b/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/README.md b/owl-bot-staging/google-cloud-automl-v1beta1/README.md deleted file mode 100644 index e6c1806fd3a0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud AutoML V1beta1 API - -Train high-quality custom machine learning models with minimum effort and machine learning expertise. - -AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud AutoML V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-automl-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/automl.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/automl/v1beta1" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new -request = ::Google::Cloud::AutoML::V1beta1::PredictRequest.new # (request fields as keyword arguments...) -response = client.predict request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/automl) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/automl/v1beta1" -require "logger" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-automl`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-automl-v1beta1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-automl`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-automl-v1beta1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/Rakefile b/owl-bot-staging/google-cloud-automl-v1beta1/Rakefile deleted file mode 100644 index 0809ccb14b35..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-automl-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["AUTOML_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["AUTOML_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["AUTOML_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/automl/v1beta1/prediction_service/credentials" - ::Google::Cloud::AutoML::V1beta1::PredictionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["AUTOML_PROJECT"] = project - ENV["AUTOML_TEST_PROJECT"] = project - ENV["AUTOML_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-automl-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-automl-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-automl-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-automl-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-automl-v1beta1" - header "google-cloud-automl-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-automl-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-automl-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-automl-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-automl-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json deleted file mode 100644 index ebf069d33f8d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.automl.v1beta1", - "libraryPackage": "::Google::Cloud::AutoML::V1beta1", - "services": { - "PredictionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client", - "rpcs": { - "Predict": { - "methods": [ - "predict" - ] - }, - "BatchPredict": { - "methods": [ - "batch_predict" - ] - } - } - } - } - }, - "AutoMl": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1beta1::AutoML::Client", - "rpcs": { - "CreateDataset": { - "methods": [ - "create_dataset" - ] - }, - "GetDataset": { - "methods": [ - "get_dataset" - ] - }, - "ListDatasets": { - "methods": [ - "list_datasets" - ] - }, - "UpdateDataset": { - "methods": [ - "update_dataset" - ] - }, - "DeleteDataset": { - "methods": [ - "delete_dataset" - ] - }, - "ImportData": { - "methods": [ - "import_data" - ] - }, - "ExportData": { - "methods": [ - "export_data" - ] - }, - "GetAnnotationSpec": { - "methods": [ - "get_annotation_spec" - ] - }, - "GetTableSpec": { - "methods": [ - "get_table_spec" - ] - }, - "ListTableSpecs": { - "methods": [ - "list_table_specs" - ] - }, - "UpdateTableSpec": { - "methods": [ - "update_table_spec" - ] - }, - "GetColumnSpec": { - "methods": [ - "get_column_spec" - ] - }, - "ListColumnSpecs": { - "methods": [ - "list_column_specs" - ] - }, - "UpdateColumnSpec": { - "methods": [ - "update_column_spec" - ] - }, - "CreateModel": { - "methods": [ - "create_model" - ] - }, - "GetModel": { - "methods": [ - "get_model" - ] - }, - "ListModels": { - "methods": [ - "list_models" - ] - }, - "DeleteModel": { - "methods": [ - "delete_model" - ] - }, - "DeployModel": { - "methods": [ - "deploy_model" - ] - }, - "UndeployModel": { - "methods": [ - "undeploy_model" - ] - }, - "ExportModel": { - "methods": [ - "export_model" - ] - }, - "ExportEvaluatedExamples": { - "methods": [ - "export_evaluated_examples" - ] - }, - "GetModelEvaluation": { - "methods": [ - "get_model_evaluation" - ] - }, - "ListModelEvaluations": { - "methods": [ - "list_model_evaluations" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec b/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec deleted file mode 100644 index 8e0d93173ed3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/automl/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-automl-v1beta1" - gem.version = Google::Cloud::AutoML::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." - gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb deleted file mode 100644 index ac7d092bf31e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/automl/v1beta1" diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb deleted file mode 100644 index 78a600ce0c87..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1beta1/prediction_service" -require "google/cloud/automl/v1beta1/automl" -require "google/cloud/automl/v1beta1/version" - -module Google - module Cloud - module AutoML - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/automl/v1beta1" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/automl/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb deleted file mode 100644 index c031b6200be1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/annotation_payload.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/detection_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_extraction_pb' -require 'google/cloud/automl/v1beta1/text_sentiment_pb' -require 'google/cloud/automl/v1beta1/translation_pb' - - -descriptor_data = "\n4google/cloud/automl/v1beta1/annotation_payload.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\"\xe6\x05\n\x11\x41nnotationPayload\x12I\n\x0btranslation\x18\x02 \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TranslationAnnotationH\x00\x12O\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotationH\x00\x12]\n\x16image_object_detection\x18\x04 \x01(\x0b\x32;.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationH\x00\x12Z\n\x14video_classification\x18\t \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoClassificationAnnotationH\x00\x12[\n\x15video_object_tracking\x18\x08 \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationH\x00\x12P\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TextExtractionAnnotationH\x00\x12N\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.TextSentimentAnnotationH\x00\x12?\n\x06tables\x18\n \x01(\x0b\x32-.google.cloud.automl.v1beta1.TablesAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationPayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb deleted file mode 100644 index 85b08ebdfc7b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/annotation_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n1google/cloud/automl/v1beta1/annotation_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb deleted file mode 100644 index 3e41d90e7a98..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/automl/credentials" -require "google/cloud/automl/v1beta1/automl/paths" -require "google/cloud/automl/v1beta1/automl/operations" -require "google/cloud/automl/v1beta1/automl/client" -require "google/cloud/automl/v1beta1/automl/rest" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1/automl" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1beta1/automl/rest" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - module AutoML - end - end - end - end -end - -helper_path = ::File.join __dir__, "automl", "helpers.rb" -require "google/cloud/automl/v1beta1/automl/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb deleted file mode 100644 index f6465ef5f465..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb +++ /dev/null @@ -1,2983 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1beta1/service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - ## - # Client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_dataset.timeout = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_table_spec.timeout = 5.0 - default_config.rpcs.get_table_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_table_specs.timeout = 5.0 - default_config.rpcs.list_table_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_table_spec.timeout = 5.0 - - default_config.rpcs.get_column_spec.timeout = 5.0 - default_config.rpcs.get_column_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_column_specs.timeout = 5.0 - default_config.rpcs.list_column_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_column_spec.timeout = 5.0 - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.export_evaluated_examples.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/automl/v1beta1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @auto_ml_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1beta1::AutoMl::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @auto_ml_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1beta1::AutoML::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def create_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.dataset&.name - header_params["dataset.name"] = request.dataset.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset. - # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] - # Required. The desired output location. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the annotation spec to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_annotation_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a table spec. - # - # @overload get_table_spec(request, options = nil) - # Pass arguments to `get_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_table_spec(name: nil, field_mask: nil) - # Pass arguments to `get_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the table spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - # - # # Call the get_table_spec method. - # result = client.get_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def get_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_table_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_table_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists table specs in a dataset. - # - # @overload list_table_specs(request, options = nil) - # Pass arguments to `list_table_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_table_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the dataset to list table specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - # - # # Call the list_table_specs method. - # result = client.list_table_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - # p item - # end - # - def list_table_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_table_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_table_specs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_table_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_table_specs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_table_specs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a table spec. - # - # @overload update_table_spec(request, options = nil) - # Pass arguments to `update_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_table_spec(table_spec: nil, update_mask: nil) - # Pass arguments to `update_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] - # Required. The table spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - # - # # Call the update_table_spec method. - # result = client.update_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def update_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.table_spec&.name - header_params["table_spec.name"] = request.table_spec.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_table_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_table_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a column spec. - # - # @overload get_column_spec(request, options = nil) - # Pass arguments to `get_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_column_spec(name: nil, field_mask: nil) - # Pass arguments to `get_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the column spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - # - # # Call the get_column_spec method. - # result = client.get_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def get_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_column_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_column_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists column specs in a table spec. - # - # @overload list_column_specs(request, options = nil) - # Pass arguments to `list_column_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_column_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the table spec to list column specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - # - # # Call the list_column_specs method. - # result = client.list_column_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p item - # end - # - def list_column_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_column_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_column_specs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_column_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_column_specs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_column_specs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a column spec. - # - # @overload update_column_spec(request, options = nil) - # Pass arguments to `update_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_column_spec(column_spec: nil, update_mask: nil) - # Pass arguments to `update_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] - # Required. The column spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - # - # # Call the update_column_spec method. - # result = client.update_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def update_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.column_spec&.name - header_params["column_spec.name"] = request.column_spec.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_column_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_column_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] - # Required. The model to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_models.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param name [::String] - # Required. Resource name of the model to deploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model to export. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_evaluated_examples(request, options = nil) - # Pass arguments to `export_evaluated_examples` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_evaluated_examples(name: nil, output_config: nil) - # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model whose evaluated examples are to - # be exported. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - # - # # Call the export_evaluated_examples method. - # result = client.export_evaluated_examples request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluated_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_evaluated_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_evaluated_examples.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_evaluated_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_evaluated_examples, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutoMl API. - # - # This class represents the configuration for AutoMl, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `get_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_table_spec - ## - # RPC-specific configuration for `list_table_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_table_specs - ## - # RPC-specific configuration for `update_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_table_spec - ## - # RPC-specific configuration for `get_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_column_spec - ## - # RPC-specific configuration for `list_column_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_column_specs - ## - # RPC-specific configuration for `update_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_column_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `export_evaluated_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluated_examples - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec - @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config - list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs - @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config - update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec - @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config - get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec - @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config - list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs - @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config - update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec - @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples - @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb deleted file mode 100644 index 59c4eb1fb2be..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - # Credentials for the AutoMl API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb deleted file mode 100644 index 10f048277270..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb +++ /dev/null @@ -1,849 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb deleted file mode 100644 index f9a7d5efd31e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb +++ /dev/null @@ -1,174 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - # Path helper methods for the AutoMl API. - module Paths - ## - # Create a fully-qualified AnnotationSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param annotation_spec [String] - # - # @return [::String] - def annotation_spec_path project:, location:, dataset:, annotation_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" - end - - ## - # Create a fully-qualified ColumnSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param table_spec [String] - # @param column_spec [String] - # - # @return [::String] - def column_spec_path project:, location:, dataset:, table_spec:, column_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - raise ::ArgumentError, "table_spec cannot contain /" if table_spec.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}/columnSpecs/#{column_spec}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, location:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - ## - # Create a fully-qualified ModelEvaluation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # @param model_evaluation [String] - # - # @return [::String] - def model_evaluation_path project:, location:, model:, model_evaluation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" - end - - ## - # Create a fully-qualified TableSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param table_spec [String] - # - # @return [::String] - def table_spec_path project:, location:, dataset:, table_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb deleted file mode 100644 index da55991d354b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/automl/credentials" -require "google/cloud/automl/v1beta1/automl/paths" -require "google/cloud/automl/v1beta1/automl/rest/operations" -require "google/cloud/automl/v1beta1/automl/rest/client" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1beta1/automl/rest" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - module AutoML - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1beta1/automl/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb deleted file mode 100644 index f1cdebd73081..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +++ /dev/null @@ -1,2772 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - module Rest - ## - # REST client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_dataset.timeout = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_table_spec.timeout = 5.0 - default_config.rpcs.get_table_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_table_specs.timeout = 5.0 - default_config.rpcs.list_table_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_table_spec.timeout = 5.0 - - default_config.rpcs.get_column_spec.timeout = 5.0 - default_config.rpcs.get_column_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_column_specs.timeout = 5.0 - default_config.rpcs.list_column_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_column_spec.timeout = 5.0 - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.export_evaluated_examples.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @auto_ml_stub = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @auto_ml_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def create_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_dataset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.import_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset. - # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] - # Required. The desired output location. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the annotation spec to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_annotation_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a table spec. - # - # @overload get_table_spec(request, options = nil) - # Pass arguments to `get_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_table_spec(name: nil, field_mask: nil) - # Pass arguments to `get_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the table spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - # - # # Call the get_table_spec method. - # result = client.get_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def get_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_table_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_table_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists table specs in a dataset. - # - # @overload list_table_specs(request, options = nil) - # Pass arguments to `list_table_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_table_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the dataset to list table specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_table_specs AutoMl.ListTableSpecs} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - # - # # Call the list_table_specs method. - # result = client.list_table_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - # p item - # end - # - def list_table_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_table_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_table_specs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_table_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_table_specs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_table_specs, "table_specs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a table spec. - # - # @overload update_table_spec(request, options = nil) - # Pass arguments to `update_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_table_spec(table_spec: nil, update_mask: nil) - # Pass arguments to `update_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] - # Required. The table spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - # - # # Call the update_table_spec method. - # result = client.update_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def update_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_table_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_table_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a column spec. - # - # @overload get_column_spec(request, options = nil) - # Pass arguments to `get_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_column_spec(name: nil, field_mask: nil) - # Pass arguments to `get_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the column spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - # - # # Call the get_column_spec method. - # result = client.get_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def get_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_column_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_column_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists column specs in a table spec. - # - # @overload list_column_specs(request, options = nil) - # Pass arguments to `list_column_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_column_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the table spec to list column specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_column_specs AutoMl.ListColumnSpecs} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - # - # # Call the list_column_specs method. - # result = client.list_column_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p item - # end - # - def list_column_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_column_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_column_specs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_column_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_column_specs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_column_specs, "column_specs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a column spec. - # - # @overload update_column_spec(request, options = nil) - # Pass arguments to `update_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_column_spec(column_spec: nil, update_mask: nil) - # Pass arguments to `update_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] - # Required. The column spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - # - # # Call the update_column_spec method. - # result = client.update_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def update_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_column_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_column_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] - # Required. The model to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_models.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_models request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param name [::String] - # Required. Resource name of the model to deploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.deploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.undeploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model to export. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_evaluated_examples(request, options = nil) - # Pass arguments to `export_evaluated_examples` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_evaluated_examples(name: nil, output_config: nil) - # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model whose evaluated examples are to - # be exported. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - # - # # Call the export_evaluated_examples method. - # result = client.export_evaluated_examples request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluated_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_evaluated_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_evaluated_examples.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_evaluated_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_evaluated_examples request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_model_evaluations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutoMl REST API. - # - # This class represents the configuration for AutoMl REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `get_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_table_spec - ## - # RPC-specific configuration for `list_table_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_table_specs - ## - # RPC-specific configuration for `update_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_table_spec - ## - # RPC-specific configuration for `get_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_column_spec - ## - # RPC-specific configuration for `list_column_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_column_specs - ## - # RPC-specific configuration for `update_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_column_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `export_evaluated_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluated_examples - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec - @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config - list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs - @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config - update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec - @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config - get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec - @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config - list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs - @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config - update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec - @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples - @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb deleted file mode 100644 index 0bd77325d30d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb +++ /dev/null @@ -1,1093 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.wait_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "wait_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:wait", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb deleted file mode 100644 index 774d061a2484..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb +++ /dev/null @@ -1,1556 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1beta1/service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - module Rest - ## - # REST service stub for the AutoMl service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def create_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def get_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] - # A result object deserialized from the server's reply - def list_datasets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_datasets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def update_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # A result object deserialized from the server's reply - def get_annotation_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_annotation_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # A result object deserialized from the server's reply - def get_table_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_table_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_table_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::TableSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_table_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] - # A result object deserialized from the server's reply - def list_table_specs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_table_specs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_table_specs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # A result object deserialized from the server's reply - def update_table_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_table_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_table_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::TableSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # A result object deserialized from the server's reply - def get_column_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_column_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_column_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_column_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] - # A result object deserialized from the server's reply - def list_column_specs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_column_specs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_column_specs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # A result object deserialized from the server's reply - def update_column_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_column_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_column_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # A result object deserialized from the server's reply - def get_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Model.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] - # A result object deserialized from the server's reply - def list_models request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_models", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def deploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "deploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def undeploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undeploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_evaluated_examples REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_evaluated_examples request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluated_examples_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_evaluated_examples", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # A result object deserialized from the server's reply - def get_model_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] - # A result object deserialized from the server's reply - def list_model_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_model_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/datasets", - body: "dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_datasets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/datasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{dataset.name}", - body: "dataset", - matches: [ - ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:importData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:exportData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_annotation_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_table_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_table_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_table_specs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/tableSpecs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_table_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{table_spec.name}", - body: "table_spec", - matches: [ - ["table_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_column_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_column_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_column_specs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/columnSpecs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_column_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{column_spec.name}", - body: "column_spec", - matches: [ - ["column_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/models", - body: "model", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_models_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/models", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_deploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:deploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undeploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:undeploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:export", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_evaluated_examples REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_evaluated_examples_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:exportEvaluatedExamples", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_model_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/modelEvaluations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb deleted file mode 100644 index e1ade31b5e08..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/classification.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/temporal_pb' - - -descriptor_data = "\n0google/cloud/automl/v1beta1/classification.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/temporal.proto\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\xc7\x01\n\x1dVideoClassificationAnnotation\x12\x0c\n\x04type\x18\x01 \x01(\t\x12X\n\x19\x63lassification_annotation\x18\x02 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotation\x12>\n\x0ctime_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TimeSegment\"\xa9\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x17\n\x0b\x62\x61se_au_prc\x18\x02 \x01(\x02\x42\x02\x18\x01\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12u\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32S.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x66\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xc0\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12]\n\x03row\x18\x02 \x03(\x0b\x32P.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xae\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x13\x43lassificationProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationAnnotation").msgclass - VideoClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationAnnotation").msgclass - ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics").msgclass - ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass - ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb deleted file mode 100644 index 631c71630e0e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/column_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/data_stats_pb' -require 'google/cloud/automl/v1beta1/data_types_pb' - - -descriptor_data = "\n-google/cloud/automl/v1beta1/column_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a,google/cloud/automl/v1beta1/data_types.proto\"\x9b\x04\n\nColumnSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\tdata_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12:\n\ndata_stats\x18\x04 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\x12X\n\x16top_correlated_columns\x18\x05 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x1at\n\x10\x43orrelatedColumn\x12\x16\n\x0e\x63olumn_spec_id\x18\x01 \x01(\t\x12H\n\x11\x63orrelation_stats\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x94\x01\xea\x41\x90\x01\n automl.googleapis.com/ColumnSpec\x12lprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ColumnSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec").msgclass - ColumnSpec::CorrelatedColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb deleted file mode 100644 index 1a0c06144eb3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_items.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/geometry_pb' -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/temporal_pb' -require 'google/cloud/automl/v1beta1/text_segment_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_items.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a.google/cloud/automl/v1beta1/text_segment.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x7f\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12@\n\x0cinput_config\x18\x06 \x01(\x0b\x32(.google.cloud.automl.v1beta1.InputConfigH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xef\x01\n\x12\x44ocumentDimensions\x12S\n\x04unit\x18\x01 \x01(\x0e\x32\x45.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xf9\x05\n\x08\x44ocument\x12\x46\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.DocumentInputConfig\x12?\n\rdocument_text\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippet\x12<\n\x06layout\x18\x03 \x03(\x0b\x32,.google.cloud.automl.v1beta1.Document.Layout\x12L\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32/.google.cloud.automl.v1beta1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xc3\x03\n\x06Layout\x12>\n\x0ctext_segment\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12@\n\rbounding_poly\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12W\n\x11text_segment_type\x18\x04 \x01(\x0e\x32<.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"F\n\x03Row\x12\x17\n\x0f\x63olumn_spec_ids\x18\x02 \x03(\t\x12&\n\x06values\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xfe\x01\n\x0e\x45xamplePayload\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32\".google.cloud.automl.v1beta1.ImageH\x00\x12@\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetH\x00\x12\x39\n\x08\x64ocument\x18\x04 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DocumentH\x00\x12/\n\x03row\x18\x03 \x01(\x0b\x32 .google.cloud.automl.v1beta1.RowH\x00\x42\t\n\x07payloadB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Image").msgclass - TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSnippet").msgclass - DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions").msgclass - DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit").enummodule - Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document").msgclass - Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout").msgclass - Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout.TextSegmentType").enummodule - Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Row").msgclass - ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExamplePayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb deleted file mode 100644 index becbd202cf0c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_stats.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_stats.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfd\x03\n\tDataStats\x12\x42\n\rfloat64_stats\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.Float64StatsH\x00\x12@\n\x0cstring_stats\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StringStatsH\x00\x12\x46\n\x0ftimestamp_stats\x18\x05 \x01(\x0b\x32+.google.cloud.automl.v1beta1.TimestampStatsH\x00\x12>\n\x0b\x61rray_stats\x18\x06 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ArrayStatsH\x00\x12@\n\x0cstruct_stats\x18\x07 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StructStatsH\x00\x12\x44\n\x0e\x63\x61tegory_stats\x18\x08 \x01(\x0b\x32*.google.cloud.automl.v1beta1.CategoryStatsH\x00\x12\x1c\n\x14\x64istinct_value_count\x18\x01 \x01(\x03\x12\x18\n\x10null_value_count\x18\x02 \x01(\x03\x12\x19\n\x11valid_value_count\x18\t \x01(\x03\x42\x07\n\x05stats\"\xdd\x01\n\x0c\x46loat64Stats\x12\x0c\n\x04mean\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x02 \x01(\x01\x12\x11\n\tquantiles\x18\x03 \x03(\x01\x12T\n\x11histogram_buckets\x18\x04 \x03(\x0b\x32\x39.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket\x1a:\n\x0fHistogramBucket\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\"\x8d\x01\n\x0bStringStats\x12P\n\x11top_unigram_stats\x18\x01 \x03(\x0b\x32\x35.google.cloud.automl.v1beta1.StringStats.UnigramStats\x1a,\n\x0cUnigramStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xf4\x02\n\x0eTimestampStats\x12V\n\x0egranular_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.TimestampStats.GranularStatsEntry\x1a\x98\x01\n\rGranularStats\x12W\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x46.google.cloud.automl.v1beta1.TimestampStats.GranularStats.BucketsEntry\x1a.\n\x0c\x42ucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1ao\n\x12GranularStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TimestampStats.GranularStats:\x02\x38\x01\"J\n\nArrayStats\x12<\n\x0cmember_stats\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\"\xb7\x01\n\x0bStructStats\x12M\n\x0b\x66ield_stats\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.StructStats.FieldStatsEntry\x1aY\n\x0f\x46ieldStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats:\x02\x38\x01\"\xa0\x01\n\rCategoryStats\x12Z\n\x12top_category_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats\x1a\x33\n\x13SingleCategoryStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"%\n\x10\x43orrelationStats\x12\x11\n\tcramers_v\x18\x01 \x01(\x01\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - DataStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataStats").msgclass - Float64Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats").msgclass - Float64Stats::HistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats.HistogramBucket").msgclass - StringStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats").msgclass - StringStats::UnigramStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats.UnigramStats").msgclass - TimestampStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats").msgclass - TimestampStats::GranularStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats.GranularStats").msgclass - ArrayStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ArrayStats").msgclass - StructStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructStats").msgclass - CategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats").msgclass - CategoryStats::SingleCategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats").msgclass - CorrelationStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CorrelationStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb deleted file mode 100644 index e1edf66dbe0d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_types.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_types.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfc\x01\n\x08\x44\x61taType\x12\x42\n\x11list_element_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataTypeH\x00\x12>\n\x0bstruct_type\x18\x03 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.StructTypeH\x00\x12\x15\n\x0btime_format\x18\x05 \x01(\tH\x00\x12\x38\n\ttype_code\x18\x01 \x01(\x0e\x32%.google.cloud.automl.v1beta1.TypeCode\x12\x10\n\x08nullable\x18\x04 \x01(\x08\x42\t\n\x07\x64\x65tails\"\xa7\x01\n\nStructType\x12\x43\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x33.google.cloud.automl.v1beta1.StructType.FieldsEntry\x1aT\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType:\x02\x38\x01*r\n\x08TypeCode\x12\x19\n\x15TYPE_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46LOAT64\x10\x03\x12\r\n\tTIMESTAMP\x10\x04\x12\n\n\x06STRING\x10\x06\x12\t\n\x05\x41RRAY\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x0c\n\x08\x43\x41TEGORY\x10\nB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataType").msgclass - StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructType").msgclass - TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TypeCode").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb deleted file mode 100644 index 3135034e2cdc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/dataset.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/image_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/cloud/automl/v1beta1/video_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/automl/v1beta1/dataset.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\t\n\x07\x44\x61taset\x12_\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TranslationDatasetMetadataH\x00\x12p\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32?.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataH\x00\x12n\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32>.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataH\x00\x12s\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32@.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataH\x00\x12p\n%video_classification_dataset_metadata\x18\x1f \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataH\x00\x12q\n&video_object_tracking_dataset_metadata\x18\x1d \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataH\x00\x12\x66\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32:.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataH\x00\x12\x64\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataH\x00\x12U\n\x17tables_dataset_metadata\x18! \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesDatasetMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Dataset").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb deleted file mode 100644 index 2e9510dd00d8..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/detection.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/geometry_pb' -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n+google/cloud/automl/v1beta1/detection.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a\x1egoogle/protobuf/duration.proto\"p\n\x1eImageObjectDetectionAnnotation\x12?\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xb4\x01\n\x1dVideoObjectTrackingAnnotation\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12?\n\x0c\x62ounding_box\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x04 \x01(\x02\"\xae\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12o\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32K.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd6\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\"\xf4\x01\n$VideoObjectTrackingEvaluationMetrics\x12\x1d\n\x15\x65valuated_frame_count\x18\x01 \x01(\x05\x12$\n\x1c\x65valuated_bounding_box_count\x18\x02 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x04 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x06 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation").msgclass - VideoObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation").msgclass - BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry").msgclass - BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass - ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics").msgclass - VideoObjectTrackingEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb deleted file mode 100644 index 4a92f0a318eb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/geometry.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/automl/v1beta1/geometry.proto\x12\x1bgoogle.cloud.automl.v1beta1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"Z\n\x0c\x42oundingPoly\x12J\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32-.google.cloud.automl.v1beta1.NormalizedVertexB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.NormalizedVertex").msgclass - BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingPoly").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb deleted file mode 100644 index 8631c4f1de2e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/image.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/annotation_spec_pb' -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/image.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x31google/cloud/automl/v1beta1/annotation_spec.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"%\n#ImageObjectDetectionDatasetMetadata\"\xb2\x01\n ImageClassificationModelMetadata\x12\x15\n\rbase_model_id\x18\x01 \x01(\t\x12\x14\n\x0ctrain_budget\x18\x02 \x01(\x03\x12\x12\n\ntrain_cost\x18\x03 \x01(\x03\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12\x12\n\nmodel_type\x18\x07 \x01(\t\x12\x10\n\x08node_qps\x18\r \x01(\x01\x12\x12\n\nnode_count\x18\x0e \x01(\x03\"\xbe\x01\n!ImageObjectDetectionModelMetadata\x12\x12\n\nmodel_type\x18\x01 \x01(\t\x12\x12\n\nnode_count\x18\x03 \x01(\x03\x12\x10\n\x08node_qps\x18\x04 \x01(\x01\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\"@\n*ImageClassificationModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\"A\n+ImageObjectDetectionModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\x42\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nImageProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata").msgclass - ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata").msgclass - ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelMetadata").msgclass - ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata").msgclass - ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata").msgclass - ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb deleted file mode 100644 index 0ae4984c691f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/io.proto - -require 'google/protobuf' - - -descriptor_data = "\n$google/cloud/automl/v1beta1/io.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\x92\x02\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x12\x44\n\x06params\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"\xa9\x01\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x42\x08\n\x06source\"Q\n\x13\x44ocumentInputConfig\x12:\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSource\"\xb7\x01\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xc3\x01\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xcf\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12\x46\n\x0fgcr_destination\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcrDestinationH\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12P\n\x06params\x18\x02 \x03(\x0b\x32@.google.cloud.automl.v1beta1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"\x86\x01\n#ExportEvaluatedExamplesOutputConfig\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x1f\n\tGcsSource\x12\x12\n\ninput_uris\x18\x01 \x03(\t\"#\n\x0e\x42igQuerySource\x12\x11\n\tinput_uri\x18\x01 \x01(\t\"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\")\n\x13\x42igQueryDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\t\"$\n\x0eGcrDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.InputConfig").msgclass - BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictInputConfig").msgclass - DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentInputConfig").msgclass - OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OutputConfig").msgclass - BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOutputConfig").msgclass - ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelExportOutputConfig").msgclass - ExportEvaluatedExamplesOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig").msgclass - GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsSource").msgclass - BigQuerySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQuerySource").msgclass - GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsDestination").msgclass - BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQueryDestination").msgclass - GcrDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcrDestination").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb deleted file mode 100644 index 0b5f16c6bf27..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/model_evaluation.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/detection_pb' -require 'google/cloud/automl/v1beta1/regression_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_extraction_pb' -require 'google/cloud/automl/v1beta1/text_sentiment_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/automl/v1beta1/model_evaluation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x08\n\x0fModelEvaluation\x12i\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32<.google.cloud.automl.v1beta1.ClassificationEvaluationMetricsH\x00\x12\x61\n\x1dregression_evaluation_metrics\x18\x18 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.RegressionEvaluationMetricsH\x00\x12\x63\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TranslationEvaluationMetricsH\x00\x12w\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32\x42.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsH\x00\x12u\n(video_object_tracking_evaluation_metrics\x18\x0e \x01(\x0b\x32\x41.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsH\x00\x12h\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32;.google.cloud.automl.v1beta1.TextSentimentEvaluationMetricsH\x00\x12j\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelEvaluation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb deleted file mode 100644 index 5e4ceb1dd794..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/model.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/image_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/cloud/automl/v1beta1/video_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/model.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\n\n\x05Model\x12[\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TranslationModelMetadataH\x00\x12l\n#image_classification_model_metadata\x18\r \x01(\x0b\x32=.google.cloud.automl.v1beta1.ImageClassificationModelMetadataH\x00\x12j\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextClassificationModelMetadataH\x00\x12o\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32>.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataH\x00\x12l\n#video_classification_model_metadata\x18\x17 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoClassificationModelMetadataH\x00\x12m\n$video_object_tracking_model_metadata\x18\x15 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataH\x00\x12\x62\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.TextExtractionModelMetadataH\x00\x12Q\n\x15tables_model_metadata\x18\x18 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.TablesModelMetadataH\x00\x12`\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32\x32.google.cloud.automl.v1beta1.Model.DeploymentState\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model").msgclass - Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model.DeploymentState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb deleted file mode 100644 index 651d885fc239..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/operations.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/model_pb' -require 'google/cloud/automl/v1beta1/model_evaluation_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/operations.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a$google/cloud/automl/v1beta1/io.proto\x1a\'google/cloud/automl/v1beta1/model.proto\x1a\x32google/cloud/automl/v1beta1/model_evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8b\x08\n\x11OperationMetadata\x12N\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.DeleteOperationMetadataH\x00\x12Y\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.DeployModelOperationMetadataH\x00\x12]\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32;.google.cloud.automl.v1beta1.UndeployModelOperationMetadataH\x00\x12Y\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.CreateModelOperationMetadataH\x00\x12W\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ImportDataOperationMetadataH\x00\x12[\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32:.google.cloud.automl.v1beta1.BatchPredictOperationMetadataH\x00\x12W\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ExportDataOperationMetadataH\x00\x12Y\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.ExportModelOperationMetadataH\x00\x12r\n!export_evaluated_examples_details\x18\x1a \x01(\x0b\x32\x45.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xef\x01\n\x1b\x45xportDataOperationMetadata\x12\x62\n\x0boutput_info\x18\x01 \x01(\x0b\x32M.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo\x1al\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xc3\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12J\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfig\x12\x66\n\x0boutput_info\x18\x02 \x01(\x0b\x32Q.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1an\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xbb\x01\n\x1c\x45xportModelOperationMetadata\x12\x64\n\x0boutput_info\x18\x02 \x01(\x0b\x32O.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\t\"\xee\x01\n(ExportEvaluatedExamplesOperationMetadata\x12|\n\x0boutput_info\x18\x02 \x01(\x0b\x32g.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo\x1a\x44\n!ExportEvaluatedExamplesOutputInfo\x12\x1f\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OperationMetadata").msgclass - DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteOperationMetadata").msgclass - DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelOperationMetadata").msgclass - UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelOperationMetadata").msgclass - CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelOperationMetadata").msgclass - ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataOperationMetadata").msgclass - ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata").msgclass - ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass - BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata").msgclass - BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass - ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata").msgclass - ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass - ExportEvaluatedExamplesOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata").msgclass - ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb deleted file mode 100644 index 3ef3fce3b376..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/prediction_service/credentials" -require "google/cloud/automl/v1beta1/prediction_service/paths" -require "google/cloud/automl/v1beta1/prediction_service/operations" -require "google/cloud/automl/v1beta1/prediction_service/client" -require "google/cloud/automl/v1beta1/prediction_service/rest" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1/prediction_service" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1beta1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module PredictionService - end - end - end - end -end - -helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" -require "google/cloud/automl/v1beta1/prediction_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb deleted file mode 100644 index 1e33b55c5612..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +++ /dev/null @@ -1,725 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1beta1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - ## - # Client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/automl/v1beta1/prediction_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @prediction_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1beta1::PredictionService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @prediction_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictionService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result will be directly - # returned in the response. - # Available for following ML problems, and their expected request payloads: - # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Text Classification - TextSnippet, content up to 60,000 characters, - # UTF-8 encoded. - # * Text Extraction - TextSnippet, content up to 30,000 characters, - # UTF-8 NFC encoded. - # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 - # encoded. - # * Tables - Row, with column values matching the columns of the model, - # up to 5MB. Not available for FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. - # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 - # encoded. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML problems: - # * Image Classification - # * Image Object Detection - # * Video Classification - # * Video Object Tracking * Text Extraction - # * Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PredictionService API. - # - # This class represents the configuration for PredictionService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb deleted file mode 100644 index a5db32e08e4d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - # Credentials for the PredictionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb deleted file mode 100644 index 86611b26eb38..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +++ /dev/null @@ -1,849 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb deleted file mode 100644 index a43bf51c919f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - # Path helper methods for the PredictionService API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb deleted file mode 100644 index 7d3604f143b4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/prediction_service/credentials" -require "google/cloud/automl/v1beta1/prediction_service/paths" -require "google/cloud/automl/v1beta1/prediction_service/rest/operations" -require "google/cloud/automl/v1beta1/prediction_service/rest/client" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1beta1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module PredictionService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1beta1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb deleted file mode 100644 index 20ea008e1bb6..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb +++ /dev/null @@ -1,668 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - module Rest - ## - # REST client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @prediction_service_stub = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @prediction_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result will be directly - # returned in the response. - # Available for following ML problems, and their expected request payloads: - # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Text Classification - TextSnippet, content up to 60,000 characters, - # UTF-8 encoded. - # * Text Extraction - TextSnippet, content up to 30,000 characters, - # UTF-8 NFC encoded. - # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 - # encoded. - # * Tables - Row, with column values matching the columns of the model, - # up to 5MB. Not available for FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. - # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 - # encoded. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.predict request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML problems: - # * Image Classification - # * Image Object Detection - # * Video Classification - # * Video Object Tracking * Text Extraction - # * Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.batch_predict request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PredictionService REST API. - # - # This class represents the configuration for PredictionService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb deleted file mode 100644 index 4a88d22613f7..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb +++ /dev/null @@ -1,1093 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.wait_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "wait_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:wait", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb deleted file mode 100644 index 4d4927cfe5ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1beta1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - module Rest - ## - # REST service stub for the PredictionService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # A result object deserialized from the server's reply - def predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:predict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:batchPredict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb deleted file mode 100644 index 1d749800e047..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/prediction_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/annotation_payload_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/operations_pb' -require 'google/longrunning/operations_pb' - - -descriptor_data = "\n4google/cloud/automl/v1beta1/prediction_service.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/automl/v1beta1/annotation_payload.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a,google/cloud/automl/v1beta1/operations.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x41\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayloadB\x03\xe0\x41\x02\x12G\n\x06params\x18\x03 \x03(\x0b\x32\x37.google.cloud.automl.v1beta1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9a\x02\n\x0fPredictResponse\x12?\n\x07payload\x18\x01 \x03(\x0b\x32..google.cloud.automl.v1beta1.AnnotationPayload\x12G\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayload\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.google.cloud.automl.v1beta1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xee\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12O\n\x0cinput_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12Q\n\routput_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12Q\n\x06params\x18\x05 \x03(\x0b\x32<.google.cloud.automl.v1beta1.BatchPredictRequest.ParamsEntryB\x03\xe0\x41\x02\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x96\x01\n\x12\x42\x61tchPredictResult\x12O\n\x08metadata\x18\x01 \x03(\x0b\x32=.google.cloud.automl.v1beta1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x9e\x04\n\x11PredictionService\x12\xbe\x01\n\x07Predict\x12+.google.cloud.automl.v1beta1.PredictRequest\x1a,.google.cloud.automl.v1beta1.PredictResponse\"X\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xfc\x01\n\x0c\x42\x61tchPredict\x12\x30.google.cloud.automl.v1beta1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02\x41\"/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}\x12\xca\x01\n\x0eListTableSpecs\x12\x32.google.cloud.automl.v1beta1.ListTableSpecsRequest\x1a\x33.google.cloud.automl.v1beta1.ListTableSpecsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs\x12\xda\x01\n\x0fUpdateTableSpec\x12\x33.google.cloud.automl.v1beta1.UpdateTableSpecRequest\x1a&.google.cloud.automl.v1beta1.TableSpec\"j\xda\x41\ntable_spec\x82\xd3\xe4\x93\x02W2I/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}:\ntable_spec\x12\xc8\x01\n\rGetColumnSpec\x12\x31.google.cloud.automl.v1beta1.GetColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}\x12\xdb\x01\n\x0fListColumnSpecs\x12\x33.google.cloud.automl.v1beta1.ListColumnSpecsRequest\x1a\x34.google.cloud.automl.v1beta1.ListColumnSpecsResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs\x12\xee\x01\n\x10UpdateColumnSpec\x12\x34.google.cloud.automl.v1beta1.UpdateColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"{\xda\x41\x0b\x63olumn_spec\x82\xd3\xe4\x93\x02g2X/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}:\x0b\x63olumn_spec\x12\xc9\x01\n\x0b\x43reateModel\x12/.google.cloud.automl.v1beta1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x38\"//v1beta1/{parent=projects/*/locations/*}/models:\x05model\x12\x9c\x01\n\x08GetModel\x12,.google.cloud.automl.v1beta1.GetModelRequest\x1a\".google.cloud.automl.v1beta1.Model\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{name=projects/*/locations/*/models/*}\x12\xaf\x01\n\nListModels\x12..google.cloud.automl.v1beta1.ListModelsRequest\x1a/.google.cloud.automl.v1beta1.ListModelsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{parent=projects/*/locations/*}/models\x12\xca\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.automl.v1beta1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1beta1/{name=projects/*/locations/*/models/*}\x12\xd4\x01\n\x0b\x44\x65ployModel\x12/.google.cloud.automl.v1beta1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xda\x01\n\rUndeployModel\x12\x31.google.cloud.automl.v1beta1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1beta1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xe3\x01\n\x0b\x45xportModel\x12/.google.cloud.automl.v1beta1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\x8c\x02\n\x17\x45xportEvaluatedExamples\x12;.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples:\x01*\x12\xcd\x01\n\x12GetModelEvaluation\x12\x36.google.cloud.automl.v1beta1.GetModelEvaluationRequest\x1a,.google.cloud.automl.v1beta1.ModelEvaluation\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xe0\x01\n\x14ListModelEvaluations\x12\x38.google.cloud.automl.v1beta1.ListModelEvaluationsRequest\x1a\x39.google.cloud.automl.v1beta1.ListModelEvaluationsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x0b\x41utoMlProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateDatasetRequest").msgclass - GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetDatasetRequest").msgclass - ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsRequest").msgclass - ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsResponse").msgclass - UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateDatasetRequest").msgclass - DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteDatasetRequest").msgclass - ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataRequest").msgclass - ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataRequest").msgclass - GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetAnnotationSpecRequest").msgclass - GetTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetTableSpecRequest").msgclass - ListTableSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsRequest").msgclass - ListTableSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsResponse").msgclass - UpdateTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateTableSpecRequest").msgclass - GetColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetColumnSpecRequest").msgclass - ListColumnSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsRequest").msgclass - ListColumnSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsResponse").msgclass - UpdateColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateColumnSpecRequest").msgclass - CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelRequest").msgclass - GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelRequest").msgclass - ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsRequest").msgclass - ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsResponse").msgclass - DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteModelRequest").msgclass - DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelRequest").msgclass - UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelRequest").msgclass - ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelRequest").msgclass - ExportEvaluatedExamplesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest").msgclass - GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelEvaluationRequest").msgclass - ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsRequest").msgclass - ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb deleted file mode 100644 index 3058d28ba237..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb +++ /dev/null @@ -1,163 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/automl/v1beta1/service.proto for package 'Google.Cloud.AutoML.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/automl/v1beta1/service_pb' - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoMl - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.automl.v1beta1.AutoMl' - - # Creates a dataset. - rpc :CreateDataset, ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Gets a dataset. - rpc :GetDataset, ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Lists datasets in a project. - rpc :ListDatasets, ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse - # Updates a dataset. - rpc :UpdateDataset, ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Deletes a dataset and all of its contents. - # Returns empty response in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteDataset, ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Google::Longrunning::Operation - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] - # parameter must be explicitly set. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ImportData, ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Google::Longrunning::Operation - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportData, ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Google::Longrunning::Operation - # Gets an annotation spec. - rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1beta1::AnnotationSpec - # Gets a table spec. - rpc :GetTableSpec, ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec - # Lists table specs in a dataset. - rpc :ListTableSpecs, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse - # Updates a table spec. - rpc :UpdateTableSpec, ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec - # Gets a column spec. - rpc :GetColumnSpec, ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec - # Lists column specs in a table spec. - rpc :ListColumnSpecs, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse - # Updates a column spec. - rpc :UpdateColumnSpec, ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec - # Creates a model. - # Returns a Model in the [response][google.longrunning.Operation.response] - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - rpc :CreateModel, ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Google::Longrunning::Operation - # Gets a model. - rpc :GetModel, ::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Google::Cloud::AutoML::V1beta1::Model - # Lists models. - rpc :ListModels, ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelsResponse - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteModel, ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Google::Longrunning::Operation - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :DeployModel, ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Google::Longrunning::Operation - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :UndeployModel, ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Google::Longrunning::Operation - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportModel, ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Google::Longrunning::Operation - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportEvaluatedExamples, ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Google::Longrunning::Operation - # Gets a model evaluation. - rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1beta1::ModelEvaluation - # Lists model evaluations. - rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb deleted file mode 100644 index 160d97c9614a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/table_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/io_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/table_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a$google/cloud/automl/v1beta1/io.proto\"\xc1\x02\n\tTableSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13time_column_spec_id\x18\x02 \x01(\t\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x17\n\x0fvalid_row_count\x18\x04 \x01(\x03\x12\x14\n\x0c\x63olumn_count\x18\x07 \x01(\x03\x12?\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.automl.v1beta1.InputConfig\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:x\xea\x41u\n\x1f\x61utoml.googleapis.com/TableSpec\x12Rprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TableSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TableSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb deleted file mode 100644 index f6d3ca925dc9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/tables.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/column_spec_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' -require 'google/cloud/automl/v1beta1/data_stats_pb' -require 'google/cloud/automl/v1beta1/ranges_pb' -require 'google/cloud/automl/v1beta1/regression_pb' -require 'google/cloud/automl/v1beta1/temporal_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/automl/v1beta1/tables.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a-google/cloud/automl/v1beta1/column_spec.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a(google/cloud/automl/v1beta1/ranges.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x03\n\x15TablesDatasetMetadata\x12\x1d\n\x15primary_table_spec_id\x18\x01 \x01(\t\x12\x1d\n\x15target_column_spec_id\x18\x02 \x01(\t\x12\x1d\n\x15weight_column_spec_id\x18\x03 \x01(\t\x12\x1d\n\x15ml_use_column_spec_id\x18\x04 \x01(\t\x12t\n\x1atarget_column_correlations\x18\x06 \x03(\x0b\x32P.google.cloud.automl.v1beta1.TablesDatasetMetadata.TargetColumnCorrelationsEntry\x12\x35\n\x11stats_update_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1an\n\x1dTargetColumnCorrelationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x02\x38\x01\"\x96\x04\n\x13TablesModelMetadata\x12-\n#optimization_objective_recall_value\x18\x11 \x01(\x02H\x00\x12\x30\n&optimization_objective_precision_value\x18\x12 \x01(\x02H\x00\x12\x43\n\x12target_column_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12K\n\x1ainput_feature_column_specs\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12\x1e\n\x16optimization_objective\x18\x04 \x01(\t\x12T\n\x18tables_model_column_info\x18\x05 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x12\x1e\n\x16\x64isable_early_stopping\x18\x0c \x01(\x08\x42*\n(additional_optimization_objective_config\"\xfd\x01\n\x10TablesAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x45\n\x13prediction_interval\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.DoubleRange\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x12T\n\x18tables_model_column_info\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12\x16\n\x0e\x62\x61seline_score\x18\x05 \x01(\x02\"j\n\x15TablesModelColumnInfo\x12\x18\n\x10\x63olumn_spec_name\x18\x01 \x01(\t\x12\x1b\n\x13\x63olumn_display_name\x18\x02 \x01(\t\x12\x1a\n\x12\x66\x65\x61ture_importance\x18\x03 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TablesDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesDatasetMetadata").msgclass - TablesModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelMetadata").msgclass - TablesAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesAnnotation").msgclass - TablesModelColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelColumnInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb deleted file mode 100644 index 396cc6fd35e0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/temporal.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n*google/cloud/automl/v1beta1/temporal.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1egoogle/protobuf/duration.proto\"w\n\x0bTimeSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TimeSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimeSegment").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb deleted file mode 100644 index d6721fb18c95..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_extraction.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/text_segment_pb' - - -descriptor_data = "\n1google/cloud/automl/v1beta1/text_extraction.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a.google/cloud/automl/v1beta1/text_segment.proto\"y\n\x18TextExtractionAnnotation\x12@\n\x0ctext_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x97\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12w\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32S.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionAnnotation").msgclass - TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics").msgclass - TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb deleted file mode 100644 index ff6b1ba5b994..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n&google/cloud/automl/v1beta1/text.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"q\n!TextClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"o\n\x1fTextClassificationModelMetadata\x12L\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"1\n\x1bTextExtractionModelMetadata\x12\x12\n\nmodel_hint\x18\x03 \x01(\t\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xa6\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\tTextProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationDatasetMetadata").msgclass - TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationModelMetadata").msgclass - TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionDatasetMetadata").msgclass - TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionModelMetadata").msgclass - TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentDatasetMetadata").msgclass - TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentModelMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb deleted file mode 100644 index 33f9468c557a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_segment.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/automl/v1beta1/text_segment.proto\x12\x1bgoogle.cloud.automl.v1beta1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TextSegmentProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSegment").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb deleted file mode 100644 index 0b206376a98e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_sentiment.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n0google/cloud/automl/v1beta1/text_sentiment.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xc5\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x66\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1e\n\x12\x61nnotation_spec_id\x18\t \x03(\tB\x02\x18\x01\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x12TextSentimentProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentAnnotation").msgclass - TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb deleted file mode 100644 index cbd8923df2c9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/translation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' - - -descriptor_data = "\n-google/cloud/automl/v1beta1/translation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"]\n\x15TranslationAnnotation\x12\x44\n\x12translated_content\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetB\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TranslationProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationDatasetMetadata").msgclass - TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationEvaluationMetrics").msgclass - TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationModelMetadata").msgclass - TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationAnnotation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb deleted file mode 100644 index 339624fb94a5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb b/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb deleted file mode 100644 index 0cde809f1c74..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/video.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/video.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"$\n\"VideoClassificationDatasetMetadata\"$\n\"VideoObjectTrackingDatasetMetadata\"\"\n VideoClassificationModelMetadata\"\"\n VideoObjectTrackingModelMetadataB\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nVideoProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - VideoClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata").msgclass - VideoObjectTrackingDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata").msgclass - VideoClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationModelMetadata").msgclass - VideoObjectTrackingModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md deleted file mode 100644 index 483947fef0b4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud AutoML V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb deleted file mode 100644 index a5d64336682a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Contains annotation information that is relevant to AutoML. - # @!attribute [rw] translation - # @return [::Google::Cloud::AutoML::V1beta1::TranslationAnnotation] - # Annotation details for translation. - # - # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] classification - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] - # Annotation details for content or image classification. - # - # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionAnnotation] - # Annotation details for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationAnnotation] - # Annotation details for video classification. - # Returned for Video Classification predictions. - # - # Note: The following fields are mutually exclusive: `video_classification`, `translation`, `classification`, `image_object_detection`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingAnnotation] - # Annotation details for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking`, `translation`, `classification`, `image_object_detection`, `video_classification`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionAnnotation] - # Annotation details for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentAnnotation] - # Annotation details for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables - # @return [::Google::Cloud::AutoML::V1beta1::TablesAnnotation] - # Annotation details for Tables. - # - # Note: The following fields are mutually exclusive: `tables`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only . The resource ID of the annotation spec that - # this annotation pertains to. The annotation spec comes from either an - # ancestor dataset, or the dataset that was used to train the model in use. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} - # when the model was trained. Because this field returns a value at model - # training time, for different models trained using the same dataset, the - # returned value could be different as model owner could update the - # `display_name` between any two model training. - class AnnotationPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb deleted file mode 100644 index fef4ea17d2ba..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A definition of an annotation spec. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the annotation spec. - # Form: - # - # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the annotation spec to show in the interface. The name can be - # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the parent dataset - # labeled by the annotation spec. - class AnnotationSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb deleted file mode 100644 index ddcb7dbb8d85..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb +++ /dev/null @@ -1,235 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Contains annotation details specific to classification. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence that the annotation is positive. If a user - # approves an annotation as negative or positive, the score value remains - # unchanged. If a user creates an annotation, the score is 0 for negative or - # 1 for positive. - class ClassificationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains annotation details specific to video classification. - # @!attribute [rw] type - # @return [::String] - # Output only. Expresses the type of video classification. Possible values: - # - # * `segment` - Classification done on a specified by user - # time segment of a video. AnnotationSpec is answered to be present - # in that time segment, if it is present in any part of it. The video - # ML model evaluations are done only for this type of classification. - # - # * `shot`- Shot-level classification. - # AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # * `1s_interval` - AutoML Video Intelligence returns labels and their - # confidence scores for each second of the entire segment of the video - # that user specified in the request configuration. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # @!attribute [rw] classification_annotation - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] - # Output only . The classification details of this annotation. - # @!attribute [rw] time_segment - # @return [::Google::Cloud::AutoML::V1beta1::TimeSegment] - # Output only . The time segment of the video to which the - # annotation applies. - class VideoClassificationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for classification problems. - # Note: For Video Classification this metrics only describe quality of the - # Video Classification predictions of "segment_classification" type. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged - # for the overall evaluation. - # @!attribute [rw] base_au_prc - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Float] - # Output only. The Area Under Precision-Recall Curve metric based on priors. - # Micro-averaged for the overall evaluation. - # Deprecated. - # @!attribute [rw] au_roc - # @return [::Float] - # Output only. The Area Under Receiver Operating Characteristic curve metric. - # Micro-averaged for the overall evaluation. - # @!attribute [rw] log_loss - # @return [::Float] - # Output only. The Log Loss metric. - # @!attribute [rw] confidence_metrics_entry - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics for each confidence_threshold in - # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and - # position_threshold = INT32_MAX_VALUE. - # ROC and precision-recall curves, and other aggregated metrics are derived - # from them. The confidence metrics entries may also be supplied for - # additional values of position_threshold, but from these no aggregated - # metrics are computed. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for MULTICLASS classification problems where number - # of labels is no more than 10. - # Only set for model level evaluation, not for evaluation per label. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. The annotation spec ids used for this evaluation. - class ClassificationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. Metrics are computed with an assumption that the model - # never returns predictions with score lower than this value. - # @!attribute [rw] position_threshold - # @return [::Integer] - # Output only. Metrics are computed with an assumption that the model - # always returns at most this many predictions (ordered by their score, - # descendingly), but they all still need to meet the confidence_threshold. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall (True Positive Rate) for the given confidence - # threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision for the given confidence threshold. - # @!attribute [rw] false_positive_rate - # @return [::Float] - # Output only. False Positive Rate for the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] recall_at1 - # @return [::Float] - # Output only. The Recall (True Positive Rate) when only considering the - # label that has the highest prediction score and not below the confidence - # threshold for each example. - # @!attribute [rw] precision_at1 - # @return [::Float] - # Output only. The precision when only considering the label that has the - # highest prediction score and not below the confidence threshold for each - # example. - # @!attribute [rw] false_positive_rate_at1 - # @return [::Float] - # Output only. The False Positive Rate when only considering the label that - # has the highest prediction score and not below the confidence threshold - # for each example. - # @!attribute [rw] f1_score_at1 - # @return [::Float] - # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. - # @!attribute [rw] true_positive_count - # @return [::Integer] - # Output only. The number of model created labels that match a ground truth - # label. - # @!attribute [rw] false_positive_count - # @return [::Integer] - # Output only. The number of model created labels that do not match a - # ground truth label. - # @!attribute [rw] false_negative_count - # @return [::Integer] - # Output only. The number of ground truth labels that are not matched - # by a model created label. - # @!attribute [rw] true_negative_count - # @return [::Integer] - # Output only. The number of labels that were not created by the model, - # but if they would, they would not match a ground truth label. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Confusion matrix of the model running the classification. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. IDs of the annotation specs used in the confusion matrix. - # For Tables CLASSIFICATION - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # only list of [annotation_spec_display_name-s][] is populated. - # @!attribute [rw] display_name - # @return [::Array<::String>] - # Output only. Display name of the annotation specs used in the confusion - # matrix, as they were at the moment of the evaluation. For Tables - # CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type], - # distinct values of the target column at the moment of the model - # evaluation are populated here. - # @!attribute [rw] row - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] - # Output only. Rows in the confusion matrix. The number of rows is equal to - # the size of `annotation_spec_id`. - # `row[i].example_count[j]` is the number of examples that have ground - # truth of the `annotation_spec_id[i]` and are predicted as - # `annotation_spec_id[j]` by the model being evaluated. - class ConfusionMatrix - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. A row in the confusion matrix. - # @!attribute [rw] example_count - # @return [::Array<::Integer>] - # Output only. Value of the specific cell in the confusion matrix. - # The number of values each row has (i.e. the length of the row) is equal - # to the length of the `annotation_spec_id` field or, if that one is not - # populated, length of the {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Type of the classification problem. - module ClassificationType - # An un-set value of this enum. - CLASSIFICATION_TYPE_UNSPECIFIED = 0 - - # At most one label is allowed per example. - MULTICLASS = 1 - - # Multiple labels are allowed for one example. - MULTILABEL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb deleted file mode 100644 index 5a49f3139bdf..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were - # given on import . - # Used by: - # * Tables - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the column specs. - # Form: - # - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` - # @!attribute [rw] data_type - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - # The data type of elements stored in the column. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The name of the column to show in the interface. The name can - # be up to 100 characters long and can consist only of ASCII Latin letters - # A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and - # must start with a letter or a digit. - # @!attribute [rw] data_stats - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - # Output only. Stats of the series of values in the column. - # This field may be stale, see the ancestor's - # Dataset.tables_dataset_metadata.stats_update_time field - # for the timestamp at which these stats were last updated. - # @!attribute [rw] top_correlated_columns - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec::CorrelatedColumn>] - # Deprecated. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class ColumnSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Identifies the table's column, and its correlation with the column this - # ColumnSpec describes. - # @!attribute [rw] column_spec_id - # @return [::String] - # The column_spec_id of the correlated column, which belongs to the same - # table as the in-context column. - # @!attribute [rw] correlation_stats - # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] - # Correlation between this and the in-context column. - class CorrelatedColumn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb deleted file mode 100644 index c6d3145ce607..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb +++ /dev/null @@ -1,239 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A representation of an image. - # Only images up to 30MB in size are supported. - # @!attribute [rw] image_bytes - # @return [::String] - # Image content represented as a stream of bytes. - # Note: As with all `bytes` fields, protobuffers use a pure binary - # representation, whereas JSON representations use base64. - # - # Note: The following fields are mutually exclusive: `image_bytes`, `input_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] - # An input config specifying the content of the image. - # - # Note: The following fields are mutually exclusive: `input_config`, `image_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] thumbnail_uri - # @return [::String] - # Output only. HTTP URI to the thumbnail image. - class Image - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of a text snippet. - # @!attribute [rw] content - # @return [::String] - # Required. The content of the text snippet as a string. Up to 250000 - # characters long. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. The format of {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. Currently the only two allowed - # values are "text/html" and "text/plain". If left blank, the format is - # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. - # @!attribute [rw] content_uri - # @return [::String] - # Output only. HTTP URI where you can download the content. - class TextSnippet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message that describes dimension of a document. - # @!attribute [rw] unit - # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions::DocumentDimensionUnit] - # Unit of the dimension. - # @!attribute [rw] width - # @return [::Float] - # Width value of the document, works together with the unit. - # @!attribute [rw] height - # @return [::Float] - # Height value of the document, works together with the unit. - class DocumentDimensions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit of the document dimension. - module DocumentDimensionUnit - # Should not be used. - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 - - # Document dimension is measured in inches. - INCH = 1 - - # Document dimension is measured in centimeters. - CENTIMETER = 2 - - # Document dimension is measured in points. 72 points = 1 inch. - POINT = 3 - end - end - - # A structured text document e.g. a PDF. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::DocumentInputConfig] - # An input config specifying the content of the document. - # @!attribute [rw] document_text - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # The plain text version of this document. - # @!attribute [rw] layout - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Document::Layout>] - # Describes the layout of the document. - # Sorted by [page_number][]. - # @!attribute [rw] document_dimensions - # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions] - # The dimensions of the page in the document. - # @!attribute [rw] page_count - # @return [::Integer] - # Number of pages in the document. - class Document - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] - # Text Segment that represents a segment in - # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. - # @!attribute [rw] page_number - # @return [::Integer] - # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts - # from 1. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. - # Contains exactly 4 - # - # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} - # and they are connected by edges in the order provided, which will - # represent a rectangle parallel to the frame. The - # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are - # relative to the page. - # Coordinates are based on top-left as point (0,0). - # @!attribute [rw] text_segment_type - # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] - # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. - class Layout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of TextSegment in the context of the original document. - module TextSegmentType - # Should not be used. - TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 - - # The text segment is a token. e.g. word. - TOKEN = 1 - - # The text segment is a paragraph. - PARAGRAPH = 2 - - # The text segment is a form field. - FORM_FIELD = 3 - - # The text segment is the name part of a form field. It will be treated - # as child of another FORM_FIELD TextSegment if its span is subspan of - # another TextSegment with type FORM_FIELD. - FORM_FIELD_NAME = 4 - - # The text segment is the text content part of a form field. It will be - # treated as child of another FORM_FIELD TextSegment if its span is - # subspan of another TextSegment with type FORM_FIELD. - FORM_FIELD_CONTENTS = 5 - - # The text segment is a whole table, including headers, and all rows. - TABLE = 6 - - # The text segment is a table's headers. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_HEADER = 7 - - # The text segment is a row in table. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_ROW = 8 - - # The text segment is a cell in table. It will be treated as child of - # another TABLE_ROW TextSegment if its span is subspan of another - # TextSegment with type TABLE_ROW. - TABLE_CELL = 9 - end - end - end - - # A representation of a row in a relational table. - # @!attribute [rw] column_spec_ids - # @return [::Array<::String>] - # The resource IDs of the column specs describing the columns of the row. - # If set must contain, but possibly in a different order, all input - # feature - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_spec_ids} - # of the Model this row is being passed to. - # Note: The below `values` field must match order of this field, if this - # field is set. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Required. The values of the row cells, given in the same order as the - # column_spec_ids, or, if not set, then in the same order as input - # feature - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_specs} - # of the Model this row is being passed to. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Example data used for training or prediction. - # @!attribute [rw] image - # @return [::Google::Cloud::AutoML::V1beta1::Image] - # Example image. - # - # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_snippet - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # Example text. - # - # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document - # @return [::Google::Cloud::AutoML::V1beta1::Document] - # Example document. - # - # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row - # @return [::Google::Cloud::AutoML::V1beta1::Row] - # Example relational table row. - # - # Note: The following fields are mutually exclusive: `row`, `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExamplePayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb deleted file mode 100644 index 69d1de9e2ebe..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb +++ /dev/null @@ -1,239 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # The data statistics of a series of values that share the same DataType. - # @!attribute [rw] float64_stats - # @return [::Google::Cloud::AutoML::V1beta1::Float64Stats] - # The statistics for FLOAT64 DataType. - # - # Note: The following fields are mutually exclusive: `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_stats - # @return [::Google::Cloud::AutoML::V1beta1::StringStats] - # The statistics for STRING DataType. - # - # Note: The following fields are mutually exclusive: `string_stats`, `float64_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_stats - # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats] - # The statistics for TIMESTAMP DataType. - # - # Note: The following fields are mutually exclusive: `timestamp_stats`, `float64_stats`, `string_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] array_stats - # @return [::Google::Cloud::AutoML::V1beta1::ArrayStats] - # The statistics for ARRAY DataType. - # - # Note: The following fields are mutually exclusive: `array_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_stats - # @return [::Google::Cloud::AutoML::V1beta1::StructStats] - # The statistics for STRUCT DataType. - # - # Note: The following fields are mutually exclusive: `struct_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] category_stats - # @return [::Google::Cloud::AutoML::V1beta1::CategoryStats] - # The statistics for CATEGORY DataType. - # - # Note: The following fields are mutually exclusive: `category_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] distinct_value_count - # @return [::Integer] - # The number of distinct values. - # @!attribute [rw] null_value_count - # @return [::Integer] - # The number of values that are null. - # @!attribute [rw] valid_value_count - # @return [::Integer] - # The number of values that are valid. - class DataStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data statistics of a series of FLOAT64 values. - # @!attribute [rw] mean - # @return [::Float] - # The mean of the series. - # @!attribute [rw] standard_deviation - # @return [::Float] - # The standard deviation of the series. - # @!attribute [rw] quantiles - # @return [::Array<::Float>] - # Ordered from 0 to k k-quantile values of the data series of n values. - # The value at index i is, approximately, the i*n/k-th smallest value in the - # series; for i = 0 and i = k these are, respectively, the min and max - # values. - # @!attribute [rw] histogram_buckets - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Float64Stats::HistogramBucket>] - # Histogram buckets of the data series. Sorted by the min value of the - # bucket, ascendingly, and the number of the buckets is dynamically - # generated. The buckets are non-overlapping and completely cover whole - # FLOAT64 range with min of first bucket being `"-Infinity"`, and max of - # the last one being `"Infinity"`. - class Float64Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A bucket of a histogram. - # @!attribute [rw] min - # @return [::Float] - # The minimum value of the bucket, inclusive. - # @!attribute [rw] max - # @return [::Float] - # The maximum value of the bucket, exclusive unless max = `"Infinity"`, in - # which case it's inclusive. - # @!attribute [rw] count - # @return [::Integer] - # The number of data values that are in the bucket, i.e. are between - # min and max values. - class HistogramBucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of STRING values. - # @!attribute [rw] top_unigram_stats - # @return [::Array<::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats>] - # The statistics of the top 20 unigrams, ordered by - # {::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats#count count}. - class StringStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The statistics of a unigram. - # @!attribute [rw] value - # @return [::String] - # The unigram. - # @!attribute [rw] count - # @return [::Integer] - # The number of occurrences of this unigram in the series. - class UnigramStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of TIMESTAMP values. - # @!attribute [rw] granular_stats - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats}] - # The string key is the pre-defined granularity. Currently supported: - # hour_of_day, day_of_week, month_of_year. - # Granularities finer that the granularity of timestamp data are not - # populated (e.g. if timestamps are at day granularity, then hour_of_day - # is not populated). - class TimestampStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stats split by a defined in context granularity. - # @!attribute [rw] buckets - # @return [::Google::Protobuf::Map{::Integer => ::Integer}] - # A map from granularity key to example count for that key. - # E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). - class GranularStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::Integer] - # @!attribute [rw] value - # @return [::Integer] - class BucketsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats] - class GranularStatsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of ARRAY values. - # @!attribute [rw] member_stats - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - # Stats of all the values of all arrays, as if they were a single long - # series of data. The type depends on the element type of the array. - class ArrayStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data statistics of a series of STRUCT values. - # @!attribute [rw] field_stats - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataStats}] - # Map from a field name of the struct to data stats aggregated over series - # of all data in that field across all the structs. - class StructStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - class FieldStatsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of CATEGORY values. - # @!attribute [rw] top_category_stats - # @return [::Array<::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats>] - # The statistics of the top 20 CATEGORY values, ordered by - # - # {::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats#count count}. - class CategoryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The statistics of a single CATEGORY value. - # @!attribute [rw] value - # @return [::String] - # The CATEGORY value. - # @!attribute [rw] count - # @return [::Integer] - # The number of occurrences of this value in the series. - class SingleCategoryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A correlation statistics between two series of DataType values. The series - # may have differing DataType-s, but within a single series the DataType must - # be the same. - # @!attribute [rw] cramers_v - # @return [::Float] - # The correlation value using the Cramer's V measure. - class CorrelationStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb deleted file mode 100644 index 487ca044c5e5..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Indicated the type of data that can be stored in a structured data entity - # (e.g. a table). - # @!attribute [rw] list_element_type - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::ARRAY ARRAY}, - # then `list_element_type` is the type of the elements. - # - # Note: The following fields are mutually exclusive: `list_element_type`, `struct_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_type - # @return [::Google::Cloud::AutoML::V1beta1::StructType] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT}, then `struct_type` - # provides type information for the struct's fields. - # - # Note: The following fields are mutually exclusive: `struct_type`, `list_element_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_format - # @return [::String] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::TIMESTAMP TIMESTAMP} - # then `time_format` provides the format in which that time field is - # expressed. The time_format must either be one of: - # * `UNIX_SECONDS` - # * `UNIX_MILLISECONDS` - # * `UNIX_MICROSECONDS` - # * `UNIX_NANOSECONDS` - # (for respectively number of seconds, milliseconds, microseconds and - # nanoseconds since start of the Unix epoch); - # or be written in `strftime` syntax. If time_format is not set, then the - # default format as described on the type_code is used. - # - # Note: The following fields are mutually exclusive: `time_format`, `list_element_type`, `struct_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type_code - # @return [::Google::Cloud::AutoML::V1beta1::TypeCode] - # Required. The {::Google::Cloud::AutoML::V1beta1::TypeCode TypeCode} for this type. - # @!attribute [rw] nullable - # @return [::Boolean] - # If true, this DataType can also be `NULL`. In .CSV files `NULL` value is - # expressed as an empty string. - class DataType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StructType` defines the DataType-s of a {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT} type. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataType}] - # Unordered map of struct field names to their data types. - # Fields cannot be added or removed via Update. Their names and - # data types are still mutable. - class StructType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `TypeCode` is used as a part of - # {::Google::Cloud::AutoML::V1beta1::DataType DataType}. - module TypeCode - # Not specified. Should not be used. - TYPE_CODE_UNSPECIFIED = 0 - - # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or - # `"-Infinity"`. - FLOAT64 = 3 - - # Must be between 0AD and 9999AD. Encoded as `string` according to - # {::Google::Cloud::AutoML::V1beta1::DataType#time_format time_format}, or, if - # that format is not set, then in RFC 3339 `date-time` format, where - # `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). - TIMESTAMP = 4 - - # Encoded as `string`. - STRING = 6 - - # Encoded as `list`, where the list elements are represented according to - # - # {::Google::Cloud::AutoML::V1beta1::DataType#list_element_type list_element_type}. - ARRAY = 8 - - # Encoded as `struct`, where field values are represented according to - # {::Google::Cloud::AutoML::V1beta1::DataType#struct_type struct_type}. - STRUCT = 9 - - # Values of this type are not further understood by AutoML, - # e.g. AutoML is unable to tell the order of values (as it could with - # FLOAT64), or is unable to say if one value contains another (as it - # could with STRING). - # Encoded as `string` (bytes should be base64-encoded, as described in RFC - # 4648, section 4). - CATEGORY = 10 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb deleted file mode 100644 index 66f98e62fd51..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A workspace for solving a single, particular machine learning (ML) problem. - # A workspace contains examples that may be annotated. - # @!attribute [rw] translation_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TranslationDatasetMetadata] - # Metadata for a dataset used for translation. - # - # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationDatasetMetadata] - # Metadata for a dataset used for image classification. - # - # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationDatasetMetadata] - # Metadata for a dataset used for text classification. - # - # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionDatasetMetadata] - # Metadata for a dataset used for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationDatasetMetadata] - # Metadata for a dataset used for video classification. - # - # Note: The following fields are mutually exclusive: `video_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingDatasetMetadata] - # Metadata for a dataset used for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionDatasetMetadata] - # Metadata for a dataset used for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentDatasetMetadata] - # Metadata for a dataset used for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata] - # Metadata for a dataset used for Tables. - # - # Note: The following fields are mutually exclusive: `tables_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the dataset. - # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the dataset to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. - # @!attribute [rw] description - # @return [::String] - # User-provided description of the dataset. The description can be up to - # 25000 characters long. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the dataset. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was created. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class Dataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb deleted file mode 100644 index 6f569cb06b5e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Annotation details for image object detection. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # Output only. The rectangle representing the object location. - # @!attribute [rw] score - # @return [::Float] - # Output only. The confidence that this annotation is positive for the parent example, - # value in [0, 1], higher means higher positivity confidence. - class ImageObjectDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation details for video object tracking. - # @!attribute [rw] instance_id - # @return [::String] - # Optional. The instance of the object, expressed as a positive integer. Used to tell - # apart objects of the same type (i.e. AnnotationSpec) when multiple are - # present on a single example. - # NOTE: Instance ID prediction quality is not a part of model evaluation and - # is done as best effort. Especially in cases when an entity goes - # off-screen for a longer time (minutes), when it comes back it may be given - # a new instance ID. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Required. A time (frame) of a video to which this annotation pertains. - # Represented as the duration since the video's start. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # Required. The rectangle representing the object location on the frame (i.e. - # at the time_offset of the video). - # @!attribute [rw] score - # @return [::Float] - # Output only. The confidence that this annotation is positive for the video at - # the time_offset, value in [0, 1], higher means higher positivity - # confidence. For annotations created by the user the score is 1. When - # user approves an annotation, the original float score is kept (and not - # changed to 1). - class VideoObjectTrackingAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bounding box matching model metrics for a single intersection-over-union - # threshold and multiple label match confidence thresholds. - # @!attribute [rw] iou_threshold - # @return [::Float] - # Output only. The intersection-over-union threshold value used to compute - # this metrics entry. - # @!attribute [rw] mean_average_precision - # @return [::Float] - # Output only. The mean average precision, most often close to au_prc. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] - # Output only. Metrics for each label-match confidence_threshold from - # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is - # derived from them. - class BoundingBoxMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Model evaluation metrics for image object detection problems. - # Evaluates prediction quality of labeled bounding boxes. - # @!attribute [rw] evaluated_bounding_box_count - # @return [::Integer] - # Output only. The total number of bounding boxes (i.e. summed over all - # images) the ground truth used to create this evaluation had. - # @!attribute [rw] bounding_box_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] - # Output only. The bounding boxes match metrics for each - # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # pair. - # @!attribute [rw] bounding_box_mean_average_precision - # @return [::Float] - # Output only. The single metric for bounding boxes evaluation: - # the mean_average_precision averaged over all bounding_box_metrics_entries. - class ImageObjectDetectionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for video object tracking problems. - # Evaluates prediction quality of both labeled bounding boxes and labeled - # tracks (i.e. series of bounding boxes sharing same label and instance ID). - # @!attribute [rw] evaluated_frame_count - # @return [::Integer] - # Output only. The number of video frames used to create this evaluation. - # @!attribute [rw] evaluated_bounding_box_count - # @return [::Integer] - # Output only. The total number of bounding boxes (i.e. summed over all - # frames) the ground truth used to create this evaluation had. - # @!attribute [rw] bounding_box_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] - # Output only. The bounding boxes match metrics for each - # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # pair. - # @!attribute [rw] bounding_box_mean_average_precision - # @return [::Float] - # Output only. The single metric for bounding boxes evaluation: - # the mean_average_precision averaged over all bounding_box_metrics_entries. - class VideoObjectTrackingEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb deleted file mode 100644 index 64cc3c7ae1f9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A vertex represents a 2D point in the image. - # The normalized vertex coordinates are between 0 to 1 fractions relative to - # the original plane (image, video). E.g. if the plane (e.g. whole image) would - # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would - # be at the position (1, 6) on that plane. - # @!attribute [rw] x - # @return [::Float] - # Required. Horizontal coordinate. - # @!attribute [rw] y - # @return [::Float] - # Required. Vertical coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A bounding polygon of a detected object on a plane. - # On output both vertices and normalized_vertices are provided. - # The polygon is formed by connecting vertices in the order they are listed. - # @!attribute [rw] normalized_vertices - # @return [::Array<::Google::Cloud::AutoML::V1beta1::NormalizedVertex>] - # Output only . The bounding polygon normalized vertices. - class BoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb deleted file mode 100644 index e75d8c471c72..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata that is specific to image classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Required. Type of the classification problem. - class ImageClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata specific to image object detection. - class ImageObjectDetectionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata for image classification. - # @!attribute [rw] base_model_id - # @return [::String] - # Optional. The ID of the `base` model. If it is specified, the new model - # will be created based on the `base` model. Otherwise, the new model will be - # created from scratch. The `base` model must be in the same - # `project` and `location` as the new model to create, and have the same - # `model_type`. - # @!attribute [rw] train_budget - # @return [::Integer] - # Required. The train budget of creating this model, expressed in hours. The - # actual `train_cost` will be equal or less than this value. - # @!attribute [rw] train_cost - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # hours. If this model is created from a `base` model, the train cost used - # to create the `base` model are not included. - # @!attribute [rw] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud` - Model to be used via prediction calls to AutoML API. - # This is the default value. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. Expected to have low latency, but may have - # lower prediction quality than other models. - # * `mobile-core-ml-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. - # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to - # providing prediction via AutoML API, can also be exported - # (see {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with - # Core ML afterwards. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # @!attribute [rw] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [rw] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the node_qps field. - class ImageClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to image object detection. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud-high-accuracy-1` - (default) A model to be used via prediction - # calls to AutoML API. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # * `cloud-low-latency-1` - A model to be used via prediction - # calls to AutoML API. Expected to have low latency, but may - # have lower prediction quality than other models. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # @!attribute [rw] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the qps_per_node field. - # @!attribute [rw] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [rw] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. The actual - # `train_cost` will be equal or less than this value. If further model - # training ceases to provide any improvements, it will stop without using - # full budget and the stop_reason will be `MODEL_CONVERGED`. - # Note, node_hour = actual_hour * number_of_nodes_invovled. - # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, - # the train budget must be between 20,000 and 900,000 milli node hours, - # inclusive. The default value is 216, 000 which represents one day in - # wall time. - # For model type `mobile-low-latency-1`, `mobile-versatile-1`, - # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, - # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train - # budget must be between 1,000 and 100,000 milli node hours, inclusive. - # The default value is 24, 000 which represents one day in wall time. - # @!attribute [rw] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # milli node hours, i.e. 1,000 value in this field means 1 node hour. - # Guaranteed to not exceed the train budget. - class ImageObjectDetectionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Classification. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # - # {::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata#node_qps node_qps}. - # Must be between 1 and 100, inclusive on both ends. - class ImageClassificationModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Object Detection. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # - # [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node]. - # Must be between 1 and 100, inclusive on both ends. - class ImageObjectDetectionModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb deleted file mode 100644 index bb6c621d86fc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb +++ /dev/null @@ -1,1214 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Input configuration for ImportData Action. - # - # The format of input depends on dataset_metadata the Dataset into which - # the import is happening has. As input source the - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. Additionally any input .CSV file - # by itself must be 100MB or smaller, unless specified otherwise. - # If an "example" file (that is, image, video etc.) with identical content - # (even if it had different GCS_FILE_PATH) is mentioned multiple times, then - # its label, bounding boxes etc. are appended. The same file should be always - # provided with the same ML_USE and GCS_FILE_PATH, if it is not, then - # these values are nondeterministically selected from the given ones. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats are: - # - # * For Image Classification: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... - # GCS_FILE_PATH leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO - # For MULTICLASS classification type, at most one LABEL is allowed - # per image. If an image has not yet been labeled, then it should be - # mentioned just once with no LABEL. - # Some sample rows: - # TRAIN,gs://folder/image1.jpg,daisy - # TEST,gs://folder/image2.jpg,dandelion,tulip,rose - # UNASSIGNED,gs://folder/image3.jpg,daisy - # UNASSIGNED,gs://folder/image4.jpg - # - # * For Image Object Detection: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) - # GCS_FILE_PATH leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. - # Each image is assumed to be exhaustively labeled. The minimum - # allowed BOUNDING_BOX edge length is 0.01, and no more than 500 - # BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined - # per line). If an image has not yet been labeled, then it should be - # mentioned just once with no LABEL and the ",,,,,,," in place of the - # BOUNDING_BOX. For images which are known to not contain any - # bounding boxes, they should be labelled explictly as - # "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the - # BOUNDING_BOX. - # Sample rows: - # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, - # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, - # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 - # TEST,gs://folder/im3.png,,,,,,,,, - # TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, - # - # * For Video Classification: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH - # should lead to another .csv file which describes examples that have - # given ML_USE, using the following row format: - # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) - # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. Any segment - # of a video which has one or more labels on it, is considered a - # hard negative for all other labels. Any segment with no labels on - # it is considered to be unknown. If a whole video is unknown, then - # it shuold be mentioned just once with ",," in place of LABEL, - # TIME_SEGMENT_START,TIME_SEGMENT_END. - # Sample top level CSV file: - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # Sample rows of a CSV file for a particular ML_USE: - # gs://folder/video1.avi,car,120,180.000021 - # gs://folder/video1.avi,bike,150,180.000021 - # gs://folder/vid2.avi,car,0,60.5 - # gs://folder/vid3.avi,,, - # - # * For Video Object Tracking: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH - # should lead to another .csv file which describes examples that have - # given ML_USE, using one of the following row format: - # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX - # or - # GCS_FILE_PATH,,,,,,,,,, - # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # Providing INSTANCE_IDs can help to obtain a better model. When - # a specific labeled entity leaves the video frame, and shows up - # afterwards it is not required, albeit preferable, that the same - # INSTANCE_ID is given to it. - # TIMESTAMP must be within the length of the video, the - # BOUNDING_BOX is assumed to be drawn on the closest video's frame - # to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected - # to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per - # frame are allowed. If a whole video is unknown, then it should be - # mentioned just once with ",,,,,,,,,," in place of LABEL, - # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX. - # Sample top level CSV file: - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # Seven sample rows of a CSV file for a particular ML_USE: - # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 - # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 - # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 - # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, - # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, - # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, - # gs://folder/video2.avi,,,,,,,,,,, - # * For Text Extraction: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which - # either imports text in-line or as documents. Any given - # .JSONL file must be 100MB or smaller. - # The in-line .JSONL file contains, per line, a proto that wraps a - # TextSnippet proto (in json representation) followed by one or more - # AnnotationPayload protos (called annotations), which have - # display_name and text_extraction detail populated. The given text - # is expected to be annotated exhaustively, for example, if you look - # for animals and text contains "dolphin" that is not labeled, then - # "dolphin" is assumed to not be an animal. Any given text snippet - # content must be 10KB or smaller, and also be UTF-8 NFC encoded - # (ASCII already is). - # The document .JSONL file contains, per line, a proto that wraps a - # Document proto. The Document proto must have either document_text - # or input_config set. In document_text case, the Document proto may - # also contain the spatial information of the document, including - # layout, document dimension and page number. In input_config case, - # only PDF documents are supported now, and each document may be up - # to 2MB large. Currently, annotations on documents cannot be - # specified at import. - # Three sample CSV rows: - # TRAIN,gs://folder/file1.jsonl - # VALIDATE,gs://folder/file2.jsonl - # TEST,gs://folder/file3.jsonl - # Sample in-line JSON Lines file for entity extraction (presented here - # with artificial line breaks, but the only actual line break is - # denoted by \n).: - # { - # "document": { - # "document_text": \\{"content": "dog cat"} - # "layout": [ - # { - # "text_segment": { - # "start_offset": 0, - # "end_offset": 3, - # }, - # "page_number": 1, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.1, "y": 0.1}, - # \\{"x": 0.1, "y": 0.3}, - # \\{"x": 0.3, "y": 0.3}, - # \\{"x": 0.3, "y": 0.1}, - # ], - # }, - # "text_segment_type": TOKEN, - # }, - # { - # "text_segment": { - # "start_offset": 4, - # "end_offset": 7, - # }, - # "page_number": 1, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.4, "y": 0.1}, - # \\{"x": 0.4, "y": 0.3}, - # \\{"x": 0.8, "y": 0.3}, - # \\{"x": 0.8, "y": 0.1}, - # ], - # }, - # "text_segment_type": TOKEN, - # } - # - # ], - # "document_dimensions": { - # "width": 8.27, - # "height": 11.69, - # "unit": INCH, - # } - # "page_count": 1, - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": {"text_segment": {"start_offset": 0, - # "end_offset": 3}} - # }, - # { - # "display_name": "animal", - # "text_extraction": {"text_segment": {"start_offset": 4, - # "end_offset": 7}} - # } - # ], - # }\n - # { - # "text_snippet": { - # "content": "This dog is good." - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": \\{"start_offset": 5, "end_offset": 8} - # } - # } - # ] - # } - # Sample document JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n).: - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] - # } - # } - # } - # } - # - # * For Text Classification: - # CSV file(s) with each line in format: - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... - # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If - # the column content is a valid gcs file path, i.e. prefixed by - # "gs://", it will be treated as a GCS_FILE_PATH, else if the content - # is enclosed within double quotes (""), it is - # treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path - # must lead to a .txt file with UTF-8 encoding, for example, - # "gs://folder/content.txt", and the content in it is extracted - # as a text snippet. In TEXT_SNIPPET case, the column content - # excluding quotes is treated as to be imported text snippet. In - # both cases, the text snippet/file size must be within 128kB. - # Maximum 100 unique labels are allowed per CSV row. - # Sample rows: - # TRAIN,"They have bad food and very rude",RudeService,BadFood - # TRAIN,gs://folder/content.txt,SlowService - # TEST,"Typically always bad service there.",RudeService - # VALIDATE,"Stomach ache to go.",BadFood - # - # * For Text Sentiment: - # CSV file(s) with each line in format: - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT - # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If - # the column content is a valid gcs file path, that is, prefixed by - # "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated - # as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path - # must lead to a .txt file with UTF-8 encoding, for example, - # "gs://folder/content.txt", and the content in it is extracted - # as a text snippet. In TEXT_SNIPPET case, the column content itself - # is treated as to be imported text snippet. In both cases, the - # text snippet must be up to 500 characters long. - # Sample rows: - # TRAIN,"@freewrytin this is way too good for your product",2 - # TRAIN,"I need this product so bad",3 - # TEST,"Thank you for this product.",4 - # VALIDATE,gs://folder/content.txt,2 - # - # * For Tables: - # Either - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or - # - # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source} - # can be used. All inputs is concatenated into a single - # - # [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] - # For gcs_source: - # CSV file(s), where the first row of the first file is the header, - # containing unique column names. If the first row of a subsequent - # file is the same as the header, then it is also treated as a - # header. All other rows contain values for the corresponding - # columns. - # Each .CSV file by itself must be 10GB or smaller, and their total - # size must be 100GB or smaller. - # First three sample rows of a CSV file: - # "Id","First Name","Last Name","Dob","Addresses" - # - # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" - # - # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} - # For bigquery_source: - # An URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # An imported table must have between 2 and 1,000 columns, inclusive, - # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 - # import data running in parallel. - # Definitions: - # ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" - # Describes how the given example (file) should be used for model - # training. "UNASSIGNED" can be used when user has no preference. - # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png". - # LABEL = A display name of an object on an image, video etc., e.g. "dog". - # Must be up to 32 characters long and can consist only of ASCII - # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. - # For each label an AnnotationSpec is created which display_name - # becomes the label; AnnotationSpecs are given back in predictions. - # INSTANCE_ID = A positive integer that identifies a specific instance of a - # labeled entity on an example. Used e.g. to track two cars on - # a video while being able to tell apart which one is which. - # BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,, - # A rectangle parallel to the frame of the example (image, - # video). If 4 vertices are given they are connected by edges - # in the order provided, if 2 are given they are recognized - # as diagonally opposite vertices of the rectangle. - # VERTEX = COORDINATE,COORDINATE - # First coordinate is horizontal (x), the second is vertical (y). - # COORDINATE = A float in 0 to 1 range, relative to total length of - # image or video in given dimension. For fractions the - # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). - # Point 0,0 is in top left. - # TIME_SEGMENT_START = TIME_OFFSET - # Expresses a beginning, inclusive, of a time segment - # within an example that has a time dimension - # (e.g. video). - # TIME_SEGMENT_END = TIME_OFFSET - # Expresses an end, exclusive, of a time segment within - # an example that has a time dimension (e.g. video). - # TIME_OFFSET = A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed, and it means the end - # of the example. - # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within - # double quotes (""). - # SENTIMENT = An integer between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max - # (inclusive). Describes the ordinal of the sentiment - higher - # value means a more positive sentiment. All the values are - # completely relative, i.e. neither 0 needs to mean a negative or - # neutral sentiment nor sentiment_max needs to mean a positive one - # - it is just required that 0 is the least positive sentiment - # in the data, and sentiment_max is the most positive one. - # The SENTIMENT shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - # All SENTIMENT values between 0 and sentiment_max must be - # represented in the imported data. On prediction the same 0 to - # sentiment_max range will be used. The difference between - # neighboring sentiment values needs not to be uniform, e.g. 1 and - # 2 may be similar whereas the difference between 2 and 3 may be - # huge. - # - # Errors: - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # nothing is imported. Regardless of overall success or failure the per-row - # failures, up to a certain count cap, is listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location for the input content. - # In ImportData, the gcs_source points to a csv with structure described in - # the comment. - # - # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_source - # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] - # The BigQuery location for the input content. - # - # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters describing the semantic of the - # imported data, any string must be up to 25000 - # characters long. - # - # * For Tables: - # `schema_inference_version` - (integer) Required. The version of the - # algorithm that should be used for the initial inference of the - # schema (columns' DataTypes) of the table the data is being imported - # into. Allowed values: "1". - class InputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Input configuration for BatchPredict Action. - # - # The format of input depends on the ML problem of the model used for - # prediction. As input source the - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats - # are: - # - # * For Image Classification: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH - # which leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in - # the Batch predict output. - # Three sample rows: - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # - # * For Image Object Detection: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH - # which leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in - # the Batch predict output. - # Three sample rows: - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # * For Video Classification: - # CSV file(s) with each line in format: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h - # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. - # Three sample rows: - # gs://folder/video1.mp4,10,40 - # gs://folder/video1.mp4,20,60 - # gs://folder/vid2.mov,0,inf - # - # * For Video Object Tracking: - # CSV file(s) with each line in format: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h - # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. - # Three sample rows: - # gs://folder/video1.mp4,10,240 - # gs://folder/video1.mp4,300,360 - # gs://folder/vid2.mov,0,inf - # * For Text Classification: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH | TEXT_SNIPPET - # Any given text file can have size upto 128kB. - # Any given text snippet content must have 60,000 characters or less. - # Three sample rows: - # gs://folder/text1.txt - # "Some text content to predict" - # gs://folder/text3.pdf - # Supported file extensions: .txt, .pdf - # - # * For Text Sentiment: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH | TEXT_SNIPPET - # Any given text file can have size upto 128kB. - # Any given text snippet content must have 500 characters or less. - # Three sample rows: - # gs://folder/text1.txt - # "Some text content to predict" - # gs://folder/text3.pdf - # Supported file extensions: .txt, .pdf - # - # * For Text Extraction - # .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or - # as documents (for a single BatchPredict call only one of the these - # formats may be used). - # The in-line .JSONL file(s) contain per line a proto that - # wraps a temporary user-assigned TextSnippet ID (string up to 2000 - # characters long) called "id", a TextSnippet proto (in - # json representation) and zero or more TextFeature protos. Any given - # text snippet content must have 30,000 characters or less, and also - # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be - # unique. - # The document .JSONL file(s) contain, per line, a proto that wraps a - # Document proto with input_config set. Only PDF documents are - # supported now, and each document must be up to 2MB large. - # Any given .JSONL file must be 100MB or smaller, and no more than 20 - # files may be given. - # Sample in-line JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n): - # { - # "id": "my_first_id", - # "text_snippet": { "content": "dog car cat"}, - # "text_features": [ - # { - # "text_segment": \\{"start_offset": 4, "end_offset": 6}, - # "structural_type": PARAGRAPH, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.1, "y": 0.1}, - # \\{"x": 0.1, "y": 0.3}, - # \\{"x": 0.3, "y": 0.3}, - # \\{"x": 0.3, "y": 0.1}, - # ] - # }, - # } - # ], - # }\n - # { - # "id": "2", - # "text_snippet": { - # "content": "An elaborate content", - # "mime_type": "text/plain" - # } - # } - # Sample document JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n).: - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] - # } - # } - # } - # } - # - # * For Tables: - # Either - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or - # - # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source}. - # GCS case: - # CSV file(s), each by itself 10GB or smaller and total size must be - # 100GB or smaller, where first file must have a header containing - # column names. If the first row of a subsequent file is the same as - # the header, then it is also treated as a header. All other rows - # contain values for the corresponding columns. - # The column names must contain the model's - # - # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows, i.e. the CSV - # lines, will be attempted. For FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # all columns having - # - # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] - # type will be ignored. - # First three sample rows of a CSV file: - # "First Name","Last Name","Dob","Addresses" - # - # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" - # - # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} - # BigQuery case: - # An URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # The column names must contain the model's - # - # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows of the table - # will be attempted. For FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # all columns having - # - # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] - # type will be ignored. - # - # Definitions: - # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". - # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within - # double quotes ("") - # TIME_SEGMENT_START = TIME_OFFSET - # Expresses a beginning, inclusive, of a time segment - # within an - # example that has a time dimension (e.g. video). - # TIME_SEGMENT_END = TIME_OFFSET - # Expresses an end, exclusive, of a time segment within - # an example that has a time dimension (e.g. video). - # TIME_OFFSET = A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed and it means the end - # of the example. - # - # Errors: - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # prediction does not happen. Regardless of overall success or failure the - # per-row failures, up to a certain count cap, will be listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location for the input content. - # - # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_source - # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] - # The BigQuery location for the input content. - # - # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input configuration of a {::Google::Cloud::AutoML::V1beta1::Document Document}. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location of the document file. Only a single path - # should be given. - # Max supported size: 512MB. - # Supported extensions: .PDF. - class DocumentInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # * For Translation: - # CSV file `translation.csv`, with each line in format: - # ML_USE,GCS_FILE_PATH - # GCS_FILE_PATH leads to a .TSV file which describes examples that have - # given ML_USE, using the following row format per line: - # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target - # language) - # - # * For Tables: - # Output depends on whether the dataset was imported from GCS or - # BigQuery. - # GCS case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#gcs_destination gcs_destination} - # must be set. Exported are CSV file(s) `tables_1.csv`, - # `tables_2.csv`,...,`tables_N.csv` with each having as header line - # the table's column names, and all other lines contain values for - # the header columns. - # BigQuery case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # - # `export_data__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that - # dataset a new table called `primary_table` will be created, and - # filled with precisely the same data as this obtained on import. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location where the output is to be written to. - # For Image Object Detection, Text Extraction, Video Classification and - # Tables, in the given directory a new directory will be created with name: - # export_data-- where - # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export - # output will be written into that directory. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for BatchPredict Action. - # - # As destination the - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} - # must be set unless specified otherwise for a domain. If gcs_destination is - # set then in the given directory a new directory is created. Its name - # will be - # "prediction--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents - # of it depends on the ML problem the predictions are made for. - # - # * For Image Classification: - # In the created directory files `image_classification_1.jsonl`, - # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # A single image will be listed only once with all its annotations, - # and its annotations will never be split across files. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. - # If prediction for any image failed (partially or completely), then an - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # - # * For Image Object Detection: - # In the created directory files `image_object_detection_1.jsonl`, - # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have image_object_detection detail populated. A single image will - # be listed only once with all its annotations, and its annotations - # will never be split across files. - # If prediction for any image failed (partially or completely), then - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # * For Video Classification: - # In the created directory a video_classification.csv file, and a .JSON - # file per each video classification requested in the input (i.e. each - # line in given CSV(s)), will be created. - # - # The format of video_classification.csv is: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_classification.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error code - # with message otherwise. If STATUS is not "OK" then the .JSON file - # for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for the video time segment the file is assigned to in the - # video_classification.csv. All AnnotationPayload protos will have - # video_classification field set, and will be sorted by - # video_classification.type field (note that the returned types are - # governed by `classifaction_types` parameter in - # [PredictService.BatchPredictRequest.params][]). - # - # * For Video Object Tracking: - # In the created directory a video_object_tracking.csv file will be - # created, and multiple files video_object_trackinng_1.json, - # video_object_trackinng_2.json,..., video_object_trackinng_N.json, - # where N is the number of requests in the input (i.e. the number of - # lines in given CSV(s)). - # - # The format of video_object_tracking.csv is: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_object_tracking.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error - # code with message otherwise. If STATUS is not "OK" then the .JSON - # file for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for each frame of the video time segment the file is assigned to in - # video_object_tracking.csv. All AnnotationPayload protos will have - # video_object_tracking field set. - # * For Text Classification: - # In the created directory files `text_classification_1.jsonl`, - # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text snippet or input text file and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. A single text snippet or file - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any text snippet or file failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input text snippet or input text file followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Sentiment: - # In the created directory files `text_sentiment_1.jsonl`, - # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text snippet or input text file and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have text_sentiment detail populated. A single text snippet or file - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any text snippet or file failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input text snippet or input text file followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Extraction: - # In the created directory files `text_extraction_1.jsonl`, - # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # The contents of these .JSONL file(s) depend on whether the input - # used inline text, or documents. - # If input was inline, then each .JSONL file will contain, per line, - # a JSON representation of a proto that wraps given in request text - # snippet's "id" (if specified), followed by input text snippet, - # and a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated. A single text snippet will be - # listed only once with all its annotations, and its annotations will - # never be split across files. - # If input used documents, then each .JSONL file will contain, per - # line, a JSON representation of a proto that wraps given in request - # document proto, followed by its OCR-ed representation in the form - # of a text snippet, finally followed by a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated and refer, via their indices, to - # the OCR-ed text snippet. A single document (and its text snippet) - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # If prediction for any text snippet failed (partially or completely), - # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps either the "id" : "" (in case of inline) - # or the document proto (in case of document) but here followed by - # exactly one - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Tables: - # Output depends on whether - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} - # or - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#bigquery_destination bigquery_destination} - # is set (either is allowed). - # GCS case: - # In the created directory files `tables_1.csv`, `tables_2.csv`,..., - # `tables_N.csv` will be created, where N may be 1, and depends on - # the total number of the successfully predicted rows. - # For all CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # given on input followed by M target column names in the format of - # - # "<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>__score" where M is the number of distinct target values, - # i.e. number of distinct values in the target column of the table - # used to train the model. Subsequent lines will contain the - # respective values of successfully predicted rows, with the last, - # i.e. the target, columns having the corresponding prediction - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation#score scores}. - # For REGRESSION and FORECASTING - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # [display_name-s][google.cloud.automl.v1beta1.display_name] given - # on input followed by the predicted target column with name in the - # format of - # - # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" - # Subsequent lines will contain the respective values of - # successfully predicted rows, with the last, i.e. the target, - # column having the predicted target value. - # If prediction for any rows failed, then an additional - # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be - # created (N depends on total number of failed rows). These files - # will have analogous format as `tables_*.csv`, but always with a - # single target column having - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a JSON string, and containing only `code` and - # `message`. - # BigQuery case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # `prediction__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset - # two tables will be created, `predictions`, and `errors`. - # The `predictions` table's column names will be the input columns' - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # followed by the target column with name in the format of - # - # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" - # The input feature columns will contain the respective values of - # successfully predicted rows, with the target column having an - # ARRAY of - # - # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, - # represented as STRUCT-s, containing - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. - # The `errors` table contains rows for which the prediction has - # failed, it has analogous input columns while the target column name - # is in the format of - # - # "errors_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>", - # and as a value has - # - # [`google.rpc.Status`](https: - # //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a STRUCT, and containing only `code` and `message`. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location of the directory where the output is to - # be written to. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for ModelExport Action. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location where the model is to be written to. - # This location may only be set for the following model formats: - # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". - # - # Under the directory given as the destination a new one with name - # "model-export--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, - # will be created. Inside the model and any of its supporting files - # will be written. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `gcr_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcr_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcrDestination] - # The GCR location where model image is to be pushed to. This location - # may only be set for the following model formats: - # "docker". - # - # The model image will be created under the given URI. - # - # Note: The following fields are mutually exclusive: `gcr_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] model_format - # @return [::String] - # The format in which the model must be exported. The available, and default, - # formats depend on the problem and model type (if given problem and type - # combination doesn't have a format listed, it means its models are not - # exportable): - # - # * For Image Classification mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", - # "docker". - # - # * For Image Classification mobile-core-ml-low-latency-1, - # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: - # "core_ml" (default). - # - # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite", "tf_saved_model", "tf_js". - # - # * For Video Classification cloud, - # "tf_saved_model". - # - # * For Video Object Tracking cloud, - # "tf_saved_model". - # - # * For Video Object Tracking mobile-versatile-1: - # "tflite", "edgetpu_tflite", "tf_saved_model", "docker". - # - # * For Video Object Tracking mobile-coral-versatile-1: - # "tflite", "edgetpu_tflite", "docker". - # - # * For Video Object Tracking mobile-coral-low-latency-1: - # "tflite", "edgetpu_tflite", "docker". - # - # * For Video Object Tracking mobile-jetson-versatile-1: - # "tf_saved_model", "docker". - # - # * For Tables: - # "docker". - # - # Formats description: - # - # * tflite - Used for Android mobile devices. - # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) - # devices. - # * tf_saved_model - A tensorflow model in SavedModel format. - # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can - # be used in the browser and in Node.js using JavaScript. - # * docker - Used for Docker containers. Use the params field to customize - # the container. The container is verified to work correctly on - # ubuntu 16.04 operating system. See more at - # [containers - # - # quickstart](https: - # //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) - # * core_ml - Used for iOS mobile devices. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional model-type and format specific parameters describing the - # requirements for the to be exported model files, any string must be up to - # 25000 characters long. - # - # * For `docker` format: - # `cpu_architecture` - (string) "x86_64" (default). - # `gpu_architecture` - (string) "none" (default), "nvidia". - class ModelExportOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Output configuration for ExportEvaluatedExamples Action. Note that this call - # is available only for 30 days since the moment the model was evaluated. - # The output depends on the domain, as follows (note that only examples from - # the TEST set are exported): - # - # * For Tables: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # - # `export_evaluated_examples__` - # where will be made BigQuery-dataset-name - # compatible (e.g. most special characters will become underscores), - # and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" - # format. In the dataset an `evaluated_examples` table will be - # created. It will have all the same columns as the - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id primary_table} - # of the - # {::Google::Cloud::AutoML::V1beta1::Model#dataset_id dataset} from which - # the model was created, as they were at the moment of model's - # evaluation (this includes the target column with its ground - # truth), followed by a column called "predicted_". That - # last column will contain the model's prediction result for each - # respective row, given as ARRAY of - # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, - # represented as STRUCT-s, containing - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - class ExportEvaluatedExamplesOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location for the input content. - # @!attribute [rw] input_uris - # @return [::Array<::String>] - # Required. Google Cloud Storage URIs to input files, up to 2000 characters - # long. Accepted forms: - # * Full object path, e.g. gs://bucket/directory/object.csv - class GcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The BigQuery location for the input content. - # @!attribute [rw] input_uri - # @return [::String] - # Required. BigQuery URI to a table, up to 2000 characters long. - # Accepted forms: - # * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId - class BigQuerySource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location where the output is to be written to. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Required. Google Cloud Storage URI to output directory, up to 2000 - # characters long. - # Accepted forms: - # * Prefix path: gs://bucket/directory - # The requesting user must have write permission to the bucket. - # The directory is created if it doesn't exist. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The BigQuery location for the output content. - # @!attribute [rw] output_uri - # @return [::String] - # Required. BigQuery URI to a project, up to 2000 characters long. - # Accepted forms: - # * BigQuery path e.g. bq://projectId - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The GCR location where the image must be pushed to. - # @!attribute [rw] output_uri - # @return [::String] - # Required. Google Contained Registry URI of the new image, up to 2000 - # characters long. See - # - # https: - # //cloud.google.com/container-registry/do - # // cs/pushing-and-pulling#pushing_an_image_to_a_registry - # Accepted forms: - # * [HOSTNAME]/[PROJECT-ID]/[IMAGE] - # * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] - # - # The requesting user must have permission to push images the project. - class GcrDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb deleted file mode 100644 index 6e167f65d37b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # API proto representing a trained machine learning model. - # @!attribute [rw] translation_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TranslationModelMetadata] - # Metadata for translation models. - # - # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata] - # Metadata for image classification models. - # - # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationModelMetadata] - # Metadata for text classification models. - # - # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelMetadata] - # Metadata for image object detection models. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationModelMetadata] - # Metadata for video classification models. - # - # Note: The following fields are mutually exclusive: `video_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingModelMetadata] - # Metadata for video object tracking models. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionModelMetadata] - # Metadata for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TablesModelMetadata] - # Metadata for Tables models. - # - # Note: The following fields are mutually exclusive: `tables_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentModelMetadata] - # Metadata for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model. - # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the model to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. It must start with a letter. - # @!attribute [rw] dataset_id - # @return [::String] - # Required. The resource ID of the dataset used to create the model. The dataset must - # come from the same ancestor project and location. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the model training finished and can be used for prediction. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model was last updated. - # @!attribute [rw] deployment_state - # @return [::Google::Cloud::AutoML::V1beta1::Model::DeploymentState] - # Output only. Deployment state of the model. A model can only serve - # prediction requests after it gets deployed. - class Model - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Deployment state of the model. - module DeploymentState - # Should not be used, an un-set enum has this value by default. - DEPLOYMENT_STATE_UNSPECIFIED = 0 - - # Model is deployed. - DEPLOYED = 1 - - # Model is not deployed. - UNDEPLOYED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb deleted file mode 100644 index 86132556d0f6..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb +++ /dev/null @@ -1,117 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Evaluation results of a model. - # @!attribute [rw] classification_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics] - # Model evaluation metrics for image, text, video and tables - # classification. - # Tables problem is considered a classification when the target column - # is CATEGORY DataType. - # - # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regression_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::RegressionEvaluationMetrics] - # Model evaluation metrics for Tables regression. - # Tables problem is considered a regression when the target column - # has FLOAT64 DataType. - # - # Note: The following fields are mutually exclusive: `regression_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TranslationEvaluationMetrics] - # Model evaluation metrics for translation. - # - # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionEvaluationMetrics] - # Model evaluation metrics for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingEvaluationMetrics] - # Model evaluation metrics for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentEvaluationMetrics] - # Evaluation metrics for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics] - # Evaluation metrics for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model evaluation. - # Format: - # - # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only. The ID of the annotation spec that the model evaluation applies to. The - # The ID is empty for the overall model evaluation. - # For Tables annotation specs in the dataset do not exist and this ID is - # always not set, but for CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # the - # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#display_name display_name} - # field is used. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} at - # the moment when the model was trained. Because this field returns a value - # at model training time, for different models trained from the same dataset, - # the values may differ, since display names could had been changed between - # the two model's trainings. - # For Tables CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # distinct values of the target column at the moment of the model evaluation - # are populated here. - # The display_name is empty for the overall model evaluation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model evaluation was created. - # @!attribute [rw] evaluated_example_count - # @return [::Integer] - # Output only. The number of examples used for model evaluation, i.e. for - # which ground truth from time of model creation is compared against the - # predicted annotations created by the model. - # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is - # the total number of all examples used for evaluation. - # Otherwise, this is the count of examples that according to the ground - # truth were annotated by the - # - # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#annotation_spec_id annotation_spec_id}. - class ModelEvaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb deleted file mode 100644 index 6920b67fbe65..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb +++ /dev/null @@ -1,232 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Metadata used across all long running operations returned by AutoML API. - # @!attribute [rw] delete_details - # @return [::Google::Cloud::AutoML::V1beta1::DeleteOperationMetadata] - # Details of a Delete operation. - # - # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deploy_model_details - # @return [::Google::Cloud::AutoML::V1beta1::DeployModelOperationMetadata] - # Details of a DeployModel operation. - # - # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] undeploy_model_details - # @return [::Google::Cloud::AutoML::V1beta1::UndeployModelOperationMetadata] - # Details of an UndeployModel operation. - # - # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_model_details - # @return [::Google::Cloud::AutoML::V1beta1::CreateModelOperationMetadata] - # Details of CreateModel operation. - # - # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] import_data_details - # @return [::Google::Cloud::AutoML::V1beta1::ImportDataOperationMetadata] - # Details of ImportData operation. - # - # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] batch_predict_details - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata] - # Details of BatchPredict operation. - # - # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_data_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata] - # Details of ExportData operation. - # - # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_model_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata] - # Details of ExportModel operation. - # - # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_evaluated_examples_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata] - # Details of ExportEvaluatedExamples operation. - # - # Note: The following fields are mutually exclusive: `export_evaluated_examples_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Output only. Progress of operation. Range: [0, 100]. - # Not used currently. - # @!attribute [rw] partial_failures - # @return [::Array<::Google::Rpc::Status>] - # Output only. Partial failures encountered. - # E.g. single files that couldn't be read. - # This field should never exceed 20 entries. - # Status details field will contain standard GCP error details. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was updated for the last time. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of operations that perform deletes of any entities. - class DeleteOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of DeployModel operation. - class DeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of UndeployModel operation. - class UndeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of CreateModel operation. - class CreateModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ImportData operation. - class ImportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ExportData operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata::ExportDataOutputInfo] - # Output only. Information further describing this export data's output. - class ExportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this export data's output. - # Supplements - # {::Google::Cloud::AutoML::V1beta1::OutputConfig OutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the exported data is written. - # - # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the exported data is written. - # - # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExportDataOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of BatchPredict operation. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] - # Output only. The input config that was given upon starting this - # batch predict operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata::BatchPredictOutputInfo] - # Output only. Information further describing this batch predict's output. - class BatchPredictOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this batch predict's output. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig BatchPredictOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the prediction output is written. - # - # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the prediction output is written. - # - # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of ExportModel operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata::ExportModelOutputInfo] - # Output only. Information further describing the output of this model - # export. - class ExportModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes the output of model export. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the model will be exported. - class ExportModelOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of EvaluatedExamples operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo] - # Output only. Information further describing the output of this evaluated - # examples export. - class ExportEvaluatedExamplesOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes the output of the evaluated examples export. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig ExportEvaluatedExamplesOutputConfig}. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the output of export evaluated examples is written. - class ExportEvaluatedExamplesOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb deleted file mode 100644 index 87c78db799ad..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb +++ /dev/null @@ -1,238 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the prediction. - # @!attribute [rw] payload - # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - class PredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] payload - # @return [::Array<::Google::Cloud::AutoML::V1beta1::AnnotationPayload>] - # Prediction result. - # Translation and Text Sentiment will return precisely one payload. - # @!attribute [rw] preprocessed_input - # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] - # The preprocessed example that AutoML actually makes prediction on. - # Empty if AutoML does not preprocess the input example. - # * For Text Extraction: - # If the input is a .pdf file, the OCR'ed text will be provided in - # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # * For Image Object Detection: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # image could have been returned. - # - # * For Text Sentiment: - # `sentiment_score` - (float, deprecated) A value between -1 and 1, - # -1 maps to least positive sentiment, while 1 maps to the most positive - # one and the higher the score, the more positive the sentiment in the - # document is. Yet these values are relative to the training data, so - # e.g. if all data was positive then -1 will be also positive (though - # the least). - # The sentiment_score shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - class PredictResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the batch prediction. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] - # Required. The input configuration for batch prediction. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig] - # Required. The Configuration specifying where output predictions should - # be written. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - class BatchPredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the Batch Predict. This message is returned in - # {::Google::Longrunning::Operation#response response} of the operation returned - # by the {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # * For Image Object Detection: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # image could have been returned. - # - # * For Video Object Tracking: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # frame could have been returned. - class BatchPredictResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb deleted file mode 100644 index 7fc488386a6c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A range between two double numbers. - # @!attribute [rw] start - # @return [::Float] - # Start of the range, inclusive. - # @!attribute [rw] end - # @return [::Float] - # End of the range, exclusive. - class DoubleRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb deleted file mode 100644 index 147832f1fabb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Metrics for regression problems. - # @!attribute [rw] root_mean_squared_error - # @return [::Float] - # Output only. Root Mean Squared Error (RMSE). - # @!attribute [rw] mean_absolute_error - # @return [::Float] - # Output only. Mean Absolute Error (MAE). - # @!attribute [rw] mean_absolute_percentage_error - # @return [::Float] - # Output only. Mean absolute percentage error. Only set if all ground truth - # values are are positive. - # @!attribute [rw] r_squared - # @return [::Float] - # Output only. R squared. - # @!attribute [rw] root_mean_squared_log_error - # @return [::Float] - # Output only. Root mean squared log error. - class RegressionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb deleted file mode 100644 index 1c76959322fb..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset AutoMl.CreateDataset}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project to create the dataset for. - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # Required. The dataset to create. - class CreateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset AutoMl.GetDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to retrieve. - class GetDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project from which to list datasets. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - class ListDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Dataset>] - # The datasets read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. - class ListDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset AutoMl.UpdateDataset} - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # Required. The dataset which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to delete. - class DeleteDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData}. - # @!attribute [rw] name - # @return [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] - # Required. The desired input location and its domain specific semantics, - # if any. - class ImportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data AutoMl.ExportData}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::OutputConfig] - # Required. The desired output location. - class ExportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the annotation spec to retrieve. - class GetAnnotationSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec AutoMl.GetTableSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the table spec to retrieve. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - class GetTableSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the dataset to list table specs from. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - # @!attribute [rw] filter - # @return [::String] - # Filter expression, see go/filtering. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. - class ListTableSpecsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. - # @!attribute [rw] table_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # The table specs read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest#page_token ListTableSpecsRequest.page_token} to obtain that page. - class ListTableSpecsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec AutoMl.UpdateTableSpec} - # @!attribute [rw] table_spec - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # Required. The table spec which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateTableSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec AutoMl.GetColumnSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the column spec to retrieve. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - class GetColumnSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the table spec to list column specs from. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - # @!attribute [rw] filter - # @return [::String] - # Filter expression, see go/filtering. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. - class ListColumnSpecsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. - # @!attribute [rw] column_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # The column specs read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest#page_token ListColumnSpecsRequest.page_token} to obtain that page. - class ListColumnSpecsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec AutoMl.UpdateColumnSpec} - # @!attribute [rw] column_spec - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # Required. The column spec which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateColumnSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model AutoMl.CreateModel}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent project where the model is being created. - # @!attribute [rw] model - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # Required. The model to create. - class CreateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model AutoMl.GetModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model. - class GetModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project, from which to list the models. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. - class ListModelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] model - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Model>] - # List of models in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. - class ListModelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model AutoMl.DeleteModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model being deleted. - class DeleteModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model AutoMl.DeployModel}. - # @!attribute [rw] image_object_detection_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata] - # Model deployment metadata specific to Image Classification. - # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to deploy. - class DeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to undeploy. - class UndeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}. - # Models need to be enabled for exporting, otherwise an error code will be - # returned. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model to export. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig] - # Required. The desired output location and configuration. - class ExportModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples AutoMl.ExportEvaluatedExamples}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model whose evaluated examples are to - # be exported. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig] - # Required. The desired output location and configuration. - class ExportEvaluatedExamplesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the model evaluation. - class GetModelEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - class ListModelEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] model_evaluation - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # List of model evaluations in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to the {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. - class ListModelEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb deleted file mode 100644 index adc8f6e775c4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A specification of a relational table. - # The table's schema is represented via its child column specs. It is - # pre-populated as part of ImportData by schema inference algorithm, the - # version of which is a required parameter of ImportData InputConfig. - # Note: While working with a table, at times the schema may be - # inconsistent with the data in the table (e.g. string in a FLOAT64 column). - # The consistency validation is done upon creation of a model. - # Used by: - # * Tables - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the table spec. - # Form: - # - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` - # @!attribute [rw] time_column_spec_id - # @return [::String] - # column_spec_id of the time column. Only used if the parent dataset's - # ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE - # and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and - # those in between to VALIDATE. - # Required type: TIMESTAMP. - # If both this column and ml_use_column are not set, then ML use of all rows - # will be assigned by AutoML. NOTE: Updates of this field will instantly - # affect any other users concurrently working with the dataset. - # @!attribute [rw] row_count - # @return [::Integer] - # Output only. The number of rows (i.e. examples) in the table. - # @!attribute [rw] valid_row_count - # @return [::Integer] - # Output only. The number of valid rows (i.e. without values that don't match - # DataType-s of their columns). - # @!attribute [rw] column_count - # @return [::Integer] - # Output only. The number of columns of the table. That is, the number of - # child ColumnSpec-s. - # @!attribute [rw] input_configs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::InputConfig>] - # Output only. Input configs via which data currently residing in the table - # had been imported. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class TableSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb deleted file mode 100644 index cb70cab357c4..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb +++ /dev/null @@ -1,304 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Metadata for a dataset used for AutoML Tables. - # @!attribute [rw] primary_table_spec_id - # @return [::String] - # Output only. The table_spec_id of the primary table of this dataset. - # @!attribute [rw] target_column_spec_id - # @return [::String] - # column_spec_id of the primary table's column that should be used as the - # training & prediction target. - # This column must be non-nullable and have one of following data types - # (otherwise model creation will error): - # - # * CATEGORY - # - # * FLOAT64 - # - # If the type is CATEGORY , only up to - # 100 unique values may exist in that column across all rows. - # - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] weight_column_spec_id - # @return [::String] - # column_spec_id of the primary table's column that should be used as the - # weight column, i.e. the higher the value the more important the row will be - # during model training. - # Required type: FLOAT64. - # Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is - # ignored for training. - # If not set all rows are assumed to have equal weight of 1. - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] ml_use_column_spec_id - # @return [::String] - # column_spec_id of the primary table column which specifies a possible ML - # use of the row, i.e. the column will be used to split the rows into TRAIN, - # VALIDATE and TEST sets. - # Required type: STRING. - # This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` - # among its values, or only have `TEST`, `UNASSIGNED` values. In the latter - # case the rows with `UNASSIGNED` value will be assigned by AutoML. Note - # that if a given ml use distribution makes it impossible to create a "good" - # model, that call will error describing the issue. - # If both this column_spec_id and primary table's time_column_spec_id are not - # set, then all rows are treated as `UNASSIGNED`. - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] target_column_correlations - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::CorrelationStats}] - # Output only. Correlations between - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#target_column_spec_id TablesDatasetMetadata.target_column_spec_id}, - # and other columns of the - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id TablesDatasetMetadataprimary_table}. - # Only set if the target column is set. Mapping from other column spec id to - # its CorrelationStats with the target column. - # This field may be stale, see the stats_update_time field for - # for the timestamp at which these stats were last updated. - # @!attribute [rw] stats_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent timestamp when target_column_correlations - # field and all descendant ColumnSpec.data_stats and - # ColumnSpec.top_correlated_columns fields were last (re-)generated. Any - # changes that happened to the dataset afterwards are not reflected in these - # fields values. The regeneration happens in the background on a best effort - # basis. - class TablesDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] - class TargetColumnCorrelationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Model metadata specific to AutoML Tables. - # @!attribute [rw] optimization_objective_recall_value - # @return [::Float] - # Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". - # Must be between 0 and 1, inclusive. - # - # Note: The following fields are mutually exclusive: `optimization_objective_recall_value`, `optimization_objective_precision_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] optimization_objective_precision_value - # @return [::Float] - # Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". - # Must be between 0 and 1, inclusive. - # - # Note: The following fields are mutually exclusive: `optimization_objective_precision_value`, `optimization_objective_recall_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target_column_spec - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # Column spec of the dataset's primary table's column the model is - # predicting. Snapshotted when model creation started. - # Only 3 fields are used: - # name - May be set on CreateModel, if it's not then the ColumnSpec - # corresponding to the current target_column_spec_id of the dataset - # the model is trained from is used. - # If neither is set, CreateModel will error. - # display_name - Output only. - # data_type - Output only. - # @!attribute [rw] input_feature_column_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # Column specs of the dataset's primary table's columns, on which - # the model is trained and which are used as the input for predictions. - # The - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column} - # as well as, according to dataset's state upon model creation, - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#weight_column_spec_id weight_column}, - # and - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#ml_use_column_spec_id ml_use_column} - # must never be included here. - # - # Only 3 fields are used: - # - # * name - May be set on CreateModel, if set only the columns specified are - # used, otherwise all primary table's columns (except the ones listed - # above) are used for the training and prediction input. - # - # * display_name - Output only. - # - # * data_type - Output only. - # @!attribute [rw] optimization_objective - # @return [::String] - # Objective function the model is optimizing towards. The training process - # creates a model that maximizes/minimizes the value of the objective - # function over the validation set. - # - # The supported optimization objectives depend on the prediction type. - # If the field is not set, a default objective function is used. - # - # CLASSIFICATION_BINARY: - # "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver - # operating characteristic (ROC) curve. - # "MINIMIZE_LOG_LOSS" - Minimize log loss. - # "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve. - # "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified - # recall value. - # "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified - # precision value. - # - # CLASSIFICATION_MULTI_CLASS : - # "MINIMIZE_LOG_LOSS" (default) - Minimize log loss. - # - # - # REGRESSION: - # "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). - # "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). - # "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE). - # @!attribute [rw] tables_model_column_info - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] - # Output only. Auxiliary information for each of the - # input_feature_column_specs with respect to this particular model. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # Required. The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. - # - # The training cost of the model will not exceed this budget. The final cost - # will be attempted to be close to the budget, though may end up being (even) - # noticeably smaller - at the backend's discretion. This especially may - # happen when further model training ceases to provide any improvements. - # - # If the budget is set to a value known to be insufficient to train a - # model for the given dataset, the training won't be attempted and - # will error. - # - # The train budget must be between 1,000 and 72,000 milli node hours, - # inclusive. - # @!attribute [rw] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual training cost of the model, expressed in milli - # node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed - # to not exceed the train budget. - # @!attribute [rw] disable_early_stopping - # @return [::Boolean] - # Use the entire training budget. This disables the early stopping feature. - # By default, the early stopping feature is enabled, which means that AutoML - # Tables might stop training before the entire training budget has been used. - class TablesModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains annotation details specific to Tables. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher - # value means greater confidence in the returned value. - # For - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} - # of FLOAT64 data type the score is not populated. - # @!attribute [rw] prediction_interval - # @return [::Google::Cloud::AutoML::V1beta1::DoubleRange] - # Output only. Only populated when - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} - # has FLOAT64 data type. An interval in which the exactly correct target - # value has 95% chance to be in. - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - # The predicted value of the row's - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column}. - # The value depends on the column's DataType: - # - # * CATEGORY - the predicted (with the above confidence `score`) CATEGORY - # value. - # - # * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. - # @!attribute [rw] tables_model_column_info - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] - # Output only. Auxiliary information for each of the model's - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs input_feature_column_specs} - # with respect to this particular prediction. - # If no other fields than - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_spec_name column_spec_name} - # and - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_display_name column_display_name} - # would be populated, then this whole field is not. - # @!attribute [rw] baseline_score - # @return [::Float] - # Output only. Stores the prediction score for the baseline example, which - # is defined as the example with all values set to their baseline values. - # This is used as part of the Sampled Shapley explanation of the model's - # prediction. This field is populated only when feature importance is - # requested. For regression models, this holds the baseline prediction for - # the baseline example. For classification models, this holds the baseline - # prediction for the baseline example for the argmax class. - class TablesAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An information specific to given column and Tables Model, in context - # of the Model and the predictions created by it. - # @!attribute [rw] column_spec_name - # @return [::String] - # Output only. The name of the ColumnSpec describing the column. Not - # populated when this proto is outputted to BigQuery. - # @!attribute [rw] column_display_name - # @return [::String] - # Output only. The display name of the column (same as the display_name of - # its ColumnSpec). - # @!attribute [rw] feature_importance - # @return [::Float] - # Output only. When given as part of a Model (always populated): - # Measurement of how much model predictions correctness on the TEST data - # depend on values in this column. A value between 0 and 1, higher means - # higher influence. These values are normalized - for all input feature - # columns of a given model they add to 1. - # - # When given back by Predict (populated iff - # [feature_importance - # param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch - # Predict (populated iff - # {::Google::Cloud::AutoML::V1beta1::PredictRequest#params feature_importance} - # param is set): - # Measurement of how impactful for the prediction returned for the given row - # the value in this column was. Specifically, the feature importance - # specifies the marginal contribution that the feature made to the prediction - # score compared to the baseline score. These values are computed using the - # Sampled Shapley method. - class TablesModelColumnInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb deleted file mode 100644 index 0214a830f15a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A time period inside of an example that has a time dimension (e.g. video). - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Start of the time segment (inclusive), represented as the duration since - # the example start. - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # End of the time segment (exclusive), represented as the duration since the - # example start. - class TimeSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb deleted file mode 100644 index 1c3b18d079ef..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata for classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Required. Type of the classification problem. - class TextClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Output only. Classification type of the dataset used to train this model. - class TextClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata that is specific to text extraction - class TextExtractionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text extraction. - # @!attribute [rw] model_hint - # @return [::String] - # Indicates the scope of model use case. - # - # * `default`: Use to train a general text extraction model. Default value. - # - # * `health_care`: Use to train a text extraction model that is tuned for - # healthcare applications. - class TextExtractionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata for text sentiment. - # @!attribute [rw] sentiment_max - # @return [::Integer] - # Required. A sentiment is expressed as an integer ordinal, where higher value - # means a more positive sentiment. The range of sentiments that will be used - # is between 0 and sentiment_max (inclusive on both ends), and all the values - # in the range must be represented in the dataset before a model can be - # created. - # sentiment_max value must be between 1 and 10 (inclusive). - class TextSentimentDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text sentiment. - class TextSentimentModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb deleted file mode 100644 index ca5b21931f3b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Annotation for identifying spans of text. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] - # An entity annotation will set this, which is the part of the original - # text to which the annotation pertains. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence in correctness of the annotation. - class TextExtractionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text extraction problems. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area under precision recall curve metric. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics that have confidence thresholds. - # Precision-recall curve can be derived from it. - class TextExtractionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # Only annotations with score of at least this threshold are considered to - # be ones the model would return. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb deleted file mode 100644 index 0ab880d1d0de..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. - # @!attribute [rw] content - # @return [::String] - # Output only. The content of the TextSegment. - # @!attribute [rw] start_offset - # @return [::Integer] - # Required. Zero-based character index of the first character of the text - # segment (counting characters from the beginning of the text). - # @!attribute [rw] end_offset - # @return [::Integer] - # Required. Zero-based character index of the first character past the end of - # the text segment (counting character from the beginning of the text). - # The character at the end_offset is NOT included in the text segment. - class TextSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb deleted file mode 100644 index 9b48bef95e98..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Contains annotation details specific to text sentiment. - # @!attribute [rw] sentiment - # @return [::Integer] - # Output only. The sentiment with the semantic, as given to the - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used - # for the prediction had been trained. - # The sentiment values are between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), - # with higher value meaning more positive sentiment. They are completely - # relative, i.e. 0 means least positive sentiment and sentiment_max means - # the most positive from the sentiments present in the train data. Therefore - # e.g. if train data had only negative sentiment, then sentiment_max, would - # be still negative (although least negative). - # The sentiment shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - class TextSentimentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text sentiment problems. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] mean_absolute_error - # @return [::Float] - # Output only. Mean absolute error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] mean_squared_error - # @return [::Float] - # Output only. Mean squared error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] linear_kappa - # @return [::Float] - # Output only. Linear weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] quadratic_kappa - # @return [::Float] - # Output only. Quadratic weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for the overall model evaluation, not for evaluation of a single - # annotation spec. - # @!attribute [rw] annotation_spec_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # Output only. The annotation spec ids used for this evaluation. - # Deprecated . - class TextSentimentEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb deleted file mode 100644 index 4826f3a2fb6f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata that is specific to translation. - # @!attribute [rw] source_language_code - # @return [::String] - # Required. The BCP-47 language code of the source language. - # @!attribute [rw] target_language_code - # @return [::String] - # Required. The BCP-47 language code of the target language. - class TranslationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluation metrics for the dataset. - # @!attribute [rw] bleu_score - # @return [::Float] - # Output only. BLEU score. - # @!attribute [rw] base_bleu_score - # @return [::Float] - # Output only. BLEU score for base model. - class TranslationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to translation. - # @!attribute [rw] base_model - # @return [::String] - # The resource name of the model to use as a baseline to train the custom - # model. If unset, we use the default base model provided by Google - # Translate. Format: - # `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] source_language_code - # @return [::String] - # Output only. Inferred from the dataset. - # The source languge (The BCP-47 language code) that is used for training. - # @!attribute [rw] target_language_code - # @return [::String] - # Output only. The target languge (The BCP-47 language code) that is used for - # training. - class TranslationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation details specific to translation. - # @!attribute [rw] translated_content - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # Output only . The translated content. - class TranslationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb deleted file mode 100644 index 8c029ee5303b..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata specific to video classification. - # All Video Classification datasets are treated as multi label. - class VideoClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata specific to video object tracking. - class VideoObjectTrackingDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to video classification. - class VideoClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to video object tracking. - class VideoObjectTrackingModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile deleted file mode 100644 index 4af8ecce5fb8..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-automl-v1beta1", path: "../" -else - gem "google-cloud-automl-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb deleted file mode 100644 index 0a974be0868c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_CreateDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the create_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset. -# -def create_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - - # Call the create_dataset method. - result = client.create_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb deleted file mode 100644 index 22cb436527e3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/create_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_CreateModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the create_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model. -# -def create_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - - # Call the create_model method. - result = client.create_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb deleted file mode 100644 index 628da07c0d25..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_DeleteDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the delete_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset. -# -def delete_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - - # Call the delete_dataset method. - result = client.delete_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb deleted file mode 100644 index 15ca9acb6cac..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_DeleteModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the delete_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model. -# -def delete_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - - # Call the delete_model method. - result = client.delete_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb deleted file mode 100644 index 140df82eb01c..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_DeployModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the deploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model. -# -def deploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - - # Call the deploy_model method. - result = client.deploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb deleted file mode 100644 index d2be3e5b1a63..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_data.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ExportData_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data. -# -def export_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - - # Call the export_data method. - result = client.export_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb deleted file mode 100644 index ba25ff7ba592..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_evaluated_examples call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples. -# -def export_evaluated_examples - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - - # Call the export_evaluated_examples method. - result = client.export_evaluated_examples request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb deleted file mode 100644 index 7c6e81cc84b0..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/export_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ExportModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model. -# -def export_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - - # Call the export_model method. - result = client.export_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb deleted file mode 100644 index 9a97355601b2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_annotation_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec. -# -def get_annotation_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - - # Call the get_annotation_spec method. - result = client.get_annotation_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb deleted file mode 100644 index 2a52e3c32551..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetColumnSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_column_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec. -# -def get_column_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - - # Call the get_column_spec method. - result = client.get_column_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetColumnSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb deleted file mode 100644 index 68d3e53aa211..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset. -# -def get_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - - # Call the get_dataset method. - result = client.get_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb deleted file mode 100644 index e50cdc32d622..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model. -# -def get_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - - # Call the get_model method. - result = client.get_model request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - p result -end -# [END automl_v1beta1_generated_AutoML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb deleted file mode 100644 index ca4f8591f907..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_model_evaluation call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation. -# -def get_model_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - - # Call the get_model_evaluation method. - result = client.get_model_evaluation request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - p result -end -# [END automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb deleted file mode 100644 index cfe8b2137d84..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetTableSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_table_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec. -# -def get_table_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - - # Call the get_table_spec method. - result = client.get_table_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetTableSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb deleted file mode 100644 index 1cb0abe33861..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/import_data.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ImportData_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the import_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data. -# -def import_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - - # Call the import_data method. - result = client.import_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb deleted file mode 100644 index c74afd3280ca..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_column_specs call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs. -# -def list_column_specs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - - # Call the list_column_specs method. - result = client.list_column_specs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb deleted file mode 100644 index 87378a8792fc..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListDatasets_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_datasets call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets. -# -def list_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - - # Call the list_datasets method. - result = client.list_datasets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb deleted file mode 100644 index 528ea60d5c5d..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_model_evaluations call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations. -# -def list_model_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - - # Call the list_model_evaluations method. - result = client.list_model_evaluations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb deleted file mode 100644 index 82eec30e8372..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_models.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListModels_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_models call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models. -# -def list_models - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - - # Call the list_models method. - result = client.list_models request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb deleted file mode 100644 index b3ce41523371..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListTableSpecs_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_table_specs call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs. -# -def list_table_specs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - - # Call the list_table_specs method. - result = client.list_table_specs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListTableSpecs_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb deleted file mode 100644 index c4dd0d5ccf13..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UndeployModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the undeploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model. -# -def undeploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - - # Call the undeploy_model method. - result = client.undeploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_UndeployModel_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb deleted file mode 100644 index e2f0d1af6b69..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_column_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec. -# -def update_column_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - - # Call the update_column_spec method. - result = client.update_column_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb deleted file mode 100644 index a8a8c79b852f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset. -# -def update_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - - # Call the update_dataset method. - result = client.update_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb deleted file mode 100644 index 66268b4bfcd3..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_table_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec. -# -def update_table_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - - # Call the update_table_spec method. - result = client.update_table_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb deleted file mode 100644 index 181699c503a9..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_PredictionService_BatchPredict_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the batch_predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict. -# -def batch_predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - - # Call the batch_predict method. - result = client.batch_predict request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_PredictionService_BatchPredict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb deleted file mode 100644 index aaba4299f11f..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_PredictionService_Predict_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict. -# -def predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - - # Call the predict method. - result = client.predict request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - p result -end -# [END automl_v1beta1_generated_PredictionService_Predict_sync] diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json b/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json deleted file mode 100644 index 4b7ca3c8ef40..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json +++ /dev/null @@ -1,1055 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-automl-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.automl.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "automl_v1beta1_generated_PredictionService_Predict_sync", - "title": "Snippet for the predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict.", - "file": "prediction_service/predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "predict", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::PredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::PredictResponse", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" - }, - "method": { - "short_name": "Predict", - "full_name": "google.cloud.automl.v1beta1.PredictionService.Predict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1beta1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_PredictionService_BatchPredict_sync", - "title": "Snippet for the batch_predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict.", - "file": "prediction_service/batch_predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_predict", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::BatchPredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" - }, - "method": { - "short_name": "BatchPredict", - "full_name": "google.cloud.automl.v1beta1.PredictionService.BatchPredict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1beta1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_CreateDataset_sync", - "title": "Snippet for the create_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset.", - "file": "automl/create_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "CreateDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetDataset_sync", - "title": "Snippet for the get_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset.", - "file": "automl/get_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListDatasets_sync", - "title": "Snippet for the list_datasets call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets.", - "file": "automl/list_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_datasets", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListDatasets", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListDatasets", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateDataset_sync", - "title": "Snippet for the update_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset.", - "file": "automl/update_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeleteDataset_sync", - "title": "Snippet for the delete_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset.", - "file": "automl/delete_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeleteDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ImportData_sync", - "title": "Snippet for the import_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data.", - "file": "automl/import_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_data", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ImportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ImportData", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ImportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportData_sync", - "title": "Snippet for the export_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data.", - "file": "automl/export_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_data", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportData", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync", - "title": "Snippet for the get_annotation_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec.", - "file": "automl/get_annotation_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_annotation_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::AnnotationSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetAnnotationSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetTableSpec_sync", - "title": "Snippet for the get_table_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec.", - "file": "automl/get_table_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_table_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetTableSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetTableSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListTableSpecs_sync", - "title": "Snippet for the list_table_specs call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs.", - "file": "automl/list_table_specs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_table_specs", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListTableSpecs", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListTableSpecs", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateTableSpec_sync", - "title": "Snippet for the update_table_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec.", - "file": "automl/update_table_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_table_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateTableSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetColumnSpec_sync", - "title": "Snippet for the get_column_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec.", - "file": "automl/get_column_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_column_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetColumnSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetColumnSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListColumnSpecs_sync", - "title": "Snippet for the list_column_specs call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs.", - "file": "automl/list_column_specs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_column_specs", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListColumnSpecs", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync", - "title": "Snippet for the update_column_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec.", - "file": "automl/update_column_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_column_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateColumnSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_CreateModel_sync", - "title": "Snippet for the create_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model.", - "file": "automl/create_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::CreateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "CreateModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetModel_sync", - "title": "Snippet for the get_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model.", - "file": "automl/get_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Model", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListModels_sync", - "title": "Snippet for the list_models call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models.", - "file": "automl/list_models.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_models", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListModelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListModels", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModels", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeleteModel_sync", - "title": "Snippet for the delete_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model.", - "file": "automl/delete_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeleteModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeleteModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeployModel_sync", - "title": "Snippet for the deploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model.", - "file": "automl/deploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "deploy_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeployModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UndeployModel_sync", - "title": "Snippet for the undeploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model.", - "file": "automl/undeploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "undeploy_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UndeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UndeployModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UndeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportModel_sync", - "title": "Snippet for the export_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model.", - "file": "automl/export_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync", - "title": "Snippet for the export_evaluated_examples call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples.", - "file": "automl/export_evaluated_examples.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_evaluated_examples", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportEvaluatedExamples", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetModelEvaluation_sync", - "title": "Snippet for the get_model_evaluation call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation.", - "file": "automl/get_model_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model_evaluation", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ModelEvaluation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetModelEvaluation", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListModelEvaluations_sync", - "title": "Snippet for the list_model_evaluations call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations.", - "file": "automl/list_model_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_model_evaluations", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListModelEvaluations", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb deleted file mode 100644 index 397f4a4200a2..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/service_services_pb" -require "google/cloud/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb deleted file mode 100644 index 267b97d1fab1..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_annotation_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" - assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path - end - end - - def test_column_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.column_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3", column_spec: "value4" - assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3/columnSpecs/value4", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", location: "value1", dataset: "value2" - assert_equal "projects/value0/locations/value1/datasets/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end - - def test_model_evaluation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" - assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path - end - end - - def test_table_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3" - assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb deleted file mode 100644 index e24905c1f82a..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb +++ /dev/null @@ -1,1424 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl/rest" - - -class ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_dataset parent: parent, dataset: dataset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_count - end - end - end - - def test_get_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_count - end - end - end - - def test_list_datasets - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_datasets_client_stub.call_count - end - end - end - - def test_update_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_count - end - end - end - - def test_delete_dataset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_count - end - end - end - - def test_import_data - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_data_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_data({ name: name, input_config: input_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_data name: name, input_config: input_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_count - end - end - end - - def test_export_data - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_data_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_data({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_data name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_count - end - end - end - - def test_get_annotation_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_annotation_spec({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_annotation_spec name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_annotation_spec({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_annotation_spec_client_stub.call_count - end - end - end - - def test_get_table_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_table_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_table_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_table_spec({ name: name, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_table_spec name: name, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_table_spec({ name: name, field_mask: field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_table_spec_client_stub.call_count - end - end - end - - def test_list_table_specs - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_table_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_table_specs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_table_specs_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_table_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_table_specs_client_stub.call_count - end - end - end - - def test_update_table_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - table_spec = {} - update_mask = {} - - update_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_table_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_table_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_table_spec table_spec: table_spec, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_table_spec({ table_spec: table_spec, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_table_spec_client_stub.call_count - end - end - end - - def test_get_column_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_column_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_column_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_column_spec({ name: name, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_column_spec name: name, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_column_spec({ name: name, field_mask: field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_column_spec_client_stub.call_count - end - end - end - - def test_list_column_specs - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_column_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_column_specs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_column_specs_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_column_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_column_specs_client_stub.call_count - end - end - end - - def test_update_column_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - column_spec = {} - update_mask = {} - - update_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_column_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_column_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_column_spec column_spec: column_spec, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_column_spec({ column_spec: column_spec, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_column_spec_client_stub.call_count - end - end - end - - def test_create_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = {} - - create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_model({ parent: parent, model: model }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_model parent: parent, model: model do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_model({ parent: parent, model: model }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_count - end - end - end - - def test_get_model - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Model.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_count - end - end - end - - def test_list_models - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_models_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_models_client_stub.call_count - end - end - end - - def test_delete_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_count - end - end - end - - def test_deploy_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, deploy_model_client_stub.call_count - end - end - end - - def test_undeploy_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.undeploy_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.undeploy_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.undeploy_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undeploy_model_client_stub.call_count - end - end - end - - def test_export_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_model({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_model name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_count - end - end - end - - def test_export_evaluated_examples - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_evaluated_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_evaluated_examples_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_evaluated_examples_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_evaluated_examples({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_evaluated_examples name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_evaluated_examples({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_evaluated_examples_client_stub.call_count - end - end - end - - def test_get_model_evaluation - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_model_evaluation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_model_evaluation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_model_evaluation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_evaluation_client_stub.call_count - end - end - end - - def test_list_model_evaluations - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_model_evaluations_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb deleted file mode 100644 index d3a2f90a5141..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb +++ /dev/null @@ -1,1639 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_dataset({ parent: parent, dataset: dataset }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_dataset parent: parent, dataset: dataset do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_rpc_count - end - end - - def test_get_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_dataset({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_rpc_count - end - end - - def test_list_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_datasets, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_datasets_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_datasets_client_stub.call_rpc_count - end - end - - def test_update_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_dataset({ dataset: dataset, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_rpc_count - end - end - - def test_delete_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dataset_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_dataset({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_dataset name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_dataset({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_rpc_count - end - end - - def test_import_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_data, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::InputConfig), request["input_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_data_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_data({ name: name, input_config: input_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_data name: name, input_config: input_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_data({ name: name, input_config: input_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_rpc_count - end - end - - def test_export_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_data, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::OutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_data_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_data({ name: name, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_data name: name, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_data({ name: name, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_rpc_count - end - end - - def test_get_annotation_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_annotation_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_annotation_spec({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_annotation_spec name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_annotation_spec({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_annotation_spec_client_stub.call_rpc_count - end - end - - def test_get_table_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_table_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_table_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_table_spec({ name: name, field_mask: field_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_table_spec name: name, field_mask: field_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_table_spec({ name: name, field_mask: field_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_table_spec_client_stub.call_rpc_count - end - end - - def test_list_table_specs - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_table_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_table_specs, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_table_specs_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_table_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_table_specs_client_stub.call_rpc_count - end - end - - def test_update_table_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - table_spec = {} - update_mask = {} - - update_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_table_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::TableSpec), request["table_spec"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_table_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_table_spec table_spec: table_spec, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_table_spec({ table_spec: table_spec, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_table_spec_client_stub.call_rpc_count - end - end - - def test_get_column_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_column_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_column_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_column_spec({ name: name, field_mask: field_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_column_spec name: name, field_mask: field_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_column_spec({ name: name, field_mask: field_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_column_spec_client_stub.call_rpc_count - end - end - - def test_list_column_specs - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_column_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_column_specs, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_column_specs_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_column_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_column_specs_client_stub.call_rpc_count - end - end - - def test_update_column_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - column_spec = {} - update_mask = {} - - update_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_column_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ColumnSpec), request["column_spec"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_column_spec_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_column_spec column_spec: column_spec, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_column_spec({ column_spec: column_spec, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_column_spec_client_stub.call_rpc_count - end - end - - def test_create_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = {} - - create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Model), request["model"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_model({ parent: parent, model: model }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_model parent: parent, model: model do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_model({ parent: parent, model: model }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_rpc_count - end - end - - def test_get_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Model.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_model({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_model name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_model({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_rpc_count - end - end - - def test_list_models - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_models, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_models_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_models_client_stub.call_rpc_count - end - end - - def test_delete_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_model({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_model name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_model({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_rpc_count - end - end - - def test_deploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :deploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] - assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, deploy_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, deploy_model_client_stub.call_rpc_count - end - end - - def test_undeploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undeploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undeploy_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.undeploy_model({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.undeploy_model name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.undeploy_model({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undeploy_model_client_stub.call_rpc_count - end - end - - def test_export_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_model_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_model({ name: name, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_model name: name, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_model({ name: name, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_rpc_count - end - end - - def test_export_evaluated_examples - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_evaluated_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_evaluated_examples, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_evaluated_examples_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_evaluated_examples({ name: name, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_evaluated_examples name: name, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_evaluated_examples({ name: name, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_evaluated_examples_client_stub.call_rpc_count - end - end - - def test_get_model_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model_evaluation, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_model_evaluation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_model_evaluation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_model_evaluation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_model_evaluation_client_stub.call_rpc_count - end - end - - def test_list_model_evaluations - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_model_evaluations, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_model_evaluations_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_model_evaluations_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb deleted file mode 100644 index 6dcc59c6dd48..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service_services_pb" -require "google/cloud/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb deleted file mode 100644 index f82674af6532..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb deleted file mode 100644 index 4526b1744865..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb +++ /dev/null @@ -1,212 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service/rest" - - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_predict - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, predict_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.predict({ name: name, payload: payload, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.predict name: name, payload: payload, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_count - end - end - end - - def test_batch_predict - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_predict_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb deleted file mode 100644 index 3405b16d3887..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb +++ /dev/null @@ -1,249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_predict - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :predict, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExamplePayload), request["payload"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, predict_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.predict({ name: name, payload: payload, params: params }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.predict name: name, payload: payload, params: params do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_rpc_count - end - end - - def test_batch_predict - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_predict, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig), request["input_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig), request["output_config"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_predict_client_stub do - # Create client - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_predict_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-automl-v1beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.gitignore b/owl-bot-staging/google-cloud-backupdr-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json deleted file mode 100644 index 11a24894cf9d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "api_id": "backupdr.googleapis.com", - "api_shortname": "backupdr", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest", - "distribution_name": "google-cloud-backupdr-v1", - "is_cloud": true, - "language": "ruby", - "name": "backupdr", - "name_pretty": "Backup and DR Service V1 API", - "product_documentation": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", - "ruby-cloud-path-override": "backup_dr=backupdr", - "ruby-cloud-namespace-override": "Backupdr=BackupDR", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml deleted file mode 100644 index cbd65e44ff07..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-backupdr-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-backupdr-v1.rb" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb b/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.yardopts b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts deleted file mode 100644 index 17df553d8c78..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Backup and DR Service V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md deleted file mode 100644 index d053ec6f167e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-backupdr-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-backupdr-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/backupdr/v1" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/backupdr/v1" - -::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-backupdr-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/backupdr/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md b/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/README.md b/owl-bot-staging/google-cloud-backupdr-v1/README.md deleted file mode 100644 index 39e91f6e239b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Backup and DR Service V1 API - -API Client library for the Backup and DR Service V1 API - -google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Backup and DR Service V1 API. Most users should consider using -the main client gem, -[google-cloud-backupdr](https://rubygems.org/gems/google-cloud-backupdr). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-backupdr-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/backupdr.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/backupdr/v1" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new -request = ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new # (request fields as keyword arguments...) -response = client.list_management_servers request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/backupdr/v1" -require "logger" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-backupdr`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-backupdr-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-backupdr`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-backupdr-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Rakefile b/owl-bot-staging/google-cloud-backupdr-v1/Rakefile deleted file mode 100644 index 7990877ac4bf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-backupdr-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/backupdr/v1/backupdr/credentials" - ::Google::Cloud::BackupDR::V1::BackupDR::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-backupdr-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-backupdr-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-backupdr-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-backupdr-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-backupdr-v1" - header "google-cloud-backupdr-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-backupdr-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-backupdr-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-backupdr-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-backupdr-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json deleted file mode 100644 index 590f02f148a1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.backupdr.v1", - "libraryPackage": "::Google::Cloud::BackupDR::V1", - "services": { - "BackupDR": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDR::Client", - "rpcs": { - "ListManagementServers": { - "methods": [ - "list_management_servers" - ] - }, - "GetManagementServer": { - "methods": [ - "get_management_server" - ] - }, - "CreateManagementServer": { - "methods": [ - "create_management_server" - ] - }, - "DeleteManagementServer": { - "methods": [ - "delete_management_server" - ] - }, - "CreateBackupVault": { - "methods": [ - "create_backup_vault" - ] - }, - "ListBackupVaults": { - "methods": [ - "list_backup_vaults" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetch_usable_backup_vaults" - ] - }, - "GetBackupVault": { - "methods": [ - "get_backup_vault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "update_backup_vault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "delete_backup_vault" - ] - }, - "ListDataSources": { - "methods": [ - "list_data_sources" - ] - }, - "GetDataSource": { - "methods": [ - "get_data_source" - ] - }, - "UpdateDataSource": { - "methods": [ - "update_data_source" - ] - }, - "ListBackups": { - "methods": [ - "list_backups" - ] - }, - "FetchBackupsForResourceType": { - "methods": [ - "fetch_backups_for_resource_type" - ] - }, - "GetBackup": { - "methods": [ - "get_backup" - ] - }, - "UpdateBackup": { - "methods": [ - "update_backup" - ] - }, - "DeleteBackup": { - "methods": [ - "delete_backup" - ] - }, - "RestoreBackup": { - "methods": [ - "restore_backup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "create_backup_plan" - ] - }, - "UpdateBackupPlan": { - "methods": [ - "update_backup_plan" - ] - }, - "GetBackupPlan": { - "methods": [ - "get_backup_plan" - ] - }, - "ListBackupPlans": { - "methods": [ - "list_backup_plans" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "delete_backup_plan" - ] - }, - "GetBackupPlanRevision": { - "methods": [ - "get_backup_plan_revision" - ] - }, - "ListBackupPlanRevisions": { - "methods": [ - "list_backup_plan_revisions" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "create_backup_plan_association" - ] - }, - "UpdateBackupPlanAssociation": { - "methods": [ - "update_backup_plan_association" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "get_backup_plan_association" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "list_backup_plan_associations" - ] - }, - "FetchBackupPlanAssociationsForResourceType": { - "methods": [ - "fetch_backup_plan_associations_for_resource_type" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "delete_backup_plan_association" - ] - }, - "TriggerBackup": { - "methods": [ - "trigger_backup" - ] - }, - "GetDataSourceReference": { - "methods": [ - "get_data_source_reference" - ] - }, - "ListDataSourceReferences": { - "methods": [ - "list_data_source_references" - ] - }, - "FetchDataSourceReferencesForResourceType": { - "methods": [ - "fetch_data_source_references_for_resource_type" - ] - }, - "InitializeService": { - "methods": [ - "initialize_service" - ] - } - } - } - } - }, - "BackupDrProtectionSummary": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client", - "rpcs": { - "ListResourceBackupConfigs": { - "methods": [ - "list_resource_backup_configs" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec deleted file mode 100644 index a4514e81e956..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/backupdr/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-backupdr-v1" - gem.version = Google::Cloud::BackupDR::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details." - gem.summary = "API Client library for the Backup and DR Service V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb deleted file mode 100644 index 7bea88dbd327..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/backupdr/v1" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb deleted file mode 100644 index 978a9a0cc88f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/backupdr" -require "google/cloud/backupdr/v1/backup_dr_protection_summary" -require "google/cloud/backupdr/v1/version" - -module Google - module Cloud - module BackupDR - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/backupdr/v1" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/backupdr/v1" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/backupdr/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb deleted file mode 100644 index 52b98449e819..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/backupdr/v1/version" - -require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/client" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The Protection Summary service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/backupdr/v1/backup_dr_protection_summary" - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new - # - module BackupDrProtectionSummary - end - end - end - end -end - -helper_path = ::File.join __dir__, "backup_dr_protection_summary", "helpers.rb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb deleted file mode 100644 index 4c2e0d3c63ad..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb +++ /dev/null @@ -1,530 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/backupdr/v1/protection_summary_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - ## - # Client for the BackupDrProtectionSummary service. - # - # The Protection Summary service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_protection_summary_stub - - ## - # Configure the BackupDrProtectionSummary Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDrProtectionSummary clients - # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_resource_backup_configs.timeout = 60.0 - default_config.rpcs.list_resource_backup_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDrProtectionSummary Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @backup_dr_protection_summary_stub.universe_domain - end - - ## - # Create a new BackupDrProtectionSummary client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDrProtectionSummary client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/backupdr/v1/protection_summary_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @backup_dr_protection_summary_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @backup_dr_protection_summary_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_protection_summary_stub.endpoint - config.universe_domain = @backup_dr_protection_summary_stub.universe_domain - config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_protection_summary_stub.endpoint - config.universe_domain = @backup_dr_protection_summary_stub.universe_domain - config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @backup_dr_protection_summary_stub.logger - end - - # Service calls - - ## - # Lists ResourceBackupConfigs. - # - # @overload list_resource_backup_configs(request, options = nil) - # Pass arguments to `list_resource_backup_configs` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_resource_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve resource backup - # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will use 100 as default. Maximum value is - # 500 and values above 500 will be coerced to 500. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new - # - # # Call the list_resource_backup_configs method. - # result = client.list_resource_backup_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. - # p item - # end - # - def list_resource_backup_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_resource_backup_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_resource_backup_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_protection_summary_stub.call_rpc :list_resource_backup_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BackupDrProtectionSummary API. - # - # This class represents the configuration for BackupDrProtectionSummary, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_resource_backup_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_resource_backup_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_resource_backup_configs.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BackupDrProtectionSummary API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_resource_backup_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_backup_configs - - # @private - def initialize parent_rpcs = nil - list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs - @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb deleted file mode 100644 index 94614c32dfd5..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - # Credentials for the BackupDrProtectionSummary API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb deleted file mode 100644 index cbaeba7a3956..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - # Path helper methods for the BackupDrProtectionSummary API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb deleted file mode 100644 index 38b3a06e8a03..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/backupdr/v1/version" -require "google/cloud/backupdr/v1/bindings_override" - -require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The Protection Summary service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new - # - module BackupDrProtectionSummary - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb deleted file mode 100644 index e4d6e17e4350..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb +++ /dev/null @@ -1,489 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/backupdr/v1/protection_summary_pb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - module Rest - ## - # REST client for the BackupDrProtectionSummary service. - # - # The Protection Summary service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_protection_summary_stub - - ## - # Configure the BackupDrProtectionSummary Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDrProtectionSummary clients - # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_resource_backup_configs.timeout = 60.0 - default_config.rpcs.list_resource_backup_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDrProtectionSummary Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @backup_dr_protection_summary_stub.universe_domain - end - - ## - # Create a new BackupDrProtectionSummary REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDrProtectionSummary client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @backup_dr_protection_summary_stub = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @backup_dr_protection_summary_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_protection_summary_stub.endpoint - config.universe_domain = @backup_dr_protection_summary_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_protection_summary_stub.endpoint - config.universe_domain = @backup_dr_protection_summary_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @backup_dr_protection_summary_stub.logger - end - - # Service calls - - ## - # Lists ResourceBackupConfigs. - # - # @overload list_resource_backup_configs(request, options = nil) - # Pass arguments to `list_resource_backup_configs` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_resource_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve resource backup - # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will use 100 as default. Maximum value is - # 500 and values above 500 will be coerced to 500. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new - # - # # Call the list_resource_backup_configs method. - # result = client.list_resource_backup_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. - # p item - # end - # - def list_resource_backup_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_resource_backup_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_resource_backup_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_protection_summary_stub.list_resource_backup_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, "resource_backup_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BackupDrProtectionSummary REST API. - # - # This class represents the configuration for BackupDrProtectionSummary REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_resource_backup_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_resource_backup_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_resource_backup_configs.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the BackupDrProtectionSummary API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_resource_backup_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_backup_configs - - # @private - def initialize parent_rpcs = nil - list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs - @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb deleted file mode 100644 index b788e5ec9af1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/protection_summary_pb" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - module Rest - ## - # REST service stub for the BackupDrProtectionSummary service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_resource_backup_configs REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] - # A result object deserialized from the server's reply - def list_resource_backup_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_backup_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_resource_backup_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_resource_backup_configs REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_resource_backup_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/resourceBackupConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb deleted file mode 100644 index 9807b8cc2845..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/backupdr/v1/version" - -require "google/cloud/backupdr/v1/backupdr/credentials" -require "google/cloud/backupdr/v1/backupdr/paths" -require "google/cloud/backupdr/v1/backupdr/operations" -require "google/cloud/backupdr/v1/backupdr/client" -require "google/cloud/backupdr/v1/backupdr/rest" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The BackupDR Service - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/backupdr/v1/backupdr" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/backupdr/v1/backupdr/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module BackupDR - end - end - end - end -end - -helper_path = ::File.join __dir__, "backupdr", "helpers.rb" -require "google/cloud/backupdr/v1/backupdr/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb deleted file mode 100644 index 869e163a5b2c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb +++ /dev/null @@ -1,4786 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - ## - # Client for the BackupDR service. - # - # The BackupDR Service - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_stub - - ## - # Configure the BackupDR Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDR clients - # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_management_servers.timeout = 60.0 - default_config.rpcs.list_management_servers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_management_server.timeout = 60.0 - default_config.rpcs.get_management_server.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_management_server.timeout = 60.0 - - default_config.rpcs.delete_management_server.timeout = 60.0 - - default_config.rpcs.create_backup_vault.timeout = 60.0 - default_config.rpcs.create_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_backup_vaults.timeout = 60.0 - default_config.rpcs.list_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 - default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_vault.timeout = 60.0 - default_config.rpcs.get_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_vault.timeout = 60.0 - - default_config.rpcs.delete_backup_vault.timeout = 60.0 - default_config.rpcs.delete_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_sources.timeout = 60.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_source.timeout = 60.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_source.timeout = 60.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup.timeout = 60.0 - - default_config.rpcs.restore_backup.timeout = 60.0 - - default_config.rpcs.initialize_service.timeout = 60.0 - default_config.rpcs.initialize_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDR Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @backup_dr_stub.universe_domain - end - - ## - # Create a new BackupDR client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDR client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/backupdr/v1/backupdr_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @backup_dr_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BackupDR::V1::BackupDR::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @backup_dr_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BackupDR::V1::BackupDR::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @backup_dr_stub.logger - end - - # Service calls - - ## - # Lists ManagementServers in a given project and location. - # - # @overload list_management_servers(request, options = nil) - # Pass arguments to `list_management_servers` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_management_servers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve management servers - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud BackupDR, locations map to Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - # - # # Call the list_management_servers method. - # result = client.list_management_servers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - # p item - # end - # - def list_management_servers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_management_servers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_management_servers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_management_servers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_management_servers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ManagementServer. - # - # @overload get_management_server(request, options = nil) - # Pass arguments to `get_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_management_server(name: nil) - # Pass arguments to `get_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - # - # # Call the get_management_server method. - # result = client.get_management_server request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - # p result - # - def get_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_management_server, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new ManagementServer in a given project and location. - # - # @overload create_management_server(request, options = nil) - # Pass arguments to `create_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) - # Pass arguments to `create_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @param management_server_id [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - # - # # Call the create_management_server method. - # result = client.create_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_management_server, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ManagementServer. - # - # @overload delete_management_server(request, options = nil) - # Pass arguments to `delete_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_management_server(name: nil, request_id: nil) - # Pass arguments to `delete_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - # - # # Call the delete_management_server method. - # result = client.delete_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_management_server, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new BackupVault in a given project and location. - # - # @overload create_backup_vault(request, options = nil) - # Pass arguments to `create_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param backup_vault_id [::String] - # Required. ID of the requesting object - # If auto-generating ID server-side, remove this field and - # backup_vault_id from the method_signature of Create RPC - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - # - # # Call the create_backup_vault method. - # result = client.create_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupVaults in a given project and location. - # - # @overload list_backup_vaults(request, options = nil) - # Pass arguments to `list_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - # - # # Call the list_backup_vaults method. - # result = client.list_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def list_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - # - # @overload fetch_usable_backup_vaults(request, options = nil) - # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - # - # # Call the fetch_usable_backup_vaults method. - # result = client.fetch_usable_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def fetch_usable_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_usable_backup_vaults, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a BackupVault. - # - # @overload get_backup_vault(request, options = nil) - # Pass arguments to `get_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_vault(name: nil, view: nil) - # Pass arguments to `get_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - # - # # Call the get_backup_vault method. - # result = client.get_backup_vault request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - # p result - # - def get_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_vault, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a BackupVault. - # - # @overload update_backup_vault(request, options = nil) - # Pass arguments to `update_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) - # Pass arguments to `update_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # BackupVault resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param force [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @param force_update_access_restriction [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - # - # # Call the update_backup_vault method. - # result = client.update_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_vault&.name - header_params["backup_vault.name"] = request.backup_vault.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a BackupVault. - # - # @overload delete_backup_vault(request, options = nil) - # Pass arguments to `delete_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) - # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. If set to true, any data source from this backup vault will also - # be deleted. - # @param etag [::String] - # The current etag of the backup vault. - # If an etag is provided and does not match the current etag of the - # connection, deletion will be blocked. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param allow_missing [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @param ignore_backup_plan_references [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - # - # # Call the delete_backup_vault method. - # result = client.delete_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataSources in a given project and location. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve data - # sources information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_data_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a DataSource. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a DataSource. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # DataSource resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param allow_missing [::Boolean] - # Optional. Enable upsert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_source&.name - header_params["data_source.name"] = request.data_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_data_source, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Backups in a given project and location. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backup - # information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch Backups for a given resource type. - # - # @overload fetch_backups_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - # - # # Call the fetch_backups_for_resource_type method. - # result = client.fetch_backups_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def fetch_backups_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_backups_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_backups_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_backups_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a Backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup(name: nil, view: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::Backup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a Backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup(update_mask: nil, backup: nil, request_id: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Backup resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup&.name - header_params["backup.name"] = request.backup.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup(name: nil, request_id: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restore from a Backup - # - # @overload restore_backup(request, options = nil) - # Pass arguments to `restore_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) - # Pass arguments to `restore_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] - # Compute Engine target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] - # Disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] - # Region disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] - # Disk properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - # - # # Call the restore_backup method. - # result = client.restore_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restore_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.restore_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :restore_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlan - # - # @overload create_backup_plan(request, options = nil) - # Pass arguments to `create_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) - # Pass arguments to `create_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The `BackupPlan` project and location in the format - # `projects/{project}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_id [::String] - # Required. The name of the `BackupPlan` to create. The name must be unique - # for the specified project and location.The name must start with a lowercase - # letter followed by up to 62 lowercase letters, numbers, or hyphens. - # Pattern, /[a-z][a-z0-9-]\\{,62}/. - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The `BackupPlan` resource object to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - # - # # Call the create_backup_plan method. - # result = client.create_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a BackupPlan. - # - # @overload update_backup_plan(request, options = nil) - # Pass arguments to `update_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - # - # # Call the update_backup_plan method. - # result = client.update_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_plan&.name - header_params["backup_plan.name"] = request.backup_plan.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlan. - # - # @overload get_backup_plan(request, options = nil) - # Pass arguments to `get_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_plan(name: nil) - # Pass arguments to `get_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - # - # # Call the get_backup_plan method. - # result = client.get_backup_plan request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - # p result - # - def get_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlans in a given project and location. - # - # @overload list_backup_plans(request, options = nil) - # Pass arguments to `list_backup_plans` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve `BackupPlans` - # information. Format: `projects/{project}/locations/{location}`. In Cloud - # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - # retrieve backup plans for all locations, use "-" for the - # `{location}` value. - # @param page_size [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - # - # # Call the list_backup_plans method. - # result = client.list_backup_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - # p item - # end - # - def list_backup_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plans, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlan. - # - # @overload delete_backup_plan(request, options = nil) - # Pass arguments to `delete_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_plan(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - # - # # Call the delete_backup_plan method. - # result = client.delete_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanRevision. - # - # @overload get_backup_plan_revision(request, options = nil) - # Pass arguments to `get_backup_plan_revision` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_plan_revision(name: nil) - # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - # - # # Call the get_backup_plan_revision method. - # result = client.get_backup_plan_revision request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p result - # - def get_backup_plan_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlanRevisions in a given project and location. - # - # @overload list_backup_plan_revisions(request, options = nil) - # Pass arguments to `list_backup_plan_revisions` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @param page_size [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - # - # # Call the list_backup_plan_revisions method. - # result = client.list_backup_plan_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p item - # end - # - def list_backup_plan_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plan_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlanAssociation - # - # @overload create_backup_plan_association(request, options = nil) - # Pass arguments to `create_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) - # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The backup plan association project and location in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_association_id [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - # - # # Call the create_backup_plan_association method. - # result = client.create_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a BackupPlanAssociation. - # - # @overload update_backup_plan_association(request, options = nil) - # Pass arguments to `update_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - # - # # Call the update_backup_plan_association method. - # result = client.update_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_plan_association&.name - header_params["backup_plan_association.name"] = request.backup_plan_association.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanAssociation. - # - # @overload get_backup_plan_association(request, options = nil) - # Pass arguments to `get_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_plan_association(name: nil) - # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - # - # # Call the get_backup_plan_association method. - # result = client.get_backup_plan_association request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p result - # - def get_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan_association, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlanAssociations in a given project and location. - # - # @overload list_backup_plan_associations(request, options = nil) - # Pass arguments to `list_backup_plan_associations` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backup Plan - # Associations information, in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - # map to GCP regions, for example **us-central1**. To retrieve backup plan - # associations for all locations, use "-" for the - # `{location}` value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - # - # # Call the list_backup_plan_associations method. - # result = client.list_backup_plan_associations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def list_backup_plan_associations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plan_associations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List BackupPlanAssociations for a given resource type. - # - # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - # - # # Call the fetch_backup_plan_associations_for_resource_type method. - # result = client.fetch_backup_plan_associations_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def fetch_backup_plan_associations_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_backup_plan_associations_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlanAssociation. - # - # @overload delete_backup_plan_association(request, options = nil) - # Pass arguments to `delete_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_plan_association(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - # - # # Call the delete_backup_plan_association method. - # result = client.delete_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Triggers a new Backup. - # - # @overload trigger_backup(request, options = nil) - # Pass arguments to `trigger_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) - # Pass arguments to `trigger_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param rule_id [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - # - # # Call the trigger_backup method. - # result = client.trigger_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def trigger_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.trigger_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.trigger_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :trigger_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single DataSourceReference. - # - # @overload get_data_source_reference(request, options = nil) - # Pass arguments to `get_data_source_reference` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source_reference(name: nil) - # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - # - # # Call the get_data_source_reference method. - # result = client.get_data_source_reference request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - # p result - # - def get_data_source_reference request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source_reference.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source_reference.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_data_source_reference, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataSourceReferences for a given project and location. - # - # @overload list_data_source_references(request, options = nil) - # Pass arguments to `list_data_source_references` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_source_references` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - # - # # Call the list_data_source_references method. - # result = client.list_data_source_references request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def list_data_source_references request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_source_references.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_source_references.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_data_source_references, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch DataSourceReferences for a given project, location and resource type. - # - # @overload fetch_data_source_references_for_resource_type(request, options = nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - # - # # Call the fetch_data_source_references_for_resource_type method. - # result = client.fetch_data_source_references_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def fetch_data_source_references_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_data_source_references_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Initializes the service related config for a project. - # - # @overload initialize_service(request, options = nil) - # Pass arguments to `initialize_service` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) - # Pass arguments to `initialize_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @param resource_type [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] - # Optional. The configuration for initializing a Cloud SQL instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - # - # # Call the initialize_service method. - # result = client.initialize_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def initialize_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.initialize_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.initialize_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :initialize_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BackupDR API. - # - # This class represents the configuration for BackupDR, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_management_servers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BackupDR API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_management_servers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_management_servers - ## - # RPC-specific configuration for `get_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :get_management_server - ## - # RPC-specific configuration for `create_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :create_management_server - ## - # RPC-specific configuration for `delete_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_management_server - ## - # RPC-specific configuration for `create_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_vault - ## - # RPC-specific configuration for `list_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_vaults - ## - # RPC-specific configuration for `fetch_usable_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_usable_backup_vaults - ## - # RPC-specific configuration for `get_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_vault - ## - # RPC-specific configuration for `update_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_vault - ## - # RPC-specific configuration for `delete_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_vault - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `fetch_backups_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backups_for_resource_type - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `restore_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_backup - ## - # RPC-specific configuration for `create_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan - ## - # RPC-specific configuration for `update_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan - ## - # RPC-specific configuration for `get_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan - ## - # RPC-specific configuration for `list_backup_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plans - ## - # RPC-specific configuration for `delete_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan - ## - # RPC-specific configuration for `get_backup_plan_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_revision - ## - # RPC-specific configuration for `list_backup_plan_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_revisions - ## - # RPC-specific configuration for `create_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan_association - ## - # RPC-specific configuration for `update_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan_association - ## - # RPC-specific configuration for `get_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_association - ## - # RPC-specific configuration for `list_backup_plan_associations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_associations - ## - # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backup_plan_associations_for_resource_type - ## - # RPC-specific configuration for `delete_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan_association - ## - # RPC-specific configuration for `trigger_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_backup - ## - # RPC-specific configuration for `get_data_source_reference` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source_reference - ## - # RPC-specific configuration for `list_data_source_references` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_source_references - ## - # RPC-specific configuration for `fetch_data_source_references_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source_references_for_resource_type - ## - # RPC-specific configuration for `initialize_service` - # @return [::Gapic::Config::Method] - # - attr_reader :initialize_service - - # @private - def initialize parent_rpcs = nil - list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers - @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config - get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server - @get_management_server = ::Gapic::Config::Method.new get_management_server_config - create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server - @create_management_server = ::Gapic::Config::Method.new create_management_server_config - delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server - @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config - create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault - @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config - list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults - @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config - fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults - @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config - get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault - @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config - update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault - @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config - delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault - @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type - @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup - @restore_backup = ::Gapic::Config::Method.new restore_backup_config - create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan - @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config - update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan - @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config - get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan - @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config - list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans - @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config - delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan - @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config - get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision - @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config - list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions - @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config - create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association - @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config - update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association - @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config - get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association - @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config - list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations - @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config - fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type - @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config - delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association - @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config - trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup - @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config - get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference - @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config - list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references - @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config - fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type - @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config - initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service - @initialize_service = ::Gapic::Config::Method.new initialize_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb deleted file mode 100644 index f6fc3fd1ca69..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # Credentials for the BackupDR API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb deleted file mode 100644 index 6eeece6aaa79..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BackupDR Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDR Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb deleted file mode 100644 index 298a5882fa27..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb +++ /dev/null @@ -1,309 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # Path helper methods for the BackupDR API. - module Paths - ## - # Create a fully-qualified Backup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # @param datasource [String] - # @param backup [String] - # - # @return [::String] - def backup_path project:, location:, backupvault:, datasource:, backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" - raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}/backups/#{backup}" - end - - ## - # Create a fully-qualified BackupPlan resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # - # @return [::String] - def backup_plan_path project:, location:, backup_plan: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}" - end - - ## - # Create a fully-qualified BackupPlanAssociation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}` - # - # @param project [String] - # @param location [String] - # @param backup_plan_association [String] - # - # @return [::String] - def backup_plan_association_path project:, location:, backup_plan_association: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlanAssociations/#{backup_plan_association}" - end - - ## - # Create a fully-qualified BackupPlanRevision resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # @param revision [String] - # - # @return [::String] - def backup_plan_revision_path project:, location:, backup_plan:, revision: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/revisions/#{revision}" - end - - ## - # Create a fully-qualified BackupVault resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # - # @return [::String] - def backup_vault_path project:, location:, backupvault: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}" - end - - ## - # Create a fully-qualified Cluster resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/clusters/{cluster}` - # - # @param project [String] - # @param location [String] - # @param cluster [String] - # - # @return [::String] - def cluster_path project:, location:, cluster: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/clusters/#{cluster}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}` - # - # @param project [String] - # @param location [String] - # @param ring [String] - # @param key [String] - # - # @return [::String] - def crypto_key_path project:, location:, ring:, key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "ring cannot contain /" if ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{ring}/cryptoKeys/#{key}" - end - - ## - # Create a fully-qualified CryptoKeyVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # @param crypto_key_version [String] - # - # @return [::String] - def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" - end - - ## - # Create a fully-qualified DataSource resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # @param datasource [String] - # - # @return [::String] - def data_source_path project:, location:, backupvault:, datasource: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}" - end - - ## - # Create a fully-qualified DataSourceReference resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}` - # - # @param project [String] - # @param location [String] - # @param data_source_reference [String] - # - # @return [::String] - def data_source_reference_path project:, location:, data_source_reference: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataSourceReferences/#{data_source_reference}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}` - # - # @param project [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/instances/#{instance}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified ManagementServer resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/managementServers/{managementserver}` - # - # @param project [String] - # @param location [String] - # @param managementserver [String] - # - # @return [::String] - def management_server_path project:, location:, managementserver: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/managementServers/#{managementserver}" - end - - ## - # Create a fully-qualified StoragePool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/zones/{zone}/storagePools/{storage_pool}` - # - # @param project [String] - # @param zone [String] - # @param storage_pool [String] - # - # @return [::String] - def storage_pool_path project:, zone:, storage_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/zones/#{zone}/storagePools/#{storage_pool}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb deleted file mode 100644 index 5b7fba263be4..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/backupdr/v1/version" -require "google/cloud/backupdr/v1/bindings_override" - -require "google/cloud/backupdr/v1/backupdr/credentials" -require "google/cloud/backupdr/v1/backupdr/paths" -require "google/cloud/backupdr/v1/backupdr/rest/operations" -require "google/cloud/backupdr/v1/backupdr/rest/client" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The BackupDR Service - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/backupdr/v1/backupdr/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module BackupDR - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/backupdr/v1/backupdr/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb deleted file mode 100644 index 343bd216f57b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb +++ /dev/null @@ -1,4493 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - module Rest - ## - # REST client for the BackupDR service. - # - # The BackupDR Service - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_stub - - ## - # Configure the BackupDR Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDR clients - # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_management_servers.timeout = 60.0 - default_config.rpcs.list_management_servers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_management_server.timeout = 60.0 - default_config.rpcs.get_management_server.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_management_server.timeout = 60.0 - - default_config.rpcs.delete_management_server.timeout = 60.0 - - default_config.rpcs.create_backup_vault.timeout = 60.0 - default_config.rpcs.create_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_backup_vaults.timeout = 60.0 - default_config.rpcs.list_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 - default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_vault.timeout = 60.0 - default_config.rpcs.get_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_vault.timeout = 60.0 - - default_config.rpcs.delete_backup_vault.timeout = 60.0 - default_config.rpcs.delete_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_sources.timeout = 60.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_source.timeout = 60.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_source.timeout = 60.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup.timeout = 60.0 - - default_config.rpcs.restore_backup.timeout = 60.0 - - default_config.rpcs.initialize_service.timeout = 60.0 - default_config.rpcs.initialize_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDR Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @backup_dr_stub.universe_domain - end - - ## - # Create a new BackupDR REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDR client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @backup_dr_stub = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @backup_dr_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @backup_dr_stub.logger - end - - # Service calls - - ## - # Lists ManagementServers in a given project and location. - # - # @overload list_management_servers(request, options = nil) - # Pass arguments to `list_management_servers` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_management_servers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve management servers - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud BackupDR, locations map to Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - # - # # Call the list_management_servers method. - # result = client.list_management_servers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - # p item - # end - # - def list_management_servers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_management_servers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_management_servers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_management_servers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_management_servers, "management_servers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ManagementServer. - # - # @overload get_management_server(request, options = nil) - # Pass arguments to `get_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_management_server(name: nil) - # Pass arguments to `get_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - # - # # Call the get_management_server method. - # result = client.get_management_server request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - # p result - # - def get_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_management_server request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new ManagementServer in a given project and location. - # - # @overload create_management_server(request, options = nil) - # Pass arguments to `create_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) - # Pass arguments to `create_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @param management_server_id [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - # - # # Call the create_management_server method. - # result = client.create_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_management_server request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ManagementServer. - # - # @overload delete_management_server(request, options = nil) - # Pass arguments to `delete_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_management_server(name: nil, request_id: nil) - # Pass arguments to `delete_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - # - # # Call the delete_management_server method. - # result = client.delete_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_management_server request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new BackupVault in a given project and location. - # - # @overload create_backup_vault(request, options = nil) - # Pass arguments to `create_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param backup_vault_id [::String] - # Required. ID of the requesting object - # If auto-generating ID server-side, remove this field and - # backup_vault_id from the method_signature of Create RPC - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - # - # # Call the create_backup_vault method. - # result = client.create_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupVaults in a given project and location. - # - # @overload list_backup_vaults(request, options = nil) - # Pass arguments to `list_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - # - # # Call the list_backup_vaults method. - # result = client.list_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def list_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_vaults request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, "backup_vaults", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - # - # @overload fetch_usable_backup_vaults(request, options = nil) - # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - # - # # Call the fetch_usable_backup_vaults method. - # result = client.fetch_usable_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def fetch_usable_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_usable_backup_vaults request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, "backup_vaults", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a BackupVault. - # - # @overload get_backup_vault(request, options = nil) - # Pass arguments to `get_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_vault(name: nil, view: nil) - # Pass arguments to `get_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - # - # # Call the get_backup_vault method. - # result = client.get_backup_vault request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - # p result - # - def get_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_vault request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a BackupVault. - # - # @overload update_backup_vault(request, options = nil) - # Pass arguments to `update_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) - # Pass arguments to `update_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # BackupVault resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param force [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @param force_update_access_restriction [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - # - # # Call the update_backup_vault method. - # result = client.update_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a BackupVault. - # - # @overload delete_backup_vault(request, options = nil) - # Pass arguments to `delete_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) - # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. If set to true, any data source from this backup vault will also - # be deleted. - # @param etag [::String] - # The current etag of the backup vault. - # If an etag is provided and does not match the current etag of the - # connection, deletion will be blocked. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param allow_missing [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @param ignore_backup_plan_references [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - # - # # Call the delete_backup_vault method. - # result = client.delete_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataSources in a given project and location. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve data - # sources information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_data_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_sources, "data_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a DataSource. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a DataSource. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # DataSource resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param allow_missing [::Boolean] - # Optional. Enable upsert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_data_source request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Backups in a given project and location. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backup - # information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backups, "backups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch Backups for a given resource type. - # - # @overload fetch_backups_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - # - # # Call the fetch_backups_for_resource_type method. - # result = client.fetch_backups_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def fetch_backups_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_backups_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_backups_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_backups_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, "backups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a Backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup(name: nil, view: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a Backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup(update_mask: nil, backup: nil, request_id: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Backup resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup(name: nil, request_id: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restore from a Backup - # - # @overload restore_backup(request, options = nil) - # Pass arguments to `restore_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) - # Pass arguments to `restore_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] - # Compute Engine target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] - # Disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] - # Region disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] - # Disk properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - # - # # Call the restore_backup method. - # result = client.restore_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restore_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restore_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.restore_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlan - # - # @overload create_backup_plan(request, options = nil) - # Pass arguments to `create_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) - # Pass arguments to `create_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The `BackupPlan` project and location in the format - # `projects/{project}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_id [::String] - # Required. The name of the `BackupPlan` to create. The name must be unique - # for the specified project and location.The name must start with a lowercase - # letter followed by up to 62 lowercase letters, numbers, or hyphens. - # Pattern, /[a-z][a-z0-9-]\\{,62}/. - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The `BackupPlan` resource object to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - # - # # Call the create_backup_plan method. - # result = client.create_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a BackupPlan. - # - # @overload update_backup_plan(request, options = nil) - # Pass arguments to `update_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - # - # # Call the update_backup_plan method. - # result = client.update_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlan. - # - # @overload get_backup_plan(request, options = nil) - # Pass arguments to `get_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_plan(name: nil) - # Pass arguments to `get_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - # - # # Call the get_backup_plan method. - # result = client.get_backup_plan request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - # p result - # - def get_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlans in a given project and location. - # - # @overload list_backup_plans(request, options = nil) - # Pass arguments to `list_backup_plans` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve `BackupPlans` - # information. Format: `projects/{project}/locations/{location}`. In Cloud - # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - # retrieve backup plans for all locations, use "-" for the - # `{location}` value. - # @param page_size [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - # - # # Call the list_backup_plans method. - # result = client.list_backup_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - # p item - # end - # - def list_backup_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plans request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, "backup_plans", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlan. - # - # @overload delete_backup_plan(request, options = nil) - # Pass arguments to `delete_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_plan(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - # - # # Call the delete_backup_plan method. - # result = client.delete_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanRevision. - # - # @overload get_backup_plan_revision(request, options = nil) - # Pass arguments to `get_backup_plan_revision` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_plan_revision(name: nil) - # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - # - # # Call the get_backup_plan_revision method. - # result = client.get_backup_plan_revision request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p result - # - def get_backup_plan_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlanRevisions in a given project and location. - # - # @overload list_backup_plan_revisions(request, options = nil) - # Pass arguments to `list_backup_plan_revisions` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @param page_size [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - # - # # Call the list_backup_plan_revisions method. - # result = client.list_backup_plan_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p item - # end - # - def list_backup_plan_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plan_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, "backup_plan_revisions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlanAssociation - # - # @overload create_backup_plan_association(request, options = nil) - # Pass arguments to `create_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) - # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The backup plan association project and location in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @param backup_plan_association_id [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - # - # # Call the create_backup_plan_association method. - # result = client.create_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a BackupPlanAssociation. - # - # @overload update_backup_plan_association(request, options = nil) - # Pass arguments to `update_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - # - # # Call the update_backup_plan_association method. - # result = client.update_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanAssociation. - # - # @overload get_backup_plan_association(request, options = nil) - # Pass arguments to `get_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_plan_association(name: nil) - # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - # - # # Call the get_backup_plan_association method. - # result = client.get_backup_plan_association request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p result - # - def get_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan_association request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlanAssociations in a given project and location. - # - # @overload list_backup_plan_associations(request, options = nil) - # Pass arguments to `list_backup_plan_associations` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backup Plan - # Associations information, in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - # map to GCP regions, for example **us-central1**. To retrieve backup plan - # associations for all locations, use "-" for the - # `{location}` value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - # - # # Call the list_backup_plan_associations method. - # result = client.list_backup_plan_associations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def list_backup_plan_associations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plan_associations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, "backup_plan_associations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List BackupPlanAssociations for a given resource type. - # - # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - # - # # Call the fetch_backup_plan_associations_for_resource_type method. - # result = client.fetch_backup_plan_associations_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def fetch_backup_plan_associations_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_backup_plan_associations_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, "backup_plan_associations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlanAssociation. - # - # @overload delete_backup_plan_association(request, options = nil) - # Pass arguments to `delete_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_plan_association(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - # - # # Call the delete_backup_plan_association method. - # result = client.delete_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Triggers a new Backup. - # - # @overload trigger_backup(request, options = nil) - # Pass arguments to `trigger_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) - # Pass arguments to `trigger_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param rule_id [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - # - # # Call the trigger_backup method. - # result = client.trigger_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def trigger_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.trigger_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.trigger_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.trigger_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single DataSourceReference. - # - # @overload get_data_source_reference(request, options = nil) - # Pass arguments to `get_data_source_reference` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source_reference(name: nil) - # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - # - # # Call the get_data_source_reference method. - # result = client.get_data_source_reference request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - # p result - # - def get_data_source_reference request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source_reference.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source_reference.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_data_source_reference request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataSourceReferences for a given project and location. - # - # @overload list_data_source_references(request, options = nil) - # Pass arguments to `list_data_source_references` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_source_references` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - # - # # Call the list_data_source_references method. - # result = client.list_data_source_references request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def list_data_source_references request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_source_references.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_source_references.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_data_source_references request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, "data_source_references", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch DataSourceReferences for a given project, location and resource type. - # - # @overload fetch_data_source_references_for_resource_type(request, options = nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - # - # # Call the fetch_data_source_references_for_resource_type method. - # result = client.fetch_data_source_references_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def fetch_data_source_references_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_data_source_references_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, "data_source_references", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Initializes the service related config for a project. - # - # @overload initialize_service(request, options = nil) - # Pass arguments to `initialize_service` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) - # Pass arguments to `initialize_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @param resource_type [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] - # Optional. The configuration for initializing a Cloud SQL instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - # - # # Call the initialize_service method. - # result = client.initialize_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def initialize_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.initialize_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.initialize_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.initialize_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BackupDR REST API. - # - # This class represents the configuration for BackupDR REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_management_servers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the BackupDR API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_management_servers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_management_servers - ## - # RPC-specific configuration for `get_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :get_management_server - ## - # RPC-specific configuration for `create_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :create_management_server - ## - # RPC-specific configuration for `delete_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_management_server - ## - # RPC-specific configuration for `create_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_vault - ## - # RPC-specific configuration for `list_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_vaults - ## - # RPC-specific configuration for `fetch_usable_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_usable_backup_vaults - ## - # RPC-specific configuration for `get_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_vault - ## - # RPC-specific configuration for `update_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_vault - ## - # RPC-specific configuration for `delete_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_vault - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `fetch_backups_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backups_for_resource_type - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `restore_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_backup - ## - # RPC-specific configuration for `create_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan - ## - # RPC-specific configuration for `update_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan - ## - # RPC-specific configuration for `get_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan - ## - # RPC-specific configuration for `list_backup_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plans - ## - # RPC-specific configuration for `delete_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan - ## - # RPC-specific configuration for `get_backup_plan_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_revision - ## - # RPC-specific configuration for `list_backup_plan_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_revisions - ## - # RPC-specific configuration for `create_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan_association - ## - # RPC-specific configuration for `update_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan_association - ## - # RPC-specific configuration for `get_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_association - ## - # RPC-specific configuration for `list_backup_plan_associations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_associations - ## - # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backup_plan_associations_for_resource_type - ## - # RPC-specific configuration for `delete_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan_association - ## - # RPC-specific configuration for `trigger_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_backup - ## - # RPC-specific configuration for `get_data_source_reference` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source_reference - ## - # RPC-specific configuration for `list_data_source_references` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_source_references - ## - # RPC-specific configuration for `fetch_data_source_references_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source_references_for_resource_type - ## - # RPC-specific configuration for `initialize_service` - # @return [::Gapic::Config::Method] - # - attr_reader :initialize_service - - # @private - def initialize parent_rpcs = nil - list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers - @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config - get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server - @get_management_server = ::Gapic::Config::Method.new get_management_server_config - create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server - @create_management_server = ::Gapic::Config::Method.new create_management_server_config - delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server - @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config - create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault - @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config - list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults - @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config - fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults - @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config - get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault - @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config - update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault - @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config - delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault - @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type - @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup - @restore_backup = ::Gapic::Config::Method.new restore_backup_config - create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan - @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config - update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan - @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config - get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan - @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config - list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans - @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config - delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan - @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config - get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision - @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config - list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions - @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config - create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association - @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config - update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association - @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config - get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association - @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config - list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations - @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config - fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type - @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config - delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association - @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config - trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup - @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config - get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference - @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config - list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references - @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config - fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type - @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config - initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service - @initialize_service = ::Gapic::Config::Method.new initialize_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb deleted file mode 100644 index 382f29324032..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BackupDR Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDR Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb deleted file mode 100644 index c6ef2555cab9..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb +++ /dev/null @@ -1,2350 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/backupdr_pb" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - module Rest - ## - # REST service stub for the BackupDR service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_management_servers REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] - # A result object deserialized from the server's reply - def list_management_servers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_management_servers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_management_servers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # A result object deserialized from the server's reply - def get_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ManagementServer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_backup_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] - # A result object deserialized from the server's reply - def list_backup_vaults request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_vaults", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_usable_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] - # A result object deserialized from the server's reply - def fetch_usable_backup_vaults request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_usable_backup_vaults_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_usable_backup_vaults", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # A result object deserialized from the server's reply - def get_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupVault.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] - # A result object deserialized from the server's reply - def list_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # A result object deserialized from the server's reply - def get_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backups REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupsResponse] - # A result object deserialized from the server's reply - def list_backups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_backups_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_backups_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backups_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_backups_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::Backup] - # A result object deserialized from the server's reply - def get_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::Backup.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restore_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def restore_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restore_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # A result object deserialized from the server's reply - def get_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlan.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_plans REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] - # A result object deserialized from the server's reply - def list_backup_plans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_plans", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_plan_revision REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # A result object deserialized from the server's reply - def get_backup_plan_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_plan_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_plan_revisions REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] - # A result object deserialized from the server's reply - def list_backup_plan_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_plan_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_backup_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # A result object deserialized from the server's reply - def get_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_plan_associations REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] - # A result object deserialized from the server's reply - def list_backup_plan_associations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_associations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_plan_associations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_backup_plan_associations_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_backup_plan_associations_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_backup_plan_associations_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the trigger_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def trigger_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_trigger_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "trigger_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_data_source_reference REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # A result object deserialized from the server's reply - def get_data_source_reference request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_reference_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source_reference", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::DataSourceReference.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_source_references REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] - # A result object deserialized from the server's reply - def list_data_source_references request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_source_references_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_source_references", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_data_source_references_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_data_source_references_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_references_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_data_source_references_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the initialize_service REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def initialize_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_initialize_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "initialize_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_management_servers REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_management_servers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/managementServers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/managementServers", - body: "management_server", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_backup_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupVaults", - body: "backup_vault", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_vaults_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupVaults", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_usable_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_usable_backup_vaults_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupVaults:fetchUsable", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_vault.name}", - body: "backup_vault", - matches: [ - ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSources", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_source.name}", - body: "data_source", - matches: [ - ["data_source.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backups REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_backups_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_backups_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup.name}", - body: "backup", - matches: [ - ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restore_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:restore", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupPlans", - body: "backup_plan", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_plan.name}", - body: "backup_plan", - matches: [ - ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plans REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_plans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlans", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan_revision REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_plan_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/revisions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plan_revisions REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_plan_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/revisions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_backup_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupPlanAssociations", - body: "backup_plan_association", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_plan_association.name}", - body: "backup_plan_association", - matches: [ - ["backup_plan_association.name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plan_associations REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_plan_associations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlanAssociations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_backup_plan_associations_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlanAssociations:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the trigger_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_trigger_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:triggerBackup", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_source_reference REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_reference_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataSourceReferences/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_source_references REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_source_references_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSourceReferences", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_data_source_references_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_data_source_references_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSourceReferences:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the initialize_service REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_initialize_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:initialize", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb deleted file mode 100644 index f53e679c2cb7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupdr.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupplan_pb' -require 'google/cloud/backupdr/v1/backupplanassociation_pb' -require 'google/cloud/backupdr/v1/backupvault_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/cloud/backupdr/v1/datasourcereference_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n\'google/cloud/backupdr/v1/backupdr.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/backupdr/v1/backupplan.proto\x1a\x34google/cloud/backupdr/v1/backupplanassociation.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x32google/cloud/backupdr/v1/datasourcereference.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x01\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cpeering_mode\x18\x02 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.NetworkConfig.PeeringModeB\x03\xe0\x41\x01\"G\n\x0bPeeringMode\x12\x1c\n\x18PEERING_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x01\"6\n\rManagementURI\x12\x13\n\x06web_ui\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\"w\n#WorkforceIdentityBasedManagementURI\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"|\n$WorkforceIdentityBasedOAuth2ClientID\x12)\n\x1c\x66irst_party_oauth2_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1cthird_party_oauth2_client_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd1\n\n\x10ManagementServer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.ManagementServer.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x04type\x18\x0e \x01(\x0e\x32\x37.google.cloud.backupdr.v1.ManagementServer.InstanceTypeB\x03\xe0\x41\x01\x12\x44\n\x0emanagement_uri\x18\x0b \x01(\x0b\x32\'.google.cloud.backupdr.v1.ManagementURIB\x03\xe0\x41\x03\x12s\n\'workforce_identity_based_management_uri\x18\x10 \x01(\x0b\x32=.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURIB\x03\xe0\x41\x03\x12L\n\x05state\x18\x07 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.ManagementServer.InstanceStateB\x03\xe0\x41\x03\x12>\n\x08networks\x18\x08 \x03(\x0b\x32\'.google.cloud.backupdr.v1.NetworkConfigB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10oauth2_client_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12v\n)workforce_identity_based_oauth2_client_id\x18\x11 \x01(\x0b\x32>.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientIDB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61_proxy_uri\x18\x12 \x03(\tB\x03\xe0\x41\x03\x12\x36\n\rsatisfies_pzs\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41\x43KUP_RESTORE\x10\x01\"\x8f\x01\n\rInstanceState\x12\x1e\n\x1aINSTANCE_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\t\n\x05\x45RROR\x10\x07:\xa1\x01\xea\x41\x9d\x01\n(backupdr.googleapis.com/ManagementServer\x12Lprojects/{project}/locations/{location}/managementServers/{managementserver}*\x11managementServers2\x10managementServer\"\xdf\x01\n\x1cListManagementServersRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_filterB\x0b\n\t_order_by\"\x95\x01\n\x1dListManagementServersResponse\x12\x46\n\x12management_servers\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.ManagementServer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x1aGetManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\"\xe9\x01\n\x1d\x43reateManagementServerRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12!\n\x14management_server_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11management_server\x18\x03 \x01(\x0b\x32*.google.cloud.backupdr.v1.ManagementServerB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x1d\x44\x65leteManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xfc\x01\n\x18InitializeServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12w\n(cloud_sql_instance_initialization_config\x18\x04 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfigB\x03\xe0\x41\x01H\x00\x42\x17\n\x15initialization_config\"P\n\x19InitializeServiceResponse\x12\x19\n\x11\x62\x61\x63kup_vault_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_plan_name\x18\x02 \x01(\t\"\x96\x03\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0f\x61\x64\x64itional_info\x18\x08 \x03(\x0b\x32?.google.cloud.backupdr.v1.OperationMetadata.AdditionalInfoEntryB\x03\xe0\x41\x03\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xd4\x43\n\x08\x42\x61\x63kupDR\x12\xd0\x01\n\x15ListManagementServers\x12\x36.google.cloud.backupdr.v1.ListManagementServersRequest\x1a\x37.google.cloud.backupdr.v1.ListManagementServersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/managementServers\x12\xbd\x01\n\x13GetManagementServer\x12\x34.google.cloud.backupdr.v1.GetManagementServerRequest\x1a*.google.cloud.backupdr.v1.ManagementServer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/managementServers/*}\x12\x9b\x02\n\x16\x43reateManagementServer\x12\x37.google.cloud.backupdr.v1.CreateManagementServerRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10ManagementServer\x12\x11OperationMetadata\xda\x41-parent,management_server,management_server_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/managementServers:\x11management_server\x12\xe3\x01\n\x16\x44\x65leteManagementServer\x12\x37.google.cloud.backupdr.v1.DeleteManagementServerRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/managementServers/*}\x12\xf8\x01\n\x11\x43reateBackupVault\x12\x32.google.cloud.backupdr.v1.CreateBackupVaultRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x42\x61\x63kupVault\x12\x11OperationMetadata\xda\x41#parent,backup_vault,backup_vault_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/backupVaults:\x0c\x62\x61\x63kup_vault\x12\xbc\x01\n\x10ListBackupVaults\x12\x31.google.cloud.backupdr.v1.ListBackupVaultsRequest\x1a\x32.google.cloud.backupdr.v1.ListBackupVaultsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/backupVaults\x12\xdd\x01\n\x17\x46\x65tchUsableBackupVaults\x12\x38.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest\x1a\x39.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources\x12\xb4\x01\n\rGetDataSource\x12..google.cloud.backupdr.v1.GetDataSourceRequest\x1a$.google.cloud.backupdr.v1.DataSource\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\x12\x82\x02\n\x10UpdateDataSource\x12\x31.google.cloud.backupdr.v1.UpdateDataSourceRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nDataSource\x12\x11OperationMetadata\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xc5\x01\n\x0bListBackups\x12,.google.cloud.backupdr.v1.ListBackupsRequest\x1a-.google.cloud.backupdr.v1.ListBackupsResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\x12\x98\x02\n\x1b\x46\x65tchBackupsForResourceType\x12<.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest\x1a=.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse\"|\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02_\x12]/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType\x12\xb2\x01\n\tGetBackup\x12*.google.cloud.backupdr.v1.GetBackupRequest\x1a .google.cloud.backupdr.v1.Backup\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf1\x01\n\x0cUpdateBackup\x12-.google.cloud.backupdr.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02Y2O/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:\x06\x62\x61\x63kup\x12\xd3\x01\n\x0c\x44\x65leteBackup\x12-.google.cloud.backupdr.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf0\x01\n\rRestoreBackup\x12..google.cloud.backupdr.v1.RestoreBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15RestoreBackupResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore:\x01*\x12\xf1\x01\n\x10\x43reateBackupPlan\x12\x31.google.cloud.backupdr.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xf3\x01\n\x10UpdateBackupPlan\x12\x31.google.cloud.backupdr.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xa5\x01\n\rGetBackupPlan\x12..google.cloud.backupdr.v1.GetBackupPlanRequest\x1a$.google.cloud.backupdr.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xb8\x01\n\x0fListBackupPlans\x12\x30.google.cloud.backupdr.v1.ListBackupPlansRequest\x1a\x31.google.cloud.backupdr.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xd1\x01\n\x10\x44\x65leteBackupPlan\x12\x31.google.cloud.backupdr.v1.DeleteBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xc9\x01\n\x15GetBackupPlanRevision\x12\x36.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest\x1a,.google.cloud.backupdr.v1.BackupPlanRevision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/backupPlans/*/revisions/*}\x12\xdc\x01\n\x17ListBackupPlanRevisions\x12\x38.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest\x1a\x39.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/backupPlans/*}/revisions\x12\xc1\x02\n\x1b\x43reateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x39parent,backup_plan_association,backup_plan_association_id\x82\xd3\xe4\x93\x02U\":/v1/{parent=projects/*/locations/*}/backupPlanAssociations:\x17\x62\x61\x63kup_plan_association\x12\xc3\x02\n\x1bUpdateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc6\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41#backup_plan_association,update_mask\x82\xd3\xe4\x93\x02m2R/v1/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}:\x17\x62\x61\x63kup_plan_association\x12\xd1\x01\n\x18GetBackupPlanAssociation\x12\x39.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest\x1a/.google.cloud.backupdr.v1.BackupPlanAssociation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xe4\x01\n\x1aListBackupPlanAssociations\x12;.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest\x1a<.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/backupPlanAssociations\x12\xb7\x02\n*FetchBackupPlanAssociationsForResourceType\x12K.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest\x1aL.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse\"n\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02Q\x12O/v1/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType\x12\xf2\x01\n\x1b\x44\x65leteBackupPlanAssociation\x12<.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xf0\x01\n\rTriggerBackup\x12..google.cloud.backupdr.v1.TriggerBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x0cname,rule_id\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup:\x01*\x12\xc9\x01\n\x16GetDataSourceReference\x12\x37.google.cloud.backupdr.v1.GetDataSourceReferenceRequest\x1a-.google.cloud.backupdr.v1.DataSourceReference\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/dataSourceReferences/*}\x12\xdc\x01\n\x18ListDataSourceReferences\x12\x39.google.cloud.backupdr.v1.ListDataSourceReferencesRequest\x1a:.google.cloud.backupdr.v1.ListDataSourceReferencesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/dataSourceReferences\x12\xaf\x02\n(FetchDataSourceReferencesForResourceType\x12I.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest\x1aJ.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse\"l\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02O\x12M/v1/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType\x12\xde\x01\n\x11InitializeService\x12\x32.google.cloud.backupdr.v1.InitializeServiceRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41.\n\x19InitializeServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/serviceConfig}:initialize:\x01*\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.backupdr.v1B\rBackupDRProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig").msgclass - NetworkConfig::PeeringMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig.PeeringMode").enummodule - ManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementURI").msgclass - WorkforceIdentityBasedManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI").msgclass - WorkforceIdentityBasedOAuth2ClientID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID").msgclass - ManagementServer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer").msgclass - ManagementServer::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceType").enummodule - ManagementServer::InstanceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceState").enummodule - ListManagementServersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersRequest").msgclass - ListManagementServersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersResponse").msgclass - GetManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetManagementServerRequest").msgclass - CreateManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateManagementServerRequest").msgclass - DeleteManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteManagementServerRequest").msgclass - InitializeServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceRequest").msgclass - InitializeServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceResponse").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb deleted file mode 100644 index 91bbec9bb35d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb +++ /dev/null @@ -1,119 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/backupdr/v1/backupdr.proto for package 'Google.Cloud.BackupDR.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/backupdr/v1/backupdr_pb' - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # The BackupDR Service - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.backupdr.v1.BackupDR' - - # Lists ManagementServers in a given project and location. - rpc :ListManagementServers, ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Google::Cloud::BackupDR::V1::ListManagementServersResponse - # Gets details of a single ManagementServer. - rpc :GetManagementServer, ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Google::Cloud::BackupDR::V1::ManagementServer - # Creates a new ManagementServer in a given project and location. - rpc :CreateManagementServer, ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Google::Longrunning::Operation - # Deletes a single ManagementServer. - rpc :DeleteManagementServer, ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Google::Longrunning::Operation - # Creates a new BackupVault in a given project and location. - rpc :CreateBackupVault, ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Google::Longrunning::Operation - # Lists BackupVaults in a given project and location. - rpc :ListBackupVaults, ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - rpc :FetchUsableBackupVaults, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse - # Gets details of a BackupVault. - rpc :GetBackupVault, ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Google::Cloud::BackupDR::V1::BackupVault - # Updates the settings of a BackupVault. - rpc :UpdateBackupVault, ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Google::Longrunning::Operation - # Deletes a BackupVault. - rpc :DeleteBackupVault, ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Google::Longrunning::Operation - # Lists DataSources in a given project and location. - rpc :ListDataSources, ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse - # Gets details of a DataSource. - rpc :GetDataSource, ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Google::Cloud::BackupDR::V1::DataSource - # Updates the settings of a DataSource. - rpc :UpdateDataSource, ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Google::Longrunning::Operation - # Lists Backups in a given project and location. - rpc :ListBackups, ::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Google::Cloud::BackupDR::V1::ListBackupsResponse - # Fetch Backups for a given resource type. - rpc :FetchBackupsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse - # Gets details of a Backup. - rpc :GetBackup, ::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Google::Cloud::BackupDR::V1::Backup - # Updates the settings of a Backup. - rpc :UpdateBackup, ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Google::Longrunning::Operation - # Deletes a Backup. - rpc :DeleteBackup, ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Google::Longrunning::Operation - # Restore from a Backup - rpc :RestoreBackup, ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Google::Longrunning::Operation - # Create a BackupPlan - rpc :CreateBackupPlan, ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation - # Update a BackupPlan. - rpc :UpdateBackupPlan, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlan. - rpc :GetBackupPlan, ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Google::Cloud::BackupDR::V1::BackupPlan - # Lists BackupPlans in a given project and location. - rpc :ListBackupPlans, ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse - # Deletes a single BackupPlan. - rpc :DeleteBackupPlan, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlanRevision. - rpc :GetBackupPlanRevision, ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Google::Cloud::BackupDR::V1::BackupPlanRevision - # Lists BackupPlanRevisions in a given project and location. - rpc :ListBackupPlanRevisions, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse - # Create a BackupPlanAssociation - rpc :CreateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Update a BackupPlanAssociation. - rpc :UpdateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlanAssociation. - rpc :GetBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Google::Cloud::BackupDR::V1::BackupPlanAssociation - # Lists BackupPlanAssociations in a given project and location. - rpc :ListBackupPlanAssociations, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse - # List BackupPlanAssociations for a given resource type. - rpc :FetchBackupPlanAssociationsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse - # Deletes a single BackupPlanAssociation. - rpc :DeleteBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Triggers a new Backup. - rpc :TriggerBackup, ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Google::Longrunning::Operation - # Gets details of a single DataSourceReference. - rpc :GetDataSourceReference, ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Google::Cloud::BackupDR::V1::DataSourceReference - # Lists DataSourceReferences for a given project and location. - rpc :ListDataSourceReferences, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse - # Fetch DataSourceReferences for a given project, location and resource type. - rpc :FetchDataSourceReferencesForResourceType, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse - # Initializes the service related config for a project. - rpc :InitializeService, ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb deleted file mode 100644 index a17a1db88525..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupplan.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/dayofweek_pb' -require 'google/type/month_pb' - - -descriptor_data = "\n)google/cloud/backupdr/v1/backupplan.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x17google/type/month.proto\"\xa5\x07\n\nBackupPlan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.BackupPlan.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x0c\x62\x61\x63kup_rules\x18\x06 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupRuleB\x03\xe0\x41\x02\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.backupdr.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62\x61\x63kup_vault\x18\n \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12)\n\x1c\x62\x61\x63kup_vault_service_account\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12log_retention_days\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18supported_resource_types\x18\r \x03(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rrevision_name\x18\x0f \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x84\x01\xea\x41\x80\x01\n\"backupdr.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}*\x0b\x62\x61\x63kupPlans2\nbackupPlan\"\xb0\x01\n\nBackupRule\x12\x17\n\x07rule_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x15\x62\x61\x63kup_retention_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12L\n\x11standard_schedule\x18\x05 \x01(\x0b\x32*.google.cloud.backupdr.v1.StandardScheduleB\x03\xe0\x41\x01H\x00\x42\x17\n\x15\x62\x61\x63kup_schedule_oneof\"\x97\x04\n\x10StandardSchedule\x12W\n\x0frecurrence_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.backupdr.v1.StandardSchedule.RecurrenceTypeB\x03\xe0\x41\x02\x12\x1d\n\x10hourly_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x31\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x1a\n\rdays_of_month\x18\x04 \x03(\x05\x42\x03\xe0\x41\x01\x12H\n\x11week_day_of_month\x18\x05 \x01(\x0b\x32(.google.cloud.backupdr.v1.WeekDayOfMonthB\x03\xe0\x41\x01\x12\'\n\x06months\x18\x06 \x03(\x0e\x32\x12.google.type.MonthB\x03\xe0\x41\x01\x12\x42\n\rbackup_window\x18\x07 \x01(\x0b\x32&.google.cloud.backupdr.v1.BackupWindowB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x08 \x01(\tB\x03\xe0\x41\x02\"m\n\x0eRecurrenceType\x12\x1f\n\x1bRECURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\"L\n\x0c\x42\x61\x63kupWindow\x12\x1e\n\x11start_hour_of_day\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x65nd_hour_of_day\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xfa\x01\n\x0eWeekDayOfMonth\x12P\n\rweek_of_month\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonthB\x03\xe0\x41\x02\x12\x30\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"d\n\x0bWeekOfMonth\x12\x1d\n\x19WEEK_OF_MONTH_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IRST\x10\x01\x12\n\n\x06SECOND\x10\x02\x12\t\n\x05THIRD\x10\x03\x12\n\n\x06\x46OURTH\x10\x04\x12\x08\n\x04LAST\x10\x05\"\xd3\x01\n\x17\x43reateBackupPlanRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x62\x61\x63kup_plan\x18\x03 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb1\x01\n\x16ListBackupPlansRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListBackupPlansResponse\x12:\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\"t\n\x17\x44\x65leteBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n\x17UpdateBackupPlanRequest\x12>\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x90\x04\n\x12\x42\x61\x63kupPlanRevision\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupPlanRevision.StateB\x03\xe0\x41\x03\x12\x42\n\x14\x62\x61\x63kup_plan_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04:\xb1\x01\xea\x41\xad\x01\n*backupdr.googleapis.com/BackupPlanRevision\x12Vprojects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}*\x13\x62\x61\x63kupPlanRevisions2\x12\x62\x61\x63kupPlanRevision\"`\n\x1cGetBackupPlanRevisionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*backupdr.googleapis.com/BackupPlanRevision\"\x95\x01\n\x1eListBackupPlanRevisionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*backupdr.googleapis.com/BackupPlanRevision\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9c\x01\n\x1fListBackupPlanRevisionsResponse\x12K\n\x15\x62\x61\x63kup_plan_revisions\x18\x01 \x03(\x0b\x32,.google.cloud.backupdr.v1.BackupPlanRevision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xbf\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - BackupPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan").msgclass - BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan.State").enummodule - BackupRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupRule").msgclass - StandardSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule").msgclass - StandardSchedule::RecurrenceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule.RecurrenceType").enummodule - BackupWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupWindow").msgclass - WeekDayOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth").msgclass - WeekDayOfMonth::WeekOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth").enummodule - CreateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanRequest").msgclass - ListBackupPlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansRequest").msgclass - ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansResponse").msgclass - GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRequest").msgclass - DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanRequest").msgclass - UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanRequest").msgclass - BackupPlanRevision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision").msgclass - BackupPlanRevision::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision.State").enummodule - GetBackupPlanRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRevisionRequest").msgclass - ListBackupPlanRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest").msgclass - ListBackupPlanRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb deleted file mode 100644 index 377b868210a5..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupplanassociation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_alloydb_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n4google/cloud/backupdr/v1/backupplanassociation.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/backupdr/v1/backupvault_alloydb.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xe9\x08\n\x15\x42\x61\x63kupPlanAssociation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1d\n\rresource_type\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x08resource\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12?\n\x0b\x62\x61\x63kup_plan\x18\x04 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.BackupPlanAssociation.StateB\x03\xe0\x41\x03\x12H\n\x11rules_config_info\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.RuleConfigInfoB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x8f\x01\n5cloud_sql_instance_backup_plan_association_properties\x18\n \x01(\x0b\x32I.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12\x8a\x01\n2alloydb_cluster_backup_plan_association_properties\x18\x0f \x01(\x0b\x32G.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12$\n\x17\x62\x61\x63kup_plan_revision_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x62\x61\x63kup_plan_revision_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xbc\x01\xea\x41\xb8\x01\n-backupdr.googleapis.com/BackupPlanAssociation\x12Xprojects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}*\x16\x62\x61\x63kupPlanAssociations2\x15\x62\x61\x63kupPlanAssociationB\x15\n\x13resource_properties\"\x89\x03\n\x0eRuleConfigInfo\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x11last_backup_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\x8c\x02\n\"CreateBackupPlanAssociationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\'\n\x1a\x62\x61\x63kup_plan_association_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n!ListBackupPlanAssociationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\"ListBackupPlanAssociationsResponse\x12Q\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xf3\x01\n1FetchBackupPlanAssociationsForResourceTypeRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n2FetchBackupPlanAssociationsForResourceTypeResponse\x12V\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"f\n\x1fGetBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\"\x8a\x01\n\"DeleteBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd2\x01\n\"UpdateBackupPlanAssociationRequest\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x01 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x92\x01\n\x14TriggerBackupRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x14\n\x07rule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xca\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x1a\x42\x61\x63kupPlanAssociationProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - BackupPlanAssociation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation").msgclass - BackupPlanAssociation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation.State").enummodule - RuleConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo").msgclass - RuleConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState").enummodule - CreateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest").msgclass - ListBackupPlanAssociationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest").msgclass - ListBackupPlanAssociationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse").msgclass - FetchBackupPlanAssociationsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest").msgclass - FetchBackupPlanAssociationsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse").msgclass - GetBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanAssociationRequest").msgclass - DeleteBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest").msgclass - UpdateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest").msgclass - TriggerBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TriggerBackupRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb deleted file mode 100644 index 779033cb68ba..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_alloydb.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n2google/cloud/backupdr/v1/backupvault_alloydb.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\"Z\n\"AlloyDBClusterDataSourceProperties\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x61lloydb.googleapis.com/Cluster\"\x9b\x01\n\x1e\x41lloyDbClusterBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cstored_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08\x63hain_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x64\x61tabase_version\x18\x04 \x01(\tB\x03\xe0\x41\x03\x42\x0e\n\x0c_description\"Q\n-AlloyDBClusterBackupPlanAssociationProperties\x12 \n\x0b\x63luster_uid\x18\x01 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xa6\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x17\x42\x61\x63kupvaultAlloyDBProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\\\n\x1e\x61lloydb.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - AlloyDBClusterDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties").msgclass - AlloyDbClusterBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDbClusterBackupProperties").msgclass - AlloyDBClusterBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb deleted file mode 100644 index 54c592031980..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_ba.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/backupdr/v1/backupvault_ba.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\x02\n\x1f\x42\x61\x63kupApplianceBackupProperties\x12\x1f\n\rgeneration_id\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12;\n\rfinalize_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12G\n\x19recovery_range_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x45\n\x17recovery_range_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x10\n\x0e_generation_idB\x10\n\x0e_finalize_timeB\x1c\n\x1a_recovery_range_start_timeB\x1a\n\x18_recovery_range_end_timeB\xc2\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x12\x42\x61\x63kupvaultBaProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - BackupApplianceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb deleted file mode 100644 index 74bfb355222d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_cloudsql.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/backupdr/v1/backupvault_cloudsql.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x01\n$CloudSqlInstanceDataSourceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xc3\x02\n CloudSqlInstanceBackupProperties\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x66inal_backup\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0fsource_instance\x18\x04 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12=\n\x14instance_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_delete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xeb\x01\n-CloudSqlInstanceDataSourceReferenceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n$CloudSqlInstanceInitializationConfig\x12\\\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x46.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.EditionB\x03\xe0\x41\x02\"G\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x02\"p\n/CloudSqlInstanceBackupPlanAssociationProperties\x12=\n\x14instance_create_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x96\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x42\x61\x63kupvaultCloudSqlProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41K\n sqladmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - CloudSqlInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties").msgclass - CloudSqlInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties").msgclass - CloudSqlInstanceDataSourceReferenceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties").msgclass - CloudSqlInstanceInitializationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig").msgclass - CloudSqlInstanceInitializationConfig::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition").enummodule - CloudSqlInstanceBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb deleted file mode 100644 index 22dcc5473054..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_disk.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_gce_pb' - - -descriptor_data = "\n/google/cloud/backupdr/v1/backupvault_disk.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\"@\n\x15\x44iskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"d\n\x1bRegionDiskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rreplica_zones\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xa5\x0b\n\x15\x44iskRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x19\n\x07size_gb\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x15\n\x08licenses\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12G\n\x10guest_os_feature\x18\x05 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x06 \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12+\n\x19physical_block_size_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10provisioned_iops\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16provisioned_throughput\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12-\n\x1b\x65nable_confidential_compute\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x45\n\x0cstorage_pool\x18\x0b \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"compute.googleapis.com/StoragePoolH\x08\x88\x01\x01\x12Y\n\x0b\x61\x63\x63\x65ss_mode\x18\x0c \x01(\x0e\x32:.google.cloud.backupdr.v1.DiskRestoreProperties.AccessModeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\\\n\x0c\x61rchitecture\x18\x0e \x01(\x0e\x32<.google.cloud.backupdr.v1.DiskRestoreProperties.ArchitectureB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1c\n\x0fresource_policy\x18\x0f \x03(\tB\x03\xe0\x41\x01\x12\x16\n\x04type\x18\x10 \x01(\tB\x03\xe0\x41\x02H\x0b\x88\x01\x01\x12P\n\x06labels\x18\x11 \x03(\x0b\x32;.google.cloud.backupdr.v1.DiskRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12l\n\x15resource_manager_tags\x18\x12 \x03(\x0b\x32H.google.cloud.backupdr.v1.DiskRestoreProperties.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"L\n\nAccessMode\x12\x15\n\x11READ_WRITE_SINGLE\x10\x00\x12\x13\n\x0fREAD_WRITE_MANY\x10\x01\x12\x12\n\x0eREAD_ONLY_MANY\x10\x02\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\n\n\x08_size_gbB\x16\n\x14_disk_encryption_keyB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x1e\n\x1c_enable_confidential_computeB\x0f\n\r_storage_poolB\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x07\n\x05_type\"\xff\x03\n\x14\x44iskBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08licenses\x18\x02 \x03(\t\x12\x42\n\x10guest_os_feature\x18\x03 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeature\x12V\n\x0c\x61rchitecture\x18\x04 \x01(\x0e\x32;.google.cloud.backupdr.v1.DiskBackupProperties.ArchitectureH\x01\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07size_gb\x18\x06 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06region\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x11\n\x04zone\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x15\n\rreplica_zones\x18\t \x03(\t\x12\x18\n\x0bsource_disk\x18\n \x01(\tH\x06\x88\x01\x01\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x0e\n\x0c_descriptionB\x0f\n\r_architectureB\x07\n\x05_typeB\n\n\x08_size_gbB\t\n\x07_regionB\x07\n\x05_zoneB\x0e\n\x0c_source_disk\"\\\n\x18\x44iskDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0f\n\x07size_gb\x18\x04 \x01(\x03\x42\xa8\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x14\x42\x61\x63kupvaultDiskProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\x61\n\"compute.googleapis.com/StoragePool\x12;projects/{project}/zones/{zone}/storagePools/{storage_pool}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - DiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskTargetEnvironment").msgclass - RegionDiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RegionDiskTargetEnvironment").msgclass - DiskRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties").msgclass - DiskRestoreProperties::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode").enummodule - DiskRestoreProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.Architecture").enummodule - DiskBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties").msgclass - DiskBackupProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties.Architecture").enummodule - DiskDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskDataSourceProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb deleted file mode 100644 index 06a571c45721..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_gce.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' - - -descriptor_data = "\n.google/cloud/backupdr/v1/backupvault_gce.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xe8\x07\n\x1f\x43omputeInstanceBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x04tags\x18\x02 \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsH\x01\x88\x01\x01\x12\x19\n\x0cmachine_type\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63\x61n_ip_forward\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x45\n\x11network_interface\x18\x05 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterface\x12\x34\n\x04\x64isk\x18\x06 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDisk\x12\x39\n\x08metadata\x18\x07 \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataH\x04\x88\x01\x01\x12\x41\n\x0fservice_account\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccount\x12=\n\nscheduling\x18\t \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingH\x05\x88\x01\x01\x12\x46\n\x11guest_accelerator\x18\n \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfig\x12\x1d\n\x10min_cpu_platform\x18\x0b \x01(\tH\x06\x88\x01\x01\x12Z\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeH\x07\x88\x01\x01\x12\x1c\n\x0fsource_instance\x18\r \x01(\tH\x08\x88\x01\x01\x12U\n\x06labels\x18\x0e \x03(\x0b\x32\x45.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\x07\n\x05_tagsB\x0f\n\r_machine_typeB\x11\n\x0f_can_ip_forwardB\x0b\n\t_metadataB\r\n\x0b_schedulingB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_key_revocation_action_typeB\x12\n\x10_source_instance\"\xc7\x12\n ComputeInstanceRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12^\n\x19\x61\x64vanced_machine_features\x18\x02 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.AdvancedMachineFeaturesB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0e\x63\x61n_ip_forward\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x64\n\x1c\x63onfidential_instance_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12%\n\x13\x64\x65letion_protection\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12:\n\x05\x64isks\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDiskB\x03\xe0\x41\x01\x12I\n\x0e\x64isplay_device\x18\x08 \x01(\x0b\x32\'.google.cloud.backupdr.v1.DisplayDeviceB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12L\n\x12guest_accelerators\x18\t \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1a\n\x08hostname\x18\n \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12Z\n\x17instance_encryption_key\x18\x0b \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12_\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12[\n\x06labels\x18\r \x03(\x0b\x32\x46.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x0cmachine_type\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x08metadata\x18\x0f \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\x10min_cpu_platform\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12K\n\x12network_interfaces\x18\x11 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterfaceB\x03\xe0\x41\x01\x12`\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.NetworkPerformanceConfigB\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x42\n\x06params\x18\x13 \x01(\x0b\x32(.google.cloud.backupdr.v1.InstanceParamsB\x03\xe0\x41\x04H\x0e\x88\x01\x01\x12\x88\x01\n\x1aprivate_ipv6_google_access\x18\x14 \x01(\x0e\x32Z.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccessB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12h\n\x13\x61llocation_affinity\x18\x15 \x01(\x0b\x32,.google.cloud.backupdr.v1.AllocationAffinityB\x03\xe0\x41\x01H\x10R\x13reservationAffinity\x88\x01\x01\x12\x1e\n\x11resource_policies\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\nscheduling\x18\x17 \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingB\x03\xe0\x41\x01H\x11\x88\x01\x01\x12G\n\x10service_accounts\x18\x18 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccountB\x03\xe0\x41\x01\x12\x36\n\x04tags\x18\x1a \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsB\x03\xe0\x41\x01H\x12\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc7\x01\n\x1fInstancePrivateIpv6GoogleAccess\x12\x33\n/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\'\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\x02\x12)\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\x03\x42\x07\n\x05_nameB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0b\n\t_hostnameB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x16\n\x14_allocation_affinityB\r\n\x0b_schedulingB\x07\n\x05_tags\"K\n ComputeInstanceTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n#ComputeInstanceDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cmachine_type\x18\x03 \x01(\t\x12\x18\n\x10total_disk_count\x18\x04 \x01(\x03\x12\x1a\n\x12total_disk_size_gb\x18\x05 \x01(\x03\"\xa5\x02\n\x17\x41\x64vancedMachineFeatures\x12.\n\x1c\x65nable_nested_virtualization\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10threads_per_core\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x12visible_core_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12(\n\x16\x65nable_uefi_networking\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x13\n\x11_threads_per_coreB\x15\n\x13_visible_core_countB\x19\n\x17_enable_uefi_networking\"k\n\x1a\x43onfidentialInstanceConfig\x12-\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1e\n\x1c_enable_confidential_compute\"D\n\rDisplayDevice\x12 \n\x0e\x65nable_display\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x87\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x10\x61\x63\x63\x65lerator_type\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_accelerator_typeB\x14\n\x12_accelerator_count\"\xbc\x01\n\x15\x43ustomerEncryptionKey\x12\x16\n\x07raw_key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12 \n\x11rsa_encrypted_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0ckms_key_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12)\n\x17kms_key_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x05\n\x03keyB\x1a\n\x18_kms_key_service_account\"I\n\x05\x45ntry\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"?\n\x08Metadata\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32\x1f.google.cloud.backupdr.v1.EntryB\x03\xe0\x41\x01\"\x96\t\n\x10NetworkInterface\x12\x19\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12/\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02H\x02R\tnetworkIP\x88\x01\x01\x12&\n\x0cipv6_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x03H\x03\x88\x01\x01\x12-\n\x1binternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63\x65ss_configs\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12H\n\x13ipv6_access_configs\x18\x08 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x61lias_ip_ranges\x18\t \x03(\x0b\x32&.google.cloud.backupdr.v1.AliasIpRangeB\x03\xe0\x41\x01\x12M\n\nstack_type\x18\n \x01(\x0e\x32\x34.google.cloud.backupdr.v1.NetworkInterface.StackTypeH\x06\x88\x01\x01\x12]\n\x10ipv6_access_type\x18\x0b \x01(\x0e\x32\x39.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessTypeB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0bqueue_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12N\n\x08nic_type\x18\r \x01(\x0e\x32\x32.google.cloud.backupdr.v1.NetworkInterface.NicTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12$\n\x12network_attachment\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\"E\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIPV4_ONLY\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIpv6AccessType\x12 \n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\">\n\x07NicType\x12\x18\n\x14NIC_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nVIRTIO_NET\x10\x01\x12\t\n\x05GVNIC\x10\x02\x42\n\n\x08_networkB\r\n\x0b_subnetworkB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x07\n\x05_nameB\r\n\x0b_stack_typeB\x13\n\x11_ipv6_access_typeB\x0e\n\x0c_queue_countB\x0b\n\t_nic_typeB\x15\n\x13_network_attachment\"\xd9\x01\n\x18NetworkPerformanceConfig\x12\x66\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.NetworkPerformanceConfig.TierB\x03\xe0\x41\x01H\x00\x88\x01\x01\"5\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06TIER_1\x10\x02\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\xb2\x05\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AccessConfig.AccessTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x0b\x65xternal_ip\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x05natIP\x88\x01\x01\x12\x1f\n\rexternal_ipv6\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x65xternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12 \n\x0eset_public_ptr\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16public_ptr_domain_name\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12R\n\x0cnetwork_tier\x18\x08 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.AccessConfig.NetworkTierB\x03\xe0\x41\x01H\x07\x88\x01\x01\"N\n\nAccessType\x12\x1b\n\x17\x41\x43\x43\x45SS_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eONE_TO_ONE_NAT\x10\x01\x12\x0f\n\x0b\x44IRECT_IPV6\x10\x02\"F\n\x0bNetworkTier\x12\x1c\n\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREMIUM\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x42\x07\n\x05_typeB\x07\n\x05_nameB\x0e\n\x0c_external_ipB\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x11\n\x0f_set_public_ptrB\x19\n\x17_public_ptr_domain_nameB\x0f\n\r_network_tier\"\x84\x01\n\x0c\x41liasIpRange\x12\x1f\n\rip_cidr_range\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15subnetwork_range_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\xb3\x01\n\x0eInstanceParams\x12\x65\n\x15resource_manager_tags\x18\x01 \x03(\x0b\x32\x41.google.cloud.backupdr.v1.InstanceParams.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x02\n\x12\x41llocationAffinity\x12t\n\x17\x63onsume_allocation_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AllocationAffinity.TypeB\x03\xe0\x41\x01H\x00R\x16\x63onsumeReservationType\x88\x01\x01\x12\x15\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x42\x1a\n\x18_consume_allocation_typeB\x06\n\x04_key\"\xdc\t\n\nScheduling\x12]\n\x13on_host_maintenance\x18\x01 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.OnHostMaintenanceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61utomatic_restart\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bpreemptible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12O\n\x0fnode_affinities\x18\x04 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.Scheduling.NodeAffinityB\x03\xe0\x41\x01\x12\x1f\n\rmin_node_cpus\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x12provisioning_model\x18\x06 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.ProvisioningModelB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12m\n\x1binstance_termination_action\x18\x07 \x01(\x0e\x32>.google.cloud.backupdr.v1.Scheduling.InstanceTerminationActionB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12Z\n\x1alocal_ssd_recovery_timeout\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.SchedulingDurationB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\xe1\x01\n\x0cNodeAffinity\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x08operator\x18\x02 \x01(\x0e\x32:.google.cloud.backupdr.v1.Scheduling.NodeAffinity.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x06\n\x04_keyB\x0b\n\t_operator\"U\n\x11OnHostMaintenance\x12#\n\x1fON_HOST_MAINTENANCE_UNSPECIFIED\x10\x00\x12\r\n\tTERMINATE\x10\x01\x12\x0c\n\x07MIGRATE\x10\xe8\x07\"O\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\"^\n\x19InstanceTerminationAction\x12+\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\x16\n\x14_on_host_maintenanceB\x14\n\x12_automatic_restartB\x0e\n\x0c_preemptibleB\x10\n\x0e_min_node_cpusB\x15\n\x13_provisioning_modelB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeout\"^\n\x12SchedulingDuration\x12\x19\n\x07seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05nanos\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_secondsB\x08\n\x06_nanos\"H\n\x0eServiceAccount\x12\x17\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x08\n\x06_email\"\x1a\n\x04Tags\x12\x12\n\x05items\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x91\x0c\n\x0c\x41ttachedDisk\x12\\\n\x11initialize_params\x18\x01 \x01(\x0b\x32\x37.google.cloud.backupdr.v1.AttachedDisk.InitializeParamsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65vice_name\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\x04kind\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14\x64isk_type_deprecated\x18\x06 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x02\x18\x01H\x03\x88\x01\x01\x12G\n\x04mode\x18\x07 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskModeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x18\n\x06source\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\x05index\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04\x62oot\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0b\x61uto_delete\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x14\n\x07license\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12V\n\x0e\x64isk_interface\x18\r \x01(\x0e\x32\x34.google.cloud.backupdr.v1.AttachedDisk.DiskInterfaceB\x03\xe0\x41\x01H\t\x88\x01\x01\x12G\n\x10guest_os_feature\x18\x0e \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x0f \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0c\x64isk_size_gb\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12W\n\x0bsaved_state\x18\x11 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.AttachedDisk.DiskSavedStateB\x06\xe0\x41\x01\xe0\x41\x03H\x0c\x88\x01\x01\x12\x1e\n\tdisk_type\x18\x12 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\r\x88\x01\x01\x12G\n\x04type\x18\x13 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x1aY\n\x10InitializeParams\x12\x1b\n\tdisk_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\rreplica_zones\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_disk_name\"B\n\x08\x44iskType\x12\x19\n\x15\x44ISK_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCRATCH\x10\x01\x12\x0e\n\nPERSISTENT\x10\x02\"P\n\x08\x44iskMode\x12\x19\n\x15\x44ISK_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\n\n\x06LOCKED\x10\x03\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\"A\n\x0e\x44iskSavedState\x12 \n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\x00\x12\r\n\tPRESERVED\x10\x01\x42\x14\n\x12_initialize_paramsB\x0e\n\x0c_device_nameB\x07\n\x05_kindB\x17\n\x15_disk_type_deprecatedB\x07\n\x05_modeB\t\n\x07_sourceB\x08\n\x06_indexB\x07\n\x05_bootB\x0e\n\x0c_auto_deleteB\x11\n\x0f_disk_interfaceB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0e\n\x0c_saved_stateB\x0c\n\n_disk_typeB\x07\n\x05_type\"\xb5\x03\n\x0eGuestOsFeature\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.GuestOsFeature.FeatureTypeH\x00\x88\x01\x01\"\xd0\x02\n\x0b\x46\x65\x61tureType\x12\x1c\n\x18\x46\x45\x41TURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VIRTIO_SCSI_MULTIQUEUE\x10\x01\x12\x0b\n\x07WINDOWS\x10\x02\x12\x13\n\x0fMULTI_IP_SUBNET\x10\x03\x12\x13\n\x0fUEFI_COMPATIBLE\x10\x04\x12\x0f\n\x0bSECURE_BOOT\x10\x05\x12\t\n\x05GVNIC\x10\x06\x12\x0f\n\x0bSEV_CAPABLE\x10\x07\x12\x1f\n\x1b\x42\x41RE_METAL_LINUX_COMPATIBLE\x10\x08\x12\x1d\n\x19SUSPEND_RESUME_COMPATIBLE\x10\t\x12\x17\n\x13SEV_LIVE_MIGRATABLE\x10\n\x12\x13\n\x0fSEV_SNP_CAPABLE\x10\x0b\x12\x0f\n\x0bTDX_CAPABLE\x10\x0c\x12\x08\n\x04IDPF\x10\r\x12\x1a\n\x16SEV_LIVE_MIGRATABLE_V2\x10\x0e\x42\x07\n\x05_type*Y\n\x17KeyRevocationActionType\x12*\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\xc3\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x13\x42\x61\x63kupvaultGceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - ComputeInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceBackupProperties").msgclass - ComputeInstanceRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties").msgclass - ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess").enummodule - ComputeInstanceTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment").msgclass - ComputeInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties").msgclass - AdvancedMachineFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AdvancedMachineFeatures").msgclass - ConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ConfidentialInstanceConfig").msgclass - DisplayDevice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DisplayDevice").msgclass - AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AcceleratorConfig").msgclass - CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CustomerEncryptionKey").msgclass - Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Entry").msgclass - Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Metadata").msgclass - NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface").msgclass - NetworkInterface::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.StackType").enummodule - NetworkInterface::Ipv6AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType").enummodule - NetworkInterface::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.NicType").enummodule - NetworkPerformanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig").msgclass - NetworkPerformanceConfig::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier").enummodule - AccessConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig").msgclass - AccessConfig::AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.AccessType").enummodule - AccessConfig::NetworkTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.NetworkTier").enummodule - AliasIpRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AliasIpRange").msgclass - InstanceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InstanceParams").msgclass - AllocationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity").msgclass - AllocationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity.Type").enummodule - Scheduling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling").msgclass - Scheduling::NodeAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity").msgclass - Scheduling::NodeAffinity::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator").enummodule - Scheduling::OnHostMaintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.OnHostMaintenance").enummodule - Scheduling::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.ProvisioningModel").enummodule - Scheduling::InstanceTerminationAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction").enummodule - SchedulingDuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.SchedulingDuration").msgclass - ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceAccount").msgclass - Tags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Tags").msgclass - AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk").msgclass - AttachedDisk::InitializeParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.InitializeParams").msgclass - AttachedDisk::DiskType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskType").enummodule - AttachedDisk::DiskMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskMode").enummodule - AttachedDisk::DiskInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskInterface").enummodule - AttachedDisk::DiskSavedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskSavedState").enummodule - GuestOsFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature").msgclass - GuestOsFeature::FeatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature.FeatureType").enummodule - KeyRevocationActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.KeyRevocationActionType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb deleted file mode 100644 index 75f9ea85ef49..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_alloydb_pb' -require 'google/cloud/backupdr/v1/backupvault_ba_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/cloud/backupdr/v1/backupvault_disk_pb' -require 'google/cloud/backupdr/v1/backupvault_gce_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n*google/cloud/backupdr/v1/backupvault.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/backupdr/v1/backupvault_alloydb.proto\x1a-google/cloud/backupdr/v1/backupvault_ba.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a/google/cloud/backupdr/v1/backupvault_disk.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9f\x0f\n\x0b\x42\x61\x63kupVault\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.BackupVault.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12W\n*backup_minimum_enforced_retention_duration\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1b \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\tdeletable\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x16\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupVault.StateB\x03\xe0\x41\x03\x12<\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12total_stored_bytes\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x15 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12P\n\x0b\x61nnotations\x18\x16 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.AnnotationsEntryB\x03\xe0\x41\x01\x12X\n\x12\x61\x63\x63\x65ss_restriction\x18\x18 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.BackupVault.AccessRestrictionB\x03\xe0\x41\x01\x12[\n\x11\x65ncryption_config\x18\x1d \x01(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.EncryptionConfigB\x03\xe0\x41\x01H\x08\x88\x01\x01\x1ai\n\x10\x45ncryptionConfig\x12\x44\n\x0ckms_key_name\x18\x01 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x00\x88\x01\x01\x42\x0f\n\r_kms_key_name\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x1a\x42\x61\x63kupRetentionInheritance\x12,\n(BACKUP_RETENTION_INHERITANCE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_VAULT_RETENTION\x10\x01\x12\x1c\n\x18MATCH_BACKUP_EXPIRE_TIME\x10\x02\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\"\x9e\x01\n\x11\x41\x63\x63\x65ssRestriction\x12\"\n\x1e\x41\x43\x43\x45SS_RESTRICTION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWITHIN_PROJECT\x10\x01\x12\x17\n\x13WITHIN_ORGANIZATION\x10\x02\x12\x10\n\x0cUNRESTRICTED\x10\x03\x12&\n\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\x10\x04:\x88\x01\xea\x41\x84\x01\n#backupdr.googleapis.com/BackupVault\x12\x42projects/{project}/locations/{location}/backupVaults/{backupvault}*\x0c\x62\x61\x63kupVaults2\x0b\x62\x61\x63kupVaultB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB-\n+_backup_minimum_enforced_retention_durationB\x1f\n\x1d_backup_retention_inheritanceB\x0c\n\n_deletableB\x07\n\x05_etagB\x11\n\x0f_effective_timeB\x14\n\x12_encryption_config\"\x8c\t\n\nDataSource\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05state\x18\x15 \x01(\x0e\x32*.google.cloud.backupdr.v1.DataSource.StateB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.DataSource.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x07 \x01(\x03H\x03\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x12total_stored_bytes\x18\x17 \x01(\x03H\x05\x88\x01\x01\x12\x46\n\x0c\x63onfig_state\x18\x18 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12K\n\x12\x62\x61\x63kup_config_info\x18\x19 \x01(\x0b\x32*.google.cloud.backupdr.v1.BackupConfigInfoB\x03\xe0\x41\x03\x12S\n\x18\x64\x61ta_source_gcp_resource\x18\x1a \x01(\x0b\x32/.google.cloud.backupdr.v1.DataSourceGcpResourceH\x00\x12r\n(data_source_backup_appliance_application\x18\x1b \x01(\x0b\x32>.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationH\x00\x12\x37\n*backup_blocked_by_vault_access_restriction\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\x9e\x01\xea\x41\x9a\x01\n\"backupdr.googleapis.com/DataSource\x12[projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x11\n\x0fsource_resourceB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x0f\n\r_backup_countB\x07\n\x05_etagB\x15\n\x13_total_stored_bytes\"\xb1\x04\n\x10\x42\x61\x63kupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x11gcp_backup_config\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.GcpBackupConfigH\x00\x12_\n\x1e\x62\x61\x63kup_appliance_backup_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.BackupApplianceBackupConfigH\x00\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x0f\n\rbackup_config\"\xa4\x02\n\x0fGcpBackupConfig\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\x17\x62\x61\x63kup_plan_description\x18\x02 \x01(\t\x12S\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\tB2\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x19\n\x11\x62\x61\x63kup_plan_rules\x18\x04 \x03(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x05 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x06 \x01(\t\"\xba\x01\n\x1b\x42\x61\x63kupApplianceBackupConfig\x12\x1d\n\x15\x62\x61\x63kup_appliance_name\x18\x01 \x01(\t\x12\x1b\n\x13\x62\x61\x63kup_appliance_id\x18\x02 \x01(\x03\x12\x0e\n\x06sla_id\x18\x03 \x01(\x03\x12\x18\n\x10\x61pplication_name\x18\x04 \x01(\t\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x10\n\x08slt_name\x18\x06 \x01(\t\x12\x10\n\x08slp_name\x18\x07 \x01(\t\"\xaa\x04\n\x15\x44\x61taSourceGcpResource\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12o\n&compute_instance_datasource_properties\x18\x04 \x01(\x0b\x32=.google.cloud.backupdr.v1.ComputeInstanceDataSourcePropertiesH\x00\x12w\n(cloud_sql_instance_datasource_properties\x18\x05 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12s\n&alloy_db_cluster_datasource_properties\x18\x06 \x01(\x0b\x32<.google.cloud.backupdr.v1.AlloyDBClusterDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12X\n\x1a\x64isk_datasource_properties\x18\x07 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.DiskDataSourcePropertiesH\x00\x42\x19\n\x17gcp_resource_properties\"\xb9\x01\n$DataSourceBackupApplianceApplication\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_appliance\x18\x02 \x01(\t\x12\x14\n\x0c\x61ppliance_id\x18\x03 \x01(\x03\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x08 \x01(\x03\x12\x10\n\x08hostname\x18\x06 \x01(\t\x12\x0f\n\x07host_id\x18\x07 \x01(\x03\")\n\x0fServiceLockInfo\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x17\x42\x61\x63kupApplianceLockInfo\x12 \n\x13\x62\x61\x63kup_appliance_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\"\n\x15\x62\x61\x63kup_appliance_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0block_reason\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x08job_name\x18\x06 \x01(\tH\x00\x12\x16\n\x0c\x62\x61\x63kup_image\x18\x07 \x01(\tH\x00\x12\x10\n\x06sla_id\x18\x08 \x01(\x03H\x00\x42\r\n\x0block_source\"\xfe\x01\n\nBackupLock\x12\x38\n\x0flock_until_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12W\n\x1a\x62\x61\x63kup_appliance_lock_info\x18\x03 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.BackupApplianceLockInfoH\x00\x12K\n\x11service_lock_info\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.ServiceLockInfoB\x03\xe0\x41\x03H\x00\x42\x10\n\x0e\x43lientLockInfo\"\x80\x14\n\x06\x42\x61\x63kup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x41\n\x06labels\x18\x05 \x03(\x0b\x32,.google.cloud.backupdr.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12I\n\x1b\x65nforced_retention_end_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1e \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x39\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12>\n\x10\x63onsistency_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\t\x88\x01\x01\x12\x16\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12:\n\x05state\x18\x0f \x01(\x0e\x32&.google.cloud.backupdr.v1.Backup.StateB\x03\xe0\x41\x03\x12@\n\rservice_locks\x18\x11 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x03\x12I\n\x16\x62\x61\x63kup_appliance_locks\x18\x12 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x01\x12l\n\"compute_instance_backup_properties\x18\x13 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.ComputeInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12o\n$cloud_sql_instance_backup_properties\x18\x1a \x01(\x0b\x32:.google.cloud.backupdr.v1.CloudSqlInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12l\n\"backup_appliance_backup_properties\x18\x15 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.BackupApplianceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x63\n\x1a\x61lloy_db_backup_properties\x18\x1b \x01(\x0b\x32\x38.google.cloud.backupdr.v1.AlloyDbClusterBackupPropertiesB\x03\xe0\x41\x03H\x00\x12U\n\x16\x64isk_backup_properties\x18\x1c \x01(\x0b\x32..google.cloud.backupdr.v1.DiskBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x45\n\x0b\x62\x61\x63kup_type\x18\x14 \x01(\x0e\x32+.google.cloud.backupdr.v1.Backup.BackupTypeB\x03\xe0\x41\x03\x12W\n\x14gcp_backup_plan_info\x18\x16 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfoB\x03\xe0\x41\x03H\x01\x12 \n\x13resource_size_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x19 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12H\n\x0cgcp_resource\x18\x1f \x01(\x0b\x32+.google.cloud.backupdr.v1.BackupGcpResourceB\x03\xe0\x41\x03H\x02\x12J\n\x10kms_key_versions\x18! \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\xb2\x01\n\x11GCPBackupPlanInfo\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x13\x62\x61\x63kup_plan_rule_id\x18\x02 \x01(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x03 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x04 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\r\n\tUPLOADING\x10\x05\"b\n\nBackupType\x12\x1b\n\x17\x42\x41\x43KUP_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\r\n\tON_DEMAND\x10\x02\x12\x19\n\x15ON_DEMAND_OPERATIONAL\x10\x03:\xa3\x01\xea\x41\x9f\x01\n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12lprojects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupB\x13\n\x11\x62\x61\x63kup_propertiesB\x0b\n\tplan_infoB\x11\n\x0fsource_resourceB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x1e\n\x1c_enforced_retention_end_timeB\x1f\n\x1d_backup_retention_inheritanceB\x0e\n\x0c_expire_timeB\x13\n\x11_consistency_timeB\x07\n\x05_etagB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xf4\x01\n\x18\x43reateBackupVaultRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x1c\n\x0f\x62\x61\x63kup_vault_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x03 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xf1\x01\n\x17ListBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12<\n\x04view\x18\x06 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x86\x01\n\x18ListBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x1e\x46\x65tchUsableBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1f\x46\x65tchUsableBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8e\x02\n\"FetchBackupsForResourceTypeRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x07 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"q\n#FetchBackupsForResourceTypeResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x90\x01\n\x15GetBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12<\n\x04view\x18\x02 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x91\x02\n\x18UpdateBackupVaultRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x02 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x66orce_update_access_restriction\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xfc\x01\n\x18\x44\x65leteBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1dignore_backup_plan_references\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x16ListDataSourcesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/DataSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListDataSourcesResponse\x12:\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetDataSourceRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/DataSource\"\xcc\x01\n\x17UpdateDataSourceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12>\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32$.google.cloud.backupdr.v1.DataSourceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x01\n\x12ListBackupsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x06 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"v\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10GetBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x37\n\x04view\x18\x02 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"\xa3\x01\n\x13UpdateBackupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32 .google.cloud.backupdr.v1.BackupB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"l\n\x13\x44\x65leteBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xe2\x05\n\x14RestoreBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n#compute_instance_target_environment\x18\x03 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironmentH\x00\x12R\n\x17\x64isk_target_environment\x18\x05 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskTargetEnvironmentH\x00\x12_\n\x1eregion_disk_target_environment\x18\x06 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.RegionDiskTargetEnvironmentH\x00\x12i\n#compute_instance_restore_properties\x18\x04 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceRestorePropertiesH\x01\x12R\n\x17\x64isk_restore_properties\x18\x07 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskRestorePropertiesH\x01\x12H\n\x1a\x63lear_overrides_field_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x14\n\x12target_environmentB\x15\n\x13instance_propertiesB\x1d\n\x1b_clear_overrides_field_mask\"Z\n\x15RestoreBackupResponse\x12\x41\n\x0ftarget_resource\x18\x01 \x01(\x0b\x32(.google.cloud.backupdr.v1.TargetResource\"g\n\x0eTargetResource\x12=\n\x0cgcp_resource\x18\x01 \x01(\x0b\x32%.google.cloud.backupdr.v1.GcpResourceH\x00\x42\x16\n\x14target_resource_info\"G\n\x0bGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"M\n\x11\x42\x61\x63kupGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t*Q\n\x11\x42\x61\x63kupConfigState\x12#\n\x1f\x42\x41\x43KUP_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PASSIVE\x10\x02*V\n\nBackupView\x12\x1b\n\x17\x42\x41\x43KUP_VIEW_UNSPECIFIED\x10\x00\x12\x15\n\x11\x42\x41\x43KUP_VIEW_BASIC\x10\x01\x12\x14\n\x10\x42\x41\x43KUP_VIEW_FULL\x10\x02*m\n\x0f\x42\x61\x63kupVaultView\x12!\n\x1d\x42\x41\x43KUP_VAULT_VIEW_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42\x41\x43KUP_VAULT_VIEW_BASIC\x10\x01\x12\x1a\n\x16\x42\x41\x43KUP_VAULT_VIEW_FULL\x10\x02\x42\xda\x03\n\x1c\x63om.google.cloud.backupdr.v1B\x10\x42\x61\x63kupVaultProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41m\n!cloudkms.googleapis.com/CryptoKey\x12Hprojects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - BackupVault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault").msgclass - BackupVault::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.EncryptionConfig").msgclass - BackupVault::BackupRetentionInheritance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance").enummodule - BackupVault::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.State").enummodule - BackupVault::AccessRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.AccessRestriction").enummodule - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource").msgclass - DataSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource.State").enummodule - BackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo").msgclass - BackupConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState").enummodule - GcpBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpBackupConfig").msgclass - BackupApplianceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupConfig").msgclass - DataSourceGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResource").msgclass - DataSourceBackupApplianceApplication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupApplianceApplication").msgclass - ServiceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceLockInfo").msgclass - BackupApplianceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceLockInfo").msgclass - BackupLock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLock").msgclass - Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup").msgclass - Backup::GCPBackupPlanInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo").msgclass - Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.State").enummodule - Backup::BackupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.BackupType").enummodule - CreateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupVaultRequest").msgclass - ListBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsRequest").msgclass - ListBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsResponse").msgclass - FetchUsableBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest").msgclass - FetchUsableBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse").msgclass - FetchBackupsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest").msgclass - FetchBackupsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse").msgclass - GetBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupVaultRequest").msgclass - UpdateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupVaultRequest").msgclass - DeleteBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupVaultRequest").msgclass - ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesRequest").msgclass - ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesResponse").msgclass - GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceRequest").msgclass - UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateDataSourceRequest").msgclass - ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsRequest").msgclass - ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsResponse").msgclass - GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupRequest").msgclass - UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupRequest").msgclass - DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupRequest").msgclass - RestoreBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupRequest").msgclass - RestoreBackupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupResponse").msgclass - TargetResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TargetResource").msgclass - GcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpResource").msgclass - BackupGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupGcpResource").msgclass - BackupConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigState").enummodule - BackupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupView").enummodule - BackupVaultView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVaultView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb deleted file mode 100644 index ecfc1771ff13..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module BackupDR - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/backupdr/v1/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb deleted file mode 100644 index 9186933eef02..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/datasourcereference.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/backupdr/v1/datasourcereference.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd7\x05\n\x13\x44\x61taSourceReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12?\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"backupdr.googleapis.com/DataSource\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x1f\x64\x61ta_source_backup_config_state\x18\x04 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12%\n\x18\x64\x61ta_source_backup_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x61\n\x1e\x64\x61ta_source_backup_config_info\x18\x06 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.DataSourceBackupConfigInfoB\x03\xe0\x41\x03\x12_\n\x1d\x64\x61ta_source_gcp_resource_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.backupdr.v1.DataSourceGcpResourceInfoB\x03\xe0\x41\x03\x12$\n\x12total_stored_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01:\xb2\x01\xea\x41\xae\x01\n+backupdr.googleapis.com/DataSourceReference\x12Tprojects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}*\x14\x64\x61taSourceReferences2\x13\x64\x61taSourceReferenceB\x15\n\x13_total_stored_bytes\"\xca\x01\n\x1a\x44\x61taSourceBackupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xf2\x01\n\x19\x44\x61taSourceGcpResourceInfo\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12u\n\x1d\x63loud_sql_instance_properties\x18\x04 \x01(\x0b\x32G.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferencePropertiesB\x03\xe0\x41\x03H\x00\x42\x15\n\x13resource_properties\"b\n\x1dGetDataSourceReferenceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+backupdr.googleapis.com/DataSourceReference\"\xc3\x01\n\x1fListDataSourceReferencesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9f\x01\n ListDataSourceReferencesResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xef\x01\n/FetchDataSourceReferencesForResourceTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n0FetchDataSourceReferencesForResourceTypeResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xc8\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x44\x61taSourceReferenceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceReference").msgclass - DataSourceBackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupConfigInfo").msgclass - DataSourceGcpResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResourceInfo").msgclass - GetDataSourceReferenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceReferenceRequest").msgclass - ListDataSourceReferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesRequest").msgclass - ListDataSourceReferencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesResponse").msgclass - FetchDataSourceReferencesForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest").msgclass - FetchDataSourceReferencesForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb deleted file mode 100644 index 373529d726c8..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/protection_summary.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/cloud/backupdr/v1/protection_summary.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n ListResourceBackupConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n!ListResourceBackupConfigsResponse\x12O\n\x17resource_backup_configs\x18\x01 \x03(\x0b\x32..google.cloud.backupdr.v1.ResourceBackupConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xec\x06\n\x14ResourceBackupConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x14target_resource_type\x18\x05 \x01(\x0e\x32;.google.cloud.backupdr.v1.ResourceBackupConfig.ResourceTypeB\x03\xe0\x41\x03\x12h\n\x16target_resource_labels\x18\x06 \x03(\x0b\x32H.google.cloud.backupdr.v1.ResourceBackupConfig.TargetResourceLabelsEntry\x12M\n\x16\x62\x61\x63kup_configs_details\x18\x07 \x03(\x0b\x32-.google.cloud.backupdr.v1.BackupConfigDetails\x12\x1e\n\x11\x62\x61\x63kup_configured\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x07vaulted\x18\t \x01(\x08\x42\x03\xe0\x41\x03\x1a;\n\x19TargetResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x97\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x01\x12\x15\n\x11\x43OMPUTE_ENGINE_VM\x10\x02\x12\x17\n\x13\x43OMPUTE_ENGINE_DISK\x10\x03\x12 \n\x1c\x43OMPUTE_ENGINE_REGIONAL_DISK\x10\x04:\xb7\x01\xea\x41\xb3\x01\n,backupdr.googleapis.com/ResourceBackupConfig\x12Vprojects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}*\x15resourceBackupConfigs2\x14resourceBackupConfig\"\xa2\x07\n\x13\x42\x61\x63kupConfigDetails\x12!\n\x14\x62\x61\x63kup_config_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12.\n!backup_config_source_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupConfigDetails.TypeB\x03\xe0\x41\x03\x12G\n\x05state\x18\x04 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.BackupConfigDetails.StateB\x03\xe0\x41\x03\x12\x42\n\rpitr_settings\x18\x05 \x01(\x0b\x32&.google.cloud.backupdr.v1.PitrSettingsB\x03\xe0\x41\x03\x12\x46\n\x1dlatest_successful_backup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12 \n\x13\x61pplicable_resource\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61\x63kup_vault\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x10\x62\x61\x63kup_locations\x18\x0c \x03(\x0b\x32(.google.cloud.backupdr.v1.BackupLocation\x12M\n\x15\x62\x61\x63kup_dr_plan_config\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.BackupDrPlanConfigH\x00\x12U\n\x19\x62\x61\x63kup_dr_template_config\x18\x0b \x01(\x0b\x32\x30.google.cloud.backupdr.v1.BackupDrTemplateConfigH\x00\"\x97\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12$\n CLOUD_SQL_INSTANCE_BACKUP_CONFIG\x10\x01\x12\"\n\x1e\x43OMPUTE_ENGINE_RESOURCE_POLICY\x10\x02\x12\x18\n\x14\x42\x41\x43KUPDR_BACKUP_PLAN\x10\x03\x12\x15\n\x11\x42\x41\x43KUPDR_TEMPLATE\x10\x04\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\x16\n\x14plan_specific_config\"+\n\x0cPitrSettings\x12\x1b\n\x0eretention_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\"j\n\x16\x42\x61\x63kupDrTemplateConfig\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x12\x42\x61\x63kupDrPlanConfig\x12H\n\x14\x62\x61\x63kup_dr_plan_rules\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.BackupDrPlanRule\"n\n\x10\x42\x61\x63kupDrPlanRule\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x1blast_successful_backup_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xb7\x01\n\x0e\x42\x61\x63kupLocation\x12@\n\x04type\x18\x01 \x01(\x0e\x32-.google.cloud.backupdr.v1.BackupLocation.TypeB\x03\xe0\x41\x03\x12\x18\n\x0blocation_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"I\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\x12\x12\n\x0eMULTI_REGIONAL\x10\x03\x32\xcb\x02\n\x19\x42\x61\x63kupDrProtectionSummary\x12\xe0\x01\n\x19ListResourceBackupConfigs\x12:.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest\x1a;.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/resourceBackupConfigs\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x16ProtectionSummaryProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BackupDR - module V1 - ListResourceBackupConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsRequest").msgclass - ListResourceBackupConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsResponse").msgclass - ResourceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig").msgclass - ResourceBackupConfig::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig.ResourceType").enummodule - BackupConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails").msgclass - BackupConfigDetails::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.Type").enummodule - BackupConfigDetails::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.State").enummodule - PitrSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.PitrSettings").msgclass - BackupDrTemplateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrTemplateConfig").msgclass - BackupDrPlanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanConfig").msgclass - BackupDrPlanRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanRule").msgclass - BackupLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation").msgclass - BackupLocation::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation.Type").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb deleted file mode 100644 index 6bad6df6a175..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/backupdr/v1/protection_summary.proto for package 'Google.Cloud.BackupDR.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/backupdr/v1/protection_summary_pb' - -module Google - module Cloud - module BackupDR - module V1 - module BackupDrProtectionSummary - # The Protection Summary service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.backupdr.v1.BackupDrProtectionSummary' - - # Lists ResourceBackupConfigs. - rpc :ListResourceBackupConfigs, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb deleted file mode 100644 index 9cc488ca2ae8..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/backupdr/rest" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" -require "google/cloud/backupdr/v1/bindings_override" -require "google/cloud/backupdr/v1/version" - -module Google - module Cloud - module BackupDR - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/backupdr/v1/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb deleted file mode 100644 index e74b73cd9c04..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md deleted file mode 100644 index c891244acc73..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Backup and DR Service V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb deleted file mode 100644 index de97c93454cf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb +++ /dev/null @@ -1,415 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # Network configuration for ManagementServer instance. - # @!attribute [rw] network - # @return [::String] - # Optional. The resource name of the Google Compute Engine VPC network to - # which the ManagementServer instance is connected. - # @!attribute [rw] peering_mode - # @return [::Google::Cloud::BackupDR::V1::NetworkConfig::PeeringMode] - # Optional. The network connect mode of the ManagementServer instance. For - # this version, only PRIVATE_SERVICE_ACCESS is supported. - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VPC peering modes supported by Cloud BackupDR. - module PeeringMode - # Peering mode not set. - PEERING_MODE_UNSPECIFIED = 0 - - # Connect using Private Service Access to the Management Server. Private - # services access provides an IP address range for multiple Google Cloud - # services, including Cloud BackupDR. - PRIVATE_SERVICE_ACCESS = 1 - end - end - - # ManagementURI for the Management Server resource. - # @!attribute [r] web_ui - # @return [::String] - # Output only. The ManagementServer AGM/RD WebUI URL. - # @!attribute [r] api - # @return [::String] - # Output only. The ManagementServer AGM/RD API URL. - class ManagementURI - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. - # @!attribute [r] first_party_management_uri - # @return [::String] - # Output only. First party Management URI for Google Identities. - # @!attribute [r] third_party_management_uri - # @return [::String] - # Output only. Third party Management URI for External Identity Providers. - class WorkforceIdentityBasedManagementURI - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, - # @!attribute [r] first_party_oauth2_client_id - # @return [::String] - # Output only. First party OAuth Client ID for Google Identities. - # @!attribute [r] third_party_oauth2_client_id - # @return [::String] - # Output only. Third party OAuth Client ID for External Identity Providers. - class WorkforceIdentityBasedOAuth2ClientID - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ManagementServer describes a single BackupDR ManagementServer instance. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the ManagementServer instance (2048 characters - # or less). - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # Labels currently defined: - # 1. migrate_from_go= - # If set to true, the MS is created in migration ready mode. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceType] - # Optional. The type of the ManagementServer resource. - # @!attribute [r] management_uri - # @return [::Google::Cloud::BackupDR::V1::ManagementURI] - # Output only. The hostname or ip address of the exposed AGM endpoints, used - # by clients to connect to AGM/RD graphical user interface and APIs. - # @!attribute [r] workforce_identity_based_management_uri - # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedManagementURI] - # Output only. The hostnames of the exposed AGM endpoints for both types of - # user i.e. 1p and 3p, used to connect AGM/RM UI. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceState] - # Output only. The ManagementServer state. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkConfig>] - # Optional. VPC networks to which the ManagementServer instance is connected. - # For this version, only a single network is supported. This field is - # optional if MS is created without PSA - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag for the ManagementServer resource to - # prevent simultaneous updates from overwiting each other. - # @!attribute [r] oauth2_client_id - # @return [::String] - # Output only. The OAuth 2.0 client id is required to make API calls to the - # BackupDR instance API of this ManagementServer. This is the value that - # should be provided in the 'aud' field of the OIDC ID Token (see openid - # specification - # https://openid.net/specs/openid-connect-core-1_0.html#IDToken). - # @!attribute [r] workforce_identity_based_oauth2_client_id - # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedOAuth2ClientID] - # Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. - # @!attribute [r] ba_proxy_uri - # @return [::Array<::String>] - # Output only. The hostname or ip address of the exposed AGM endpoints, used - # by BAs to connect to BA proxy. - # @!attribute [r] satisfies_pzs - # @return [::Google::Protobuf::BoolValue] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - class ManagementServer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of backup service resource. - module InstanceType - # Instance type is not mentioned. - INSTANCE_TYPE_UNSPECIFIED = 0 - - # Instance for backup and restore management (i.e., AGM). - BACKUP_RESTORE = 1 - end - - # State of Management server instance. - module InstanceState - # State not set. - INSTANCE_STATE_UNSPECIFIED = 0 - - # The instance is being created. - CREATING = 1 - - # The instance has been created and is fully usable. - READY = 2 - - # The instance configuration is being updated. Certain kinds of updates - # may cause the instance to become unusable while the update is in - # progress. - UPDATING = 3 - - # The instance is being deleted. - DELETING = 4 - - # The instance is being repaired and may be unstable. - REPAIRING = 5 - - # Maintenance is being performed on this instance. - MAINTENANCE = 6 - - # The instance is experiencing an issue and might be unusable. You can get - # further details from the statusMessage field of Instance resource. - ERROR = 7 - end - end - - # Request message for listing management servers. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve management servers - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud BackupDR, locations map to Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListManagementServersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing management servers. - # @!attribute [rw] management_servers - # @return [::Array<::Google::Cloud::BackupDR::V1::ManagementServer>] - # The list of ManagementServer instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return management servers in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListManagementServersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a management server instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - class GetManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a management server instance. - # @!attribute [rw] parent - # @return [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @!attribute [rw] management_server_id - # @return [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @!attribute [rw] management_server - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a management server instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for initializing the service. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] cloud_sql_instance_initialization_config - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig] - # Optional. The configuration for initializing a Cloud SQL instance. - class InitializeServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for initializing the service. - # @!attribute [rw] backup_vault_name - # @return [::String] - # The resource name of the default `BackupVault` created. - # Format: - # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - # @!attribute [rw] backup_plan_name - # @return [::String] - # The resource name of the default `BackupPlan` created. - # Format: - # `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`. - class InitializeServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to 'Code.CANCELLED'. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - # @!attribute [r] additional_info - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. AdditionalInfo contains additional Info related to backup plan - # association resource. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AdditionalInfoEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb deleted file mode 100644 index f7ce82fba389..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb +++ /dev/null @@ -1,588 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # A `BackupPlan` specifies some common fields, such as `description` as well - # as one or more `BackupRule` messages. Each `BackupRule` has a retention - # policy and defines a schedule by which the system is to perform backup - # workloads. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the `BackupPlan`. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the `BackupPlan` resource. - # - # The description allows for additional details about `BackupPlan` and its - # use cases to be provided. An example description is the following: "This - # is a backup plan that performs a daily backup at 6pm and retains data for 3 - # months". The description must be at most 2048 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. This collection of key/value pairs allows for custom labels to be - # supplied by the user. Example, \\{"tag": "Weekly"}. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the `BackupPlan` was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the `BackupPlan` was last updated. - # @!attribute [rw] backup_rules - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupRule>] - # Required. The backup rules for this `BackupPlan`. There must be at least - # one `BackupRule` message. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlan::State] - # Output only. The `State` for the `BackupPlan`. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The resource type to which the `BackupPlan` will be applied. - # Examples include, "compute.googleapis.com/Instance", - # "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", - # "compute.googleapis.com/Disk". - # @!attribute [rw] etag - # @return [::String] - # Optional. `etag` is returned from the service in the response. As a user of - # the service, you may provide an etag value in this field to prevent stale - # resources. - # @!attribute [rw] backup_vault - # @return [::String] - # Required. Resource name of backup vault which will be used as storage - # location for backups. Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault} - # @!attribute [r] backup_vault_service_account - # @return [::String] - # Output only. The Google Cloud Platform Service Account to be used by the - # BackupVault for taking backups. Specify the email address of the Backup - # Vault Service Account. - # @!attribute [rw] log_retention_days - # @return [::Integer] - # Optional. Applicable only for CloudSQL and AlloyDB resource_type. - # - # Configures how long logs will be stored. It is defined in “days”. This - # value should be greater than or equal to minimum enforced log retention - # duration of the backup vault. - # @!attribute [r] supported_resource_types - # @return [::Array<::String>] - # Output only. All resource types to which backupPlan can be applied. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] revision_name - # @return [::String] - # Output only. The resource id of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` - class BackupPlan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `State` enumerates the possible states for a `BackupPlan`. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - - # The resource is being updated. - UPDATING = 5 - end - end - - # `BackupRule` binds the backup schedule to a retention policy. - # @!attribute [rw] rule_id - # @return [::String] - # Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is - # unique per `BackupPlan`.The `rule_id` must start with a lowercase letter - # followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, - # /[a-z][a-z0-9-]\\{,62}/. - # @!attribute [rw] backup_retention_days - # @return [::Integer] - # Required. Configures the duration for which backup data will be kept. It is - # defined in “days”. The value should be greater than or equal to minimum - # enforced retention of the backup vault. - # - # Minimum value is 1 and maximum value is 36159 for custom retention - # on-demand backup. - # Minimum and maximum values are workload specific for all other rules. - # @!attribute [rw] standard_schedule - # @return [::Google::Cloud::BackupDR::V1::StandardSchedule] - # Optional. Defines a schedule that runs within the confines of a defined - # window of time. - class BackupRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StandardSchedule` defines a schedule that run within the confines of a - # defined window of days. We can define recurrence type for schedule as - # HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. - # @!attribute [rw] recurrence_type - # @return [::Google::Cloud::BackupDR::V1::StandardSchedule::RecurrenceType] - # Required. Specifies the `RecurrenceType` for the schedule. - # @!attribute [rw] hourly_frequency - # @return [::Integer] - # Optional. Specifies frequency for hourly backups. A hourly frequency of 2 - # means jobs will run every 2 hours from start time till end time defined. - # - # This is required for `recurrence_type`, `HOURLY` and is not applicable - # otherwise. A validation error will occur if a value is supplied and - # `recurrence_type` is not `HOURLY`. - # - # Value of hourly frequency should be between 4 and 23. - # - # Reason for limit : We found that there is bandwidth limitation of 3GB/S for - # GMI while taking a backup and 5GB/S while doing a restore. Given the amount - # of parallel backups and restore we are targeting, this will potentially - # take the backup time to mins and hours (in worst case scenario). - # @!attribute [rw] days_of_week - # @return [::Array<::Google::Type::DayOfWeek>] - # Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs - # will run. - # - # This is required for `recurrence_type`, `WEEKLY` and is not applicable - # otherwise. A validation error will occur if a value is supplied and - # `recurrence_type` is not `WEEKLY`. - # @!attribute [rw] days_of_month - # @return [::Array<::Integer>] - # Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. - # - # Values for `days_of_month` are only applicable for `recurrence_type`, - # `MONTHLY` and `YEARLY`. A validation error will occur if other values are - # supplied. - # @!attribute [rw] week_day_of_month - # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth] - # Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST - # MONDAY, on which jobs will run. This will be specified by two fields in - # `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, - # e.g. `LAST`. - # - # This field is only applicable for `recurrence_type`, `MONTHLY` and - # `YEARLY`. A validation error will occur if other values are supplied. - # @!attribute [rw] months - # @return [::Array<::Google::Type::Month>] - # Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on - # which jobs will run. - # - # This field is only applicable when `recurrence_type` is `YEARLY`. A - # validation error will occur if other values are supplied. - # @!attribute [rw] backup_window - # @return [::Google::Cloud::BackupDR::V1::BackupWindow] - # Required. A BackupWindow defines the window of day during which backup jobs - # will run. Jobs are queued at the beginning of the window and will be marked - # as `NOT_RUN` if they do not start by the end of the window. - # - # Note: running jobs will not be cancelled at the end of the window. - # @!attribute [rw] time_zone - # @return [::String] - # Required. The time zone to be used when interpreting the schedule. - # The value of this field must be a time zone name from the IANA tz database. - # See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the - # list of valid timezone names. For e.g., Europe/Paris. - class StandardSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `RecurrenceTypes` enumerates the applicable periodicity for the schedule. - module RecurrenceType - # recurrence type not set - RECURRENCE_TYPE_UNSPECIFIED = 0 - - # The `BackupRule` is to be applied hourly. - HOURLY = 1 - - # The `BackupRule` is to be applied daily. - DAILY = 2 - - # The `BackupRule` is to be applied weekly. - WEEKLY = 3 - - # The `BackupRule` is to be applied monthly. - MONTHLY = 4 - - # The `BackupRule` is to be applied yearly. - YEARLY = 5 - end - end - - # `BackupWindow` defines a window of the day during which backup jobs will run. - # @!attribute [rw] start_hour_of_day - # @return [::Integer] - # Required. The hour of day (0-23) when the window starts for e.g. if value - # of start hour of day is 6 that mean backup window start at 6:00. - # @!attribute [rw] end_hour_of_day - # @return [::Integer] - # Required. The hour of day (1-24) when the window end for e.g. if value of - # end hour of day is 10 that mean backup window end time is 10:00. - # - # End hour of day should be greater than start hour of day. - # 0 <= start_hour_of_day < end_hour_of_day <= 24 - # - # End hour of day is not include in backup window that mean if - # end_hour_of_day= 10 jobs should start before 10:00. - class BackupWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `WeekDayOfMonth` defines the week day of the month on which the backups will - # run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values - # like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. - # @!attribute [rw] week_of_month - # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth::WeekOfMonth] - # Required. Specifies the week of the month. - # @!attribute [rw] day_of_week - # @return [::Google::Type::DayOfWeek] - # Required. Specifies the day of the week. - class WeekDayOfMonth - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, - # third, or last week of the month. - module WeekOfMonth - # The zero value. Do not use. - WEEK_OF_MONTH_UNSPECIFIED = 0 - - # The first week of the month. - FIRST = 1 - - # The second week of the month. - SECOND = 2 - - # The third week of the month. - THIRD = 3 - - # The fourth week of the month. - FOURTH = 4 - - # The last week of the month. - LAST = 5 - end - end - - # The request message for creating a `BackupPlan`. - # @!attribute [rw] parent - # @return [::String] - # Required. The `BackupPlan` project and location in the format - # `projects/{project}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @!attribute [rw] backup_plan_id - # @return [::String] - # Required. The name of the `BackupPlan` to create. The name must be unique - # for the specified project and location.The name must start with a lowercase - # letter followed by up to 62 lowercase letters, numbers, or hyphens. - # Pattern, /[a-z][a-z0-9-]\\{,62}/. - # @!attribute [rw] backup_plan - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # Required. The `BackupPlan` resource object to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a list `BackupPlan`. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve `BackupPlans` - # information. Format: `projects/{project}/locations/{location}`. In Cloud - # BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - # retrieve backup plans for all locations, use "-" for the - # `{location}` value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListBackupPlansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for getting a list of `BackupPlan`. - # @!attribute [rw] backup_plans - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlan>] - # The list of `BackupPlans` in the project for the specified - # location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of resources from all locations. In case any location is unreachable, - # the response will only return backup plans in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # BackupPlan - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest#page_token page_token} in - # a subsequent `ListBackupPlans` call to retrieve the next page of results. - # If this field is omitted or empty, then there are no more results to - # return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlansResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a `BackupPlan`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - class GetBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for deleting a `BackupPlan`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a backup plan. - # @!attribute [rw] backup_plan - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # Required. The resource being updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in - # time. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # @!attribute [r] revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision::State] - # Output only. Resource State - # @!attribute [rw] backup_plan_snapshot - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # The Backup Plan being encompassed by this revision. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp that the revision was created. - class BackupPlanRevision - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the `BackupPlanRevision`. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - end - end - - # The request message for getting a `BackupPlanRevision`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - class GetBackupPlanRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a list of `BackupPlanRevision`. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `BackupPlans` to return in a single - # response. If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - class ListBackupPlanRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for getting a list of `BackupPlanRevision`. - # @!attribute [rw] backup_plan_revisions - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # The list of `BackupPlanRevisions` in the project for the specified - # location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of resources from all locations. In case any location is unreachable, - # the response will only return backup plans in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest#page_token page_token} - # in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlanRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb deleted file mode 100644 index b6e38383477c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb +++ /dev/null @@ -1,388 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # A BackupPlanAssociation represents a single BackupPlanAssociation which - # contains details like workload, backup plan etc - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of BackupPlanAssociation in - # below format Format : - # projects/\\{project}/locations/\\{location}/backupPlanAssociations/\\{backupPlanAssociationId} - # @!attribute [rw] resource_type - # @return [::String] - # Required. Immutable. Resource type of workload on which backupplan is - # applied - # @!attribute [rw] resource - # @return [::String] - # Required. Immutable. Resource name of workload on which the backup plan is - # applied. - # - # The format can either be the resource name (e.g., - # "projects/my-project/zones/us-central1-a/instances/my-instance") or the - # full resource URI (e.g., - # "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). - # @!attribute [rw] backup_plan - # @return [::String] - # Required. Resource name of backup plan which needs to be applied on - # workload. Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation::State] - # Output only. The BackupPlanAssociation resource state. - # @!attribute [r] rules_config_info - # @return [::Array<::Google::Cloud::BackupDR::V1::RuleConfigInfo>] - # Output only. The config info related to backup rules. - # @!attribute [r] data_source - # @return [::String] - # Output only. Resource name of data source which will be used as storage - # location for backups taken. Format : - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault}/dataSources/\\{datasource} - # @!attribute [r] cloud_sql_instance_backup_plan_association_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupPlanAssociationProperties] - # Output only. Cloud SQL instance's backup plan association properties. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_plan_association_properties`, `alloydb_cluster_backup_plan_association_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] alloydb_cluster_backup_plan_association_properties - # @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterBackupPlanAssociationProperties] - # Output only. AlloyDB cluster's backup plan association properties. - # - # Note: The following fields are mutually exclusive: `alloydb_cluster_backup_plan_association_properties`, `cloud_sql_instance_backup_plan_association_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_plan_revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] backup_plan_revision_name - # @return [::String] - # Output only. The resource id of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` - class BackupPlanAssociation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for State of BackupPlan Association - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - - # The resource is being updated. - UPDATING = 5 - end - end - - # Message for rules config info. - # @!attribute [r] rule_id - # @return [::String] - # Output only. Backup Rule id fetched from backup plan. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::RuleConfigInfo::LastBackupState] - # Output only. The last backup state for rule. - # @!attribute [r] last_backup_error - # @return [::Google::Rpc::Status] - # Output only. google.rpc.Status object to store the last backup error. - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The point in time when the last successful backup was captured - # from the source. - class RuleConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for LastBackupState - module LastBackupState - # State not set. - LAST_BACKUP_STATE_UNSPECIFIED = 0 - - # The first backup is pending. - FIRST_BACKUP_PENDING = 1 - - # The most recent backup could not be run/failed because of the lack of - # permissions. - PERMISSION_DENIED = 2 - - # The last backup operation succeeded. - SUCCEEDED = 3 - - # The last backup operation failed. - FAILED = 4 - end - end - - # Request message for creating a backup plan. - # @!attribute [rw] parent - # @return [::String] - # Required. The backup plan association project and location in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - # map to GCP regions, for example **us-central1**. - # @!attribute [rw] backup_plan_association_id - # @return [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @!attribute [rw] backup_plan_association - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # Required. The resource being created - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for List BackupPlanAssociation - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backup Plan - # Associations information, in the format - # `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - # map to GCP regions, for example **us-central1**. To retrieve backup plan - # associations for all locations, use "-" for the - # `{location}` value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - class ListBackupPlanAssociationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for List BackupPlanAssociation - # @!attribute [rw] backup_plan_associations - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # The list of Backup Plan Associations in the project for the specified - # location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return backup plan associations in reachable - # locations and the 'unreachable' field will be populated with a list of - # unreachable locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlanAssociationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchBackupPlanAssociationsForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - class FetchBackupPlanAssociationsForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchBackupPlanAssociationsForResourceType method. - # @!attribute [r] backup_plan_associations - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # Output only. The BackupPlanAssociations from the specified parent. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. A token, which can be sent as `page_token` to retrieve the - # next page. If this field is omitted, there are no subsequent pages. - class FetchBackupPlanAssociationsForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a BackupPlanAssociation resource. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - class GetBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a backup plan association. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a backup plan association. - # @!attribute [rw] backup_plan_association - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # Required. The resource being updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for triggering a backup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @!attribute [rw] rule_id - # @return [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class TriggerBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb deleted file mode 100644 index 688246d5f3d2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb +++ /dev/null @@ -1,1366 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # Message describing a BackupVault object. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the backup vault to create. It must have - # the - # format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. - # `{backupvault}` cannot be changed after creation. It must be between 3-63 - # characters long and must be unique within the project and location. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the BackupVault instance (2048 characters or - # less). - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined: - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] backup_minimum_enforced_retention_duration - # @return [::Google::Protobuf::Duration] - # Required. The default and minimum enforced retention for each backup within - # the backup vault. The enforced retention for each backup can be extended. - # @!attribute [rw] backup_retention_inheritance - # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] - # Optional. Setting for how a backup's enforced retention end time is - # inherited. - # @!attribute [r] deletable - # @return [::Boolean] - # Output only. Set to true when there are no backups nested under this - # resource. - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag for the backup vault resource to - # prevent simultaneous updates from overwiting each other. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupVault::State] - # Output only. The BackupVault resource instance state. - # @!attribute [rw] effective_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time after which the BackupVault resource is locked. - # @!attribute [r] backup_count - # @return [::Integer] - # Output only. The number of backups in this backup vault. - # @!attribute [r] service_account - # @return [::String] - # Output only. Service account used by the BackupVault Service for this - # BackupVault. The user should grant this account permissions in their - # workload project to enable the service to run backups and restores there. - # @!attribute [r] total_stored_bytes - # @return [::Integer] - # Output only. Total size of the storage used by all backup resources. - # @!attribute [r] uid - # @return [::String] - # Output only. Immutable after resource creation until resource deletion. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User annotations. See https://google.aip.dev/128#annotations - # Stores small amounts of arbitrary data. - # @!attribute [rw] access_restriction - # @return [::Google::Cloud::BackupDR::V1::BackupVault::AccessRestriction] - # Optional. Note: This field is added for future use case and will not be - # supported in the current release. - # - # Access restriction for the backup vault. - # Default value is WITHIN_ORGANIZATION if not provided during creation. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::BackupDR::V1::BackupVault::EncryptionConfig] - # Optional. The encryption config of the backup vault. - class BackupVault - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message describing the EncryptionConfig of backup vault. - # This determines how data within the vault is encrypted at rest. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The Cloud KMS key name to encrypt backups in this backup vault. - # Must be in the same region as the vault. Some workload backups like - # compute disk backups may use their inherited source key instead. Format: - # projects/\\{project}/locations/\\{location}/keyRings/\\{ring}/cryptoKeys/\\{key} - class EncryptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How a backup's enforced retention end time is inherited. - module BackupRetentionInheritance - # Inheritance behavior not set. This will default to - # `INHERIT_VAULT_RETENTION`. - BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0 - - # The enforced retention end time of a backup will be inherited from the - # backup vault's `backup_minimum_enforced_retention_duration` field. - # - # This is the default behavior. - INHERIT_VAULT_RETENTION = 1 - - # The enforced retention end time of a backup will always match the expire - # time of the backup. - # - # If this is set, the backup's enforced retention end time will be set to - # match the expire time during creation of the backup. When updating, the - # ERET and expire time must be updated together and have the same value. - # Invalid update requests will be rejected by the server. - MATCH_BACKUP_EXPIRE_TIME = 2 - end - - # Holds the state of the backup vault resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The backup vault is being created. - CREATING = 1 - - # The backup vault has been created and is fully usable. - ACTIVE = 2 - - # The backup vault is being deleted. - DELETING = 3 - - # The backup vault is experiencing an issue and might be unusable. - ERROR = 4 - - # The backup vault is being updated. - UPDATING = 5 - end - - # Holds the access restriction for the backup vault. - module AccessRestriction - # Access restriction not set. If user does not provide any value or pass - # this value, it will be changed to WITHIN_ORGANIZATION. - ACCESS_RESTRICTION_UNSPECIFIED = 0 - - # Access to or from resources outside your current project will be denied. - WITHIN_PROJECT = 1 - - # Access to or from resources outside your current organization will be - # denied. - WITHIN_ORGANIZATION = 2 - - # No access restriction. - UNRESTRICTED = 3 - - # Access to or from resources outside your current organization will be - # denied except for backup appliance. - WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4 - end - end - - # Message describing a DataSource object. - # Datasource object used to represent Datasource details for both admin and - # basic view. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the datasource to create. - # It must have the - # format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. - # `{datasource}` cannot be changed after creation. It must be between 3-63 - # characters long and must be unique within the backup vault. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::DataSource::State] - # Output only. The DataSource resource instance state. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined: - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] backup_count - # @return [::Integer] - # Number of backups in the data source. - # @!attribute [rw] etag - # @return [::String] - # Server specified ETag for the ManagementServer resource to prevent - # simultaneous updates from overwiting each other. - # @!attribute [rw] total_stored_bytes - # @return [::Integer] - # The number of bytes (metadata and data) stored in this datasource. - # @!attribute [r] config_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] - # Output only. The backup configuration state. - # @!attribute [r] backup_config_info - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo] - # Output only. Details of how the resource is configured for backup. - # @!attribute [rw] data_source_gcp_resource - # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResource] - # The backed up resource is a Google Cloud resource. - # The word 'DataSource' was included in the names to indicate that this is - # the representation of the Google Cloud resource used within the - # DataSource object. - # - # Note: The following fields are mutually exclusive: `data_source_gcp_resource`, `data_source_backup_appliance_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_source_backup_appliance_application - # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupApplianceApplication] - # The backed up resource is a backup appliance application. - # - # Note: The following fields are mutually exclusive: `data_source_backup_appliance_application`, `data_source_gcp_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_blocked_by_vault_access_restriction - # @return [::Boolean] - # Output only. This field is set to true if the backup is blocked by vault - # access restriction. - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds the state of the data source resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The data source is being created. - CREATING = 1 - - # The data source has been created and is fully usable. - ACTIVE = 2 - - # The data source is being deleted. - DELETING = 3 - - # The data source is experiencing an issue and might be unusable. - ERROR = 4 - end - end - - # BackupConfigInfo has information about how the resource is configured - # for Backup and about the most recent backup to this vault. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] - # Output only. The status of the last backup to this BackupVault - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. If the last backup were successful, this field has the - # consistency date. - # @!attribute [r] last_backup_error - # @return [::Google::Rpc::Status] - # Output only. If the last backup failed, this field has the error message. - # @!attribute [rw] gcp_backup_config - # @return [::Google::Cloud::BackupDR::V1::GcpBackupConfig] - # Configuration for a Google Cloud resource. - # - # Note: The following fields are mutually exclusive: `gcp_backup_config`, `backup_appliance_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] backup_appliance_backup_config - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupConfig] - # Configuration for an application backed up by a Backup Appliance. - # - # Note: The following fields are mutually exclusive: `backup_appliance_backup_config`, `gcp_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # LastBackupstate tracks whether the last backup was not yet started, - # successful, failed, or could not be run because of the lack of permissions. - module LastBackupState - # Status not set. - LAST_BACKUP_STATE_UNSPECIFIED = 0 - - # The first backup has not yet completed - FIRST_BACKUP_PENDING = 1 - - # The most recent backup was successful - SUCCEEDED = 2 - - # The most recent backup failed - FAILED = 3 - - # The most recent backup could not be run/failed because of the lack of - # permissions - PERMISSION_DENIED = 4 - end - end - - # GcpBackupConfig captures the Backup configuration details for Google Cloud - # resources. All Google Cloud resources regardless of type are protected with - # backup plan associations. - # @!attribute [rw] backup_plan - # @return [::String] - # The name of the backup plan. - # @!attribute [rw] backup_plan_description - # @return [::String] - # The description of the backup plan. - # @!attribute [rw] backup_plan_association - # @return [::String] - # The name of the backup plan association. - # @!attribute [rw] backup_plan_rules - # @return [::Array<::String>] - # The names of the backup plan rules which point to this backupvault - # @!attribute [rw] backup_plan_revision_name - # @return [::String] - # The name of the backup plan revision. - # @!attribute [rw] backup_plan_revision_id - # @return [::String] - # The user friendly id of the backup plan revision. - # E.g. v0, v1 etc. - class GcpBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceBackupConfig captures the backup configuration for - # applications that are protected by Backup Appliances. - # @!attribute [rw] backup_appliance_name - # @return [::String] - # The name of the backup appliance. - # @!attribute [rw] backup_appliance_id - # @return [::Integer] - # The ID of the backup appliance. - # @!attribute [rw] sla_id - # @return [::Integer] - # The ID of the SLA of this application. - # @!attribute [rw] application_name - # @return [::String] - # The name of the application. - # @!attribute [rw] host_name - # @return [::String] - # The name of the host where the application is running. - # @!attribute [rw] slt_name - # @return [::String] - # The name of the SLT associated with the application. - # @!attribute [rw] slp_name - # @return [::String] - # The name of the SLP associated with the application. - class BackupApplianceBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataSourceGcpResource is used for protected resources that are Google Cloud - # Resources. This name is easeier to understand than GcpResourceDataSource or - # GcpDataSourceResource - # @!attribute [r] gcp_resourcename - # @return [::String] - # Output only. Full resource pathname URL of the source Google Cloud - # resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # The type of the Google Cloud resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - # @!attribute [rw] compute_instance_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceDataSourceProperties] - # ComputeInstanceDataSourceProperties has a subset of Compute Instance - # properties that are useful at the Datasource level. - # - # Note: The following fields are mutually exclusive: `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] cloud_sql_instance_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceProperties] - # Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud - # SQL Instance properties that are useful at the Datasource level. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance_datasource_properties`, `compute_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] alloy_db_cluster_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterDataSourceProperties] - # Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB - # cluster properties that are useful at the Datasource level. - # - # Note: The following fields are mutually exclusive: `alloy_db_cluster_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::DiskDataSourceProperties] - # DiskDataSourceProperties has a subset of Disk properties that are useful - # at the Datasource level. - # - # Note: The following fields are mutually exclusive: `disk_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataSourceGcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceApplication describes a Source Resource when it is an - # application backed up by a BackupAppliance. - # @!attribute [rw] application_name - # @return [::String] - # The name of the Application as known to the Backup Appliance. - # @!attribute [rw] backup_appliance - # @return [::String] - # Appliance name. - # @!attribute [rw] appliance_id - # @return [::Integer] - # Appliance Id of the Backup Appliance. - # @!attribute [rw] type - # @return [::String] - # The type of the application. e.g. VMBackup - # @!attribute [rw] application_id - # @return [::Integer] - # The appid field of the application within the Backup Appliance. - # @!attribute [rw] hostname - # @return [::String] - # Hostname of the host where the application is running. - # @!attribute [rw] host_id - # @return [::Integer] - # Hostid of the application host. - class DataSourceBackupApplianceApplication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ServiceLockInfo represents the details of a lock taken by the service on a - # Backup resource. - # @!attribute [r] operation - # @return [::String] - # Output only. The name of the operation that created this lock. - # The lock will automatically be released when the operation completes. - class ServiceLockInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceLockInfo contains metadata about the backupappliance that - # created the lock. - # @!attribute [rw] backup_appliance_id - # @return [::Integer] - # Required. The ID of the backup/recovery appliance that created this lock. - # @!attribute [rw] backup_appliance_name - # @return [::String] - # Required. The name of the backup/recovery appliance that created this lock. - # @!attribute [rw] lock_reason - # @return [::String] - # Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The - # value of this string is only meaningful to the client and it is not - # interpreted by the BackupVault service. - # @!attribute [rw] job_name - # @return [::String] - # The job name on the backup/recovery appliance that created this lock. - # - # Note: The following fields are mutually exclusive: `job_name`, `backup_image`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] backup_image - # @return [::String] - # The image name that depends on this Backup. - # - # Note: The following fields are mutually exclusive: `backup_image`, `job_name`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sla_id - # @return [::Integer] - # The SLA on the backup/recovery appliance that owns the lock. - # - # Note: The following fields are mutually exclusive: `sla_id`, `job_name`, `backup_image`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupApplianceLockInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupLock represents a single lock on a Backup resource. An unexpired - # lock on a Backup prevents the Backup from being deleted. - # @!attribute [rw] lock_until_time - # @return [::Google::Protobuf::Timestamp] - # Required. The time after which this lock is not considered valid and will - # no longer protect the Backup from deletion. - # @!attribute [rw] backup_appliance_lock_info - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo] - # If the client is a backup and recovery appliance, this - # contains metadata about why the lock exists. - # - # Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] service_lock_info - # @return [::Google::Cloud::BackupDR::V1::ServiceLockInfo] - # Output only. Contains metadata about the lock exist for Google Cloud - # native backups. - # - # Note: The following fields are mutually exclusive: `service_lock_info`, `backup_appliance_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupLock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message describing a Backup object. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the backup to create. It must have the - # format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. - # `{backup}` cannot be changed after creation. It must be between 3-63 - # characters long and must be unique within the datasource. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the Backup instance (2048 characters or - # less). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined. - # @!attribute [rw] enforced_retention_end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The backup can not be deleted before this time. - # @!attribute [r] backup_retention_inheritance - # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] - # Output only. Setting for how the enforced retention end time is inherited. - # This value is copied from this backup's BackupVault. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Optional. When this backup is automatically expired. - # @!attribute [r] consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The point in time when this backup was captured from the - # source. - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag to prevent updates from overwriting each - # other. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::Backup::State] - # Output only. The Backup resource instance state. - # @!attribute [r] service_locks - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] - # Output only. The list of BackupLocks taken by the service to prevent the - # deletion of the backup. - # @!attribute [rw] backup_appliance_locks - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] - # Optional. The list of BackupLocks taken by the accessor Backup Appliance. - # @!attribute [r] compute_instance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties] - # Output only. Compute Engine specific backup properties. - # - # Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] cloud_sql_instance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties] - # Output only. Cloud SQL specific backup properties. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_appliance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties] - # Output only. Backup Appliance specific backup properties. - # - # Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `alloy_db_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] alloy_db_backup_properties - # @return [::Google::Cloud::BackupDR::V1::AlloyDbClusterBackupProperties] - # Output only. AlloyDB specific backup properties. - # - # Note: The following fields are mutually exclusive: `alloy_db_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] disk_backup_properties - # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties] - # Output only. Disk specific backup properties. - # - # Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_type - # @return [::Google::Cloud::BackupDR::V1::Backup::BackupType] - # Output only. Type of the backup, unspecified, scheduled or ondemand. - # @!attribute [r] gcp_backup_plan_info - # @return [::Google::Cloud::BackupDR::V1::Backup::GCPBackupPlanInfo] - # Output only. Configuration for a Google Cloud resource. - # @!attribute [r] resource_size_bytes - # @return [::Integer] - # Output only. source resource size in bytes at the time of the backup. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Optional. Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Optional. Output only. Reserved for future use. - # @!attribute [r] gcp_resource - # @return [::Google::Cloud::BackupDR::V1::BackupGcpResource] - # Output only. Unique identifier of the GCP resource that is being backed - # up. - # @!attribute [r] kms_key_versions - # @return [::Array<::String>] - # Optional. Output only. The list of KMS key versions used to encrypt the - # backup. - class Backup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # GCPBackupPlanInfo captures the plan configuration details of Google Cloud - # resources at the time of backup. - # @!attribute [rw] backup_plan - # @return [::String] - # Resource name of backup plan by which workload is protected at the time - # of the backup. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} - # @!attribute [rw] backup_plan_rule_id - # @return [::String] - # The rule id of the backup plan which triggered this backup in case of - # scheduled backup or used for - # @!attribute [rw] backup_plan_revision_name - # @return [::String] - # Resource name of the backup plan revision which triggered this backup in - # case of scheduled backup or used for on demand backup. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId}/revisions/\\{revisionId} - # @!attribute [rw] backup_plan_revision_id - # @return [::String] - # The user friendly id of the backup plan revision which triggered this - # backup in case of scheduled backup or used for on demand backup. - class GCPBackupPlanInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds the state of the backup resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The backup is being created. - CREATING = 1 - - # The backup has been created and is fully usable. - ACTIVE = 2 - - # The backup is being deleted. - DELETING = 3 - - # The backup is experiencing an issue and might be unusable. - ERROR = 4 - - # The backup is being uploaded. - UPLOADING = 5 - end - - # Type of the backup, scheduled or ondemand. - module BackupType - # Backup type is unspecified. - BACKUP_TYPE_UNSPECIFIED = 0 - - # Scheduled backup. - SCHEDULED = 1 - - # On demand backup. - ON_DEMAND = 2 - - # Operational backup. - ON_DEMAND_OPERATIONAL = 3 - end - end - - # Message for creating a BackupVault. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] backup_vault_id - # @return [::String] - # Required. ID of the requesting object - # If auto-generating ID server-side, remove this field and - # backup_vault_id from the method_signature of Create RPC - # @!attribute [rw] backup_vault - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # Required. The resource being created - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - class CreateBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing backupvault stores. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - class ListBackupVaultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing BackupVaults. - # @!attribute [rw] backup_vaults - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] - # The list of BackupVault instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return backup vaults in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupVaultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for fetching usable BackupVaults. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backupvault stores - # information, in the format 'projects/\\{project_id}/locations/\\{location}'. In - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # To retrieve backupvault stores for all locations, use "-" for the - # '\\{location}' value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class FetchUsableBackupVaultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for fetching usable BackupVaults. - # @!attribute [rw] backup_vaults - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] - # The list of BackupVault instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return backup vaults in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class FetchUsableBackupVaultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchBackupsForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - class FetchBackupsForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchBackupsForResourceType method. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] - # The Backups from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class FetchBackupsForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a BackupVault. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - class GetBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a BackupVault. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # BackupVault resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @!attribute [rw] backup_vault - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # Required. The resource being updated - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @!attribute [rw] force_update_access_restriction - # @return [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - class UpdateBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a BackupVault. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any data source from this backup vault will also - # be deleted. - # @!attribute [rw] etag - # @return [::String] - # The current etag of the backup vault. - # If an etag is provided and does not match the current etag of the - # connection, deletion will be blocked. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @!attribute [rw] ignore_backup_plan_references - # @return [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - class DeleteBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing DataSources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve data - # sources information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing DataSources. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSource>] - # The list of DataSource instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return data sources in reachable locations - # and the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a DataSource instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - class GetDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a data source instance. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # DataSource resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @!attribute [rw] data_source - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # Required. The resource being updated - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. Enable upsert. - class UpdateDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing Backups. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backup - # information, in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR, - # locations map to Google Cloud regions, for example **us-central1**. - # To retrieve data sources for all locations, use "-" for the - # '\\{location}' value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - class ListBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing Backups. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] - # The list of Backup instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return data sources in reachable locations - # and the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a Backup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - class GetBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a Backup. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Backup resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # @!attribute [rw] backup - # @return [::Google::Cloud::BackupDR::V1::Backup] - # Required. The resource being updated - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a Backup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for restoring from a Backup. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] compute_instance_target_environment - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment] - # Compute Engine target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_target_environment - # @return [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment] - # Disk target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] region_disk_target_environment - # @return [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment] - # Region disk target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] compute_instance_restore_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following fields are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_restore_properties - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties] - # Disk properties to be overridden during restore. - # - # Note: The following fields are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] clear_overrides_field_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - class RestoreBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for restoring from a Backup. - # @!attribute [rw] target_resource - # @return [::Google::Cloud::BackupDR::V1::TargetResource] - # Details of the target resource created/modified as part of restore. - class RestoreBackupResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of the target resource created/modified as part of restore. - # @!attribute [rw] gcp_resource - # @return [::Google::Cloud::BackupDR::V1::GcpResource] - # Details of the native Google Cloud resource created as part of restore. - class TargetResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Minimum details to identify a Google Cloud resource - # @!attribute [rw] gcp_resourcename - # @return [::String] - # Name of the Google Cloud resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # Type of the resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - class GcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Minimum details to identify a Google Cloud resource for a backup. - # @!attribute [rw] gcp_resourcename - # @return [::String] - # Name of the Google Cloud resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # Type of the resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - class BackupGcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Backup configuration state. Is the resource configured for backup? - module BackupConfigState - # The possible states of backup configuration. - # Status not set. - BACKUP_CONFIG_STATE_UNSPECIFIED = 0 - - # The data source is actively protected (i.e. there is a - # BackupPlanAssociation or Appliance SLA pointing to it) - ACTIVE = 1 - - # The data source is no longer protected (but may have backups under it) - PASSIVE = 2 - end - - # BackupView contains enum options for Partial and Full view. - module BackupView - # If the value is not set, the default 'FULL' view is used. - BACKUP_VIEW_UNSPECIFIED = 0 - - # Includes basic data about the Backup, but not the full contents. - BACKUP_VIEW_BASIC = 1 - - # Includes all data about the Backup. - # This is the default value (for both ListBackups and GetBackup). - BACKUP_VIEW_FULL = 2 - end - - # BackupVaultView contains enum options for Partial and Full view. - module BackupVaultView - # If the value is not set, the default 'FULL' view is used. - BACKUP_VAULT_VIEW_UNSPECIFIED = 0 - - # Includes basic data about the Backup Vault, but not the full contents. - BACKUP_VAULT_VIEW_BASIC = 1 - - # Includes all data about the Backup Vault. - # This is the default value (for both ListBackupVaults and GetBackupVault). - BACKUP_VAULT_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb deleted file mode 100644 index 1498cae8a4ff..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # AlloyDBClusterDataSourceProperties represents the properties of a - # AlloyDB cluster resource that are stored in the DataSource. - # . - # @!attribute [r] name - # @return [::String] - # Output only. Name of the AlloyDB cluster backed up by the datasource. - class AlloyDBClusterDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AlloyDbClusterBackupProperties represents AlloyDB cluster - # backup properties. - # . - # @!attribute [rw] description - # @return [::String] - # An optional text description for the backup. - # @!attribute [r] stored_bytes - # @return [::Integer] - # Output only. Storage usage of this particular backup - # @!attribute [r] chain_id - # @return [::String] - # Output only. The chain id of this backup. Backups belonging to the same - # chain are sharing the same chain id. This property is calculated and - # maintained by BackupDR. - # @!attribute [r] database_version - # @return [::String] - # Output only. The PostgreSQL major version of the AlloyDB cluster when the - # backup was taken. - class AlloyDbClusterBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties for an AlloyDB cluster backup plan association. - # @!attribute [r] cluster_uid - # @return [::String] - # Output only. The cluster UID of the AlloyDB cluster. - class AlloyDBClusterBackupPlanAssociationProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb deleted file mode 100644 index 787b36f74c08..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # BackupApplianceBackupProperties represents BackupDR backup appliance's - # properties. - # @!attribute [r] generation_id - # @return [::Integer] - # Output only. The numeric generation ID of the backup (monotonically - # increasing). - # @!attribute [r] finalize_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when this backup object was finalized (if none, - # backup is not finalized). - # @!attribute [rw] recovery_range_start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The earliest timestamp of data available in this Backup. - # @!attribute [rw] recovery_range_end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The latest timestamp of data available in this Backup. - class BackupApplianceBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb deleted file mode 100644 index c11daec87a93..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # CloudSqlInstanceDataSourceProperties represents the properties of a - # Cloud SQL resource that are stored in the DataSource. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the Cloud SQL instance backed up by the datasource. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - class CloudSqlInstanceDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceBackupProperties represents Cloud SQL Instance - # Backup properties. - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance - # when the backup was taken. - # @!attribute [r] final_backup - # @return [::Boolean] - # Output only. Whether the backup is a final backup. - # @!attribute [r] source_instance - # @return [::String] - # Output only. The source instance of the backup. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - # @!attribute [r] instance_delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance delete timestamp. - class CloudSqlInstanceBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceDataSourceReferenceProperties represents the properties of a - # Cloud SQL resource that are stored in the DataSourceReference. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the Cloud SQL instance backed up by the datasource. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - class CloudSqlInstanceDataSourceReferenceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceInitializationConfig contains the configuration for - # initializing a Cloud SQL instance. - # @!attribute [rw] edition - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig::Edition] - # Required. The edition of the Cloud SQL instance. - class CloudSqlInstanceInitializationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The edition of the Cloud SQL instance. For details, see - # https://cloud.google.com/sql/docs/editions-intro. - module Edition - # Unspecified edition. - EDITION_UNSPECIFIED = 0 - - # Enterprise edition. - ENTERPRISE = 1 - - # Enterprise Plus edition. - ENTERPRISE_PLUS = 2 - end - end - - # Cloud SQL instance's BPA properties. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - class CloudSqlInstanceBackupPlanAssociationProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb deleted file mode 100644 index d5590a9a587f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb +++ /dev/null @@ -1,241 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # DiskTargetEnvironment represents the target environment for the disk. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the disk. - # @!attribute [rw] zone - # @return [::String] - # Required. Target zone for the disk. - class DiskTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RegionDiskTargetEnvironment represents the target environment for the disk. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the disk. - # @!attribute [rw] region - # @return [::String] - # Required. Target region for the disk. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # Required. Target URLs of the replica zones for the disk. - class RegionDiskTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DiskRestoreProperties represents the properties of a Disk restore. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the disk. - # @!attribute [rw] description - # @return [::String] - # Optional. An optional description of this resource. Provide this property - # when you create the resource. - # @!attribute [rw] size_gb - # @return [::Integer] - # Required. The size of the disk in GB. - # @!attribute [rw] licenses - # @return [::Array<::String>] - # Optional. A list of publicly available licenses that are applicable to this - # backup. This is applicable if the original image had licenses attached, - # e.g. Windows image - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # Optional. A list of features to enable in the guest operating system. This - # is applicable only for bootable images. - # @!attribute [rw] disk_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts the disk using a - # customer-supplied encryption key or a customer-managed encryption key. - # @!attribute [rw] physical_block_size_bytes - # @return [::Integer] - # Optional. Physical block size of the persistent disk, in bytes. - # If not present in a request, a default value is used. - # Currently, the supported size is 4096. - # @!attribute [rw] provisioned_iops - # @return [::Integer] - # Optional. Indicates how many IOPS to provision for the disk. This sets the - # number of I/O operations per second that the disk can handle. - # @!attribute [rw] provisioned_throughput - # @return [::Integer] - # Optional. Indicates how much throughput to provision for the disk. This - # sets the number of throughput MB per second that the disk can handle. - # @!attribute [rw] enable_confidential_compute - # @return [::Boolean] - # Optional. Indicates whether this disk is using confidential compute mode. - # Encryption with a Cloud KMS key is required to enable this option. - # @!attribute [rw] storage_pool - # @return [::String] - # Optional. The storage pool in which the new disk is created. You can - # provide this as a partial or full URL to the resource. - # @!attribute [rw] access_mode - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::AccessMode] - # Optional. The access mode of the disk. - # @!attribute [rw] architecture - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::Architecture] - # Optional. The architecture of the source disk. Valid values are - # ARM64 or X86_64. - # @!attribute [rw] resource_policy - # @return [::Array<::String>] - # Optional. Resource policies applied to this disk. - # @!attribute [rw] type - # @return [::String] - # Required. URL of the disk type resource describing which disk type to use - # to create the disk. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels to apply to this disk. These can be modified later using - # setLabels method. Label values can be empty. - # @!attribute [rw] resource_manager_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to the disk. - class DiskRestoreProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceManagerTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The supported access modes of the disk. - module AccessMode - # The default AccessMode, means the disk can be attached to single instance - # in RW mode. - READ_WRITE_SINGLE = 0 - - # The AccessMode means the disk can be attached to multiple instances in RW - # mode. - READ_WRITE_MANY = 1 - - # The AccessMode means the disk can be attached to multiple instances in RO - # mode. - READ_ONLY_MANY = 2 - end - - # Architecture of the source disk. - module Architecture - # Default value. This value is unused. - ARCHITECTURE_UNSPECIFIED = 0 - - # Disks with architecture X86_64 - X86_64 = 1 - - # Disks with architecture ARM64 - ARM64 = 2 - end - end - - # DiskBackupProperties represents the properties of a Disk backup. - # @!attribute [rw] description - # @return [::String] - # A description of the source disk. - # @!attribute [rw] licenses - # @return [::Array<::String>] - # A list of publicly available licenses that are applicable to this backup. - # This is applicable if the original image had licenses attached, e.g. - # Windows image. - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # A list of guest OS features that are applicable to this backup. - # @!attribute [rw] architecture - # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties::Architecture] - # The architecture of the source disk. Valid values are - # ARM64 or X86_64. - # @!attribute [rw] type - # @return [::String] - # The URL of the type of the disk. - # @!attribute [rw] size_gb - # @return [::Integer] - # Size(in GB) of the source disk. - # @!attribute [rw] region - # @return [::String] - # Region and zone are mutually exclusive fields. - # The URL of the region of the source disk. - # @!attribute [rw] zone - # @return [::String] - # The URL of the Zone where the source disk. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # The URL of the Zones where the source disk should be replicated. - # @!attribute [rw] source_disk - # @return [::String] - # The source disk used to create this backup. - class DiskBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Architecture of the source disk. - module Architecture - # Default value. This value is unused. - ARCHITECTURE_UNSPECIFIED = 0 - - # Disks with architecture X86_64 - X86_64 = 1 - - # Disks with architecture ARM64 - ARM64 = 2 - end - end - - # DiskDataSourceProperties represents the properties of a - # Disk resource that are stored in the DataSource. - # . - # @!attribute [rw] name - # @return [::String] - # Name of the disk backed up by the datasource. - # @!attribute [rw] description - # @return [::String] - # The description of the disk. - # @!attribute [rw] type - # @return [::String] - # The type of the disk. - # @!attribute [rw] size_gb - # @return [::Integer] - # The size of the disk in GB. - class DiskDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb deleted file mode 100644 index bc9fe21300c3..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb +++ /dev/null @@ -1,1001 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # ComputeInstanceBackupProperties represents Compute Engine instance backup - # properties. - # @!attribute [rw] description - # @return [::String] - # An optional text description for the instances that are created from these - # properties. - # @!attribute [rw] tags - # @return [::Google::Cloud::BackupDR::V1::Tags] - # A list of tags to apply to the instances that are created from these - # properties. The tags identify valid sources or targets for network - # firewalls. The setTags method can modify this list of tags. Each tag within - # the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). - # @!attribute [rw] machine_type - # @return [::String] - # The machine type to use for instances that are created from these - # properties. - # @!attribute [rw] can_ip_forward - # @return [::Boolean] - # Enables instances created based on these properties to send packets with - # source IP addresses other than their own and receive packets with - # destination IP addresses other than their own. If these instances will be - # used as an IP gateway or it will be set as the next-hop in a Route - # resource, specify `true`. If unsure, leave this set to `false`. See the - # https://cloud.google.com/vpc/docs/using-routes#canipforward - # documentation for more information. - # @!attribute [rw] network_interface - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] - # An array of network access configurations for this interface. - # @!attribute [rw] disk - # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] - # An array of disks that are associated with the instances that are created - # from these properties. - # @!attribute [rw] metadata - # @return [::Google::Cloud::BackupDR::V1::Metadata] - # The metadata key/value pairs to assign to instances that are created from - # these properties. These pairs can consist of custom metadata or predefined - # keys. See https://cloud.google.com/compute/docs/metadata/overview for more - # information. - # @!attribute [rw] service_account - # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] - # A list of service accounts with specified scopes. Access tokens for these - # service accounts are available to the instances that are created from - # these properties. Use metadata queries to obtain the access tokens for - # these instances. - # @!attribute [rw] scheduling - # @return [::Google::Cloud::BackupDR::V1::Scheduling] - # Specifies the scheduling options for the instances that are created from - # these properties. - # @!attribute [rw] guest_accelerator - # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] - # A list of guest accelerator cards' type and count to use for instances - # created from these properties. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # Minimum cpu/platform to be used by instances. The instance may be - # scheduled on the specified or newer cpu/platform. Applicable values are the - # friendly names of CPU platforms, such as - # `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. - # For more information, read - # https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - # @!attribute [rw] key_revocation_action_type - # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] - # KeyRevocationActionType of the instance. Supported options are "STOP" and - # "NONE". The default value is "NONE" if it is not specified. - # @!attribute [rw] source_instance - # @return [::String] - # The source instance used to create this backup. This can be a partial or - # full URL to the resource. For example, the following are valid values: - # -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - # -projects/project/zones/zone/instances/instance - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels to apply to instances that are created from these properties. - class ComputeInstanceBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # ComputeInstanceRestoreProperties represents Compute Engine instance - # properties to be overridden during restore. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the compute instance. - # @!attribute [rw] advanced_machine_features - # @return [::Google::Cloud::BackupDR::V1::AdvancedMachineFeatures] - # Optional. Controls for advanced machine-related behavior features. - # @!attribute [rw] can_ip_forward - # @return [::Boolean] - # Optional. Allows this instance to send and receive packets with - # non-matching destination or source IPs. - # @!attribute [rw] confidential_instance_config - # @return [::Google::Cloud::BackupDR::V1::ConfidentialInstanceConfig] - # Optional. Controls Confidential compute options on the instance - # @!attribute [rw] deletion_protection - # @return [::Boolean] - # Optional. Whether the resource should be protected against deletion. - # @!attribute [rw] description - # @return [::String] - # Optional. An optional description of this resource. Provide this property - # when you create the resource. - # @!attribute [rw] disks - # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] - # Optional. Array of disks associated with this instance. Persistent disks - # must be created before you can assign them. Source regional persistent - # disks will be restored with default replica zones if not specified. - # @!attribute [rw] display_device - # @return [::Google::Cloud::BackupDR::V1::DisplayDevice] - # Optional. Enables display device for the instance. - # @!attribute [rw] guest_accelerators - # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] - # Optional. A list of the type and count of accelerator cards attached to the - # instance. - # @!attribute [rw] hostname - # @return [::String] - # Optional. Specifies the hostname of the instance. The specified hostname - # must be RFC1035 compliant. If hostname is not specified, the default - # hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global - # DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal - # DNS. - # @!attribute [rw] instance_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts suspended data for an instance with a - # customer-managed encryption key. - # @!attribute [rw] key_revocation_action_type - # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] - # Optional. KeyRevocationActionType of the instance. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels to apply to this instance. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. Full or partial URL of the machine type resource to use for this - # instance. - # @!attribute [rw] metadata - # @return [::Google::Cloud::BackupDR::V1::Metadata] - # Optional. This includes custom metadata and predefined keys. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # Optional. Minimum CPU platform to use for this instance. - # @!attribute [rw] network_interfaces - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] - # Optional. An array of network configurations for this instance. These - # specify how interfaces are configured to interact with other network - # services, such as connecting to the internet. Multiple interfaces are - # supported per instance. Required to restore in different project or region. - # @!attribute [rw] network_performance_config - # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig] - # Optional. Configure network performance such as egress bandwidth tier. - # @!attribute [rw] params - # @return [::Google::Cloud::BackupDR::V1::InstanceParams] - # Input only. Additional params passed with the request, but not persisted - # as part of resource payload. - # @!attribute [rw] private_ipv6_google_access - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess] - # Optional. The private IPv6 google access type for the VM. - # If not specified, use INHERIT_FROM_SUBNETWORK as default. - # @!attribute [rw] allocation_affinity - # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity] - # Optional. Specifies the reservations that this instance can consume from. - # @!attribute [rw] resource_policies - # @return [::Array<::String>] - # Optional. Resource policies applied to this instance. - # By default, no resource policies will be applied. - # @!attribute [rw] scheduling - # @return [::Google::Cloud::BackupDR::V1::Scheduling] - # Optional. Sets the scheduling options for this instance. - # @!attribute [rw] service_accounts - # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] - # Optional. A list of service accounts, with their specified scopes, - # authorized for this instance. Only one service account per VM instance is - # supported. - # @!attribute [rw] tags - # @return [::Google::Cloud::BackupDR::V1::Tags] - # Optional. Tags to apply to this instance. Tags are used to identify valid - # sources or targets for network firewalls and are specified by the client - # during instance creation. - class ComputeInstanceRestoreProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The private IPv6 google access type for the VMs. - module InstancePrivateIpv6GoogleAccess - # Default value. This value is unused. - INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0 - - # Each network interface inherits PrivateIpv6GoogleAccess from its - # subnetwork. - INHERIT_FROM_SUBNETWORK = 1 - - # Outbound private IPv6 access from VMs in this subnet to Google services. - # If specified, the subnetwork who is attached to the instance's default - # network interface will be assigned an internal IPv6 prefix if it doesn't - # have before. - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2 - - # Bidirectional private IPv6 access to/from Google services. If - # specified, the subnetwork who is attached to the instance's default - # network interface will be assigned an internal IPv6 prefix if it doesn't - # have before. - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 - end - end - - # ComputeInstanceTargetEnvironment represents Compute Engine target - # environment to be used during restore. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the Compute Engine instance. - # @!attribute [rw] zone - # @return [::String] - # Required. The zone of the Compute Engine instance. - class ComputeInstanceTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ComputeInstanceDataSourceProperties represents the properties of a - # ComputeEngine resource that are stored in the DataSource. - # @!attribute [rw] name - # @return [::String] - # Name of the compute instance backed up by the datasource. - # @!attribute [rw] description - # @return [::String] - # The description of the Compute Engine instance. - # @!attribute [rw] machine_type - # @return [::String] - # The machine type of the instance. - # @!attribute [rw] total_disk_count - # @return [::Integer] - # The total number of disks attached to the Instance. - # @!attribute [rw] total_disk_size_gb - # @return [::Integer] - # The sum of all the disk sizes. - class ComputeInstanceDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies options for controlling advanced machine features. - # @!attribute [rw] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization or not (default is - # false). - # @!attribute [rw] threads_per_core - # @return [::Integer] - # Optional. The number of threads per physical core. To disable simultaneous - # multithreading (SMT) set this to 1. If unset, the maximum number - # of threads supported per core by the underlying processor is - # assumed. - # @!attribute [rw] visible_core_count - # @return [::Integer] - # Optional. The number of physical cores to expose to an instance. Multiply - # by the number of threads per core to compute the total number of virtual - # CPUs to expose to the instance. If unset, the number of cores is - # inferred from the instance's nominal CPU count and the underlying - # platform's SMT width. - # @!attribute [rw] enable_uefi_networking - # @return [::Boolean] - # Optional. Whether to enable UEFI networking for instance creation. - class AdvancedMachineFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of Confidential Instance options. - # @!attribute [rw] enable_confidential_compute - # @return [::Boolean] - # Optional. Defines whether the instance should have confidential compute - # enabled. - class ConfidentialInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of Display Device options - # @!attribute [rw] enable_display - # @return [::Boolean] - # Optional. Enables display for the Compute Engine VM - class DisplayDevice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A specification of the type and number of accelerator cards attached to the - # instance. - # @!attribute [rw] accelerator_type - # @return [::String] - # Optional. Full or partial URL of the accelerator type resource to attach to - # this instance. - # @!attribute [rw] accelerator_count - # @return [::Integer] - # Optional. The number of the guest accelerator cards exposed to this - # instance. - class AcceleratorConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A customer-supplied encryption key. - # @!attribute [rw] raw_key - # @return [::String] - # Optional. Specifies a 256-bit customer-supplied - # encryption key. - # - # Note: The following fields are mutually exclusive: `raw_key`, `rsa_encrypted_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] rsa_encrypted_key - # @return [::String] - # Optional. RSA-wrapped 2048-bit - # customer-supplied encryption key to either encrypt or decrypt this - # resource. - # - # Note: The following fields are mutually exclusive: `rsa_encrypted_key`, `raw_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The name of the encryption key that is stored in Google Cloud - # KMS. - # - # Note: The following fields are mutually exclusive: `kms_key_name`, `raw_key`, `rsa_encrypted_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kms_key_service_account - # @return [::String] - # Optional. The service account being used for the encryption request for the - # given KMS key. If absent, the Compute Engine default service account is - # used. - class CustomerEncryptionKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A key/value pair to be used for storing metadata. - # @!attribute [rw] key - # @return [::String] - # Optional. Key for the metadata entry. - # @!attribute [rw] value - # @return [::String] - # Optional. Value for the metadata entry. These are free-form strings, and - # only have meaning as interpreted by the image running in the instance. The - # only restriction placed on values is that their size must be less than - # or equal to 262144 bytes (256 KiB). - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A metadata key/value entry. - # @!attribute [rw] items - # @return [::Array<::Google::Cloud::BackupDR::V1::Entry>] - # Optional. Array of key/value pairs. The total size of all keys and values - # must be less than 512 KB. - class Metadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A network interface resource attached to an instance. - # s - # @!attribute [rw] network - # @return [::String] - # Optional. URL of the VPC network resource for this instance. - # @!attribute [rw] subnetwork - # @return [::String] - # Optional. The URL of the Subnetwork resource for this instance. - # @!attribute [rw] ip_address - # @return [::String] - # Optional. An IPv4 internal IP address to assign to the instance for this - # network interface. If not specified by the user, an unused internal IP is - # assigned by the system. - # @!attribute [rw] ipv6_address - # @return [::String] - # Optional. An IPv6 internal network address for this network interface. To - # use a static internal IP address, it must be unused and in the same region - # as the instance's zone. If not specified, Google Cloud will automatically - # assign an internal IPv6 address from the instance's subnetwork. - # @!attribute [rw] internal_ipv6_prefix_length - # @return [::Integer] - # Optional. The prefix length of the primary internal IPv6 range. - # @!attribute [r] name - # @return [::String] - # Output only. [Output Only] The name of the network interface, which is - # generated by the server. - # @!attribute [rw] access_configs - # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] - # Optional. An array of configurations for this interface. Currently, only - # one access config,ONE_TO_ONE_NAT is supported. If there are no - # accessConfigs specified, then this instance will have - # no external internet access. - # @!attribute [rw] ipv6_access_configs - # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] - # Optional. An array of IPv6 access configurations for this interface. - # Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there - # is no ipv6AccessConfig specified, then this instance will - # have no external IPv6 Internet access. - # @!attribute [rw] alias_ip_ranges - # @return [::Array<::Google::Cloud::BackupDR::V1::AliasIpRange>] - # Optional. An array of alias IP ranges for this network interface. - # You can only specify this field for network interfaces in VPC networks. - # @!attribute [rw] stack_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::StackType] - # The stack type for this network interface. - # @!attribute [rw] ipv6_access_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::Ipv6AccessType] - # Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the - # IP can be accessed from the Internet. This field is always inherited from - # its subnetwork. - # @!attribute [rw] queue_count - # @return [::Integer] - # Optional. The networking queue count that's specified by users for the - # network interface. Both Rx and Tx queues will be set to this number. It'll - # be empty if not specified by the users. - # @!attribute [rw] nic_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::NicType] - # Optional. The type of vNIC to be used on this interface. This may be gVNIC - # or VirtioNet. - # @!attribute [rw] network_attachment - # @return [::String] - # Optional. The URL of the network attachment that this interface should - # connect to in the following format: - # projects/\\{project_number}/regions/\\{region_name}/networkAttachments/\\{network_attachment_name}. - class NetworkInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stack type for this network interface. - module StackType - # Default should be STACK_TYPE_UNSPECIFIED. - STACK_TYPE_UNSPECIFIED = 0 - - # The network interface will be assigned IPv4 address. - IPV4_ONLY = 1 - - # The network interface can have both IPv4 and IPv6 addresses. - IPV4_IPV6 = 2 - end - - # IPv6 access type for this network interface. - module Ipv6AccessType - # IPv6 access type not set. Means this network interface hasn't been - # turned on IPv6 yet. - UNSPECIFIED_IPV6_ACCESS_TYPE = 0 - - # This network interface can have internal IPv6. - INTERNAL = 1 - - # This network interface can have external IPv6. - EXTERNAL = 2 - end - - # Nic type for this network interface. - module NicType - # Default should be NIC_TYPE_UNSPECIFIED. - NIC_TYPE_UNSPECIFIED = 0 - - # VIRTIO - VIRTIO_NET = 1 - - # GVNIC - GVNIC = 2 - end - end - - # Network performance configuration. - # @!attribute [rw] total_egress_bandwidth_tier - # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig::Tier] - # Optional. The tier of the total egress bandwidth. - class NetworkPerformanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Network performance tier. - module Tier - # This value is unused. - TIER_UNSPECIFIED = 0 - - # Default network performance config. - DEFAULT = 1 - - # Tier 1 network performance config. - TIER_1 = 2 - end - end - - # An access configuration attached to an instance's network interface. - # Only one access config per instance is supported. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::AccessConfig::AccessType] - # Optional. In accessConfigs (IPv4), the - # default and only option is ONE_TO_ONE_NAT. In - # ipv6AccessConfigs, the default and only option is - # DIRECT_IPV6. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of this access configuration. - # @!attribute [rw] external_ip - # @return [::String] - # Optional. The external IP address of this access configuration. - # @!attribute [rw] external_ipv6 - # @return [::String] - # Optional. The external IPv6 address of this access configuration. - # @!attribute [rw] external_ipv6_prefix_length - # @return [::Integer] - # Optional. The prefix length of the external IPv6 range. - # @!attribute [rw] set_public_ptr - # @return [::Boolean] - # Optional. Specifies whether a public DNS 'PTR' record should be created to - # map the external IP address of the instance to a DNS domain name. - # @!attribute [rw] public_ptr_domain_name - # @return [::String] - # Optional. The DNS domain name for the public PTR record. - # @!attribute [rw] network_tier - # @return [::Google::Cloud::BackupDR::V1::AccessConfig::NetworkTier] - # Optional. This signifies the networking tier used for configuring this - # access - class AccessConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of configuration. - module AccessType - # Default value. This value is unused. - ACCESS_TYPE_UNSPECIFIED = 0 - - # ONE_TO_ONE_NAT - ONE_TO_ONE_NAT = 1 - - # Direct IPv6 access. - DIRECT_IPV6 = 2 - end - - # Network tier property used by addresses, instances and forwarding rules. - module NetworkTier - # Default value. This value is unused. - NETWORK_TIER_UNSPECIFIED = 0 - - # High quality, Google-grade network tier, support for all networking - # products. - PREMIUM = 1 - - # Public internet quality, only limited support for other networking - # products. - STANDARD = 2 - end - end - - # An alias IP range attached to an instance's network interface. - # @!attribute [rw] ip_cidr_range - # @return [::String] - # Optional. The IP alias ranges to allocate for this interface. - # @!attribute [rw] subnetwork_range_name - # @return [::String] - # Optional. The name of a subnetwork secondary IP range from which to - # allocate an IP alias range. If not specified, the primary range of the - # subnetwork is used. - class AliasIpRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional instance params. - # @!attribute [rw] resource_manager_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to the instance. - class InstanceParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceManagerTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifies the reservations that this instance can consume from. - # @!attribute [rw] consume_allocation_type - # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity::Type] - # Optional. Specifies the type of reservation from which this instance can - # consume - # @!attribute [rw] key - # @return [::String] - # Optional. Corresponds to the label key of a reservation resource. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Corresponds to the label values of a reservation resource. - class AllocationAffinity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates whether to consume from a reservation or not. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # Do not consume from any allocated capacity. - NO_RESERVATION = 1 - - # Consume any allocation available. - ANY_RESERVATION = 2 - - # Must consume from a specific reservation. Must specify key value fields - # for specifying the reservations. - SPECIFIC_RESERVATION = 3 - end - end - - # Sets the scheduling options for an Instance. - # @!attribute [rw] on_host_maintenance - # @return [::Google::Cloud::BackupDR::V1::Scheduling::OnHostMaintenance] - # Optional. Defines the maintenance behavior for this instance. - # @!attribute [rw] automatic_restart - # @return [::Boolean] - # Optional. Specifies whether the instance should be automatically restarted - # if it is terminated by Compute Engine (not terminated by a user). - # @!attribute [rw] preemptible - # @return [::Boolean] - # Optional. Defines whether the instance is preemptible. - # @!attribute [rw] node_affinities - # @return [::Array<::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity>] - # Optional. A set of node affinity and anti-affinity configurations. - # Overrides reservationAffinity. - # @!attribute [rw] min_node_cpus - # @return [::Integer] - # Optional. The minimum number of virtual CPUs this instance will consume - # when running on a sole-tenant node. - # @!attribute [rw] provisioning_model - # @return [::Google::Cloud::BackupDR::V1::Scheduling::ProvisioningModel] - # Optional. Specifies the provisioning model of the instance. - # @!attribute [rw] instance_termination_action - # @return [::Google::Cloud::BackupDR::V1::Scheduling::InstanceTerminationAction] - # Optional. Specifies the termination action for the instance. - # @!attribute [rw] local_ssd_recovery_timeout - # @return [::Google::Cloud::BackupDR::V1::SchedulingDuration] - # Optional. Specifies the maximum amount of time a Local Ssd Vm should wait - # while recovery of the Local Ssd state is attempted. Its value should be in - # between 0 and 168 hours with hour granularity and the default value being 1 - # hour. - class Scheduling - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Node Affinity: the configuration of desired nodes onto which this Instance - # could be scheduled. - # @!attribute [rw] key - # @return [::String] - # Optional. Corresponds to the label key of Node resource. - # @!attribute [rw] operator - # @return [::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity::Operator] - # Optional. Defines the operation of node selection. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Corresponds to the label values of Node resource. - class NodeAffinity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the type of node selections. - module Operator - # Default value. This value is unused. - OPERATOR_UNSPECIFIED = 0 - - # Requires Compute Engine to seek for matched nodes. - IN = 1 - - # Requires Compute Engine to avoid certain nodes. - NOT_IN = 2 - end - end - - # Defines the maintenance behavior for this instance= - module OnHostMaintenance - # Default value. This value is unused. - ON_HOST_MAINTENANCE_UNSPECIFIED = 0 - - # Tells Compute Engine to terminate and (optionally) restart the instance - # away from the maintenance activity. - TERMINATE = 1 - - # Default, Allows Compute Engine to automatically migrate instances - # out of the way of maintenance events. - MIGRATE = 1000 - end - - # Defines the provisioning model for an instance. - module ProvisioningModel - # Default value. This value is not used. - PROVISIONING_MODEL_UNSPECIFIED = 0 - - # Standard provisioning with user controlled runtime, no discounts. - STANDARD = 1 - - # Heavily discounted, no guaranteed runtime. - SPOT = 2 - end - - # Defines the supported termination actions for an instance. - module InstanceTerminationAction - # Default value. This value is unused. - INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0 - - # Delete the VM. - DELETE = 1 - - # Stop the VM without storing in-memory content. default action. - STOP = 2 - end - end - - # A SchedulingDuration represents a fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". Range is approximately 10,000 years. - # @!attribute [rw] seconds - # @return [::Integer] - # Optional. Span of time at a resolution of a second. - # @!attribute [rw] nanos - # @return [::Integer] - # Optional. Span of time that's a fraction of a second at nanosecond - # resolution. - class SchedulingDuration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A service account. - # @!attribute [rw] email - # @return [::String] - # Optional. Email address of the service account. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Optional. The list of scopes to be made available for this service account. - class ServiceAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of instance tags. - # @!attribute [rw] items - # @return [::Array<::String>] - # Optional. An array of tags. Each tag must be 1-63 characters long, and - # comply with RFC1035. - class Tags - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An instance-attached disk resource. - # @!attribute [rw] initialize_params - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::InitializeParams] - # Optional. Specifies the parameters to initialize this disk. - # @!attribute [rw] device_name - # @return [::String] - # Optional. This is used as an identifier for the disks. This is the unique - # name has to provided to modify disk parameters like disk_name and - # replica_zones (in case of RePDs) - # @!attribute [rw] kind - # @return [::String] - # Optional. Type of the resource. - # @!attribute [rw] disk_type_deprecated - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] - # Specifies the type of the disk. - # @!attribute [rw] mode - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskMode] - # Optional. The mode in which to attach this disk. - # @!attribute [rw] source - # @return [::String] - # Optional. Specifies a valid partial or full URL to an existing Persistent - # Disk resource. - # @!attribute [rw] index - # @return [::Integer] - # Optional. A zero-based index to this disk, where 0 is reserved for the - # boot disk. - # @!attribute [rw] boot - # @return [::Boolean] - # Optional. Indicates that this is a boot disk. The virtual machine will use - # the first partition of the disk for its root filesystem. - # @!attribute [rw] auto_delete - # @return [::Boolean] - # Optional. Specifies whether the disk will be auto-deleted when the instance - # is deleted (but not when the disk is detached from the instance). - # @!attribute [rw] license - # @return [::Array<::String>] - # Optional. Any valid publicly visible licenses. - # @!attribute [rw] disk_interface - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskInterface] - # Optional. Specifies the disk interface to use for attaching this disk. - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # Optional. A list of features to enable on the guest operating system. - # Applicable only for bootable images. - # @!attribute [rw] disk_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts or decrypts a disk using a customer-supplied - # encryption key. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Optional. The size of the disk in GB. - # @!attribute [r] saved_state - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskSavedState] - # Optional. Output only. The state of the disk. - # @!attribute [r] disk_type - # @return [::String] - # Optional. Output only. The URI of the disk type resource. For example: - # projects/project/zones/zone/diskTypes/pd-standard or pd-ssd - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] - # Optional. Specifies the type of the disk. - class AttachedDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the parameters to initialize this disk. - # @!attribute [rw] disk_name - # @return [::String] - # Optional. Specifies the disk name. If not specified, the default is to - # use the name of the instance. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # Optional. URL of the zone where the disk should be created. - # Required for each regional disk associated with the instance. - class InitializeParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of the Disk Types. - module DiskType - # Default value, which is unused. - DISK_TYPE_UNSPECIFIED = 0 - - # A scratch disk type. - SCRATCH = 1 - - # A persistent disk type. - PERSISTENT = 2 - end - - # List of the Disk Modes. - module DiskMode - # Default value, which is unused. - DISK_MODE_UNSPECIFIED = 0 - - # Attaches this disk in read-write mode. Only one - # virtual machine at a time can be attached to a disk in read-write mode. - READ_WRITE = 1 - - # Attaches this disk in read-only mode. Multiple virtual machines can use - # a disk in read-only mode at a time. - READ_ONLY = 2 - - # The disk is locked for administrative reasons. Nobody else - # can use the disk. This mode is used (for example) when taking - # a snapshot of a disk to prevent mounting the disk while it is - # being snapshotted. - LOCKED = 3 - end - - # List of the Disk Interfaces. - module DiskInterface - # Default value, which is unused. - DISK_INTERFACE_UNSPECIFIED = 0 - - # SCSI Disk Interface. - SCSI = 1 - - # NVME Disk Interface. - NVME = 2 - - # NVDIMM Disk Interface. - NVDIMM = 3 - - # ISCSI Disk Interface. - ISCSI = 4 - end - - # List of the states of the Disk. - module DiskSavedState - # Default Disk state has not been preserved. - DISK_SAVED_STATE_UNSPECIFIED = 0 - - # Disk state has been preserved. - PRESERVED = 1 - end - end - - # Feature type of the Guest OS. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::GuestOsFeature::FeatureType] - # The ID of a supported feature. - class GuestOsFeature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # List of the Feature Types. - module FeatureType - # Default value, which is unused. - FEATURE_TYPE_UNSPECIFIED = 0 - - # VIRTIO_SCSI_MULTIQUEUE feature type. - VIRTIO_SCSI_MULTIQUEUE = 1 - - # WINDOWS feature type. - WINDOWS = 2 - - # MULTI_IP_SUBNET feature type. - MULTI_IP_SUBNET = 3 - - # UEFI_COMPATIBLE feature type. - UEFI_COMPATIBLE = 4 - - # SECURE_BOOT feature type. - SECURE_BOOT = 5 - - # GVNIC feature type. - GVNIC = 6 - - # SEV_CAPABLE feature type. - SEV_CAPABLE = 7 - - # BARE_METAL_LINUX_COMPATIBLE feature type. - BARE_METAL_LINUX_COMPATIBLE = 8 - - # SUSPEND_RESUME_COMPATIBLE feature type. - SUSPEND_RESUME_COMPATIBLE = 9 - - # SEV_LIVE_MIGRATABLE feature type. - SEV_LIVE_MIGRATABLE = 10 - - # SEV_SNP_CAPABLE feature type. - SEV_SNP_CAPABLE = 11 - - # TDX_CAPABLE feature type. - TDX_CAPABLE = 12 - - # IDPF feature type. - IDPF = 13 - - # SEV_LIVE_MIGRATABLE_V2 feature type. - SEV_LIVE_MIGRATABLE_V2 = 14 - end - end - - # Specifies whether the virtual machine instance will be shut down on key - # revocation. It is currently used in instance, instance properties and GMI - # protos - module KeyRevocationActionType - # Default value. This value is unused. - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0 - - # Indicates user chose no operation. - NONE = 1 - - # Indicates user chose to opt for VM shutdown on key revocation. - STOP = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb deleted file mode 100644 index d6e8a8da44c0..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb +++ /dev/null @@ -1,228 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # DataSourceReference is a reference to a DataSource resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the DataSourceReference. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # @!attribute [r] data_source - # @return [::String] - # Output only. The resource name of the DataSource. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{dataSource} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataSourceReference was created. - # @!attribute [r] data_source_backup_config_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] - # Output only. The backup configuration state of the DataSource. - # @!attribute [r] data_source_backup_count - # @return [::Integer] - # Output only. Number of backups in the DataSource. - # @!attribute [r] data_source_backup_config_info - # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupConfigInfo] - # Output only. Information of backup configuration on the DataSource. - # @!attribute [r] data_source_gcp_resource_info - # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResourceInfo] - # Output only. The GCP resource that the DataSource is associated with. - # @!attribute [r] total_stored_bytes - # @return [::Integer] - # Output only. Total size of the storage used by all backup resources for the - # referenced datasource. - class DataSourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information of backup configuration on the DataSource. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] - # Output only. The status of the last backup in this DataSource - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the last successful backup to this DataSource. - class DataSourceBackupConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The GCP resource that the DataSource is associated with. - # @!attribute [r] gcp_resourcename - # @return [::String] - # Output only. The resource name of the GCP resource. - # Ex: projects/\\{project}/zones/\\{zone}/instances/\\{instance} - # @!attribute [r] type - # @return [::String] - # Output only. The type of the GCP resource. - # Ex: compute.googleapis.com/Instance - # @!attribute [r] location - # @return [::String] - # Output only. The location of the GCP resource. - # Ex: //"global"/"unspecified" - # @!attribute [r] cloud_sql_instance_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceReferenceProperties] - # Output only. The properties of the Cloud SQL instance. - class DataSourceGcpResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the GetDataSourceReference method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - class GetDataSourceReferenceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the ListDataSourceReferences method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - class ListDataSourceReferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the ListDataSourceReferences method. - # @!attribute [rw] data_source_references - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # The DataSourceReferences from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataSourceReferencesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchDataSourceReferencesForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - class FetchDataSourceReferencesForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchDataSourceReferencesForResourceType method. - # @!attribute [rw] data_source_references - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # The DataSourceReferences from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class FetchDataSourceReferencesForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb deleted file mode 100644 index 79acc54ee206..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb +++ /dev/null @@ -1,309 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # Request for ListResourceBackupConfigs. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve resource backup - # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google - # Cloud Backup and DR, locations map to Google Cloud regions, for example - # **us-central1**. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will use 100 as default. Maximum value is - # 500 and values above 500 will be coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListResourceBackupConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListResourceBackupConfigs. - # @!attribute [rw] resource_backup_configs - # @return [::Array<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] - # The list of ResourceBackupConfigs for the specified scope. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListResourceBackupConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ResourceBackupConfig represents a resource along with its backup - # configurations. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the ResourceBackupConfig. - # Format: - # projects/\\{project}/locations/\\{location}/resourceBackupConfigs/\\{uid} - # @!attribute [r] uid - # @return [::String] - # Output only. The unique identifier of the resource backup config. - # @!attribute [r] target_resource - # @return [::String] - # Output only. The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the cloud resource that this configuration applies to. Supported - # resource types are - # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType ResourceBackupConfig.ResourceType}. - # @!attribute [r] target_resource_display_name - # @return [::String] - # Output only. The human friendly name of the target resource. - # @!attribute [r] target_resource_type - # @return [::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType] - # Output only. The type of the target resource. - # @!attribute [rw] target_resource_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with the target resource. - # @!attribute [rw] backup_configs_details - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupConfigDetails>] - # Backup configurations applying to the target resource, including those - # targeting its related/child resources. For example, backup configuration - # applicable to Compute Engine disks will be populated in this field for a - # Compute Engine VM which has the disk associated. - # @!attribute [r] backup_configured - # @return [::Boolean] - # Output only. Whether the target resource is configured for backup. This is - # true if the backup_configs_details is not empty. - # @!attribute [r] vaulted - # @return [::Boolean] - # Output only. Whether the target resource is protected by a backup vault. - # This is true if the backup_configs_details is not empty and any of the - # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig#backup_configs_details ResourceBackupConfig.backup_configs_details} - # has a backup configuration with - # {::Google::Cloud::BackupDR::V1::BackupConfigDetails#backup_vault BackupConfigDetails.backup_vault} - # set. set. - class ResourceBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TargetResourceLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the cloud resource. - module ResourceType - # Resource type not set. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # Cloud SQL instance. - CLOUD_SQL_INSTANCE = 1 - - # Compute Engine VM. - COMPUTE_ENGINE_VM = 2 - - # Compute Engine Disk. - COMPUTE_ENGINE_DISK = 3 - - # Compute Engine Regional Disk. - COMPUTE_ENGINE_REGIONAL_DISK = 4 - end - end - - # BackupConfigDetails has information about how the resource is configured - # for backups and about the most recent backup taken for this configuration. - # @!attribute [r] backup_config_source - # @return [::String] - # Output only. The full resource name of the backup config source resource. - # For example, - # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupPlans/\\{backupplanId}" - # or - # "//compute.googleapis.com/projects/\\{project}/locations/\\{region}/resourcePolicies/\\{resourcePolicyId}". - # @!attribute [r] backup_config_source_display_name - # @return [::String] - # Output only. The display name of the backup config source resource. - # @!attribute [r] type - # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::Type] - # Output only. The type of the backup config resource. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::State] - # Output only. The state of the backup config resource. - # @!attribute [r] pitr_settings - # @return [::Google::Cloud::BackupDR::V1::PitrSettings] - # Output only. Point in time recovery settings of the backup configuration - # resource. - # @!attribute [r] latest_successful_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the latest successful backup created via this - # backup configuration. - # @!attribute [r] applicable_resource - # @return [::String] - # Output only. The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the resource that is applicable for the backup configuration. Example: - # "//compute.googleapis.com/projects/\\{project}/zones/\\{zone}/instances/\\{instance}" - # @!attribute [r] backup_vault - # @return [::String] - # Output only. The [full resource - # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # of the backup vault that will store the backups generated through this - # backup configuration. Example: - # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupVaults/\\{backupvaultId}" - # @!attribute [rw] backup_locations - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLocation>] - # The locations where the backups are to be stored. - # @!attribute [rw] backup_dr_plan_config - # @return [::Google::Cloud::BackupDR::V1::BackupDrPlanConfig] - # Google Cloud Backup and DR's Backup Plan specific data. - # - # Note: The following fields are mutually exclusive: `backup_dr_plan_config`, `backup_dr_template_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] backup_dr_template_config - # @return [::Google::Cloud::BackupDR::V1::BackupDrTemplateConfig] - # Google Cloud Backup and DR's Template specific data. - # - # Note: The following fields are mutually exclusive: `backup_dr_template_config`, `backup_dr_plan_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of the backup configuration. - # This enum may receive new values in the future. - module Type - # Backup config type is unspecified. - TYPE_UNSPECIFIED = 0 - - # Backup config is Cloud SQL instance's automated backup config. - CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1 - - # Backup config is Compute Engine Resource Policy. - COMPUTE_ENGINE_RESOURCE_POLICY = 2 - - # Backup config is Google Cloud Backup and DR's Backup Plan. - BACKUPDR_BACKUP_PLAN = 3 - - # Backup config is Google Cloud Backup and DR's Template. - BACKUPDR_TEMPLATE = 4 - end - - # The state tells whether the backup config is active or not. - module State - # Backup config state not set. - STATE_UNSPECIFIED = 0 - - # The config is in an active state protecting the resource - ACTIVE = 1 - - # The config is currently not protecting the resource. Either because it is - # disabled or the owning project has been deleted without cleanup of the - # actual resource. - INACTIVE = 2 - - # The config still exists but because of some error state it is not - # protecting the resource. Like the source project is deleted. For eg. - # PlanAssociation, BackupPlan is deleted. - ERROR = 3 - end - end - - # Point in time recovery settings of the backup configuration resource. - # @!attribute [r] retention_days - # @return [::Integer] - # Output only. Number of days to retain the backup. - class PitrSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides additional information about Google Cloud Backup - # and DR's Template backup configuration. - # @!attribute [r] first_party_management_uri - # @return [::String] - # Output only. The URI of the BackupDr template resource for the first party - # identity users. - # @!attribute [r] third_party_management_uri - # @return [::String] - # Output only. The URI of the BackupDr template resource for the third party - # identity users. - class BackupDrTemplateConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupDrPlanConfig has additional information about Google Cloud Backup and - # DR's Plan backup configuration. - # @!attribute [rw] backup_dr_plan_rules - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupDrPlanRule>] - # Backup rules of the backup plan resource. - class BackupDrPlanConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupDrPlanRule has rule specific information of the backup plan resource. - # @!attribute [r] rule_id - # @return [::String] - # Output only. Unique Id of the backup rule. - # @!attribute [r] last_successful_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the latest successful backup created via this - # backup rule. - class BackupDrPlanRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupLocation represents a cloud location where a backup can be stored. - # @!attribute [r] type - # @return [::Google::Cloud::BackupDR::V1::BackupLocation::Type] - # Output only. The type of the location. - # @!attribute [r] location_id - # @return [::String] - # Output only. The id of the cloud location. Example: "us-central1" - class BackupLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the location. - module Type - # Location type is unspecified. - TYPE_UNSPECIFIED = 0 - - # Location type is zonal. - ZONAL = 1 - - # Location type is regional. - REGIONAL = 2 - - # Location type is multi regional. - MULTI_REGIONAL = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb deleted file mode 100644 index 3e27c902551d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a month in the Gregorian calendar. - module Month - # The unspecified month. - MONTH_UNSPECIFIED = 0 - - # The month of January. - JANUARY = 1 - - # The month of February. - FEBRUARY = 2 - - # The month of March. - MARCH = 3 - - # The month of April. - APRIL = 4 - - # The month of May. - MAY = 5 - - # The month of June. - JUNE = 6 - - # The month of July. - JULY = 7 - - # The month of August. - AUGUST = 8 - - # The month of September. - SEPTEMBER = 9 - - # The month of October. - OCTOBER = 10 - - # The month of November. - NOVEMBER = 11 - - # The month of December. - DECEMBER = 12 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile deleted file mode 100644 index 4febd3ff4e67..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-backupdr-v1", path: "../" -else - gem "google-cloud-backupdr-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb deleted file mode 100644 index 2b79d9a8674f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs. -# -def list_resource_backup_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new - - # Call the list_resource_backup_configs method. - result = client.list_resource_backup_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. - p item - end -end -# [END backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb deleted file mode 100644 index e5b889a4dfa1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan. -# -def create_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - - # Call the create_backup_plan method. - result = client.create_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb deleted file mode 100644 index 628c925da9e2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association. -# -def create_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - - # Call the create_backup_plan_association method. - result = client.create_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb deleted file mode 100644 index 30f7bcaa3098..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_CreateBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault. -# -def create_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - - # Call the create_backup_vault method. - result = client.create_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb deleted file mode 100644 index 8eb6c732f376..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_CreateManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server. -# -def create_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - - # Call the create_management_server method. - result = client.create_management_server request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb deleted file mode 100644 index d920bccbb83b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup. -# -def delete_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - - # Call the delete_backup method. - result = client.delete_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb deleted file mode 100644 index a1585e7a803b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan. -# -def delete_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - - # Call the delete_backup_plan method. - result = client.delete_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb deleted file mode 100644 index 68037dc3c1c4..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association. -# -def delete_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - - # Call the delete_backup_plan_association method. - result = client.delete_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb deleted file mode 100644 index bfc3d415812f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault. -# -def delete_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - - # Call the delete_backup_vault method. - result = client.delete_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb deleted file mode 100644 index 6e0a6c8cea65..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server. -# -def delete_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - - # Call the delete_management_server method. - result = client.delete_management_server request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb deleted file mode 100644 index 0caa4cac2125..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type. -# -def fetch_backup_plan_associations_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - - # Call the fetch_backup_plan_associations_for_resource_type method. - result = client.fetch_backup_plan_associations_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb deleted file mode 100644 index 8cd5de148567..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_backups_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type. -# -def fetch_backups_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - - # Call the fetch_backups_for_resource_type method. - result = client.fetch_backups_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb deleted file mode 100644 index dfcab2575125..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type. -# -def fetch_data_source_references_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - - # Call the fetch_data_source_references_for_resource_type method. - result = client.fetch_data_source_references_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb deleted file mode 100644 index a69bc309bc34..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_usable_backup_vaults call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults. -# -def fetch_usable_backup_vaults - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - - # Call the fetch_usable_backup_vaults method. - result = client.fetch_usable_backup_vaults request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb deleted file mode 100644 index 657958fff3c2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup. -# -def get_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - - # Call the get_backup method. - result = client.get_backup request - - # The returned object is of type Google::Cloud::BackupDR::V1::Backup. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb deleted file mode 100644 index 7f12d19c6466..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan. -# -def get_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - - # Call the get_backup_plan method. - result = client.get_backup_plan request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb deleted file mode 100644 index 95a3715c6d53..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association. -# -def get_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - - # Call the get_backup_plan_association method. - result = client.get_backup_plan_association request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb deleted file mode 100644 index d9bdfc3ff576..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan_revision call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision. -# -def get_backup_plan_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - - # Call the get_backup_plan_revision method. - result = client.get_backup_plan_revision request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb deleted file mode 100644 index b42028f7c351..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault. -# -def get_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - - # Call the get_backup_vault method. - result = client.get_backup_vault request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb deleted file mode 100644 index d86a885d8a7f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetDataSource_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_data_source call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source. -# -def get_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - - # Call the get_data_source method. - result = client.get_data_source request - - # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - p result -end -# [END backupdr_v1_generated_BackupDR_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb deleted file mode 100644 index 789a665be9b7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_data_source_reference call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference. -# -def get_data_source_reference - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - - # Call the get_data_source_reference method. - result = client.get_data_source_reference request - - # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - p result -end -# [END backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb deleted file mode 100644 index 0ab70b155c06..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server. -# -def get_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - - # Call the get_management_server method. - result = client.get_management_server request - - # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - p result -end -# [END backupdr_v1_generated_BackupDR_GetManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb deleted file mode 100644 index 1a6248e10433..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_InitializeService_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the initialize_service call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service. -# -def initialize_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - - # Call the initialize_service method. - result = client.initialize_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_InitializeService_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb deleted file mode 100644 index 1be14c9502b1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plan_associations call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations. -# -def list_backup_plan_associations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - - # Call the list_backup_plan_associations method. - result = client.list_backup_plan_associations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb deleted file mode 100644 index 523bdada0405..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plan_revisions call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions. -# -def list_backup_plan_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - - # Call the list_backup_plan_revisions method. - result = client.list_backup_plan_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb deleted file mode 100644 index 68a2931714bf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupPlans_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plans call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans. -# -def list_backup_plans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - - # Call the list_backup_plans method. - result = client.list_backup_plans request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlans_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb deleted file mode 100644 index bd68d0f95f72..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupVaults_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_vaults call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults. -# -def list_backup_vaults - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - - # Call the list_backup_vaults method. - result = client.list_backup_vaults request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb deleted file mode 100644 index 865ebe38ae19..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackups_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backups call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups. -# -def list_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new - - # Call the list_backups method. - result = client.list_backups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb deleted file mode 100644 index c0cbb790e2d0..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_data_source_references call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references. -# -def list_data_source_references - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - - # Call the list_data_source_references method. - result = client.list_data_source_references request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb deleted file mode 100644 index 5607c9beb443..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListDataSources_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_data_sources call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources. -# -def list_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - - # Call the list_data_sources method. - result = client.list_data_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb deleted file mode 100644 index c026e846fb03..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListManagementServers_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_management_servers call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers. -# -def list_management_servers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - - # Call the list_management_servers method. - result = client.list_management_servers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListManagementServers_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb deleted file mode 100644 index 0f57a119d916..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_RestoreBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the restore_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup. -# -def restore_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - - # Call the restore_backup method. - result = client.restore_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_RestoreBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb deleted file mode 100644 index d5b2a0664bef..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_TriggerBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the trigger_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup. -# -def trigger_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - - # Call the trigger_backup method. - result = client.trigger_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_TriggerBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb deleted file mode 100644 index 90ba04ae397e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup. -# -def update_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - - # Call the update_backup method. - result = client.update_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb deleted file mode 100644 index f2bdd1d70e64..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan. -# -def update_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - - # Call the update_backup_plan method. - result = client.update_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb deleted file mode 100644 index eaf3f010e273..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association. -# -def update_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - - # Call the update_backup_plan_association method. - result = client.update_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb deleted file mode 100644 index 5b0d5a057c05..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault. -# -def update_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - - # Call the update_backup_vault method. - result = client.update_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb deleted file mode 100644 index 1167757bc2d9..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateDataSource_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_data_source call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source. -# -def update_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - - # Call the update_data_source method. - result = client.update_data_source request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json deleted file mode 100644 index fa4385c64a8c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json +++ /dev/null @@ -1,1535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-backupdr-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.backupdr.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "backupdr_v1_generated_BackupDR_ListManagementServers_sync", - "title": "Snippet for the list_management_servers call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers.", - "file": "backupdr/list_management_servers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_management_servers", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListManagementServersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListManagementServersResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListManagementServers", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetManagementServer_sync", - "title": "Snippet for the get_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server.", - "file": "backupdr/get_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ManagementServer", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateManagementServer_sync", - "title": "Snippet for the create_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server.", - "file": "backupdr/create_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_sync", - "title": "Snippet for the delete_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server.", - "file": "backupdr/delete_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupVault_sync", - "title": "Snippet for the create_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault.", - "file": "backupdr/create_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupVaults_sync", - "title": "Snippet for the list_backup_vaults call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults.", - "file": "backupdr/list_backup_vaults.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_vaults", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupVaults", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync", - "title": "Snippet for the fetch_usable_backup_vaults call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults.", - "file": "backupdr/fetch_usable_backup_vaults.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_usable_backup_vaults", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchUsableBackupVaults", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupVault_sync", - "title": "Snippet for the get_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault.", - "file": "backupdr/get_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupVault", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_sync", - "title": "Snippet for the update_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault.", - "file": "backupdr/update_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_sync", - "title": "Snippet for the delete_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault.", - "file": "backupdr/delete_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListDataSources_sync", - "title": "Snippet for the list_data_sources call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources.", - "file": "backupdr/list_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_sources", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourcesResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListDataSources", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetDataSource_sync", - "title": "Snippet for the get_data_source call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source.", - "file": "backupdr/get_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::DataSource", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetDataSource", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateDataSource_sync", - "title": "Snippet for the update_data_source call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source.", - "file": "backupdr/update_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_source", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateDataSource", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackups_sync", - "title": "Snippet for the list_backups call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups.", - "file": "backupdr/list_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backups", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackups", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync", - "title": "Snippet for the fetch_backups_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type.", - "file": "backupdr/fetch_backups_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_backups_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchBackupsForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackup_sync", - "title": "Snippet for the get_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup.", - "file": "backupdr/get_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::Backup", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackup_sync", - "title": "Snippet for the update_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup.", - "file": "backupdr/update_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackup_sync", - "title": "Snippet for the delete_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup.", - "file": "backupdr/delete_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_RestoreBackup_sync", - "title": "Snippet for the restore_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup.", - "file": "backupdr/restore_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::RestoreBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "RestoreBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_sync", - "title": "Snippet for the create_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan.", - "file": "backupdr/create_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync", - "title": "Snippet for the update_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan.", - "file": "backupdr/update_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlan_sync", - "title": "Snippet for the get_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan.", - "file": "backupdr/get_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlan", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlans_sync", - "title": "Snippet for the list_backup_plans call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans.", - "file": "backupdr/list_backup_plans.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plans", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlansRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlansResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlans", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync", - "title": "Snippet for the delete_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan.", - "file": "backupdr/delete_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync", - "title": "Snippet for the get_backup_plan_revision call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision.", - "file": "backupdr/get_backup_plan_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan_revision", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanRevision", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlanRevision", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanRevision", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync", - "title": "Snippet for the list_backup_plan_revisions call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions.", - "file": "backupdr/list_backup_plan_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plan_revisions", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlanRevisions", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanRevisions", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync", - "title": "Snippet for the create_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association.", - "file": "backupdr/create_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync", - "title": "Snippet for the update_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association.", - "file": "backupdr/update_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync", - "title": "Snippet for the get_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association.", - "file": "backupdr/get_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanAssociation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync", - "title": "Snippet for the list_backup_plan_associations call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations.", - "file": "backupdr/list_backup_plan_associations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plan_associations", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlanAssociations", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync", - "title": "Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type.", - "file": "backupdr/fetch_backup_plan_associations_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_backup_plan_associations_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchBackupPlanAssociationsForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupPlanAssociationsForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync", - "title": "Snippet for the delete_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association.", - "file": "backupdr/delete_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_TriggerBackup_sync", - "title": "Snippet for the trigger_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup.", - "file": "backupdr/trigger_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "trigger_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::TriggerBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "TriggerBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetDataSourceReference_sync", - "title": "Snippet for the get_data_source_reference call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference.", - "file": "backupdr/get_data_source_reference.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source_reference", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::DataSourceReference", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetDataSourceReference", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSourceReference", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync", - "title": "Snippet for the list_data_source_references call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references.", - "file": "backupdr/list_data_source_references.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_source_references", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListDataSourceReferences", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSourceReferences", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync", - "title": "Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type.", - "file": "backupdr/fetch_data_source_references_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_data_source_references_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchDataSourceReferencesForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchDataSourceReferencesForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_InitializeService_sync", - "title": "Snippet for the initialize_service call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service.", - "file": "backupdr/initialize_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "initialize_service", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::InitializeServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "InitializeService", - "full_name": "google.cloud.backupdr.v1.BackupDR.InitializeService", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync", - "title": "Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs.", - "file": "backup_dr_protection_summary/list_resource_backup_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_resource_backup_configs", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse", - "client": { - "short_name": "BackupDrProtectionSummary::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client" - }, - "method": { - "short_name": "ListResourceBackupConfigs", - "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary.ListResourceBackupConfigs", - "service": { - "short_name": "BackupDrProtectionSummary", - "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb deleted file mode 100644 index 9d979a3cfce6..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/backupdr/v1/backup_dr_protection_summary" - -class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb deleted file mode 100644 index 1d7d6c2b8954..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/backupdr/v1/protection_summary_pb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" - - -class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_resource_backup_configs - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_resource_backup_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.stub :transcode_list_resource_backup_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_resource_backup_configs_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_resource_backup_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_resource_backup_configs_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb deleted file mode 100644 index 721fe7b5b877..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb +++ /dev/null @@ -1,175 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/backupdr/v1/protection_summary_pb" -require "google/cloud/backupdr/v1/backup_dr_protection_summary" - -class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_resource_backup_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_resource_backup_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_resource_backup_configs, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_resource_backup_configs_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_resource_backup_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_resource_backup_configs_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb deleted file mode 100644 index 93faecb1e332..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr_services_pb" -require "google/cloud/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb deleted file mode 100644 index 5c155040928d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb +++ /dev/null @@ -1,211 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_backup_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3", backup: "value4" - assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3/backups/value4", path - end - end - - def test_backup_plan_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_path project: "value0", location: "value1", backup_plan: "value2" - assert_equal "projects/value0/locations/value1/backupPlans/value2", path - end - end - - def test_backup_plan_association_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_association_path project: "value0", location: "value1", backup_plan_association: "value2" - assert_equal "projects/value0/locations/value1/backupPlanAssociations/value2", path - end - end - - def test_backup_plan_revision_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_revision_path project: "value0", location: "value1", backup_plan: "value2", revision: "value3" - assert_equal "projects/value0/locations/value1/backupPlans/value2/revisions/value3", path - end - end - - def test_backup_vault_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_vault_path project: "value0", location: "value1", backupvault: "value2" - assert_equal "projects/value0/locations/value1/backupVaults/value2", path - end - end - - def test_cluster_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cluster_path project: "value0", location: "value1", cluster: "value2" - assert_equal "projects/value0/locations/value1/clusters/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", ring: "value2", key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_crypto_key_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path - end - end - - def test_data_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3" - assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3", path - end - end - - def test_data_source_reference_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_reference_path project: "value0", location: "value1", data_source_reference: "value2" - assert_equal "projects/value0/locations/value1/dataSourceReferences/value2", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", instance: "value1" - assert_equal "projects/value0/instances/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_management_server_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.management_server_path project: "value0", location: "value1", managementserver: "value2" - assert_equal "projects/value0/locations/value1/managementServers/value2", path - end - end - - def test_storage_pool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.storage_pool_path project: "value0", zone: "value1", storage_pool: "value2" - assert_equal "projects/value0/zones/value1/storagePools/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb deleted file mode 100644 index 4e67aa6b660d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb +++ /dev/null @@ -1,2196 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr/rest" - - -class ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_management_servers - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_management_servers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_management_servers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_management_servers_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_management_servers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_management_servers_client_stub.call_count - end - end - end - - def test_get_management_server - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ManagementServer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_management_server({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_management_server name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_management_server({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_management_server_client_stub.call_count - end - end - end - - def test_create_management_server - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - management_server_id = "hello world" - management_server = {} - request_id = "hello world" - - create_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_management_server_client_stub.call_count - end - end - end - - def test_delete_management_server - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_management_server({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_management_server name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_management_server({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_management_server_client_stub.call_count - end - end - end - - def test_create_backup_vault - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_vault_id = "hello world" - backup_vault = {} - request_id = "hello world" - validate_only = true - - create_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_vault_client_stub.call_count - end - end - end - - def test_list_backup_vaults - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - list_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_vaults_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_vaults_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_vaults_client_stub.call_count - end - end - end - - def test_fetch_usable_backup_vaults - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_usable_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_usable_backup_vaults_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_usable_backup_vaults_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_usable_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_usable_backup_vaults_client_stub.call_count - end - end - end - - def test_get_backup_vault - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupVault.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - get_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_vault({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_vault name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_vault({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_vault_client_stub.call_count - end - end - end - - def test_update_backup_vault - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - backup_vault = {} - request_id = "hello world" - validate_only = true - force = true - force_update_access_restriction = true - - update_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_vault_client_stub.call_count - end - end - end - - def test_delete_backup_vault - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - etag = "hello world" - validate_only = true - allow_missing = true - ignore_backup_plan_references = true - - delete_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_vault_client_stub.call_count - end - end - end - - def test_list_data_sources - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_sources parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_sources_client_stub.call_count - end - end - end - - def test_get_data_source - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_count - end - end - end - - def test_update_data_source - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_source = {} - request_id = "hello world" - allow_missing = true - - update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_source_client_stub.call_count - end - end - end - - def test_list_backups - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_count - end - end - end - - def test_fetch_backups_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - fetch_backups_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backups_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_backups_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_backups_for_resource_type_client_stub.call_count - end - end - end - - def test_get_backup - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_count - end - end - end - - def test_update_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - backup = {} - request_id = "hello world" - - update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_client_stub.call_count - end - end - end - - def test_delete_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_count - end - end - end - - def test_restore_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - compute_instance_target_environment = {} - compute_instance_restore_properties = {} - clear_overrides_field_mask = {} - - restore_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_restore_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_backup_client_stub.call_count - end - end - end - - def test_create_backup_plan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan_id = "hello world" - backup_plan = {} - request_id = "hello world" - - create_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_plan_client_stub.call_count - end - end - end - - def test_update_backup_plan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup_plan = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_plan_client_stub.call_count - end - end - end - - def test_get_backup_plan - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlan.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_plan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_plan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_plan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_client_stub.call_count - end - end - end - - def test_list_backup_plans - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_backup_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plans_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_plans_client_stub.call_count - end - end - end - - def test_delete_backup_plan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_plan({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_plan name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_plan({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_plan_client_stub.call_count - end - end - end - - def test_get_backup_plan_revision - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_revision_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_plan_revision({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_plan_revision name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_plan_revision({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_revision_client_stub.call_count - end - end - end - - def test_list_backup_plan_revisions - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_backup_plan_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plan_revisions_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_plan_revisions_client_stub.call_count - end - end - end - - def test_create_backup_plan_association - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan_association_id = "hello world" - backup_plan_association = {} - request_id = "hello world" - - create_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_plan_association_client_stub.call_count - end - end - end - - def test_update_backup_plan_association - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup_plan_association = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_plan_association_client_stub.call_count - end - end - end - - def test_get_backup_plan_association - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_plan_association({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_plan_association name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_plan_association({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_association_client_stub.call_count - end - end - end - - def test_list_backup_plan_associations - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_backup_plan_associations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_associations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plan_associations_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_plan_associations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_plan_associations_client_stub.call_count - end - end - end - - def test_fetch_backup_plan_associations_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backup_plan_associations_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_count - end - end - end - - def test_delete_backup_plan_association - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_plan_association({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_plan_association name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_plan_association({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_plan_association_client_stub.call_count - end - end - end - - def test_trigger_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - rule_id = "hello world" - request_id = "hello world" - - trigger_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_trigger_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, trigger_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, trigger_backup_client_stub.call_count - end - end - end - - def test_get_data_source_reference - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::DataSourceReference.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_reference_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_reference_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_reference_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_source_reference({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_source_reference name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_source_reference({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_reference_client_stub.call_count - end - end - end - - def test_list_data_source_references - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_source_references_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_source_references_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_source_references_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_source_references parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_source_references_client_stub.call_count - end - end - end - - def test_fetch_data_source_references_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_data_source_references_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_data_source_references_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_count - end - end - end - - def test_initialize_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - resource_type = "hello world" - request_id = "hello world" - cloud_sql_instance_initialization_config = {} - - initialize_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_initialize_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, initialize_service_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, initialize_service_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb deleted file mode 100644 index 0e7a35ab8959..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb +++ /dev/null @@ -1,2613 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_management_servers - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_management_servers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_management_servers, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert request.has_filter? - assert_equal "hello world", request["order_by"] - assert request.has_order_by? - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_management_servers_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_management_servers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_management_servers_client_stub.call_rpc_count - end - end - - def test_get_management_server - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ManagementServer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_management_server({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_management_server name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_management_server({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_management_server_client_stub.call_rpc_count - end - end - - def test_create_management_server - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - management_server_id = "hello world" - management_server = {} - request_id = "hello world" - - create_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["management_server_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ManagementServer), request["management_server"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_management_server_client_stub.call_rpc_count - end - end - - def test_delete_management_server - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_management_server({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_management_server name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_management_server({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_management_server_client_stub.call_rpc_count - end - end - - def test_create_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_vault_id = "hello world" - backup_vault = {} - request_id = "hello world" - validate_only = true - - create_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_vault_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_vault_client_stub.call_rpc_count - end - end - - def test_list_backup_vaults - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - list_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_vaults, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_vaults_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_vaults_client_stub.call_rpc_count - end - end - - def test_fetch_usable_backup_vaults - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_usable_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_usable_backup_vaults, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_usable_backup_vaults_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_usable_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_usable_backup_vaults_client_stub.call_rpc_count - end - end - - def test_get_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupVault.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - get_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, request - assert_equal "hello world", request["name"] - assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_vault({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_vault name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_vault({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_vault_client_stub.call_rpc_count - end - end - - def test_update_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - backup_vault = {} - request_id = "hello world" - validate_only = true - force = true - force_update_access_restriction = true - - update_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - assert_equal true, request["force_update_access_restriction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_vault_client_stub.call_rpc_count - end - end - - def test_delete_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - etag = "hello world" - validate_only = true - allow_missing = true - ignore_backup_plan_references = true - - delete_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["force"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - assert_equal true, request["ignore_backup_plan_references"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_vault_client_stub.call_rpc_count - end - end - - def test_list_data_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_sources, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_sources_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_sources parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_sources_client_stub.call_rpc_count - end - end - - def test_get_data_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_rpc_count - end - end - - def test_update_data_source - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_source = {} - request_id = "hello world" - allow_missing = true - - update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_source, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::DataSource), request["data_source"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_source_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_source_client_stub.call_rpc_count - end - end - - def test_list_backups - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backups, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_rpc_count - end - end - - def test_fetch_backups_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - fetch_backups_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_backups_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_backups_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_backups_for_resource_type_client_stub.call_rpc_count - end - end - - def test_get_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::Backup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - get_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_rpc_count - end - end - - def test_update_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - backup = {} - request_id = "hello world" - - update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::Backup), request["backup"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_client_stub.call_rpc_count - end - end - - def test_delete_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_rpc_count - end - end - - def test_restore_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - compute_instance_target_environment = {} - compute_instance_restore_properties = {} - clear_overrides_field_mask = {} - - restore_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment), request["compute_instance_target_environment"] - assert_equal :compute_instance_target_environment, request.target_environment - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties), request["compute_instance_restore_properties"] - assert_equal :compute_instance_restore_properties, request.instance_properties - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["clear_overrides_field_mask"] - assert request.has_clear_overrides_field_mask? - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restore_backup_client_stub.call_rpc_count - end - end - - def test_create_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan_id = "hello world" - backup_plan = {} - request_id = "hello world" - - create_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_plan_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_plan_client_stub.call_rpc_count - end - end - - def test_update_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup_plan = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_plan_client_stub.call_rpc_count - end - end - - def test_get_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlan.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_plan({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_plan name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_plan({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_plan_client_stub.call_rpc_count - end - end - - def test_list_backup_plans - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_backup_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plans, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_plans_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_plans_client_stub.call_rpc_count - end - end - - def test_delete_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_plan({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup_plan name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup_plan({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_plan_client_stub.call_rpc_count - end - end - - def test_get_backup_plan_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan_revision, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_revision_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_plan_revision({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_plan_revision name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_plan_revision({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_plan_revision_client_stub.call_rpc_count - end - end - - def test_list_backup_plan_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_backup_plan_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plan_revisions, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_plan_revisions_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_plan_revisions_client_stub.call_rpc_count - end - end - - def test_create_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan_association_id = "hello world" - backup_plan_association = {} - request_id = "hello world" - - create_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_plan_association_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_update_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup_plan_association = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_get_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_plan_association({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_plan_association name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_plan_association({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_list_backup_plan_associations - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_backup_plan_associations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plan_associations, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_plan_associations_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_plan_associations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_plan_associations_client_stub.call_rpc_count - end - end - - def test_fetch_backup_plan_associations_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_backup_plan_associations_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_rpc_count - end - end - - def test_delete_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_plan_association({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup_plan_association name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup_plan_association({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_trigger_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - rule_id = "hello world" - request_id = "hello world" - - trigger_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :trigger_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["rule_id"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, trigger_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, trigger_backup_client_stub.call_rpc_count - end - end - - def test_get_data_source_reference - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::DataSourceReference.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_reference_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source_reference, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_reference_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_source_reference({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_source_reference name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_source_reference({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_reference_client_stub.call_rpc_count - end - end - - def test_list_data_source_references - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_source_references_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_source_references, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_source_references_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_source_references parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_source_references_client_stub.call_rpc_count - end - end - - def test_fetch_data_source_references_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_data_source_references_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_data_source_references_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_rpc_count - end - end - - def test_initialize_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - resource_type = "hello world" - request_id = "hello world" - cloud_sql_instance_initialization_config = {} - - initialize_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :initialize_service, name - assert_kind_of ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["resource_type"] - assert_equal "hello world", request["request_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig), request["cloud_sql_instance_initialization_config"] - assert_equal :cloud_sql_instance_initialization_config, request.initialization_config - refute_nil options - end - - Gapic::ServiceStub.stub :new, initialize_service_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, initialize_service_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json deleted file mode 100644 index 484136c8a856..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "baremetalsolution.googleapis.com", - "api_shortname": "baremetalsolution", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bare_metal_solution-v2/latest", - "distribution_name": "google-cloud-bare_metal_solution-v2", - "is_cloud": true, - "language": "ruby", - "name": "baremetalsolution", - "name_pretty": "Bare Metal Solution V2 API", - "product_documentation": "https://cloud.google.com/bare-metal/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. Note that google-cloud-bare_metal_solution-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bare_metal_solution instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bare-metal/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml deleted file mode 100644 index 1d57d709ce5b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bare_metal_solution-v2.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bare_metal_solution-v2.rb" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts b/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts deleted file mode 100644 index 54f5b5f1015c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Bare Metal Solution V2 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md deleted file mode 100644 index ae79d1ebde45..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bare_metal_solution-v2 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bare_metal_solution-v2 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bare_metal_solution/v2" - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bare_metal_solution/v2" - -::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-bare_metal_solution-v2 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bare_metal_solution/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md deleted file mode 100644 index 6e660d5c7876..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Bare Metal Solution V2 API - -Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center. - -Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Bare Metal Solution V2 API. Most users should consider using -the main client gem, -[google-cloud-bare_metal_solution](https://rubygems.org/gems/google-cloud-bare_metal_solution). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bare_metal_solution-v2 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/baremetalsolution.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bare_metal_solution/v2" - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new -request = ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bare_metal_solution-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bare-metal/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/bare_metal_solution/v2" -require "logger" - -client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-bare_metal_solution`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bare_metal_solution-v2`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bare_metal_solution`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-bare_metal_solution-v2`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile deleted file mode 100644 index c38c913d0c54..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bare_metal_solution-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bare_metal_solution-v2 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bare_metal_solution-v2 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bare_metal_solution-v2 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bare_metal_solution-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bare_metal_solution-v2" - header "google-cloud-bare_metal_solution-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bare_metal_solution-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bare_metal_solution-v2 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bare_metal_solution-v2 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bare_metal_solution-v2 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json deleted file mode 100644 index 7c860b1ff908..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/gapic_metadata.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.baremetalsolution.v2", - "libraryPackage": "::Google::Cloud::BareMetalSolution::V2", - "services": { - "BareMetalSolution": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client", - "rpcs": { - "ListInstances": { - "methods": [ - "list_instances" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - }, - "UpdateInstance": { - "methods": [ - "update_instance" - ] - }, - "RenameInstance": { - "methods": [ - "rename_instance" - ] - }, - "ResetInstance": { - "methods": [ - "reset_instance" - ] - }, - "StartInstance": { - "methods": [ - "start_instance" - ] - }, - "StopInstance": { - "methods": [ - "stop_instance" - ] - }, - "EnableInteractiveSerialConsole": { - "methods": [ - "enable_interactive_serial_console" - ] - }, - "DisableInteractiveSerialConsole": { - "methods": [ - "disable_interactive_serial_console" - ] - }, - "DetachLun": { - "methods": [ - "detach_lun" - ] - }, - "ListSSHKeys": { - "methods": [ - "list_ssh_keys" - ] - }, - "CreateSSHKey": { - "methods": [ - "create_ssh_key" - ] - }, - "DeleteSSHKey": { - "methods": [ - "delete_ssh_key" - ] - }, - "ListVolumes": { - "methods": [ - "list_volumes" - ] - }, - "GetVolume": { - "methods": [ - "get_volume" - ] - }, - "UpdateVolume": { - "methods": [ - "update_volume" - ] - }, - "RenameVolume": { - "methods": [ - "rename_volume" - ] - }, - "EvictVolume": { - "methods": [ - "evict_volume" - ] - }, - "ResizeVolume": { - "methods": [ - "resize_volume" - ] - }, - "ListNetworks": { - "methods": [ - "list_networks" - ] - }, - "ListNetworkUsage": { - "methods": [ - "list_network_usage" - ] - }, - "GetNetwork": { - "methods": [ - "get_network" - ] - }, - "UpdateNetwork": { - "methods": [ - "update_network" - ] - }, - "CreateVolumeSnapshot": { - "methods": [ - "create_volume_snapshot" - ] - }, - "RestoreVolumeSnapshot": { - "methods": [ - "restore_volume_snapshot" - ] - }, - "DeleteVolumeSnapshot": { - "methods": [ - "delete_volume_snapshot" - ] - }, - "GetVolumeSnapshot": { - "methods": [ - "get_volume_snapshot" - ] - }, - "ListVolumeSnapshots": { - "methods": [ - "list_volume_snapshots" - ] - }, - "GetLun": { - "methods": [ - "get_lun" - ] - }, - "ListLuns": { - "methods": [ - "list_luns" - ] - }, - "EvictLun": { - "methods": [ - "evict_lun" - ] - }, - "GetNfsShare": { - "methods": [ - "get_nfs_share" - ] - }, - "ListNfsShares": { - "methods": [ - "list_nfs_shares" - ] - }, - "UpdateNfsShare": { - "methods": [ - "update_nfs_share" - ] - }, - "CreateNfsShare": { - "methods": [ - "create_nfs_share" - ] - }, - "RenameNfsShare": { - "methods": [ - "rename_nfs_share" - ] - }, - "DeleteNfsShare": { - "methods": [ - "delete_nfs_share" - ] - }, - "ListProvisioningQuotas": { - "methods": [ - "list_provisioning_quotas" - ] - }, - "SubmitProvisioningConfig": { - "methods": [ - "submit_provisioning_config" - ] - }, - "GetProvisioningConfig": { - "methods": [ - "get_provisioning_config" - ] - }, - "CreateProvisioningConfig": { - "methods": [ - "create_provisioning_config" - ] - }, - "UpdateProvisioningConfig": { - "methods": [ - "update_provisioning_config" - ] - }, - "RenameNetwork": { - "methods": [ - "rename_network" - ] - }, - "ListOSImages": { - "methods": [ - "list_os_images" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec b/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec deleted file mode 100644 index 21eb37c2677d..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/google-cloud-bare_metal_solution-v2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bare_metal_solution/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bare_metal_solution-v2" - gem.version = Google::Cloud::BareMetalSolution::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Bare Metal Solution is a managed solution that provides purpose-built HPE or Atos bare-metal servers in regional extensions that are connected to Google Cloud by a managed, high-performance connection with a low-latency network fabric. Note that google-cloud-bare_metal_solution-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bare_metal_solution instead. See the readme for more details." - gem.summary = "Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb deleted file mode 100644 index e3cbed72515b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google-cloud-bare_metal_solution-v2.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bare_metal_solution/v2" diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb deleted file mode 100644 index 4decd222cabc..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bare_metal_solution/v2/bare_metal_solution" -require "google/cloud/bare_metal_solution/v2/version" - -module Google - module Cloud - module BareMetalSolution - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bare_metal_solution/v2" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bare_metal_solution/v2" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/bare_metal_solution/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb deleted file mode 100644 index 0ef9b283c295..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bare_metal_solution/v2/version" - -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/paths" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/operations" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/client" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" - -module Google - module Cloud - module BareMetalSolution - module V2 - ## - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bare_metal_solution/v2/bare_metal_solution" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module BareMetalSolution - end - end - end - end -end - -helper_path = ::File.join __dir__, "bare_metal_solution", "helpers.rb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb deleted file mode 100644 index 6f875fa5f30e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb +++ /dev/null @@ -1,4836 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - ## - # Client for the BareMetalSolution service. - # - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :bare_metal_solution_stub - - ## - # Configure the BareMetalSolution Client class. - # - # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BareMetalSolution clients - # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BareMetalSolution", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BareMetalSolution Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @bare_metal_solution_stub.universe_domain - end - - ## - # Create a new BareMetalSolution client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BareMetalSolution client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/baremetalsolution/v2/baremetalsolution_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @bare_metal_solution_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @bare_metal_solution_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @bare_metal_solution_stub.endpoint - config.universe_domain = @bare_metal_solution_stub.universe_domain - config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @bare_metal_solution_stub.endpoint - config.universe_domain = @bare_metal_solution_stub.universe_domain - config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @bare_metal_solution_stub.logger - end - - # Service calls - - ## - # List servers in a given project and location. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListInstancesRequest. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_instances.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_instances, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_instances, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details about a single server. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_instance, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single server. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_instance(instance: nil, update_mask: nil) - # Pass arguments to `update_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance [::Google::Cloud::BareMetalSolution::V2::Instance, ::Hash] - # Required. The server to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The currently supported fields are: - # `labels` - # `hyperthreading_enabled` - # `os_image` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance&.name - header_params["instance.name"] = request.instance.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameInstance sets a new name for an instance. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_instance(request, options = nil) - # Pass arguments to `rename_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_instance(name: nil, new_instance_id: nil) - # Pass arguments to `rename_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the instance. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param new_instance_id [::String] - # Required. The new `id` of the instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new - # - # # Call the rename_instance method. - # result = client.rename_instance request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - # p result - # - def rename_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rename_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rename_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :rename_instance, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform an ungraceful, hard reset on a server. Equivalent to shutting the - # power off and then turning it back on. - # - # @overload reset_instance(request, options = nil) - # Pass arguments to `reset_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload reset_instance(name: nil) - # Pass arguments to `reset_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new - # - # # Call the reset_instance method. - # result = client.reset_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def reset_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.reset_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.reset_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.reset_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :reset_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts a server that was shutdown. - # - # @overload start_instance(request, options = nil) - # Pass arguments to `start_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_instance(name: nil) - # Pass arguments to `start_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new - # - # # Call the start_instance method. - # result = client.start_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :start_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stop a running server. - # - # @overload stop_instance(request, options = nil) - # Pass arguments to `stop_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload stop_instance(name: nil) - # Pass arguments to `stop_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new - # - # # Call the stop_instance method. - # result = client.stop_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def stop_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.stop_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.stop_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :stop_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable the interactive serial console feature on an instance. - # - # @overload enable_interactive_serial_console(request, options = nil) - # Pass arguments to `enable_interactive_serial_console` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_interactive_serial_console(name: nil) - # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new - # - # # Call the enable_interactive_serial_console method. - # result = client.enable_interactive_serial_console request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def enable_interactive_serial_console request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_interactive_serial_console.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enable_interactive_serial_console.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :enable_interactive_serial_console, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable the interactive serial console feature on an instance. - # - # @overload disable_interactive_serial_console(request, options = nil) - # Pass arguments to `disable_interactive_serial_console` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_interactive_serial_console(name: nil) - # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new - # - # # Call the disable_interactive_serial_console method. - # result = client.disable_interactive_serial_console request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def disable_interactive_serial_console request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_interactive_serial_console.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.disable_interactive_serial_console.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :disable_interactive_serial_console, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detach LUN from Instance. - # - # @overload detach_lun(request, options = nil) - # Pass arguments to `detach_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil) - # Pass arguments to `detach_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance [::String] - # Required. Name of the instance. - # @param lun [::String] - # Required. Name of the Lun to detach. - # @param skip_reboot [::Boolean] - # If true, performs lun unmapping without instance reboot. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new - # - # # Call the detach_lun method. - # result = client.detach_lun request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def detach_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.detach_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance - header_params["instance"] = request.instance - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.detach_lun.timeout, - metadata: metadata, - retry_policy: @config.rpcs.detach_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :detach_lun, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the public SSH keys registered for the specified project. - # These SSH keys are used only for the interactive serial console feature. - # - # @overload list_ssh_keys(request, options = nil) - # Pass arguments to `list_ssh_keys` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent containing the SSH keys. - # Currently, the only valid value for the location is "global". - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new - # - # # Call the list_ssh_keys method. - # result = client.list_ssh_keys request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. - # p item - # end - # - def list_ssh_keys request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_ssh_keys.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_ssh_keys.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_ssh_keys.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_ssh_keys, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Register a public SSH key in the specified project for use with the - # interactive serial console feature. - # - # @overload create_ssh_key(request, options = nil) - # Pass arguments to `create_ssh_key` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) - # Pass arguments to `create_ssh_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent containing the SSH keys. - # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash] - # Required. The SSH key to register. - # @param ssh_key_id [::String] - # Required. The ID to use for the key, which will become the final component - # of the key's resource name. - # - # This value must match the regex: - # [a-zA-Z0-9@.\-_]\\{1,64} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new - # - # # Call the create_ssh_key method. - # result = client.create_ssh_key request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. - # p result - # - def create_ssh_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_ssh_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_ssh_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_ssh_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :create_ssh_key, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a public SSH key registered in the specified project. - # - # @overload delete_ssh_key(request, options = nil) - # Pass arguments to `delete_ssh_key` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_ssh_key(name: nil) - # Pass arguments to `delete_ssh_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the SSH key to delete. - # Currently, the only valid value for the location is "global". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new - # - # # Call the delete_ssh_key method. - # result = client.delete_ssh_key request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_ssh_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_ssh_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_ssh_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_ssh_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :delete_ssh_key, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List storage volumes in a given project and location. - # - # @overload list_volumes(request, options = nil) - # Pass arguments to `list_volumes` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_volumes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListVolumesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new - # - # # Call the list_volumes method. - # result = client.list_volumes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. - # p item - # end - # - def list_volumes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_volumes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_volumes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_volumes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_volumes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single storage volume. - # - # @overload get_volume(request, options = nil) - # Pass arguments to `get_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_volume(name: nil) - # Pass arguments to `get_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new - # - # # Call the get_volume method. - # result = client.get_volume request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - # p result - # - def get_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_volume, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single storage volume. - # - # @overload update_volume(request, options = nil) - # Pass arguments to `update_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_volume(volume: nil, update_mask: nil) - # Pass arguments to `update_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash] - # Required. The volume to update. - # - # The `name` field is used to identify the volume to update. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # 'labels' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new - # - # # Call the update_volume method. - # result = client.update_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.volume&.name - header_params["volume.name"] = request.volume.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_volume, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameVolume sets a new name for a volume. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_volume(request, options = nil) - # Pass arguments to `rename_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_volume(name: nil, new_volume_id: nil) - # Pass arguments to `rename_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the volume. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @param new_volume_id [::String] - # Required. The new `id` of the volume. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new - # - # # Call the rename_volume method. - # result = client.rename_volume request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - # p result - # - def rename_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rename_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rename_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :rename_volume, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Skips volume's cooloff and deletes it now. - # Volume must be in cooloff state. - # - # @overload evict_volume(request, options = nil) - # Pass arguments to `evict_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload evict_volume(name: nil) - # Pass arguments to `evict_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Volume. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new - # - # # Call the evict_volume method. - # result = client.evict_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def evict_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.evict_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.evict_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.evict_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :evict_volume, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Emergency Volume resize. - # - # @overload resize_volume(request, options = nil) - # Pass arguments to `resize_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resize_volume(volume: nil, size_gib: nil) - # Pass arguments to `resize_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume [::String] - # Required. Volume to resize. - # @param size_gib [::Integer] - # New Volume size, in GiB. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new - # - # # Call the resize_volume method. - # result = client.resize_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def resize_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resize_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.volume - header_params["volume"] = request.volume - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.resize_volume.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resize_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :resize_volume, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List network in a given project and location. - # - # @overload list_networks(request, options = nil) - # Pass arguments to `list_networks` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_networks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListNetworksRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new - # - # # Call the list_networks method. - # result = client.list_networks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. - # p item - # end - # - def list_networks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_networks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_networks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_networks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_networks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all Networks (and used IPs for each Network) in the vendor account - # associated with the specified project. - # - # @overload list_network_usage(request, options = nil) - # Pass arguments to `list_network_usage` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_network_usage(location: nil) - # Pass arguments to `list_network_usage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param location [::String] - # Required. Parent value (project and location). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new - # - # # Call the list_network_usage method. - # result = client.list_network_usage request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. - # p result - # - def list_network_usage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_network_usage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.location - header_params["location"] = request.location - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_network_usage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_network_usage, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single network. - # - # @overload get_network(request, options = nil) - # Pass arguments to `get_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_network(name: nil) - # Pass arguments to `get_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new - # - # # Call the get_network method. - # result = client.get_network request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - # p result - # - def get_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_network.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_network, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single network. - # - # @overload update_network(request, options = nil) - # Pass arguments to `update_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_network(network: nil, update_mask: nil) - # Pass arguments to `update_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash] - # Required. The network to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # `labels`, `reservations`, `vrf.vlan_attachments` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new - # - # # Call the update_network method. - # result = client.update_network request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.network&.name - header_params["network.name"] = request.network.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_network.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_network, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Takes a snapshot of a boot volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload create_volume_snapshot(request, options = nil) - # Pass arguments to `create_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil) - # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The volume to snapshot. - # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash] - # Required. The snapshot to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new - # - # # Call the create_volume_snapshot method. - # result = client.create_volume_snapshot request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p result - # - def create_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_volume_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :create_volume_snapshot, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Uses the specified snapshot to restore its parent volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload restore_volume_snapshot(request, options = nil) - # Pass arguments to `restore_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restore_volume_snapshot(volume_snapshot: nil) - # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume_snapshot [::String] - # Required. Name of the snapshot which will be used to restore its parent - # volume. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new - # - # # Call the restore_volume_snapshot method. - # result = client.restore_volume_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restore_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.volume_snapshot - header_params["volume_snapshot"] = request.volume_snapshot - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.restore_volume_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :restore_volume_snapshot, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a volume snapshot. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload delete_volume_snapshot(request, options = nil) - # Pass arguments to `delete_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_volume_snapshot(name: nil) - # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the snapshot to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new - # - # # Call the delete_volume_snapshot method. - # result = client.delete_volume_snapshot request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_volume_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :delete_volume_snapshot, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified snapshot resource. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload get_volume_snapshot(request, options = nil) - # Pass arguments to `get_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_volume_snapshot(name: nil) - # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the snapshot. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new - # - # # Call the get_volume_snapshot method. - # result = client.get_volume_snapshot request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p result - # - def get_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_volume_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_volume_snapshot, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of snapshots for the specified volume. - # Returns a response with an empty list of snapshots if called - # for a non-boot volume. - # - # @overload list_volume_snapshots(request, options = nil) - # Pass arguments to `list_volume_snapshots` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListVolumesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new - # - # # Call the list_volume_snapshots method. - # result = client.list_volume_snapshots request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p item - # end - # - def list_volume_snapshots request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_volume_snapshots.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_volume_snapshots.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_volume_snapshots.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_volume_snapshots, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single storage logical unit number(LUN). - # - # @overload get_lun(request, options = nil) - # Pass arguments to `get_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lun(name: nil) - # Pass arguments to `get_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Lun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Lun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new - # - # # Call the get_lun method. - # result = client.get_lun request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. - # p result - # - def get_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_lun.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_lun, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List storage volume luns for given storage volume. - # - # @overload list_luns(request, options = nil) - # Pass arguments to `list_luns` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_luns(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_luns` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListLunsRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new - # - # # Call the list_luns method. - # result = client.list_luns request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. - # p item - # end - # - def list_luns request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_luns.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_luns.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_luns.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_luns, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Skips lun's cooloff and deletes it now. - # Lun must be in cooloff state. - # - # @overload evict_lun(request, options = nil) - # Pass arguments to `evict_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload evict_lun(name: nil) - # Pass arguments to `evict_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the lun. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new - # - # # Call the evict_lun method. - # result = client.evict_lun request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def evict_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.evict_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.evict_lun.timeout, - metadata: metadata, - retry_policy: @config.rpcs.evict_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :evict_lun, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single NFS share. - # - # @overload get_nfs_share(request, options = nil) - # Pass arguments to `get_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_nfs_share(name: nil) - # Pass arguments to `get_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new - # - # # Call the get_nfs_share method. - # result = client.get_nfs_share request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - # p result - # - def get_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_nfs_share, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List NFS shares. - # - # @overload list_nfs_shares(request, options = nil) - # Pass arguments to `list_nfs_shares` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListNfsSharesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new - # - # # Call the list_nfs_shares method. - # result = client.list_nfs_shares request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. - # p item - # end - # - def list_nfs_shares request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_nfs_shares.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_nfs_shares.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_nfs_shares.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_nfs_shares, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single NFS share. - # - # @overload update_nfs_share(request, options = nil) - # Pass arguments to `update_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_nfs_share(nfs_share: nil, update_mask: nil) - # Pass arguments to `update_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] - # Required. The NFS share to update. - # - # The `name` field is used to identify the NFS share to update. - # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # `labels` - # `allowed_clients` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new - # - # # Call the update_nfs_share method. - # result = client.update_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.nfs_share&.name - header_params["nfs_share.name"] = request.nfs_share.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_nfs_share, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create an NFS share. - # - # @overload create_nfs_share(request, options = nil) - # Pass arguments to `create_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_nfs_share(parent: nil, nfs_share: nil) - # Pass arguments to `create_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location. - # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] - # Required. The NfsShare to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new - # - # # Call the create_nfs_share method. - # result = client.create_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :create_nfs_share, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameNfsShare sets a new name for an nfsshare. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_nfs_share(request, options = nil) - # Pass arguments to `rename_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil) - # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the nfsshare. - # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} - # @param new_nfsshare_id [::String] - # Required. The new `id` of the nfsshare. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new - # - # # Call the rename_nfs_share method. - # result = client.rename_nfs_share request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - # p result - # - def rename_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rename_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rename_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :rename_nfs_share, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete an NFS share. The underlying volume is automatically deleted. - # - # @overload delete_nfs_share(request, options = nil) - # Pass arguments to `delete_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_nfs_share(name: nil) - # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the NFS share to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new - # - # # Call the delete_nfs_share method. - # result = client.delete_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_nfs_share.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :delete_nfs_share, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List the budget details to provision resources on a given project. - # - # @overload list_provisioning_quotas(request, options = nil) - # Pass arguments to `list_provisioning_quotas` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListProvisioningQuotasRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @param page_token [::String] - # A token identifying a page of results from the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new - # - # # Call the list_provisioning_quotas method. - # result = client.list_provisioning_quotas request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. - # p item - # end - # - def list_provisioning_quotas request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_provisioning_quotas.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_provisioning_quotas, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Submit a provisiong configuration for a given project. - # - # @overload submit_provisioning_config(request, options = nil) - # Pass arguments to `submit_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload submit_provisioning_config(parent: nil, provisioning_config: nil, email: nil) - # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to create. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new - # - # # Call the submit_provisioning_config method. - # result = client.submit_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. - # p result - # - def submit_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.submit_provisioning_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.submit_provisioning_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.submit_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :submit_provisioning_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get ProvisioningConfig by name. - # - # @overload get_provisioning_config(request, options = nil) - # Pass arguments to `get_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_provisioning_config(name: nil) - # Pass arguments to `get_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the ProvisioningConfig. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new - # - # # Call the get_provisioning_config method. - # result = client.get_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def get_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_provisioning_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_provisioning_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :get_provisioning_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create new ProvisioningConfig. - # - # @overload create_provisioning_config(request, options = nil) - # Pass arguments to `create_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) - # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to create. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new - # - # # Call the create_provisioning_config method. - # result = client.create_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def create_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_provisioning_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_provisioning_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :create_provisioning_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update existing ProvisioningConfig. - # - # @overload update_provisioning_config(request, options = nil) - # Pass arguments to `update_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) - # Pass arguments to `update_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new - # - # # Call the update_provisioning_config method. - # result = client.update_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def update_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_provisioning_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.provisioning_config&.name - header_params["provisioning_config.name"] = request.provisioning_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_provisioning_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :update_provisioning_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameNetwork sets a new name for a network. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_network(request, options = nil) - # Pass arguments to `rename_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_network(name: nil, new_network_id: nil) - # Pass arguments to `rename_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the network. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @param new_network_id [::String] - # Required. The new `id` of the network. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new - # - # # Call the rename_network method. - # result = client.rename_network request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - # p result - # - def rename_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rename_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rename_network.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :rename_network, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of OS images which are currently approved. - # - # @overload list_os_images(request, options = nil) - # Pass arguments to `list_os_images` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_os_images(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_os_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListProvisioningQuotasRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @param page_token [::String] - # A token identifying a page of results from the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new - # - # # Call the list_os_images method. - # result = client.list_os_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. - # p item - # end - # - def list_os_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_os_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_os_images.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_os_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.call_rpc :list_os_images, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BareMetalSolution API. - # - # This class represents the configuration for BareMetalSolution, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "baremetalsolution.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BareMetalSolution API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `rename_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_instance - ## - # RPC-specific configuration for `reset_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :reset_instance - ## - # RPC-specific configuration for `start_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :start_instance - ## - # RPC-specific configuration for `stop_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_instance - ## - # RPC-specific configuration for `enable_interactive_serial_console` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_interactive_serial_console - ## - # RPC-specific configuration for `disable_interactive_serial_console` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_interactive_serial_console - ## - # RPC-specific configuration for `detach_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :detach_lun - ## - # RPC-specific configuration for `list_ssh_keys` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ssh_keys - ## - # RPC-specific configuration for `create_ssh_key` - # @return [::Gapic::Config::Method] - # - attr_reader :create_ssh_key - ## - # RPC-specific configuration for `delete_ssh_key` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_ssh_key - ## - # RPC-specific configuration for `list_volumes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volumes - ## - # RPC-specific configuration for `get_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume - ## - # RPC-specific configuration for `update_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :update_volume - ## - # RPC-specific configuration for `rename_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_volume - ## - # RPC-specific configuration for `evict_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :evict_volume - ## - # RPC-specific configuration for `resize_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :resize_volume - ## - # RPC-specific configuration for `list_networks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_networks - ## - # RPC-specific configuration for `list_network_usage` - # @return [::Gapic::Config::Method] - # - attr_reader :list_network_usage - ## - # RPC-specific configuration for `get_network` - # @return [::Gapic::Config::Method] - # - attr_reader :get_network - ## - # RPC-specific configuration for `update_network` - # @return [::Gapic::Config::Method] - # - attr_reader :update_network - ## - # RPC-specific configuration for `create_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :create_volume_snapshot - ## - # RPC-specific configuration for `restore_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_volume_snapshot - ## - # RPC-specific configuration for `delete_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_volume_snapshot - ## - # RPC-specific configuration for `get_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume_snapshot - ## - # RPC-specific configuration for `list_volume_snapshots` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volume_snapshots - ## - # RPC-specific configuration for `get_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lun - ## - # RPC-specific configuration for `list_luns` - # @return [::Gapic::Config::Method] - # - attr_reader :list_luns - ## - # RPC-specific configuration for `evict_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :evict_lun - ## - # RPC-specific configuration for `get_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :get_nfs_share - ## - # RPC-specific configuration for `list_nfs_shares` - # @return [::Gapic::Config::Method] - # - attr_reader :list_nfs_shares - ## - # RPC-specific configuration for `update_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :update_nfs_share - ## - # RPC-specific configuration for `create_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :create_nfs_share - ## - # RPC-specific configuration for `rename_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_nfs_share - ## - # RPC-specific configuration for `delete_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_nfs_share - ## - # RPC-specific configuration for `list_provisioning_quotas` - # @return [::Gapic::Config::Method] - # - attr_reader :list_provisioning_quotas - ## - # RPC-specific configuration for `submit_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_provisioning_config - ## - # RPC-specific configuration for `get_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_provisioning_config - ## - # RPC-specific configuration for `create_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_provisioning_config - ## - # RPC-specific configuration for `update_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_provisioning_config - ## - # RPC-specific configuration for `rename_network` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_network - ## - # RPC-specific configuration for `list_os_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_os_images - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance - @rename_instance = ::Gapic::Config::Method.new rename_instance_config - reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance - @reset_instance = ::Gapic::Config::Method.new reset_instance_config - start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance - @start_instance = ::Gapic::Config::Method.new start_instance_config - stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance - @stop_instance = ::Gapic::Config::Method.new stop_instance_config - enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console - @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config - disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console - @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config - detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun - @detach_lun = ::Gapic::Config::Method.new detach_lun_config - list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys - @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config - create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key - @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config - delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key - @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config - list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes - @list_volumes = ::Gapic::Config::Method.new list_volumes_config - get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume - @get_volume = ::Gapic::Config::Method.new get_volume_config - update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume - @update_volume = ::Gapic::Config::Method.new update_volume_config - rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume - @rename_volume = ::Gapic::Config::Method.new rename_volume_config - evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume - @evict_volume = ::Gapic::Config::Method.new evict_volume_config - resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume - @resize_volume = ::Gapic::Config::Method.new resize_volume_config - list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks - @list_networks = ::Gapic::Config::Method.new list_networks_config - list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage - @list_network_usage = ::Gapic::Config::Method.new list_network_usage_config - get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network - @get_network = ::Gapic::Config::Method.new get_network_config - update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network - @update_network = ::Gapic::Config::Method.new update_network_config - create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot - @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config - restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot - @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config - delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot - @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config - get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot - @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config - list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots - @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config - get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun - @get_lun = ::Gapic::Config::Method.new get_lun_config - list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns - @list_luns = ::Gapic::Config::Method.new list_luns_config - evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun - @evict_lun = ::Gapic::Config::Method.new evict_lun_config - get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share - @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config - list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares - @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config - update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share - @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config - create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share - @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config - rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share - @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config - delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share - @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config - list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas - @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config - submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config - @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config - get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config - @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config - create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config - @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config - update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config - @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config - rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network - @rename_network = ::Gapic::Config::Method.new rename_network_config - list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images - @list_os_images = ::Gapic::Config::Method.new list_os_images_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb deleted file mode 100644 index ca17fd2fa097..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - # Credentials for the BareMetalSolution API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb deleted file mode 100644 index 9e1381e38069..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BareMetalSolution Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the BareMetalSolution Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "baremetalsolution.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb deleted file mode 100644 index ed6067ff8440..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb +++ /dev/null @@ -1,301 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - # Path helper methods for the BareMetalSolution API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified InstanceConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instanceConfigs/{instance_config}` - # - # @param project [String] - # @param location [String] - # @param instance_config [String] - # - # @return [::String] - def instance_config_path project:, location:, instance_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instanceConfigs/#{instance_config}" - end - - ## - # Create a fully-qualified InterconnectAttachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}` - # - # @param project [String] - # @param region [String] - # @param interconnect_attachment [String] - # - # @return [::String] - def interconnect_attachment_path project:, region:, interconnect_attachment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/interconnectAttachments/#{interconnect_attachment}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Lun resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}` - # - # @param project [String] - # @param location [String] - # @param volume [String] - # @param lun [String] - # - # @return [::String] - def lun_path project:, location:, volume:, lun: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "volume cannot contain /" if volume.to_s.include? "/" - - "projects/#{project}/locations/#{location}/volumes/#{volume}/luns/#{lun}" - end - - ## - # Create a fully-qualified NFSShare resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/nfsShares/{nfs_share}` - # - # @param project [String] - # @param location [String] - # @param nfs_share [String] - # - # @return [::String] - def nfs_share_path project:, location:, nfs_share: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/nfsShares/#{nfs_share}" - end - - ## - # Create a fully-qualified Network resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/networks/{network}` - # - # @param project [String] - # @param location [String] - # @param network [String] - # - # @return [::String] - def network_path project:, location:, network: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/networks/#{network}" - end - - ## - # Create a fully-qualified NetworkConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/networkConfigs/{network_config}` - # - # @param project [String] - # @param location [String] - # @param network_config [String] - # - # @return [::String] - def network_config_path project:, location:, network_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/networkConfigs/#{network_config}" - end - - ## - # Create a fully-qualified ProvisioningConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}` - # - # @param project [String] - # @param location [String] - # @param provisioning_config [String] - # - # @return [::String] - def provisioning_config_path project:, location:, provisioning_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/provisioningConfigs/#{provisioning_config}" - end - - ## - # Create a fully-qualified ServerNetworkTemplate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` - # - # @param project [String] - # @param location [String] - # @param server_network_template [String] - # - # @return [::String] - def server_network_template_path project:, location:, server_network_template: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serverNetworkTemplate/#{server_network_template}" - end - - ## - # Create a fully-qualified SshKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/sshKeys/{ssh_key}` - # - # @param project [String] - # @param location [String] - # @param ssh_key [String] - # - # @return [::String] - def ssh_key_path project:, location:, ssh_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/sshKeys/#{ssh_key}" - end - - ## - # Create a fully-qualified Volume resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/volumes/{volume}` - # - # @param project [String] - # @param location [String] - # @param volume [String] - # - # @return [::String] - def volume_path project:, location:, volume: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/volumes/#{volume}" - end - - ## - # Create a fully-qualified VolumeConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/volumeConfigs/{volume_config}` - # - # @param project [String] - # @param location [String] - # @param volume_config [String] - # - # @return [::String] - def volume_config_path project:, location:, volume_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/volumeConfigs/#{volume_config}" - end - - ## - # Create a fully-qualified VolumeSnapshot resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}` - # - # @param project [String] - # @param location [String] - # @param volume [String] - # @param snapshot [String] - # - # @return [::String] - def volume_snapshot_path project:, location:, volume:, snapshot: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "volume cannot contain /" if volume.to_s.include? "/" - - "projects/#{project}/locations/#{location}/volumes/#{volume}/snapshots/#{snapshot}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb deleted file mode 100644 index 7f95f0aebf5e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bare_metal_solution/v2/version" -require "google/cloud/bare_metal_solution/v2/bindings_override" - -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/paths" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client" - -module Google - module Cloud - module BareMetalSolution - module V2 - ## - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module BareMetalSolution - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb deleted file mode 100644 index ec4dc017406e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb +++ /dev/null @@ -1,4493 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - module Rest - ## - # REST client for the BareMetalSolution service. - # - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :bare_metal_solution_stub - - ## - # Configure the BareMetalSolution Client class. - # - # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BareMetalSolution clients - # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BareMetalSolution", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BareMetalSolution Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @bare_metal_solution_stub.universe_domain - end - - ## - # Create a new BareMetalSolution REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BareMetalSolution client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @bare_metal_solution_stub = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @bare_metal_solution_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @bare_metal_solution_stub.endpoint - config.universe_domain = @bare_metal_solution_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @bare_metal_solution_stub.endpoint - config.universe_domain = @bare_metal_solution_stub.universe_domain - config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @bare_metal_solution_stub.logger - end - - # Service calls - - ## - # List servers in a given project and location. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListInstancesRequest. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_instances.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_instances request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_instances, "instances", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details about a single server. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_instance request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single server. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_instance(instance: nil, update_mask: nil) - # Pass arguments to `update_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance [::Google::Cloud::BareMetalSolution::V2::Instance, ::Hash] - # Required. The server to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The currently supported fields are: - # `labels` - # `hyperthreading_enabled` - # `os_image` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameInstance sets a new name for an instance. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_instance(request, options = nil) - # Pass arguments to `rename_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_instance(name: nil, new_instance_id: nil) - # Pass arguments to `rename_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the instance. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param new_instance_id [::String] - # Required. The new `id` of the instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new - # - # # Call the rename_instance method. - # result = client.rename_instance request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - # p result - # - def rename_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rename_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rename_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.rename_instance request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform an ungraceful, hard reset on a server. Equivalent to shutting the - # power off and then turning it back on. - # - # @overload reset_instance(request, options = nil) - # Pass arguments to `reset_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload reset_instance(name: nil) - # Pass arguments to `reset_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new - # - # # Call the reset_instance method. - # result = client.reset_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def reset_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.reset_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.reset_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.reset_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.reset_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts a server that was shutdown. - # - # @overload start_instance(request, options = nil) - # Pass arguments to `start_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_instance(name: nil) - # Pass arguments to `start_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new - # - # # Call the start_instance method. - # result = client.start_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.start_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.start_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stop a running server. - # - # @overload stop_instance(request, options = nil) - # Pass arguments to `stop_instance` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload stop_instance(name: nil) - # Pass arguments to `stop_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new - # - # # Call the stop_instance method. - # result = client.stop_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def stop_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.stop_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.stop_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stop_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.stop_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable the interactive serial console feature on an instance. - # - # @overload enable_interactive_serial_console(request, options = nil) - # Pass arguments to `enable_interactive_serial_console` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_interactive_serial_console(name: nil) - # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new - # - # # Call the enable_interactive_serial_console method. - # result = client.enable_interactive_serial_console request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def enable_interactive_serial_console request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_interactive_serial_console.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_interactive_serial_console.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.enable_interactive_serial_console request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable the interactive serial console feature on an instance. - # - # @overload disable_interactive_serial_console(request, options = nil) - # Pass arguments to `disable_interactive_serial_console` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_interactive_serial_console(name: nil) - # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new - # - # # Call the disable_interactive_serial_console method. - # result = client.disable_interactive_serial_console request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def disable_interactive_serial_console request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_interactive_serial_console.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_interactive_serial_console.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.disable_interactive_serial_console request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detach LUN from Instance. - # - # @overload detach_lun(request, options = nil) - # Pass arguments to `detach_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil) - # Pass arguments to `detach_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance [::String] - # Required. Name of the instance. - # @param lun [::String] - # Required. Name of the Lun to detach. - # @param skip_reboot [::Boolean] - # If true, performs lun unmapping without instance reboot. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new - # - # # Call the detach_lun method. - # result = client.detach_lun request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def detach_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.detach_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.detach_lun.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.detach_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.detach_lun request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the public SSH keys registered for the specified project. - # These SSH keys are used only for the interactive serial console feature. - # - # @overload list_ssh_keys(request, options = nil) - # Pass arguments to `list_ssh_keys` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent containing the SSH keys. - # Currently, the only valid value for the location is "global". - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new - # - # # Call the list_ssh_keys method. - # result = client.list_ssh_keys request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. - # p item - # end - # - def list_ssh_keys request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_ssh_keys.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_ssh_keys.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_ssh_keys.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_ssh_keys request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, "ssh_keys", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Register a public SSH key in the specified project for use with the - # interactive serial console feature. - # - # @overload create_ssh_key(request, options = nil) - # Pass arguments to `create_ssh_key` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) - # Pass arguments to `create_ssh_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent containing the SSH keys. - # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash] - # Required. The SSH key to register. - # @param ssh_key_id [::String] - # Required. The ID to use for the key, which will become the final component - # of the key's resource name. - # - # This value must match the regex: - # [a-zA-Z0-9@.\-_]\\{1,64} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new - # - # # Call the create_ssh_key method. - # result = client.create_ssh_key request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. - # p result - # - def create_ssh_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_ssh_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_ssh_key.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_ssh_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.create_ssh_key request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a public SSH key registered in the specified project. - # - # @overload delete_ssh_key(request, options = nil) - # Pass arguments to `delete_ssh_key` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_ssh_key(name: nil) - # Pass arguments to `delete_ssh_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the SSH key to delete. - # Currently, the only valid value for the location is "global". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new - # - # # Call the delete_ssh_key method. - # result = client.delete_ssh_key request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_ssh_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_ssh_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_ssh_key.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_ssh_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.delete_ssh_key request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List storage volumes in a given project and location. - # - # @overload list_volumes(request, options = nil) - # Pass arguments to `list_volumes` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_volumes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListVolumesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new - # - # # Call the list_volumes method. - # result = client.list_volumes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. - # p item - # end - # - def list_volumes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_volumes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_volumes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_volumes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_volumes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, "volumes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single storage volume. - # - # @overload get_volume(request, options = nil) - # Pass arguments to `get_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_volume(name: nil) - # Pass arguments to `get_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new - # - # # Call the get_volume method. - # result = client.get_volume request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - # p result - # - def get_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_volume request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single storage volume. - # - # @overload update_volume(request, options = nil) - # Pass arguments to `update_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_volume(volume: nil, update_mask: nil) - # Pass arguments to `update_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash] - # Required. The volume to update. - # - # The `name` field is used to identify the volume to update. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # 'labels' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new - # - # # Call the update_volume method. - # result = client.update_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_volume request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameVolume sets a new name for a volume. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_volume(request, options = nil) - # Pass arguments to `rename_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_volume(name: nil, new_volume_id: nil) - # Pass arguments to `rename_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the volume. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @param new_volume_id [::String] - # Required. The new `id` of the volume. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new - # - # # Call the rename_volume method. - # result = client.rename_volume request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - # p result - # - def rename_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rename_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rename_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.rename_volume request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Skips volume's cooloff and deletes it now. - # Volume must be in cooloff state. - # - # @overload evict_volume(request, options = nil) - # Pass arguments to `evict_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload evict_volume(name: nil) - # Pass arguments to `evict_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Volume. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new - # - # # Call the evict_volume method. - # result = client.evict_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def evict_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.evict_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.evict_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.evict_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.evict_volume request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Emergency Volume resize. - # - # @overload resize_volume(request, options = nil) - # Pass arguments to `resize_volume` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload resize_volume(volume: nil, size_gib: nil) - # Pass arguments to `resize_volume` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume [::String] - # Required. Volume to resize. - # @param size_gib [::Integer] - # New Volume size, in GiB. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new - # - # # Call the resize_volume method. - # result = client.resize_volume request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def resize_volume request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.resize_volume.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.resize_volume.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.resize_volume.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.resize_volume request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List network in a given project and location. - # - # @overload list_networks(request, options = nil) - # Pass arguments to `list_networks` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_networks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListNetworksRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new - # - # # Call the list_networks method. - # result = client.list_networks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. - # p item - # end - # - def list_networks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_networks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_networks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_networks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_networks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, "networks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all Networks (and used IPs for each Network) in the vendor account - # associated with the specified project. - # - # @overload list_network_usage(request, options = nil) - # Pass arguments to `list_network_usage` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_network_usage(location: nil) - # Pass arguments to `list_network_usage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param location [::String] - # Required. Parent value (project and location). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new - # - # # Call the list_network_usage method. - # result = client.list_network_usage request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. - # p result - # - def list_network_usage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_network_usage.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_network_usage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_network_usage request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single network. - # - # @overload get_network(request, options = nil) - # Pass arguments to `get_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_network(name: nil) - # Pass arguments to `get_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new - # - # # Call the get_network method. - # result = client.get_network request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - # p result - # - def get_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_network.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_network request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single network. - # - # @overload update_network(request, options = nil) - # Pass arguments to `update_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_network(network: nil, update_mask: nil) - # Pass arguments to `update_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash] - # Required. The network to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # `labels`, `reservations`, `vrf.vlan_attachments` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new - # - # # Call the update_network method. - # result = client.update_network request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_network.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_network request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Takes a snapshot of a boot volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload create_volume_snapshot(request, options = nil) - # Pass arguments to `create_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil) - # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The volume to snapshot. - # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash] - # Required. The snapshot to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new - # - # # Call the create_volume_snapshot method. - # result = client.create_volume_snapshot request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p result - # - def create_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_volume_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.create_volume_snapshot request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Uses the specified snapshot to restore its parent volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload restore_volume_snapshot(request, options = nil) - # Pass arguments to `restore_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restore_volume_snapshot(volume_snapshot: nil) - # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param volume_snapshot [::String] - # Required. Name of the snapshot which will be used to restore its parent - # volume. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new - # - # # Call the restore_volume_snapshot method. - # result = client.restore_volume_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restore_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restore_volume_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.restore_volume_snapshot request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a volume snapshot. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload delete_volume_snapshot(request, options = nil) - # Pass arguments to `delete_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_volume_snapshot(name: nil) - # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the snapshot to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new - # - # # Call the delete_volume_snapshot method. - # result = client.delete_volume_snapshot request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_volume_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.delete_volume_snapshot request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified snapshot resource. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - # - # @overload get_volume_snapshot(request, options = nil) - # Pass arguments to `get_volume_snapshot` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_volume_snapshot(name: nil) - # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the snapshot. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new - # - # # Call the get_volume_snapshot method. - # result = client.get_volume_snapshot request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p result - # - def get_volume_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_volume_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_volume_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_volume_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_volume_snapshot request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of snapshots for the specified volume. - # Returns a response with an empty list of snapshots if called - # for a non-boot volume. - # - # @overload list_volume_snapshots(request, options = nil) - # Pass arguments to `list_volume_snapshots` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListVolumesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new - # - # # Call the list_volume_snapshots method. - # result = client.list_volume_snapshots request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - # p item - # end - # - def list_volume_snapshots request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_volume_snapshots.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_volume_snapshots.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_volume_snapshots.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_volume_snapshots request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, "volume_snapshots", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single storage logical unit number(LUN). - # - # @overload get_lun(request, options = nil) - # Pass arguments to `get_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lun(name: nil) - # Pass arguments to `get_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Lun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Lun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new - # - # # Call the get_lun method. - # result = client.get_lun request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. - # p result - # - def get_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_lun.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_lun request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List storage volume luns for given storage volume. - # - # @overload list_luns(request, options = nil) - # Pass arguments to `list_luns` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_luns(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_luns` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListLunsRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new - # - # # Call the list_luns method. - # result = client.list_luns request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. - # p item - # end - # - def list_luns request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_luns.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_luns.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_luns.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_luns request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, "luns", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Skips lun's cooloff and deletes it now. - # Lun must be in cooloff state. - # - # @overload evict_lun(request, options = nil) - # Pass arguments to `evict_lun` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload evict_lun(name: nil) - # Pass arguments to `evict_lun` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the lun. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new - # - # # Call the evict_lun method. - # result = client.evict_lun request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def evict_lun request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.evict_lun.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.evict_lun.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.evict_lun.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.evict_lun request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a single NFS share. - # - # @overload get_nfs_share(request, options = nil) - # Pass arguments to `get_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_nfs_share(name: nil) - # Pass arguments to `get_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new - # - # # Call the get_nfs_share method. - # result = client.get_nfs_share request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - # p result - # - def get_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_nfs_share request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List NFS shares. - # - # @overload list_nfs_shares(request, options = nil) - # Pass arguments to `list_nfs_shares` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListNfsSharesRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new - # - # # Call the list_nfs_shares method. - # result = client.list_nfs_shares request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. - # p item - # end - # - def list_nfs_shares request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_nfs_shares.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_nfs_shares.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_nfs_shares.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_nfs_shares request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, "nfs_shares", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update details of a single NFS share. - # - # @overload update_nfs_share(request, options = nil) - # Pass arguments to `update_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_nfs_share(nfs_share: nil, update_mask: nil) - # Pass arguments to `update_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] - # Required. The NFS share to update. - # - # The `name` field is used to identify the NFS share to update. - # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # The only currently supported fields are: - # `labels` - # `allowed_clients` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new - # - # # Call the update_nfs_share method. - # result = client.update_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_nfs_share request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create an NFS share. - # - # @overload create_nfs_share(request, options = nil) - # Pass arguments to `create_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_nfs_share(parent: nil, nfs_share: nil) - # Pass arguments to `create_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location. - # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash] - # Required. The NfsShare to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new - # - # # Call the create_nfs_share method. - # result = client.create_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.create_nfs_share request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameNfsShare sets a new name for an nfsshare. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_nfs_share(request, options = nil) - # Pass arguments to `rename_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil) - # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the nfsshare. - # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} - # @param new_nfsshare_id [::String] - # Required. The new `id` of the nfsshare. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new - # - # # Call the rename_nfs_share method. - # result = client.rename_nfs_share request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - # p result - # - def rename_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rename_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rename_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.rename_nfs_share request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete an NFS share. The underlying volume is automatically deleted. - # - # @overload delete_nfs_share(request, options = nil) - # Pass arguments to `delete_nfs_share` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_nfs_share(name: nil) - # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the NFS share to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new - # - # # Call the delete_nfs_share method. - # result = client.delete_nfs_share request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_nfs_share request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_nfs_share.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_nfs_share.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_nfs_share.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.delete_nfs_share request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List the budget details to provision resources on a given project. - # - # @overload list_provisioning_quotas(request, options = nil) - # Pass arguments to `list_provisioning_quotas` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListProvisioningQuotasRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new - # - # # Call the list_provisioning_quotas method. - # result = client.list_provisioning_quotas request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. - # p item - # end - # - def list_provisioning_quotas request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_provisioning_quotas.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_provisioning_quotas request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, "provisioning_quotas", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Submit a provisiong configuration for a given project. - # - # @overload submit_provisioning_config(request, options = nil) - # Pass arguments to `submit_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload submit_provisioning_config(parent: nil, provisioning_config: nil, email: nil) - # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to create. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new - # - # # Call the submit_provisioning_config method. - # result = client.submit_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. - # p result - # - def submit_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.submit_provisioning_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.submit_provisioning_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.submit_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.submit_provisioning_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get ProvisioningConfig by name. - # - # @overload get_provisioning_config(request, options = nil) - # Pass arguments to `get_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_provisioning_config(name: nil) - # Pass arguments to `get_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the ProvisioningConfig. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new - # - # # Call the get_provisioning_config method. - # result = client.get_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def get_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_provisioning_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_provisioning_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.get_provisioning_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create new ProvisioningConfig. - # - # @overload create_provisioning_config(request, options = nil) - # Pass arguments to `create_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) - # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to create. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new - # - # # Call the create_provisioning_config method. - # result = client.create_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def create_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_provisioning_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_provisioning_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.create_provisioning_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update existing ProvisioningConfig. - # - # @overload update_provisioning_config(request, options = nil) - # Pass arguments to `update_provisioning_config` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) - # Pass arguments to `update_provisioning_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash] - # Required. The ProvisioningConfig to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @param email [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new - # - # # Call the update_provisioning_config method. - # result = client.update_provisioning_config request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - # p result - # - def update_provisioning_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_provisioning_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_provisioning_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_provisioning_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.update_provisioning_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # RenameNetwork sets a new name for a network. - # Use with caution, previous names become immediately invalidated. - # - # @overload rename_network(request, options = nil) - # Pass arguments to `rename_network` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_network(name: nil, new_network_id: nil) - # Pass arguments to `rename_network` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the network. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @param new_network_id [::String] - # Required. The new `id` of the network. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new - # - # # Call the rename_network method. - # result = client.rename_network request - # - # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - # p result - # - def rename_network request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rename_network.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rename_network.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_network.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.rename_network request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves the list of OS images which are currently approved. - # - # @overload list_os_images(request, options = nil) - # Pass arguments to `list_os_images` via a request object, either of type - # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_os_images(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_os_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListProvisioningQuotasRequest. - # @param page_size [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @param page_token [::String] - # A token identifying a page of results from the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bare_metal_solution/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new - # - # # Call the list_os_images method. - # result = client.list_os_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. - # p item - # end - # - def list_os_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_os_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_os_images.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_os_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bare_metal_solution_stub.list_os_images request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, "os_images", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BareMetalSolution REST API. - # - # This class represents the configuration for BareMetalSolution REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "baremetalsolution.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the BareMetalSolution API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `rename_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_instance - ## - # RPC-specific configuration for `reset_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :reset_instance - ## - # RPC-specific configuration for `start_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :start_instance - ## - # RPC-specific configuration for `stop_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_instance - ## - # RPC-specific configuration for `enable_interactive_serial_console` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_interactive_serial_console - ## - # RPC-specific configuration for `disable_interactive_serial_console` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_interactive_serial_console - ## - # RPC-specific configuration for `detach_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :detach_lun - ## - # RPC-specific configuration for `list_ssh_keys` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ssh_keys - ## - # RPC-specific configuration for `create_ssh_key` - # @return [::Gapic::Config::Method] - # - attr_reader :create_ssh_key - ## - # RPC-specific configuration for `delete_ssh_key` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_ssh_key - ## - # RPC-specific configuration for `list_volumes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volumes - ## - # RPC-specific configuration for `get_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume - ## - # RPC-specific configuration for `update_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :update_volume - ## - # RPC-specific configuration for `rename_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_volume - ## - # RPC-specific configuration for `evict_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :evict_volume - ## - # RPC-specific configuration for `resize_volume` - # @return [::Gapic::Config::Method] - # - attr_reader :resize_volume - ## - # RPC-specific configuration for `list_networks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_networks - ## - # RPC-specific configuration for `list_network_usage` - # @return [::Gapic::Config::Method] - # - attr_reader :list_network_usage - ## - # RPC-specific configuration for `get_network` - # @return [::Gapic::Config::Method] - # - attr_reader :get_network - ## - # RPC-specific configuration for `update_network` - # @return [::Gapic::Config::Method] - # - attr_reader :update_network - ## - # RPC-specific configuration for `create_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :create_volume_snapshot - ## - # RPC-specific configuration for `restore_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_volume_snapshot - ## - # RPC-specific configuration for `delete_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_volume_snapshot - ## - # RPC-specific configuration for `get_volume_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume_snapshot - ## - # RPC-specific configuration for `list_volume_snapshots` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volume_snapshots - ## - # RPC-specific configuration for `get_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lun - ## - # RPC-specific configuration for `list_luns` - # @return [::Gapic::Config::Method] - # - attr_reader :list_luns - ## - # RPC-specific configuration for `evict_lun` - # @return [::Gapic::Config::Method] - # - attr_reader :evict_lun - ## - # RPC-specific configuration for `get_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :get_nfs_share - ## - # RPC-specific configuration for `list_nfs_shares` - # @return [::Gapic::Config::Method] - # - attr_reader :list_nfs_shares - ## - # RPC-specific configuration for `update_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :update_nfs_share - ## - # RPC-specific configuration for `create_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :create_nfs_share - ## - # RPC-specific configuration for `rename_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_nfs_share - ## - # RPC-specific configuration for `delete_nfs_share` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_nfs_share - ## - # RPC-specific configuration for `list_provisioning_quotas` - # @return [::Gapic::Config::Method] - # - attr_reader :list_provisioning_quotas - ## - # RPC-specific configuration for `submit_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_provisioning_config - ## - # RPC-specific configuration for `get_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_provisioning_config - ## - # RPC-specific configuration for `create_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_provisioning_config - ## - # RPC-specific configuration for `update_provisioning_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_provisioning_config - ## - # RPC-specific configuration for `rename_network` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_network - ## - # RPC-specific configuration for `list_os_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_os_images - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance - @rename_instance = ::Gapic::Config::Method.new rename_instance_config - reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance - @reset_instance = ::Gapic::Config::Method.new reset_instance_config - start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance - @start_instance = ::Gapic::Config::Method.new start_instance_config - stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance - @stop_instance = ::Gapic::Config::Method.new stop_instance_config - enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console - @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config - disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console - @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config - detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun - @detach_lun = ::Gapic::Config::Method.new detach_lun_config - list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys - @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config - create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key - @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config - delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key - @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config - list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes - @list_volumes = ::Gapic::Config::Method.new list_volumes_config - get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume - @get_volume = ::Gapic::Config::Method.new get_volume_config - update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume - @update_volume = ::Gapic::Config::Method.new update_volume_config - rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume - @rename_volume = ::Gapic::Config::Method.new rename_volume_config - evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume - @evict_volume = ::Gapic::Config::Method.new evict_volume_config - resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume - @resize_volume = ::Gapic::Config::Method.new resize_volume_config - list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks - @list_networks = ::Gapic::Config::Method.new list_networks_config - list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage - @list_network_usage = ::Gapic::Config::Method.new list_network_usage_config - get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network - @get_network = ::Gapic::Config::Method.new get_network_config - update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network - @update_network = ::Gapic::Config::Method.new update_network_config - create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot - @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config - restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot - @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config - delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot - @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config - get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot - @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config - list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots - @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config - get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun - @get_lun = ::Gapic::Config::Method.new get_lun_config - list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns - @list_luns = ::Gapic::Config::Method.new list_luns_config - evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun - @evict_lun = ::Gapic::Config::Method.new evict_lun_config - get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share - @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config - list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares - @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config - update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share - @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config - create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share - @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config - rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share - @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config - delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share - @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config - list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas - @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config - submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config - @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config - get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config - @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config - create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config - @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config - update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config - @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config - rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network - @rename_network = ::Gapic::Config::Method.new rename_network_config - list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images - @list_os_images = ::Gapic::Config::Method.new list_os_images_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb deleted file mode 100644 index 5c11be0bebf2..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "baremetalsolution.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BareMetalSolution Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the BareMetalSolution Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "baremetalsolution.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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(?:/.*)?$}, 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(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb deleted file mode 100644 index 5dc3748f6217..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb +++ /dev/null @@ -1,2789 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - module Rest - ## - # REST service stub for the BareMetalSolution service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_instances REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse] - # A result object deserialized from the server's reply - def list_instances request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_instances", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Instance.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rename_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # A result object deserialized from the server's reply - def rename_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rename_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Instance.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the reset_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def reset_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_reset_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "reset_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the start_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def start_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "start_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the stop_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def stop_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stop_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "stop_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_interactive_serial_console REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def enable_interactive_serial_console request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_interactive_serial_console_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_interactive_serial_console", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_interactive_serial_console REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def disable_interactive_serial_console request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_interactive_serial_console_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_interactive_serial_console", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the detach_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def detach_lun request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_detach_lun_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "detach_lun", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_ssh_keys REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse] - # A result object deserialized from the server's reply - def list_ssh_keys request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_ssh_keys_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_ssh_keys", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_ssh_key REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # A result object deserialized from the server's reply - def create_ssh_key request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_ssh_key_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_ssh_key", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::SSHKey.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_ssh_key REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_ssh_key request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_ssh_key_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_ssh_key", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_volumes REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse] - # A result object deserialized from the server's reply - def list_volumes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_volumes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_volumes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # A result object deserialized from the server's reply - def get_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Volume.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rename_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # A result object deserialized from the server's reply - def rename_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rename_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Volume.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the evict_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def evict_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_evict_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "evict_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the resize_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def resize_volume request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_resize_volume_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "resize_volume", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_networks REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse] - # A result object deserialized from the server's reply - def list_networks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_networks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_networks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_network_usage REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse] - # A result object deserialized from the server's reply - def list_network_usage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_network_usage_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_network_usage", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # A result object deserialized from the server's reply - def get_network request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_network_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_network", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Network.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_network request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_network_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_network", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # A result object deserialized from the server's reply - def create_volume_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_volume_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_volume_snapshot", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restore_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def restore_volume_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_volume_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restore_volume_snapshot", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_volume_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_volume_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_volume_snapshot", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # A result object deserialized from the server's reply - def get_volume_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_volume_snapshot", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_volume_snapshots REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse] - # A result object deserialized from the server's reply - def list_volume_snapshots request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_volume_snapshots_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_volume_snapshots", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetLunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Lun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Lun] - # A result object deserialized from the server's reply - def get_lun request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lun_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_lun", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Lun.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_luns REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse] - # A result object deserialized from the server's reply - def list_luns request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_luns_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_luns", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the evict_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def evict_lun request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_evict_lun_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "evict_lun", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # A result object deserialized from the server's reply - def get_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_nfs_shares REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse] - # A result object deserialized from the server's reply - def list_nfs_shares request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_nfs_shares_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_nfs_shares", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rename_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # A result object deserialized from the server's reply - def rename_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rename_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_nfs_share request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_nfs_share_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_nfs_share", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_provisioning_quotas REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse] - # A result object deserialized from the server's reply - def list_provisioning_quotas request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_provisioning_quotas_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_provisioning_quotas", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the submit_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse] - # A result object deserialized from the server's reply - def submit_provisioning_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_submit_provisioning_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "submit_provisioning_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # A result object deserialized from the server's reply - def get_provisioning_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_provisioning_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_provisioning_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # A result object deserialized from the server's reply - def create_provisioning_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_provisioning_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_provisioning_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # A result object deserialized from the server's reply - def update_provisioning_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_provisioning_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_provisioning_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rename_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # A result object deserialized from the server's reply - def rename_network request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_network_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rename_network", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::Network.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_os_images REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse] - # A result object deserialized from the server's reply - def list_os_images request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_os_images_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_os_images", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_instances REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_instances_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/instances", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{instance.name}", - body: "instance", - matches: [ - ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the reset_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_reset_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:reset", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stop_instance REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_stop_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:stop", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_interactive_serial_console REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_interactive_serial_console_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:enableInteractiveSerialConsole", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_interactive_serial_console REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_interactive_serial_console_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:disableInteractiveSerialConsole", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the detach_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_detach_lun_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{instance}:detachLun", - body: "*", - matches: [ - ["instance", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_ssh_keys REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_ssh_keys_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/sshKeys", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_ssh_key REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_ssh_key_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/sshKeys", - body: "ssh_key", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_ssh_key REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_ssh_key_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/sshKeys/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_volumes REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_volumes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/volumes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{volume.name}", - body: "volume", - matches: [ - ["volume.name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the evict_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_evict_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:evict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the resize_volume REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_resize_volume_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{volume}:resize", - body: "*", - matches: [ - ["volume", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_networks REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_networks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/networks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_network_usage REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_network_usage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{location}/networks:listNetworkUsage", - matches: [ - ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_network_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_network_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{network.name}", - body: "network", - matches: [ - ["network.name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_volume_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/snapshots", - body: "volume_snapshot", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restore_volume_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{volume_snapshot}:restoreVolumeSnapshot", - body: "*", - matches: [ - ["volume_snapshot", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_volume_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_volume_snapshot REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_volume_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_volume_snapshots REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_volume_snapshots_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/snapshots", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetLunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lun_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/luns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_luns REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_luns_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/luns", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the evict_lun REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_evict_lun_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:evict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/luns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_nfs_shares REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_nfs_shares_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/nfsShares", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{nfs_share.name}", - body: "nfs_share", - matches: [ - ["nfs_share.name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/nfsShares", - body: "nfs_share", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_nfs_share REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_nfs_share_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_provisioning_quotas REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_provisioning_quotas_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/provisioningQuotas", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the submit_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_submit_provisioning_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/provisioningConfigs:submit", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_provisioning_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_provisioning_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/provisioningConfigs", - body: "provisioning_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_provisioning_config REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_provisioning_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{provisioning_config.name}", - body: "provisioning_config", - matches: [ - ["provisioning_config.name", %r{^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_network REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_network_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/networks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_os_images REST call - # - # @param request_pb [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_os_images_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/osImages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb deleted file mode 100644 index 37345efedc50..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module BareMetalSolution - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/bare_metal_solution/v2/rest" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module V2 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BareMetalSolution"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v2/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb deleted file mode 100644 index 980745ed179a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" -require "google/cloud/bare_metal_solution/v2/bindings_override" -require "google/cloud/bare_metal_solution/v2/version" - -module Google - module Cloud - module BareMetalSolution - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bare_metal_solution/v2/rest" - # client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new - # - module V2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb deleted file mode 100644 index 8c3694d57a2e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/bare_metal_solution/v2/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb deleted file mode 100644 index ea11c0b2c2e0..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/cloud/baremetalsolution/v2/instance_pb' -require 'google/cloud/baremetalsolution/v2/lun_pb' -require 'google/cloud/baremetalsolution/v2/network_pb' -require 'google/cloud/baremetalsolution/v2/nfs_share_pb' -require 'google/cloud/baremetalsolution/v2/osimage_pb' -require 'google/cloud/baremetalsolution/v2/provisioning_pb' -require 'google/cloud/baremetalsolution/v2/ssh_key_pb' -require 'google/cloud/baremetalsolution/v2/volume_pb' -require 'google/cloud/baremetalsolution/v2/volume_snapshot_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/cloud/baremetalsolution/v2/baremetalsolution.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x30google/cloud/baremetalsolution/v2/instance.proto\x1a+google/cloud/baremetalsolution/v2/lun.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a\x31google/cloud/baremetalsolution/v2/nfs_share.proto\x1a/google/cloud/baremetalsolution/v2/osimage.proto\x1a\x34google/cloud/baremetalsolution/v2/provisioning.proto\x1a/google/cloud/baremetalsolution/v2/ssh_key.proto\x1a.google/cloud/baremetalsolution/v2/volume.proto\x1a\x37google/cloud/baremetalsolution/v2/volume_snapshot.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x17\n\x15ResetInstanceResponse2\xbaK\n\x11\x42\x61reMetalSolution\x12\xc2\x01\n\rListInstances\x12\x37.google.cloud.baremetalsolution.v2.ListInstancesRequest\x1a\x38.google.cloud.baremetalsolution.v2.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/instances\x12\xaf\x01\n\x0bGetInstance\x12\x35.google.cloud.baremetalsolution.v2.GetInstanceRequest\x1a+.google.cloud.baremetalsolution.v2.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/instances/*}\x12\xea\x01\n\x0eUpdateInstance\x12\x38.google.cloud.baremetalsolution.v2.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v2/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xcf\x01\n\x0eRenameInstance\x12\x38.google.cloud.baremetalsolution.v2.RenameInstanceRequest\x1a+.google.cloud.baremetalsolution.v2.Instance\"V\xda\x41\x14name,new_instance_id\x82\xd3\xe4\x93\x02\x39\"4/v2/{name=projects/*/locations/*/instances/*}:rename:\x01*\x12\xdb\x01\n\rResetInstance\x12\x37.google.cloud.baremetalsolution.v2.ResetInstanceRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15ResetInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/instances/*}:reset:\x01*\x12\xdb\x01\n\rStartInstance\x12\x37.google.cloud.baremetalsolution.v2.StartInstanceRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41*\n\x15StartInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/instances/*}:start:\x01*\x12\xd7\x01\n\x0cStopInstance\x12\x36.google.cloud.baremetalsolution.v2.StopInstanceRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41)\n\x14StopInstanceResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/instances/*}:stop:\x01*\x12\xa8\x02\n\x1e\x45nableInteractiveSerialConsole\x12H.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest\x1a\x1d.google.longrunning.Operation\"\x9c\x01\xca\x41;\n&EnableInteractiveSerialConsoleResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v2/{name=projects/*/locations/*/instances/*}:enableInteractiveSerialConsole:\x01*\x12\xac\x02\n\x1f\x44isableInteractiveSerialConsole\x12I.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41<\n\'DisableInteractiveSerialConsoleResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v2/{name=projects/*/locations/*/instances/*}:disableInteractiveSerialConsole:\x01*\x12\xd6\x01\n\tDetachLun\x12\x33.google.cloud.baremetalsolution.v2.DetachLunRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x0cinstance,lun\x82\xd3\xe4\x93\x02@\";/v2/{instance=projects/*/locations/*/instances/*}:detachLun:\x01*\x12\xba\x01\n\x0bListSSHKeys\x12\x35.google.cloud.baremetalsolution.v2.ListSSHKeysRequest\x1a\x36.google.cloud.baremetalsolution.v2.ListSSHKeysResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v2/{parent=projects/*/locations/*}/sshKeys\x12\xcb\x01\n\x0c\x43reateSSHKey\x12\x36.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest\x1a).google.cloud.baremetalsolution.v2.SSHKey\"X\xda\x41\x19parent,ssh_key,ssh_key_id\x82\xd3\xe4\x93\x02\x36\"+/v2/{parent=projects/*/locations/*}/sshKeys:\x07ssh_key\x12\x9a\x01\n\x0c\x44\x65leteSSHKey\x12\x36.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v2/{name=projects/*/locations/*/sshKeys/*}\x12\xba\x01\n\x0bListVolumes\x12\x35.google.cloud.baremetalsolution.v2.ListVolumesRequest\x1a\x36.google.cloud.baremetalsolution.v2.ListVolumesResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v2/{parent=projects/*/locations/*}/volumes\x12\xa7\x01\n\tGetVolume\x12\x33.google.cloud.baremetalsolution.v2.GetVolumeRequest\x1a).google.cloud.baremetalsolution.v2.Volume\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v2/{name=projects/*/locations/*/volumes/*}\x12\xdc\x01\n\x0cUpdateVolume\x12\x36.google.cloud.baremetalsolution.v2.UpdateVolumeRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06Volume\x12\x11OperationMetadata\xda\x41\x12volume,update_mask\x82\xd3\xe4\x93\x02<22/v2/{volume.name=projects/*/locations/*/volumes/*}:\x06volume\x12\xc5\x01\n\x0cRenameVolume\x12\x36.google.cloud.baremetalsolution.v2.RenameVolumeRequest\x1a).google.cloud.baremetalsolution.v2.Volume\"R\xda\x41\x12name,new_volume_id\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/volumes/*}:rename:\x01*\x12\xd5\x01\n\x0b\x45victVolume\x12\x35.google.cloud.baremetalsolution.v2.EvictVolumeRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v2/{name=projects/*/locations/*/volumes/*}:evict:\x01*\x12\xd6\x01\n\x0cResizeVolume\x12\x36.google.cloud.baremetalsolution.v2.ResizeVolumeRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x1b\n\x06Volume\x12\x11OperationMetadata\xda\x41\x0fvolume,size_gib\x82\xd3\xe4\x93\x02\x39\"4/v2/{volume=projects/*/locations/*/volumes/*}:resize:\x01*\x12\xbe\x01\n\x0cListNetworks\x12\x36.google.cloud.baremetalsolution.v2.ListNetworksRequest\x1a\x37.google.cloud.baremetalsolution.v2.ListNetworksResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/networks\x12\xdf\x01\n\x10ListNetworkUsage\x12:.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest\x1a;.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse\"R\xda\x41\x08location\x82\xd3\xe4\x93\x02\x41\x12?/v2/{location=projects/*/locations/*}/networks:listNetworkUsage\x12\xab\x01\n\nGetNetwork\x12\x34.google.cloud.baremetalsolution.v2.GetNetworkRequest\x1a*.google.cloud.baremetalsolution.v2.Network\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v2/{name=projects/*/locations/*/networks/*}\x12\xe3\x01\n\rUpdateNetwork\x12\x37.google.cloud.baremetalsolution.v2.UpdateNetworkRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07Network\x12\x11OperationMetadata\xda\x41\x13network,update_mask\x82\xd3\xe4\x93\x02?24/v2/{network.name=projects/*/locations/*/networks/*}:\x07network\x12\xf4\x01\n\x14\x43reateVolumeSnapshot\x12>.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest\x1a\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\"i\xda\x41\x16parent,volume_snapshot\x82\xd3\xe4\x93\x02J\"7/v2/{parent=projects/*/locations/*/volumes/*}/snapshots:\x0fvolume_snapshot\x12\x95\x02\n\x15RestoreVolumeSnapshot\x12?.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41#\n\x0eVolumeSnapshot\x12\x11OperationMetadata\xda\x41\x0fvolume_snapshot\x82\xd3\xe4\x93\x02]\"X/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot:\x01*\x12\xb6\x01\n\x14\x44\x65leteVolumeSnapshot\x12>.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}\x12\xcb\x01\n\x11GetVolumeSnapshot\x12;.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest\x1a\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}\x12\xde\x01\n\x13ListVolumeSnapshots\x12=.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest\x1a>.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{parent=projects/*/locations/*/volumes/*}/snapshots\x12\xa5\x01\n\x06GetLun\x12\x30.google.cloud.baremetalsolution.v2.GetLunRequest\x1a&.google.cloud.baremetalsolution.v2.Lun\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{name=projects/*/locations/*/volumes/*/luns/*}\x12\xb8\x01\n\x08ListLuns\x12\x32.google.cloud.baremetalsolution.v2.ListLunsRequest\x1a\x33.google.cloud.baremetalsolution.v2.ListLunsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{parent=projects/*/locations/*/volumes/*}/luns\x12\xd6\x01\n\x08\x45victLun\x12\x32.google.cloud.baremetalsolution.v2.EvictLunRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v2/{name=projects/*/locations/*/volumes/*/luns/*}:evict:\x01*\x12\xaf\x01\n\x0bGetNfsShare\x12\x35.google.cloud.baremetalsolution.v2.GetNfsShareRequest\x1a+.google.cloud.baremetalsolution.v2.NfsShare\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/nfsShares/*}\x12\xc2\x01\n\rListNfsShares\x12\x37.google.cloud.baremetalsolution.v2.ListNfsSharesRequest\x1a\x38.google.cloud.baremetalsolution.v2.ListNfsSharesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/nfsShares\x12\xee\x01\n\x0eUpdateNfsShare\x12\x38.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x1d\n\x08NfsShare\x12\x11OperationMetadata\xda\x41\x15nfs_share,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}:\tnfs_share\x12\xde\x01\n\x0e\x43reateNfsShare\x12\x38.google.cloud.baremetalsolution.v2.CreateNfsShareRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x1d\n\x08NfsShare\x12\x11OperationMetadata\xda\x41\x10parent,nfs_share\x82\xd3\xe4\x93\x02:\"-/v2/{parent=projects/*/locations/*}/nfsShares:\tnfs_share\x12\xcf\x01\n\x0eRenameNfsShare\x12\x38.google.cloud.baremetalsolution.v2.RenameNfsShareRequest\x1a+.google.cloud.baremetalsolution.v2.NfsShare\"V\xda\x41\x14name,new_nfsshare_id\x82\xd3\xe4\x93\x02\x39\"4/v2/{name=projects/*/locations/*/nfsShares/*}:rename:\x01*\x12\xd4\x01\n\x0e\x44\x65leteNfsShare\x12\x38.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/nfsShares/*}\x12\xe6\x01\n\x16ListProvisioningQuotas\x12@.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest\x1a\x41.google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v2/{parent=projects/*/locations/*}/provisioningQuotas\x12\x8b\x02\n\x18SubmitProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest\x1a\x43.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse\"f\xda\x41\x1aparent,provisioning_config\x82\xd3\xe4\x93\x02\x43\">/v2/{parent=projects/*/locations/*}/provisioningConfigs:submit:\x01*\x12\xd7\x01\n\x15GetProvisioningConfig\x12?.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/provisioningConfigs/*}\x12\x88\x02\n\x18\x43reateProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"q\xda\x41\x1aparent,provisioning_config\x82\xd3\xe4\x93\x02N\"7/v2/{parent=projects/*/locations/*}/provisioningConfigs:\x13provisioning_config\x12\xa2\x02\n\x18UpdateProvisioningConfig\x12\x42.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest\x1a\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"\x8a\x01\xda\x41\x1fprovisioning_config,update_mask\x82\xd3\xe4\x93\x02\x62\x32K/v2/{provisioning_config.name=projects/*/locations/*/provisioningConfigs/*}:\x13provisioning_config\x12\xca\x01\n\rRenameNetwork\x12\x37.google.cloud.baremetalsolution.v2.RenameNetworkRequest\x1a*.google.cloud.baremetalsolution.v2.Network\"T\xda\x41\x13name,new_network_id\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/networks/*}:rename:\x01*\x12\xbe\x01\n\x0cListOSImages\x12\x36.google.cloud.baremetalsolution.v2.ListOSImagesRequest\x1a\x37.google.cloud.baremetalsolution.v2.ListOSImagesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/osImages\x1aT\xca\x41 baremetalsolution.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x02\n%com.google.cloud.baremetalsolution.v2B\x16\x42\x61reMetalSolutionProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.OperationMetadata").msgclass - ResetInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResetInstanceResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb deleted file mode 100644 index 7a1a2a562afe..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb +++ /dev/null @@ -1,154 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/baremetalsolution/v2/baremetalsolution.proto for package 'Google.Cloud.BareMetalSolution.V2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/baremetalsolution/v2/baremetalsolution_pb' - -module Google - module Cloud - module BareMetalSolution - module V2 - module BareMetalSolution - # Performs management operations on Bare Metal Solution servers. - # - # The `baremetalsolution.googleapis.com` service provides management - # capabilities for Bare Metal Solution servers. To access the API methods, you - # must assign Bare Metal Solution IAM roles containing the desired permissions - # to your staff in your Google Cloud project. You must also enable the Bare - # Metal Solution API. Once enabled, the methods act - # upon specific servers in your Bare Metal Solution environment. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.baremetalsolution.v2.BareMetalSolution' - - # List servers in a given project and location. - rpc :ListInstances, ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse - # Get details about a single server. - rpc :GetInstance, ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Google::Cloud::BareMetalSolution::V2::Instance - # Update details of a single server. - rpc :UpdateInstance, ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Google::Longrunning::Operation - # RenameInstance sets a new name for an instance. - # Use with caution, previous names become immediately invalidated. - rpc :RenameInstance, ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Google::Cloud::BareMetalSolution::V2::Instance - # Perform an ungraceful, hard reset on a server. Equivalent to shutting the - # power off and then turning it back on. - rpc :ResetInstance, ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Google::Longrunning::Operation - # Starts a server that was shutdown. - rpc :StartInstance, ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Google::Longrunning::Operation - # Stop a running server. - rpc :StopInstance, ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Google::Longrunning::Operation - # Enable the interactive serial console feature on an instance. - rpc :EnableInteractiveSerialConsole, ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Google::Longrunning::Operation - # Disable the interactive serial console feature on an instance. - rpc :DisableInteractiveSerialConsole, ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Google::Longrunning::Operation - # Detach LUN from Instance. - rpc :DetachLun, ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Google::Longrunning::Operation - # Lists the public SSH keys registered for the specified project. - # These SSH keys are used only for the interactive serial console feature. - rpc :ListSSHKeys, ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse - # Register a public SSH key in the specified project for use with the - # interactive serial console feature. - rpc :CreateSSHKey, ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Google::Cloud::BareMetalSolution::V2::SSHKey - # Deletes a public SSH key registered in the specified project. - rpc :DeleteSSHKey, ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Google::Protobuf::Empty - # List storage volumes in a given project and location. - rpc :ListVolumes, ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse - # Get details of a single storage volume. - rpc :GetVolume, ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Google::Cloud::BareMetalSolution::V2::Volume - # Update details of a single storage volume. - rpc :UpdateVolume, ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Google::Longrunning::Operation - # RenameVolume sets a new name for a volume. - # Use with caution, previous names become immediately invalidated. - rpc :RenameVolume, ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Google::Cloud::BareMetalSolution::V2::Volume - # Skips volume's cooloff and deletes it now. - # Volume must be in cooloff state. - rpc :EvictVolume, ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Google::Longrunning::Operation - # Emergency Volume resize. - rpc :ResizeVolume, ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Google::Longrunning::Operation - # List network in a given project and location. - rpc :ListNetworks, ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse - # List all Networks (and used IPs for each Network) in the vendor account - # associated with the specified project. - rpc :ListNetworkUsage, ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse - # Get details of a single network. - rpc :GetNetwork, ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Google::Cloud::BareMetalSolution::V2::Network - # Update details of a single network. - rpc :UpdateNetwork, ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Google::Longrunning::Operation - # Takes a snapshot of a boot volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - rpc :CreateVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot - # Uses the specified snapshot to restore its parent volume. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - rpc :RestoreVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Google::Longrunning::Operation - # Deletes a volume snapshot. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - rpc :DeleteVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Google::Protobuf::Empty - # Returns the specified snapshot resource. - # Returns INVALID_ARGUMENT if called for a non-boot volume. - rpc :GetVolumeSnapshot, ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot - # Retrieves the list of snapshots for the specified volume. - # Returns a response with an empty list of snapshots if called - # for a non-boot volume. - rpc :ListVolumeSnapshots, ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse - # Get details of a single storage logical unit number(LUN). - rpc :GetLun, ::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Google::Cloud::BareMetalSolution::V2::Lun - # List storage volume luns for given storage volume. - rpc :ListLuns, ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse - # Skips lun's cooloff and deletes it now. - # Lun must be in cooloff state. - rpc :EvictLun, ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Google::Longrunning::Operation - # Get details of a single NFS share. - rpc :GetNfsShare, ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Google::Cloud::BareMetalSolution::V2::NfsShare - # List NFS shares. - rpc :ListNfsShares, ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse - # Update details of a single NFS share. - rpc :UpdateNfsShare, ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Google::Longrunning::Operation - # Create an NFS share. - rpc :CreateNfsShare, ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Google::Longrunning::Operation - # RenameNfsShare sets a new name for an nfsshare. - # Use with caution, previous names become immediately invalidated. - rpc :RenameNfsShare, ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Google::Cloud::BareMetalSolution::V2::NfsShare - # Delete an NFS share. The underlying volume is automatically deleted. - rpc :DeleteNfsShare, ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Google::Longrunning::Operation - # List the budget details to provision resources on a given project. - rpc :ListProvisioningQuotas, ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse - # Submit a provisiong configuration for a given project. - rpc :SubmitProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse - # Get ProvisioningConfig by name. - rpc :GetProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig - # Create new ProvisioningConfig. - rpc :CreateProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig - # Update existing ProvisioningConfig. - rpc :UpdateProvisioningConfig, ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig - # RenameNetwork sets a new name for a network. - # Use with caution, previous names become immediately invalidated. - rpc :RenameNetwork, ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Google::Cloud::BareMetalSolution::V2::Network - # Retrieves the list of OS images which are currently approved. - rpc :ListOSImages, ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb deleted file mode 100644 index 6dcab60b7988..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/common_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/common.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/baremetalsolution/v2/common.proto\x12!google.cloud.baremetalsolution.v2*\xaa\x01\n\x15VolumePerformanceTier\x12\'\n#VOLUME_PERFORMANCE_TIER_UNSPECIFIED\x10\x00\x12\"\n\x1eVOLUME_PERFORMANCE_TIER_SHARED\x10\x01\x12$\n VOLUME_PERFORMANCE_TIER_ASSIGNED\x10\x02\x12\x1e\n\x1aVOLUME_PERFORMANCE_TIER_HT\x10\x03*l\n\x0fWorkloadProfile\x12 \n\x1cWORKLOAD_PROFILE_UNSPECIFIED\x10\x00\x12\x1c\n\x18WORKLOAD_PROFILE_GENERIC\x10\x01\x12\x19\n\x15WORKLOAD_PROFILE_HANA\x10\x02\x42\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0b\x43ommonProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - VolumePerformanceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumePerformanceTier").enummodule - WorkloadProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.WorkloadProfile").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb deleted file mode 100644 index a8f5ce8b427a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/instance_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/instance.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/baremetalsolution/v2/common_pb' -require 'google/cloud/baremetalsolution/v2/lun_pb' -require 'google/cloud/baremetalsolution/v2/network_pb' -require 'google/cloud/baremetalsolution/v2/volume_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/baremetalsolution/v2/instance.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a+google/cloud/baremetalsolution/v2/lun.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a.google/cloud/baremetalsolution/v2/volume.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\t\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x0f\n\x02id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0cmachine_type\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x45\n\x05state\x18\x05 \x01(\x0e\x32\x31.google.cloud.baremetalsolution.v2.Instance.StateB\x03\xe0\x41\x03\x12\x1e\n\x16hyperthreading_enabled\x18\x06 \x01(\x08\x12G\n\x06labels\x18\x07 \x03(\x0b\x32\x37.google.cloud.baremetalsolution.v2.Instance.LabelsEntry\x12\x39\n\x04luns\x18\x08 \x03(\x0b\x32&.google.cloud.baremetalsolution.v2.LunB\x03\xe0\x41\x05\x12?\n\x07volumes\x18\x10 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.VolumeB\x03\xe0\x41\x04\x12\x41\n\x08networks\x18\t \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.NetworkB\x03\xe0\x41\x03\x12/\n\"interactive_serial_console_enabled\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12\x10\n\x08os_image\x18\x0c \x01(\t\x12\x10\n\x03pod\x18\r \x01(\tB\x03\xe0\x41\x05\x12U\n\x10network_template\x18\x0e \x01(\tB;\xfa\x41\x38\n6baremetalsolution.googleapis.com/ServerNetworkTemplate\x12O\n\x12logical_interfaces\x18\x0f \x03(\x0b\x32\x33.google.cloud.baremetalsolution.v2.LogicalInterface\x12\x17\n\nlogin_info\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12L\n\x10workload_profile\x18\x12 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.WorkloadProfile\x12\x1d\n\x10\x66irmware_version\x18\x13 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x82\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08STARTING\x10\x05\x12\x0c\n\x08STOPPING\x10\x06\x12\x0c\n\x08SHUTDOWN\x10\x07:l\xea\x41i\n)baremetalsolution.googleapis.com/Instance\x12\n\tinstances\x18\x01 \x03(\x0b\x32+.google.cloud.baremetalsolution.v2.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8c\x01\n\x15UpdateInstanceRequest\x12\x42\n\x08instance\x18\x01 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.InstanceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x15RenameInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x1c\n\x0fnew_instance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"W\n\x14ResetInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"W\n\x14StartInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"\x17\n\x15StartInstanceResponse\"V\n\x13StopInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"\x16\n\x14StopInstanceResponse\"h\n%EnableInteractiveSerialConsoleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"(\n&EnableInteractiveSerialConsoleResponse\"i\n&DisableInteractiveSerialConsoleRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\")\n\'DisableInteractiveSerialConsoleResponse\"\xa7\x01\n\x10\x44\x65tachLunRequest\x12\x43\n\x08instance\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x39\n\x03lun\x18\x02 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/Lun\x12\x13\n\x0bskip_reboot\x18\x03 \x01(\x08\"\xac\x04\n\x15ServerNetworkTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12!\n\x19\x61pplicable_instance_types\x18\x02 \x03(\t\x12\x65\n\x12logical_interfaces\x18\x03 \x03(\x0b\x32I.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface\x1a\xdd\x01\n\x10LogicalInterface\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x65\n\x04type\x18\x02 \x01(\x0e\x32W.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType\x12\x10\n\x08required\x18\x03 \x01(\x08\"B\n\rInterfaceType\x12\x1e\n\x1aINTERFACE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OND\x10\x01\x12\x07\n\x03NIC\x10\x02:\x95\x01\xea\x41\x91\x01\n6baremetalsolution.googleapis.com/ServerNetworkTemplate\x12Wprojects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}B\xfc\x01\n%com.google.cloud.baremetalsolution.v2B\rInstanceProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Instance").msgclass - Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Instance.State").enummodule - GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetInstanceRequest").msgclass - ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListInstancesRequest").msgclass - ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListInstancesResponse").msgclass - UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateInstanceRequest").msgclass - RenameInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameInstanceRequest").msgclass - ResetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResetInstanceRequest").msgclass - StartInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StartInstanceRequest").msgclass - StartInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StartInstanceResponse").msgclass - StopInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StopInstanceRequest").msgclass - StopInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.StopInstanceResponse").msgclass - EnableInteractiveSerialConsoleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest").msgclass - EnableInteractiveSerialConsoleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse").msgclass - DisableInteractiveSerialConsoleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest").msgclass - DisableInteractiveSerialConsoleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse").msgclass - DetachLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DetachLunRequest").msgclass - ServerNetworkTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate").msgclass - ServerNetworkTemplate::LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface").msgclass - ServerNetworkTemplate::LogicalInterface::InterfaceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb deleted file mode 100644 index 36f0a6678470..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/lun_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/lun.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n+google/cloud/baremetalsolution/v2/lun.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdd\x06\n\x03Lun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\n \x01(\t\x12;\n\x05state\x18\x02 \x01(\x0e\x32,.google.cloud.baremetalsolution.v2.Lun.State\x12\x0f\n\x07size_gb\x18\x03 \x01(\x03\x12T\n\x12multiprotocol_type\x18\x04 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType\x12\x44\n\x0estorage_volume\x18\x05 \x01(\tB,\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tshareable\x18\x06 \x01(\x08\x12\x10\n\x08\x62oot_lun\x18\x07 \x01(\x08\x12H\n\x0cstorage_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.Lun.StorageType\x12\x0c\n\x04wwid\x18\t \x01(\t\x12\x34\n\x0b\x65xpire_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x0c \x03(\tB1\xe0\x41\x03\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\t\n\x05READY\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0c\n\x08\x43OOL_OFF\x10\x05\"B\n\x11MultiprotocolType\x12\"\n\x1eMULTIPROTOCOL_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05LINUX\x10\x01\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02:n\xea\x41k\n$baremetalsolution.googleapis.com/Lun\x12\x43projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}\"K\n\rGetLunRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/Lun\"y\n\x0fListLunsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"v\n\x10ListLunsResponse\x12\x34\n\x04luns\x18\x01 \x03(\x0b\x32&.google.cloud.baremetalsolution.v2.Lun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x0f\x45victLunRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$baremetalsolution.googleapis.com/LunB\xf7\x01\n%com.google.cloud.baremetalsolution.v2B\x08LunProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - Lun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun").msgclass - Lun::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.State").enummodule - Lun::MultiprotocolType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.MultiprotocolType").enummodule - Lun::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Lun.StorageType").enummodule - GetLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetLunRequest").msgclass - ListLunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListLunsRequest").msgclass - ListLunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListLunsResponse").msgclass - EvictLunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EvictLunRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb deleted file mode 100644 index 309def4c477c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/network_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/network.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n/google/cloud/baremetalsolution/v2/network.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa8\x07\n\x07Network\x12\x11\n\x04name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\n \x01(\t\x12=\n\x04type\x18\x02 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Network.Type\x12\x12\n\nip_address\x18\x03 \x01(\t\x12\x13\n\x0bmac_address\x18\x04 \x03(\t\x12?\n\x05state\x18\x06 \x01(\x0e\x32\x30.google.cloud.baremetalsolution.v2.Network.State\x12\x0f\n\x07vlan_id\x18\x07 \x01(\t\x12\x0c\n\x04\x63idr\x18\x08 \x01(\t\x12\x33\n\x03vrf\x18\t \x01(\x0b\x32&.google.cloud.baremetalsolution.v2.VRF\x12\x46\n\x06labels\x18\x0b \x03(\x0b\x32\x36.google.cloud.baremetalsolution.v2.Network.LabelsEntry\x12\x15\n\rservices_cidr\x18\x0c \x01(\t\x12R\n\x0creservations\x18\r \x03(\x0b\x32<.google.cloud.baremetalsolution.v2.NetworkAddressReservation\x12\x10\n\x03pod\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12O\n\x0cmount_points\x18\x0f \x03(\x0b\x32\x34.google.cloud.baremetalsolution.v2.NetworkMountPointB\x03\xe0\x41\x04\x12\x1c\n\x14jumbo_frames_enabled\x18\x10 \x01(\x08\x12\x17\n\ngateway_ip\x18\x11 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\"c\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0f\n\x0bPROVISIONED\x10\x02\x12\x12\n\x0e\x44\x45PROVISIONING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04:i\xea\x41\x66\n(baremetalsolution.googleapis.com/Network\x12:projects/{project}/locations/{location}/networks/{network}\"U\n\x19NetworkAddressReservation\x12\x15\n\rstart_address\x18\x01 \x01(\t\x12\x13\n\x0b\x65nd_address\x18\x02 \x01(\t\x12\x0c\n\x04note\x18\x03 \x01(\t\"\xe5\x04\n\x03VRF\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x05state\x18\x05 \x01(\x0e\x32,.google.cloud.baremetalsolution.v2.VRF.State\x12\x44\n\nqos_policy\x18\x06 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.VRF.QosPolicy\x12O\n\x10vlan_attachments\x18\x07 \x03(\x0b\x32\x35.google.cloud.baremetalsolution.v2.VRF.VlanAttachment\x1a#\n\tQosPolicy\x12\x16\n\x0e\x62\x61ndwidth_gbps\x18\x01 \x01(\x01\x1a\x93\x02\n\x0eVlanAttachment\x12\x14\n\x0cpeer_vlan_id\x18\x01 \x01(\x03\x12\x0f\n\x07peer_ip\x18\x02 \x01(\t\x12\x11\n\trouter_ip\x18\x03 \x01(\t\x12\x18\n\x0bpairing_key\x18\x04 \x01(\tB\x03\xe0\x41\x04\x12\x44\n\nqos_policy\x18\x05 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.VRF.QosPolicy\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x05\x12V\n\x17interconnect_attachment\x18\x07 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-compute.googleapis.com/InterconnectAttachment\"A\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPROVISIONING\x10\x01\x12\x0f\n\x0bPROVISIONED\x10\x02\"\xdb\x02\n\x10LogicalInterface\x12o\n\x1alogical_network_interfaces\x18\x01 \x03(\x0b\x32K.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1b\n\x0finterface_index\x18\x03 \x01(\x05\x42\x02\x18\x01\x1a\xaa\x01\n\x17LogicalNetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nip_address\x18\x02 \x01(\t\x12\x17\n\x0f\x64\x65\x66\x61ult_gateway\x18\x03 \x01(\x08\x12\x45\n\x0cnetwork_type\x18\x04 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Network.Type\x12\n\n\x02id\x18\x05 \x01(\t\"S\n\x11GetNetworkRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(baremetalsolution.googleapis.com/Network\"\x87\x01\n\x13ListNetworksRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x82\x01\n\x14ListNetworksResponse\x12<\n\x08networks\x18\x01 \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.Network\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x89\x01\n\x14UpdateNetworkRequest\x12@\n\x07network\x18\x01 \x01(\x0b\x32*.google.cloud.baremetalsolution.v2.NetworkB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"]\n\x0cNetworkUsage\x12;\n\x07network\x18\x01 \x01(\x0b\x32*.google.cloud.baremetalsolution.v2.Network\x12\x10\n\x08used_ips\x18\x02 \x03(\t\"V\n\x17ListNetworkUsageRequest\x12;\n\x08location\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"]\n\x18ListNetworkUsageResponse\x12\x41\n\x08networks\x18\x01 \x03(\x0b\x32/.google.cloud.baremetalsolution.v2.NetworkUsage\"\x9d\x01\n\x11NetworkMountPoint\x12@\n\x08instance\x18\x01 \x01(\tB.\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x19\n\x11logical_interface\x18\x02 \x01(\t\x12\x17\n\x0f\x64\x65\x66\x61ult_gateway\x18\x03 \x01(\x08\x12\x12\n\nip_address\x18\x04 \x01(\t\"s\n\x14RenameNetworkRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(baremetalsolution.googleapis.com/Network\x12\x1b\n\x0enew_network_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x85\x03\n%com.google.cloud.baremetalsolution.v2B\x0cNetworkProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2\xea\x41\x86\x01\n-compute.googleapis.com/InterconnectAttachment\x12Uprojects/{project}/regions/{region}/interconnectAttachments/{interconnect_attachment}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network").msgclass - Network::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.Type").enummodule - Network::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.State").enummodule - NetworkAddressReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkAddressReservation").msgclass - VRF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF").msgclass - VRF::QosPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.QosPolicy").msgclass - VRF::VlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.VlanAttachment").msgclass - VRF::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.State").enummodule - LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface").msgclass - LogicalInterface::LogicalNetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface").msgclass - GetNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNetworkRequest").msgclass - ListNetworksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksRequest").msgclass - ListNetworksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksResponse").msgclass - UpdateNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNetworkRequest").msgclass - NetworkUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkUsage").msgclass - ListNetworkUsageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageRequest").msgclass - ListNetworkUsageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageResponse").msgclass - NetworkMountPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkMountPoint").msgclass - RenameNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameNetworkRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb deleted file mode 100644 index 2039cd5c0463..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/nfs_share.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n1google/cloud/baremetalsolution/v2/nfs_share.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x9d\t\n\x08NfsShare\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0cnfs_share_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x03 \x01(\x0e\x32\x31.google.cloud.baremetalsolution.v2.NfsShare.StateB\x03\xe0\x41\x03\x12?\n\x06volume\x18\x04 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12R\n\x0f\x61llowed_clients\x18\x05 \x03(\x0b\x32\x39.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient\x12G\n\x06labels\x18\x06 \x03(\x0b\x32\x37.google.cloud.baremetalsolution.v2.NfsShare.LabelsEntry\x12\x1a\n\x12requested_size_gib\x18\x07 \x01(\x03\x12R\n\x0cstorage_type\x18\t \x01(\x0e\x32\x37.google.cloud.baremetalsolution.v2.NfsShare.StorageTypeB\x03\xe0\x41\x05\x1a\xb3\x02\n\rAllowedClient\x12>\n\x07network\x18\x01 \x01(\tB-\xfa\x41*\n(baremetalsolution.googleapis.com/Network\x12\x15\n\x08share_ip\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x61llowed_clients_cidr\x18\x03 \x01(\t\x12W\n\x11mount_permissions\x18\x04 \x01(\x0e\x32<.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions\x12\x11\n\tallow_dev\x18\x05 \x01(\x08\x12\x12\n\nallow_suid\x18\x06 \x01(\x08\x12\x16\n\x0eno_root_squash\x18\x07 \x01(\x08\x12\x15\n\x08nfs_path\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROVISIONED\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"O\n\x10MountPermissions\x12!\n\x1dMOUNT_PERMISSIONS_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02:m\xea\x41j\n)baremetalsolution.googleapis.com/NFSShare\x12=projects/{project}/locations/{location}/nfsShares/{nfs_share}\"U\n\x12GetNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShare\"\x88\x01\n\x14ListNfsSharesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x86\x01\n\x15ListNfsSharesResponse\x12?\n\nnfs_shares\x18\x01 \x03(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShare\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8d\x01\n\x15UpdateNfsShareRequest\x12\x43\n\tnfs_share\x18\x01 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShareB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x15RenameNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShare\x12\x1c\n\x0fnew_nfsshare_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n\x15\x43reateNfsShareRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\tnfs_share\x18\x02 \x01(\x0b\x32+.google.cloud.baremetalsolution.v2.NfsShareB\x03\xe0\x41\x02\"X\n\x15\x44\x65leteNfsShareRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)baremetalsolution.googleapis.com/NFSShareB\xfc\x01\n%com.google.cloud.baremetalsolution.v2B\rNfsShareProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - NfsShare = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare").msgclass - NfsShare::AllowedClient = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.AllowedClient").msgclass - NfsShare::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.State").enummodule - NfsShare::MountPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.MountPermissions").enummodule - NfsShare::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.StorageType").enummodule - GetNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNfsShareRequest").msgclass - ListNfsSharesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesRequest").msgclass - ListNfsSharesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesResponse").msgclass - UpdateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNfsShareRequest").msgclass - RenameNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameNfsShareRequest").msgclass - CreateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateNfsShareRequest").msgclass - DeleteNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteNfsShareRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb deleted file mode 100644 index 2d966313407d..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/osimage.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n/google/cloud/baremetalsolution/v2/osimage.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x86\x02\n\x07OSImage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12!\n\x19\x61pplicable_instance_types\x18\x04 \x03(\t\x12#\n\x1bsupported_network_templates\x18\x05 \x03(\t:}\xea\x41z\n(baremetalsolution.googleapis.com/OsImage\x12;projects/{project}/locations/{location}/osImages/{os_image}*\x08osImages2\x07osImage\"w\n\x13ListOSImagesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n\x14ListOSImagesResponse\x12=\n\tos_images\x18\x01 \x03(\x0b\x32*.google.cloud.baremetalsolution.v2.OSImage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xfb\x01\n%com.google.cloud.baremetalsolution.v2B\x0cOsImageProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - OSImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.OSImage").msgclass - ListOSImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListOSImagesRequest").msgclass - ListOSImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListOSImagesResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb deleted file mode 100644 index 9167b7547176..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/provisioning.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/baremetalsolution/v2/common_pb' -require 'google/cloud/baremetalsolution/v2/network_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/baremetalsolution/v2/provisioning.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a/google/cloud/baremetalsolution/v2/network.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x12ProvisioningConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x02 \x03(\x0b\x32\x31.google.cloud.baremetalsolution.v2.InstanceConfig\x12\x42\n\x08networks\x18\x03 \x03(\x0b\x32\x30.google.cloud.baremetalsolution.v2.NetworkConfig\x12@\n\x07volumes\x18\x04 \x03(\x0b\x32/.google.cloud.baremetalsolution.v2.VolumeConfig\x12\x11\n\tticket_id\x18\x05 \x01(\t\x12 \n\x18handover_service_account\x18\x06 \x01(\t\x12\x11\n\x05\x65mail\x18\x07 \x01(\tB\x02\x18\x01\x12O\n\x05state\x18\x08 \x01(\x0e\x32;.google.cloud.baremetalsolution.v2.ProvisioningConfig.StateB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11\x63loud_console_uri\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0evpc_sc_enabled\x18\x0c \x01(\x08\x12\x16\n\x0estatus_message\x18\r \x01(\t\x12\x16\n\tcustom_id\x18\x0e \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\r\n\tSUBMITTED\x10\x02\x12\x10\n\x0cPROVISIONING\x10\x03\x12\x0f\n\x0bPROVISIONED\x10\x04\x12\r\n\tVALIDATED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07:\x8c\x01\xea\x41\x88\x01\n3baremetalsolution.googleapis.com/ProvisioningConfig\x12Qprojects/{project}/locations/{location}/provisioningConfigs/{provisioning_config}\"\xc9\x01\n\x1fSubmitProvisioningConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12W\n\x13provisioning_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\"v\n SubmitProvisioningConfigResponse\x12R\n\x13provisioning_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfig\"\xe7\x04\n\x11ProvisioningQuota\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12R\n\nasset_type\x18\x02 \x01(\x0e\x32>.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType\x12\x13\n\x0bgcp_service\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x17\n\x0f\x61vailable_count\x18\x05 \x01(\x05\x12J\n\x0einstance_quota\x18\x06 \x01(\x0b\x32\x30.google.cloud.baremetalsolution.v2.InstanceQuotaH\x00\x12\x16\n\x0cserver_count\x18\x07 \x01(\x03H\x01\x12\x1b\n\x11network_bandwidth\x18\x08 \x01(\x03H\x01\x12\x15\n\x0bstorage_gib\x18\t \x01(\x03H\x01\"n\n\tAssetType\x12\x1a\n\x16\x41SSET_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41SSET_TYPE_SERVER\x10\x01\x12\x16\n\x12\x41SSET_TYPE_STORAGE\x10\x02\x12\x16\n\x12\x41SSET_TYPE_NETWORK\x10\x03:\x89\x01\xea\x41\x85\x01\n2baremetalsolution.googleapis.com/ProvisioningQuota\x12Oprojects/{project}/locations/{location}/provisioningQuotas/{provisioning_quota}B\x07\n\x05quotaB\x0e\n\x0c\x61vailability\"\x81\x01\n\x1dListProvisioningQuotasRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8c\x01\n\x1eListProvisioningQuotasResponse\x12Q\n\x13provisioning_quotas\x18\x01 \x03(\x0b\x32\x34.google.cloud.baremetalsolution.v2.ProvisioningQuota\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe3\x06\n\x0eInstanceConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x15\n\rinstance_type\x18\x03 \x01(\t\x12\x16\n\x0ehyperthreading\x18\x04 \x01(\x08\x12\x10\n\x08os_image\x18\x05 \x01(\t\x12\\\n\x0e\x63lient_network\x18\x06 \x01(\x0b\x32@.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressB\x02\x18\x01\x12]\n\x0fprivate_network\x18\x07 \x01(\x0b\x32@.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressB\x02\x18\x01\x12\x11\n\tuser_note\x18\x08 \x01(\t\x12 \n\x18\x61\x63\x63ount_networks_enabled\x18\t \x01(\x08\x12W\n\x0enetwork_config\x18\n \x01(\x0e\x32?.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig\x12\x18\n\x10network_template\x18\x0b \x01(\t\x12O\n\x12logical_interfaces\x18\x0c \x03(\x0b\x32\x33.google.cloud.baremetalsolution.v2.LogicalInterface\x12\x15\n\rssh_key_names\x18\r \x03(\t\x1aR\n\x0eNetworkAddress\x12\x12\n\nnetwork_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x1b\n\x13\x65xisting_network_id\x18\x03 \x01(\t\"O\n\rNetworkConfig\x12\x1d\n\x19NETWORKCONFIG_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSINGLE_VLAN\x10\x01\x12\x0e\n\nMULTI_VLAN\x10\x02:\x7f\xea\x41|\n/baremetalsolution.googleapis.com/InstanceConfig\x12Iprojects/{project}/locations/{location}/instanceConfigs/{instance_config}\"\xf6\x08\n\x0cVolumeConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x19\n\x11snapshots_enabled\x18\x03 \x01(\x08\x12\x42\n\x04type\x18\x04 \x01(\x0e\x32\x34.google.cloud.baremetalsolution.v2.VolumeConfig.Type\x12J\n\x08protocol\x18\x05 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol\x12\x0f\n\x07size_gb\x18\x06 \x01(\x05\x12L\n\nlun_ranges\x18\x07 \x03(\x0b\x32\x38.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange\x12\x13\n\x0bmachine_ids\x18\x08 \x03(\t\x12N\n\x0bnfs_exports\x18\t \x03(\x0b\x32\x39.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport\x12\x11\n\tuser_note\x18\n \x01(\t\x12\x13\n\x0bgcp_service\x18\x0b \x01(\t\x12R\n\x10performance_tier\x18\x0c \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumePerformanceTier\x1a-\n\x08LunRange\x12\x10\n\x08quantity\x18\x01 \x01(\x05\x12\x0f\n\x07size_gb\x18\x02 \x01(\x05\x1a\xb5\x02\n\tNfsExport\x12\x12\n\nnetwork_id\x18\x01 \x01(\t\x12\x14\n\nmachine_id\x18\x02 \x01(\tH\x00\x12\x0e\n\x04\x63idr\x18\x03 \x01(\tH\x00\x12Z\n\x0bpermissions\x18\x04 \x01(\x0e\x32\x45.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions\x12\x16\n\x0eno_root_squash\x18\x05 \x01(\x08\x12\x12\n\nallow_suid\x18\x06 \x01(\x08\x12\x11\n\tallow_dev\x18\x07 \x01(\x08\"I\n\x0bPermissions\x12\x1b\n\x17PERMISSIONS_UNSPECIFIED\x10\x00\x12\r\n\tREAD_ONLY\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\x42\x08\n\x06\x63lient\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x46LASH\x10\x01\x12\x08\n\x04\x44ISK\x10\x02\"G\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROTOCOL_FC\x10\x01\x12\x10\n\x0cPROTOCOL_NFS\x10\x02:y\xea\x41v\n-baremetalsolution.googleapis.com/VolumeConfig\x12\x45projects/{project}/locations/{location}/volumeConfigs/{volume_config}\"\x9b\x07\n\rNetworkConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x43\n\x04type\x18\x03 \x01(\x0e\x32\x35.google.cloud.baremetalsolution.v2.NetworkConfig.Type\x12M\n\tbandwidth\x18\x04 \x01(\x0e\x32:.google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth\x12_\n\x10vlan_attachments\x18\x05 \x03(\x0b\x32\x45.google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment\x12\x0c\n\x04\x63idr\x18\x06 \x01(\t\x12R\n\x0cservice_cidr\x18\x07 \x01(\x0e\x32<.google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr\x12\x11\n\tuser_note\x18\x08 \x01(\t\x12\x13\n\x0bgcp_service\x18\t \x01(\t\x12\x19\n\x11vlan_same_project\x18\n \x01(\x08\x12\x1c\n\x14jumbo_frames_enabled\x18\x0b \x01(\x08\x1a\x37\n\x14IntakeVlanAttachment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bpairing_key\x18\x02 \x01(\t\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\"c\n\tBandwidth\x12\x19\n\x15\x42\x41NDWIDTH_UNSPECIFIED\x10\x00\x12\r\n\tBW_1_GBPS\x10\x01\x12\r\n\tBW_2_GBPS\x10\x02\x12\r\n\tBW_5_GBPS\x10\x03\x12\x0e\n\nBW_10_GBPS\x10\x04\"`\n\x0bServiceCidr\x12\x1c\n\x18SERVICE_CIDR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07HIGH_26\x10\x02\x12\x0b\n\x07HIGH_27\x10\x03\x12\x0b\n\x07HIGH_28\x10\x04:|\xea\x41y\n.baremetalsolution.googleapis.com/NetworkConfig\x12Gprojects/{project}/locations/{location}/networkConfigs/{network_config}\"\x83\x02\n\rInstanceQuota\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\rinstance_type\x18\x02 \x01(\tB\x02\x18\x01\x12\x13\n\x0bgcp_service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12\x1f\n\x17\x61vailable_machine_count\x18\x04 \x01(\x05:|\xea\x41y\n.baremetalsolution.googleapis.com/InstanceQuota\x12Gprojects/{project}/locations/{location}/instanceQuotas/{instance_quota}\"i\n\x1cGetProvisioningConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3baremetalsolution.googleapis.com/ProvisioningConfig\"\xc9\x01\n\x1f\x43reateProvisioningConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12W\n\x13provisioning_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x1fUpdateProvisioningConfigRequest\x12W\n\x13provisioning_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.baremetalsolution.v2.ProvisioningConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x80\x02\n%com.google.cloud.baremetalsolution.v2B\x11ProvisioningProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - ProvisioningConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningConfig").msgclass - ProvisioningConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningConfig.State").enummodule - SubmitProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest").msgclass - SubmitProvisioningConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SubmitProvisioningConfigResponse").msgclass - ProvisioningQuota = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningQuota").msgclass - ProvisioningQuota::AssetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType").enummodule - ListProvisioningQuotasRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest").msgclass - ListProvisioningQuotasResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListProvisioningQuotasResponse").msgclass - InstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig").msgclass - InstanceConfig::NetworkAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress").msgclass - InstanceConfig::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig").enummodule - VolumeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig").msgclass - VolumeConfig::LunRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.LunRange").msgclass - VolumeConfig::NfsExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport").msgclass - VolumeConfig::NfsExport::Permissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions").enummodule - VolumeConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.Type").enummodule - VolumeConfig::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeConfig.Protocol").enummodule - NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig").msgclass - NetworkConfig::IntakeVlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.IntakeVlanAttachment").msgclass - NetworkConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.Type").enummodule - NetworkConfig::Bandwidth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.Bandwidth").enummodule - NetworkConfig::ServiceCidr = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkConfig.ServiceCidr").enummodule - InstanceQuota = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.InstanceQuota").msgclass - GetProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest").msgclass - CreateProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest").msgclass - UpdateProvisioningConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb deleted file mode 100644 index 47a5792e89d8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/ssh_key.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n/google/cloud/baremetalsolution/v2/ssh_key.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x06SSHKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\npublic_key\x18\x02 \x01(\t:g\xea\x41\x64\n\'baremetalsolution.googleapis.com/SshKey\x12\x39projects/{project}/locations/{location}/sshKeys/{ssh_key}\"v\n\x12ListSSHKeysRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x13ListSSHKeysResponse\x12;\n\x08ssh_keys\x18\x01 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.SSHKey\x12\x17\n\x0fnext_page_token\x18Z \x01(\t\"\xaa\x01\n\x13\x43reateSSHKeyRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12?\n\x07ssh_key\x18\x02 \x01(\x0b\x32).google.cloud.baremetalsolution.v2.SSHKeyB\x03\xe0\x41\x02\x12\x17\n\nssh_key_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"T\n\x13\x44\x65leteSSHKeyRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/SshKeyB\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0bSshKeyProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - SSHKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.SSHKey").msgclass - ListSSHKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListSSHKeysRequest").msgclass - ListSSHKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListSSHKeysResponse").msgclass - CreateSSHKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateSSHKeyRequest").msgclass - DeleteSSHKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb deleted file mode 100644 index 1456dbe6e009..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/volume.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/baremetalsolution/v2/common_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/baremetalsolution/v2/volume.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/baremetalsolution/v2/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xec\x0e\n\x06Volume\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\n\n\x02id\x18\x0b \x01(\t\x12K\n\x0cstorage_type\x18\x02 \x01(\x0e\x32\x35.google.cloud.baremetalsolution.v2.Volume.StorageType\x12>\n\x05state\x18\x03 \x01(\x0e\x32/.google.cloud.baremetalsolution.v2.Volume.State\x12\x1a\n\x12requested_size_gib\x18\x04 \x01(\x03\x12%\n\x1doriginally_requested_size_gib\x18\x10 \x01(\x03\x12\x18\n\x10\x63urrent_size_gib\x18\x05 \x01(\x03\x12\x1a\n\x12\x65mergency_size_gib\x18\x0e \x01(\x03\x12\x14\n\x0cmax_size_gib\x18\x11 \x01(\x03\x12\x1b\n\x13\x61uto_grown_size_gib\x18\x06 \x01(\x03\x12\x1b\n\x13remaining_space_gib\x18\x07 \x01(\x03\x12h\n\x1bsnapshot_reservation_detail\x18\x08 \x01(\x0b\x32\x43.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail\x12k\n\x1dsnapshot_auto_delete_behavior\x18\t \x01(\x0e\x32\x44.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior\x12\x45\n\x06labels\x18\x0c \x03(\x0b\x32\x35.google.cloud.baremetalsolution.v2.Volume.LabelsEntry\x12\x18\n\x10snapshot_enabled\x18\r \x01(\x08\x12\x10\n\x03pod\x18\x0f \x01(\tB\x03\xe0\x41\x05\x12I\n\x08protocol\x18\x12 \x01(\x0e\x32\x32.google.cloud.baremetalsolution.v2.Volume.ProtocolB\x03\xe0\x41\x03\x12\x18\n\x0b\x62oot_volume\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x10performance_tier\x18\x14 \x01(\x0e\x32\x38.google.cloud.baremetalsolution.v2.VolumePerformanceTierB\x03\xe0\x41\x05\x12\x12\n\x05notes\x18\x15 \x01(\tB\x03\xe0\x41\x04\x12S\n\x10workload_profile\x18\x16 \x01(\x0e\x32\x39.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile\x12\x34\n\x0b\x65xpire_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x44\n\tinstances\x18\x19 \x03(\tB1\xe0\x41\x03\xfa\x41+\n)baremetalsolution.googleapis.com/Instance\x12\x15\n\x08\x61ttached\x18\x1a \x01(\x08\x42\x03\xe0\x41\x03\x1a\xa2\x01\n\x19SnapshotReservationDetail\x12\x1a\n\x12reserved_space_gib\x18\x01 \x01(\x03\x12#\n\x1breserved_space_used_percent\x18\x02 \x01(\x05\x12$\n\x1creserved_space_remaining_gib\x18\x03 \x01(\x03\x12\x1e\n\x16reserved_space_percent\x18\x04 \x01(\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08\x43OOL_OFF\x10\x05\"}\n\x1aSnapshotAutoDeleteBehavior\x12-\n)SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x10\n\x0cOLDEST_FIRST\x10\x02\x12\x10\n\x0cNEWEST_FIRST\x10\x03\"@\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x11\n\rFIBRE_CHANNEL\x10\x01\x12\x07\n\x03NFS\x10\x02\"J\n\x0fWorkloadProfile\x12 \n\x1cWORKLOAD_PROFILE_UNSPECIFIED\x10\x00\x12\x0b\n\x07GENERIC\x10\x01\x12\x08\n\x04HANA\x10\x02:f\xea\x41\x63\n\'baremetalsolution.googleapis.com/Volume\x12\x38projects/{project}/locations/{location}/volumes/{volume}\"Q\n\x10GetVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\"\x86\x01\n\x12ListVolumesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x7f\n\x13ListVolumesResponse\x12:\n\x07volumes\x18\x01 \x03(\x0b\x32).google.cloud.baremetalsolution.v2.Volume\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x86\x01\n\x13UpdateVolumeRequest\x12>\n\x06volume\x18\x01 \x01(\x0b\x32).google.cloud.baremetalsolution.v2.VolumeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"p\n\x13RenameVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x1a\n\rnew_volume_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"S\n\x12\x45victVolumeRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\"h\n\x13ResizeVolumeRequest\x12?\n\x06volume\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x10\n\x08size_gib\x18\x02 \x01(\x03\x42\xfa\x01\n%com.google.cloud.baremetalsolution.v2B\x0bVolumeProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume").msgclass - Volume::SnapshotReservationDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail").msgclass - Volume::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.StorageType").enummodule - Volume::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.State").enummodule - Volume::SnapshotAutoDeleteBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior").enummodule - Volume::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.Protocol").enummodule - Volume::WorkloadProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.WorkloadProfile").enummodule - GetVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeRequest").msgclass - ListVolumesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesRequest").msgclass - ListVolumesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesResponse").msgclass - UpdateVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateVolumeRequest").msgclass - RenameVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RenameVolumeRequest").msgclass - EvictVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.EvictVolumeRequest").msgclass - ResizeVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResizeVolumeRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb deleted file mode 100644 index 6dfa4dbe4766..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/baremetalsolution/v2/volume_snapshot.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n7google/cloud/baremetalsolution/v2/volume_snapshot.proto\x12!google.cloud.baremetalsolution.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\x03\n\x0eVolumeSnapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x0estorage_volume\x18\x05 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12Q\n\x04type\x18\x07 \x01(\x0e\x32>.google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotTypeB\x03\xe0\x41\x03\"H\n\x0cSnapshotType\x12\x1d\n\x19SNAPSHOT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x44_HOC\x10\x01\x12\r\n\tSCHEDULED\x10\x02:\x84\x01\xea\x41\x80\x01\n/baremetalsolution.googleapis.com/VolumeSnapshot\x12Mprojects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}\"a\n\x18GetVolumeSnapshotRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshot\"\x84\x01\n\x1aListVolumeSnapshotsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1bListVolumeSnapshotsResponse\x12K\n\x10volume_snapshots\x18\x01 \x03(\x0b\x32\x31.google.cloud.baremetalsolution.v2.VolumeSnapshot\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1b\x44\x65leteVolumeSnapshotRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshot\"\xaf\x01\n\x1b\x43reateVolumeSnapshotRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'baremetalsolution.googleapis.com/Volume\x12O\n\x0fvolume_snapshot\x18\x02 \x01(\x0b\x32\x31.google.cloud.baremetalsolution.v2.VolumeSnapshotB\x03\xe0\x41\x02\"p\n\x1cRestoreVolumeSnapshotRequest\x12P\n\x0fvolume_snapshot\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/baremetalsolution.googleapis.com/VolumeSnapshotB\x82\x02\n%com.google.cloud.baremetalsolution.v2B\x13VolumeSnapshotProtoP\x01ZScloud.google.com/go/baremetalsolution/apiv2/baremetalsolutionpb;baremetalsolutionpb\xaa\x02!Google.Cloud.BareMetalSolution.V2\xca\x02!Google\\Cloud\\BareMetalSolution\\V2\xea\x02$Google::Cloud::BareMetalSolution::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BareMetalSolution - module V2 - VolumeSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeSnapshot").msgclass - VolumeSnapshot::SnapshotType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VolumeSnapshot.SnapshotType").enummodule - GetVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest").msgclass - ListVolumeSnapshotsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest").msgclass - ListVolumeSnapshotsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse").msgclass - DeleteVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest").msgclass - CreateVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest").msgclass - RestoreVolumeSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md deleted file mode 100644 index 60e71df2a508..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Bare Metal Solution V2 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb deleted file mode 100644 index 78d8f06ad169..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # Represents the metadata from a long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the action executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user requested the cancellation - # of the operation. Operations that have been successfully cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used with the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message from resetting a server. - class ResetInstanceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb deleted file mode 100644 index 0213f58e1483..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/common.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # Performance tier of the Volume. - module VolumePerformanceTier - # Value is not specified. - VOLUME_PERFORMANCE_TIER_UNSPECIFIED = 0 - - # Regular volumes, shared aggregates. - VOLUME_PERFORMANCE_TIER_SHARED = 1 - - # Assigned aggregates. - VOLUME_PERFORMANCE_TIER_ASSIGNED = 2 - - # High throughput aggregates. - VOLUME_PERFORMANCE_TIER_HT = 3 - end - - # The possible values for a workload profile. - module WorkloadProfile - # The workload profile is in an unknown state. - WORKLOAD_PROFILE_UNSPECIFIED = 0 - - # The workload profile is generic. - WORKLOAD_PROFILE_GENERIC = 1 - - # The workload profile is hana. - WORKLOAD_PROFILE_HANA = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb deleted file mode 100644 index 71f94868fea9..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/instance.rb +++ /dev/null @@ -1,354 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A server. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of this `Instance`. - # Resource names are schemeless URIs that follow the conventions in - # https://cloud.google.com/apis/design/resource_names. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [r] id - # @return [::String] - # Output only. An identifier for the `Instance`, generated by the backend. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create a time stamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update a time stamp. - # @!attribute [rw] machine_type - # @return [::String] - # Immutable. The server type. - # [Available server - # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - # @!attribute [r] state - # @return [::Google::Cloud::BareMetalSolution::V2::Instance::State] - # Output only. The state of the server. - # @!attribute [rw] hyperthreading_enabled - # @return [::Boolean] - # True if you enable hyperthreading for the server, otherwise false. - # The default value is false. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] luns - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Lun>] - # Immutable. List of LUNs associated with this server. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Volume>] - # Input only. List of Volumes to attach to this Instance on creation. - # This field won't be populated in Get/List responses. - # @!attribute [r] networks - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Network>] - # Output only. List of networks associated with this server. - # @!attribute [r] interactive_serial_console_enabled - # @return [::Boolean] - # Output only. True if the interactive serial console feature is enabled for - # the instance, false otherwise. The default value is false. - # @!attribute [rw] os_image - # @return [::String] - # The OS image currently installed on the server. - # @!attribute [rw] pod - # @return [::String] - # Immutable. Pod name. - # Pod is an independent part of infrastructure. - # Instance can be connected to the assets (networks, volumes) allocated - # in the same pod only. - # @!attribute [rw] network_template - # @return [::String] - # Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. - # Generally, the template name follows the syntax of - # "bond" or "nic". - # @!attribute [rw] logical_interfaces - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface>] - # List of logical interfaces for the instance. The number of logical - # interfaces will be the same as number of hardware bond/nic on the chosen - # network template. For the non-multivlan configurations (for eg, existing - # servers) that use existing default network template (bondaa-bondaa), both - # the Instance.networks field and the Instance.logical_interfaces fields will - # be filled to ensure backward compatibility. For the others, only - # Instance.logical_interfaces will be filled. - # @!attribute [r] login_info - # @return [::String] - # Output only. Text field about info for logging in. - # @!attribute [rw] workload_profile - # @return [::Google::Cloud::BareMetalSolution::V2::WorkloadProfile] - # The workload profile for the instance. - # @!attribute [r] firmware_version - # @return [::String] - # Output only. The firmware version for the instance. - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible states for this server. - module State - # The server is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The server is being provisioned. - PROVISIONING = 1 - - # The server is running. - RUNNING = 2 - - # The server has been deleted. - DELETED = 3 - - # The server is being updated. - UPDATING = 4 - - # The server is starting. - STARTING = 5 - - # The server is stopping. - STOPPING = 6 - - # The server is shutdown. - SHUTDOWN = 7 - end - end - - # Message for requesting server information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of servers. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListInstancesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListInstancesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the list of servers. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Instance>] - # The list of servers. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListInstancesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to updating a server. - # @!attribute [rw] instance - # @return [::Google::Cloud::BareMetalSolution::V2::Instance] - # Required. The server to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # The currently supported fields are: - # `labels` - # `hyperthreading_enabled` - # `os_image` - class UpdateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting rename of a server. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the instance. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] new_instance_id - # @return [::String] - # Required. The new `id` of the instance. - class RenameInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to reset a server. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class ResetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to start a server. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class StartInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message from starting a server. - class StartInstanceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to stop a server. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class StopInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message from stopping a server. - class StopInstanceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for enabling the interactive serial console on an instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class EnableInteractiveSerialConsoleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response of EnableInteractiveSerialConsole. - class EnableInteractiveSerialConsoleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for disabling the interactive serial console on an instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class DisableInteractiveSerialConsoleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response of DisableInteractiveSerialConsole. - class DisableInteractiveSerialConsoleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for detach specific LUN from an Instance. - # @!attribute [rw] instance - # @return [::String] - # Required. Name of the instance. - # @!attribute [rw] lun - # @return [::String] - # Required. Name of the Lun to detach. - # @!attribute [rw] skip_reboot - # @return [::Boolean] - # If true, performs lun unmapping without instance reboot. - class DetachLunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Network template. - # @!attribute [r] name - # @return [::String] - # Output only. Template's unique name. The full resource name follows the - # pattern: - # `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` - # Generally, the \\{server_network_template} follows the syntax of - # "bond" or "nic". - # @!attribute [rw] applicable_instance_types - # @return [::Array<::String>] - # Instance types this template is applicable to. - # @!attribute [rw] logical_interfaces - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::ServerNetworkTemplate::LogicalInterface>] - # Logical interfaces. - class ServerNetworkTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Logical interface. - # @!attribute [rw] name - # @return [::String] - # Interface name. - # This is not a globally unique identifier. - # Name is unique only inside the ServerNetworkTemplate. This is of syntax - # or - # and forms part of the network template name. - # @!attribute [rw] type - # @return [::Google::Cloud::BareMetalSolution::V2::ServerNetworkTemplate::LogicalInterface::InterfaceType] - # Interface type. - # @!attribute [rw] required - # @return [::Boolean] - # If true, interface must have network connected. - class LogicalInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Interface type. - module InterfaceType - # Unspecified value. - INTERFACE_TYPE_UNSPECIFIED = 0 - - # Bond interface type. - BOND = 1 - - # NIC interface type. - NIC = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb deleted file mode 100644 index f7a9d2d4263b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/lun.rb +++ /dev/null @@ -1,161 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A storage volume logical unit number (LUN). - # @!attribute [r] name - # @return [::String] - # Output only. The name of the LUN. - # @!attribute [rw] id - # @return [::String] - # An identifier for the LUN, generated by the backend. - # @!attribute [rw] state - # @return [::Google::Cloud::BareMetalSolution::V2::Lun::State] - # The state of this storage volume. - # @!attribute [rw] size_gb - # @return [::Integer] - # The size of this LUN, in gigabytes. - # @!attribute [rw] multiprotocol_type - # @return [::Google::Cloud::BareMetalSolution::V2::Lun::MultiprotocolType] - # The LUN multiprotocol type ensures the characteristics of the LUN are - # optimized for each operating system. - # @!attribute [rw] storage_volume - # @return [::String] - # Display the storage volume for this LUN. - # @!attribute [rw] shareable - # @return [::Boolean] - # Display if this LUN can be shared between multiple physical servers. - # @!attribute [rw] boot_lun - # @return [::Boolean] - # Display if this LUN is a boot LUN. - # @!attribute [rw] storage_type - # @return [::Google::Cloud::BareMetalSolution::V2::Lun::StorageType] - # The storage type for this LUN. - # @!attribute [rw] wwid - # @return [::String] - # The WWID for this LUN. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time after which LUN will be fully deleted. - # It is filled only for LUNs in COOL_OFF state. - # @!attribute [r] instances - # @return [::Array<::String>] - # Output only. Instances this Lun is attached to. - class Lun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states for the LUN. - module State - # The LUN is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The LUN is being created. - CREATING = 1 - - # The LUN is being updated. - UPDATING = 2 - - # The LUN is ready for use. - READY = 3 - - # The LUN has been requested to be deleted. - DELETING = 4 - - # The LUN is in cool off state. It will be deleted after `expire_time`. - COOL_OFF = 5 - end - - # Display the operating systems present for the LUN multiprotocol type. - module MultiprotocolType - # Server has no OS specified. - MULTIPROTOCOL_TYPE_UNSPECIFIED = 0 - - # Server with Linux OS. - LINUX = 1 - end - - # The storage types for a LUN. - module StorageType - # The storage type for this LUN is unknown. - STORAGE_TYPE_UNSPECIFIED = 0 - - # This storage type for this LUN is SSD. - SSD = 1 - - # This storage type for this LUN is HDD. - HDD = 2 - end - end - - # Message for requesting storage lun information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetLunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of storage volume luns. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListLunsRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - class ListLunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of storage volume luns. - # @!attribute [rw] luns - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Lun>] - # The list of luns. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for skip lun cooloff and delete it. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the lun. - class EvictLunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb deleted file mode 100644 index 8448a21a3ceb..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/network.rb +++ /dev/null @@ -1,379 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A Network. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of this `Network`. - # Resource names are schemeless URIs that follow the conventions in - # https://cloud.google.com/apis/design/resource_names. - # Format: - # `projects/{project}/locations/{location}/networks/{network}` - # @!attribute [rw] id - # @return [::String] - # An identifier for the `Network`, generated by the backend. - # @!attribute [rw] type - # @return [::Google::Cloud::BareMetalSolution::V2::Network::Type] - # The type of this network. - # @!attribute [rw] ip_address - # @return [::String] - # IP address configured. - # @!attribute [rw] mac_address - # @return [::Array<::String>] - # List of physical interfaces. - # @!attribute [rw] state - # @return [::Google::Cloud::BareMetalSolution::V2::Network::State] - # The Network state. - # @!attribute [rw] vlan_id - # @return [::String] - # The vlan id of the Network. - # @!attribute [rw] cidr - # @return [::String] - # The cidr of the Network. - # @!attribute [rw] vrf - # @return [::Google::Cloud::BareMetalSolution::V2::VRF] - # The vrf for the Network. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] services_cidr - # @return [::String] - # IP range for reserved for services (e.g. NFS). - # @!attribute [rw] reservations - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkAddressReservation>] - # List of IP address reservations in this network. - # When updating this field, an error will be generated if a reservation - # conflicts with an IP address already allocated to a physical server. - # @!attribute [r] pod - # @return [::String] - # Output only. Pod name. - # @!attribute [rw] mount_points - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkMountPoint>] - # Input only. List of mount points to attach the network to. - # @!attribute [rw] jumbo_frames_enabled - # @return [::Boolean] - # Whether network uses standard frames or jumbo ones. - # @!attribute [r] gateway_ip - # @return [::String] - # Output only. Gateway ip address. - class Network - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Network type. - module Type - # Unspecified value. - TYPE_UNSPECIFIED = 0 - - # Client network, a network peered to a Google Cloud VPC. - CLIENT = 1 - - # Private network, a network local to the Bare Metal Solution environment. - PRIVATE = 2 - end - - # The possible states for this Network. - module State - # The Network is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The Network is provisioning. - PROVISIONING = 1 - - # The Network has been provisioned. - PROVISIONED = 2 - - # The Network is being deprovisioned. - DEPROVISIONING = 3 - - # The Network is being updated. - UPDATING = 4 - end - end - - # A reservation of one or more addresses in a network. - # @!attribute [rw] start_address - # @return [::String] - # The first address of this reservation block. - # Must be specified as a single IPv4 address, e.g. 10.1.2.2. - # @!attribute [rw] end_address - # @return [::String] - # The last address of this reservation block, inclusive. I.e., for cases when - # reservations are only single addresses, end_address and start_address will - # be the same. - # Must be specified as a single IPv4 address, e.g. 10.1.2.2. - # @!attribute [rw] note - # @return [::String] - # A note about this reservation, intended for human consumption. - class NetworkAddressReservation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A network VRF. - # @!attribute [rw] name - # @return [::String] - # The name of the VRF. - # @!attribute [rw] state - # @return [::Google::Cloud::BareMetalSolution::V2::VRF::State] - # The possible state of VRF. - # @!attribute [rw] qos_policy - # @return [::Google::Cloud::BareMetalSolution::V2::VRF::QosPolicy] - # The QOS policy applied to this VRF. - # The value is only meaningful when all the vlan attachments have the same - # QoS. This field should not be used for new integrations, use vlan - # attachment level qos instead. The field is left for backward-compatibility. - # @!attribute [rw] vlan_attachments - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VRF::VlanAttachment>] - # The list of VLAN attachments for the VRF. - class VRF - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # QOS policy parameters. - # @!attribute [rw] bandwidth_gbps - # @return [::Float] - # The bandwidth permitted by the QOS policy, in gbps. - class QosPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # VLAN attachment details. - # @!attribute [rw] peer_vlan_id - # @return [::Integer] - # The peer vlan ID of the attachment. - # @!attribute [rw] peer_ip - # @return [::String] - # The peer IP of the attachment. - # @!attribute [rw] router_ip - # @return [::String] - # The router IP of the attachment. - # @!attribute [rw] pairing_key - # @return [::String] - # Input only. Pairing key. - # @!attribute [rw] qos_policy - # @return [::Google::Cloud::BareMetalSolution::V2::VRF::QosPolicy] - # The QOS policy applied to this VLAN attachment. - # This value should be preferred to using qos at vrf level. - # @!attribute [rw] id - # @return [::String] - # Immutable. The identifier of the attachment within vrf. - # @!attribute [rw] interconnect_attachment - # @return [::String] - # Optional. The name of the vlan attachment within vrf. This is of the form - # projects/\\{project_number}/regions/\\{region}/interconnectAttachments/\\{interconnect_attachment} - class VlanAttachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible states for this VRF. - module State - # The unspecified state. - STATE_UNSPECIFIED = 0 - - # The vrf is provisioning. - PROVISIONING = 1 - - # The vrf is provisioned. - PROVISIONED = 2 - end - end - - # Each logical interface represents a logical abstraction of the underlying - # physical interface (for eg. bond, nic) of the instance. Each logical - # interface can effectively map to multiple network-IP pairs and still be - # mapped to one underlying physical interface. - # @!attribute [rw] logical_network_interfaces - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface::LogicalNetworkInterface>] - # List of logical network interfaces within a logical interface. - # @!attribute [rw] name - # @return [::String] - # Interface name. This is of syntax or and - # forms part of the network template name. - # @!attribute [rw] interface_index - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # The index of the logical interface mapping to the index of the hardware - # bond or nic on the chosen network template. This field is deprecated. - class LogicalInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Each logical network interface is effectively a network and IP pair. - # @!attribute [rw] network - # @return [::String] - # Name of the network - # @!attribute [rw] ip_address - # @return [::String] - # IP address in the network - # @!attribute [rw] default_gateway - # @return [::Boolean] - # Whether this interface is the default gateway for the instance. Only - # one interface can be the default gateway for the instance. - # @!attribute [rw] network_type - # @return [::Google::Cloud::BareMetalSolution::V2::Network::Type] - # Type of network. - # @!attribute [rw] id - # @return [::String] - # An identifier for the `Network`, generated by the backend. - class LogicalNetworkInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Message for requesting network information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetNetworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of networks. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListNetworksRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListNetworksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of networks. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Network>] - # The list of networks. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListNetworksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to updating a network. - # @!attribute [rw] network - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # Required. The network to update. - # - # The `name` field is used to identify the instance to update. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # The only currently supported fields are: - # `labels`, `reservations`, `vrf.vlan_attachments` - class UpdateNetworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Network with all used IP addresses. - # @!attribute [rw] network - # @return [::Google::Cloud::BareMetalSolution::V2::Network] - # Network. - # @!attribute [rw] used_ips - # @return [::Array<::String>] - # All used IP addresses in this network. - class NetworkUsage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get networks with IPs. - # @!attribute [rw] location - # @return [::String] - # Required. Parent value (project and location). - class ListNetworkUsageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response with Networks with IPs - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkUsage>] - # Networks with IPs. - class ListNetworkUsageResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Mount point for a network. - # @!attribute [rw] instance - # @return [::String] - # Instance to attach network to. - # @!attribute [rw] logical_interface - # @return [::String] - # Logical interface to detach from. - # @!attribute [rw] default_gateway - # @return [::Boolean] - # Network should be a default gateway. - # @!attribute [rw] ip_address - # @return [::String] - # Ip address of the server. - class NetworkMountPoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting rename of a server. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the network. - # Format: projects/\\{project}/locations/\\{location}/networks/\\{network} - # @!attribute [rw] new_network_id - # @return [::String] - # Required. The new `id` of the network. - class RenameNetworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb deleted file mode 100644 index a40034963b4f..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb +++ /dev/null @@ -1,243 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # An NFS share. - # @!attribute [rw] name - # @return [::String] - # Immutable. The name of the NFS share. - # @!attribute [r] nfs_share_id - # @return [::String] - # Output only. An identifier for the NFS share, generated by the backend. - # This field will be deprecated in the future, use `id` instead. - # @!attribute [r] id - # @return [::String] - # Output only. An identifier for the NFS share, generated by the backend. - # This is the same value as nfs_share_id and will replace it in the future. - # @!attribute [r] state - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::State] - # Output only. The state of the NFS share. - # @!attribute [r] volume - # @return [::String] - # Output only. The underlying volume of the share. Created automatically - # during provisioning. - # @!attribute [rw] allowed_clients - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NfsShare::AllowedClient>] - # List of allowed access points. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] requested_size_gib - # @return [::Integer] - # The requested size, in GiB. - # @!attribute [rw] storage_type - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::StorageType] - # Immutable. The storage type of the underlying volume. - class NfsShare - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an 'access point' for the share. - # @!attribute [rw] network - # @return [::String] - # The network the access point sits on. - # @!attribute [r] share_ip - # @return [::String] - # Output only. The IP address of the share on this network. Assigned - # automatically during provisioning based on the network's services_cidr. - # @!attribute [rw] allowed_clients_cidr - # @return [::String] - # The subnet of IP addresses permitted to access the share. - # @!attribute [rw] mount_permissions - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare::MountPermissions] - # Mount permissions. - # @!attribute [rw] allow_dev - # @return [::Boolean] - # Allow dev flag. Which controls whether to allow creation of devices. - # @!attribute [rw] allow_suid - # @return [::Boolean] - # Allow the setuid flag. - # @!attribute [rw] no_root_squash - # @return [::Boolean] - # Disable root squashing, which is a feature of NFS. - # Root squash is a special mapping of the remote superuser (root) identity - # when using identity authentication. - # @!attribute [r] nfs_path - # @return [::String] - # Output only. The path to access NFS, in format shareIP:/InstanceID - # InstanceID is the generated ID instead of customer provided name. - # example like "10.0.0.0:/g123456789-nfs001" - class AllowedClient - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible states for this NFS share. - module State - # The share is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The share has been provisioned. - PROVISIONED = 1 - - # The NFS Share is being created. - CREATING = 2 - - # The NFS Share is being updated. - UPDATING = 3 - - # The NFS Share has been requested to be deleted. - DELETING = 4 - end - - # The possible mount permissions. - module MountPermissions - # Permissions were not specified. - MOUNT_PERMISSIONS_UNSPECIFIED = 0 - - # NFS share can be mount with read-only permissions. - READ = 1 - - # NFS share can be mount with read-write permissions. - READ_WRITE = 2 - end - - # The storage type for a volume. - module StorageType - # The storage type for this volume is unknown. - STORAGE_TYPE_UNSPECIFIED = 0 - - # The storage type for this volume is SSD. - SSD = 1 - - # This storage type for this volume is HDD. - HDD = 2 - end - end - - # Message for requesting NFS share information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of NFS shares. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListNfsSharesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListNfsSharesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of NFS shares. - # @!attribute [rw] nfs_shares - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NfsShare>] - # The list of NFS shares. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListNfsSharesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting to updating an NFS share. - # @!attribute [rw] nfs_share - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # Required. The NFS share to update. - # - # The `name` field is used to identify the NFS share to update. - # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # The only currently supported fields are: - # `labels` - # `allowed_clients` - class UpdateNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting rename of a server. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the nfsshare. - # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare} - # @!attribute [rw] new_nfsshare_id - # @return [::String] - # Required. The new `id` of the nfsshare. - class RenameNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating an NFS share. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project and location. - # @!attribute [rw] nfs_share - # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare] - # Required. The NfsShare to create. - class CreateNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting an NFS share. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the NFS share to delete. - class DeleteNfsShareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb deleted file mode 100644 index b4785e50e209..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # Operation System image. - # @!attribute [r] name - # @return [::String] - # Output only. OS Image's unique name. - # @!attribute [rw] code - # @return [::String] - # OS Image code. - # @!attribute [rw] description - # @return [::String] - # OS Image description. - # @!attribute [rw] applicable_instance_types - # @return [::Array<::String>] - # Instance types this image is applicable to. - # [Available - # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - # @!attribute [rw] supported_network_templates - # @return [::Array<::String>] - # Network templates that can be used with this OS Image. - class OSImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting all available OS images. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListProvisioningQuotasRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - class ListOSImagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting all available OS images. - # @!attribute [rw] os_images - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::OSImage>] - # The OS images available. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListOSImagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb deleted file mode 100644 index 423eea65f0f8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb +++ /dev/null @@ -1,603 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A provisioning configuration. - # @!attribute [r] name - # @return [::String] - # Output only. The system-generated name of the provisioning config. This - # follows the UUID format. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::InstanceConfig>] - # Instances to be created. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkConfig>] - # Networks to be created. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig>] - # Volumes to be created. - # @!attribute [rw] ticket_id - # @return [::String] - # A generated ticket id to track provisioning request. - # @!attribute [rw] handover_service_account - # @return [::String] - # A service account to enable customers to access instance credentials upon - # handover. - # @!attribute [rw] email - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Email provided to send a confirmation with provisioning config to. - # Deprecated in favour of email field in request messages. - # @!attribute [r] state - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig::State] - # Output only. State of ProvisioningConfig. - # @!attribute [rw] location - # @return [::String] - # Optional. Location name of this ProvisioningConfig. - # It is optional only for Intake UI transition period. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [r] cloud_console_uri - # @return [::String] - # Output only. URI to Cloud Console UI view of this provisioning config. - # @!attribute [rw] vpc_sc_enabled - # @return [::Boolean] - # If true, VPC SC is enabled for the cluster. - # @!attribute [rw] status_message - # @return [::String] - # Optional status messages associated with the FAILED state. - # @!attribute [rw] custom_id - # @return [::String] - # Optional. The user-defined identifier of the provisioning config. - class ProvisioningConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states for this ProvisioningConfig. - module State - # State wasn't specified. - STATE_UNSPECIFIED = 0 - - # ProvisioningConfig is a draft and can be freely modified. - DRAFT = 1 - - # ProvisioningConfig was already submitted and cannot be modified. - SUBMITTED = 2 - - # ProvisioningConfig was in the provisioning state. Initially this state - # comes from the work order table in big query when SNOW is used. Later - # this field can be set by the work order API. - PROVISIONING = 3 - - # ProvisioningConfig was provisioned, meaning the resources exist. - PROVISIONED = 4 - - # ProvisioningConfig was validated. A validation tool will be run to - # set this state. - VALIDATED = 5 - - # ProvisioningConfig was canceled. - CANCELLED = 6 - - # The request is submitted for provisioning, with error return. - FAILED = 7 - end - end - - # Request for SubmitProvisioningConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @!attribute [rw] provisioning_config - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # Required. The ProvisioningConfig to create. - # @!attribute [rw] email - # @return [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - class SubmitProvisioningConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for SubmitProvisioningConfig. - # @!attribute [rw] provisioning_config - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # The submitted provisioning config. - class SubmitProvisioningConfigResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A provisioning quota for a given project. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the provisioning quota. - # @!attribute [rw] asset_type - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota::AssetType] - # The asset type of this provisioning quota. - # @!attribute [rw] gcp_service - # @return [::String] - # The gcp service of the provisioning quota. - # @!attribute [rw] location - # @return [::String] - # The specific location of the provisioining quota. - # @!attribute [rw] available_count - # @return [::Integer] - # The available count of the provisioning quota. - # @!attribute [rw] instance_quota - # @return [::Google::Cloud::BareMetalSolution::V2::InstanceQuota] - # Instance quota. - # @!attribute [rw] server_count - # @return [::Integer] - # Server count. - # - # Note: The following fields are mutually exclusive: `server_count`, `network_bandwidth`, `storage_gib`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] network_bandwidth - # @return [::Integer] - # Network bandwidth, Gbps - # - # Note: The following fields are mutually exclusive: `network_bandwidth`, `server_count`, `storage_gib`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] storage_gib - # @return [::Integer] - # Storage size (GB). - # - # Note: The following fields are mutually exclusive: `storage_gib`, `server_count`, `network_bandwidth`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ProvisioningQuota - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The available asset types for intake. - module AssetType - # The unspecified type. - ASSET_TYPE_UNSPECIFIED = 0 - - # The server asset type. - ASSET_TYPE_SERVER = 1 - - # The storage asset type. - ASSET_TYPE_STORAGE = 2 - - # The network asset type. - ASSET_TYPE_NETWORK = 3 - end - end - - # Message for requesting the list of provisioning quotas. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListProvisioningQuotasRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # Notice that page_size field is not supported and won't be respected in - # the API request for now, will be updated when pagination is supported. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - class ListProvisioningQuotasRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the list of provisioning quotas. - # @!attribute [rw] provisioning_quotas - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>] - # The provisioning quotas registered in this project. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListProvisioningQuotasResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration parameters for a new instance. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the instance config. - # @!attribute [rw] id - # @return [::String] - # A transient unique identifier to idenfity an instance within an - # ProvisioningConfig request. - # @!attribute [rw] instance_type - # @return [::String] - # Instance type. - # [Available - # types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - # @!attribute [rw] hyperthreading - # @return [::Boolean] - # Whether the instance should be provisioned with Hyperthreading enabled. - # @!attribute [rw] os_image - # @return [::String] - # OS image to initialize the instance. - # [Available - # images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - # @!attribute [rw] client_network - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkAddress] - # Client network address. Filled if InstanceConfig.multivlan_config is false. - # @!attribute [rw] private_network - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkAddress] - # Private network address, if any. Filled if InstanceConfig.multivlan_config - # is false. - # @!attribute [rw] user_note - # @return [::String] - # User note field, it can be used by customers to add additional information - # for the BMS Ops team . - # @!attribute [rw] account_networks_enabled - # @return [::Boolean] - # If true networks can be from different projects of the same vendor account. - # @!attribute [rw] network_config - # @return [::Google::Cloud::BareMetalSolution::V2::InstanceConfig::NetworkConfig] - # The type of network configuration on the instance. - # @!attribute [rw] network_template - # @return [::String] - # Server network template name. Filled if InstanceConfig.multivlan_config is - # true. - # @!attribute [rw] logical_interfaces - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::LogicalInterface>] - # List of logical interfaces for the instance. The number of logical - # interfaces will be the same as number of hardware bond/nic on the chosen - # network template. Filled if InstanceConfig.multivlan_config is true. - # @!attribute [rw] ssh_key_names - # @return [::Array<::String>] - # List of names of ssh keys used to provision the instance. - class InstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A network. - # @!attribute [rw] network_id - # @return [::String] - # Id of the network to use, within the same ProvisioningConfig request. - # @!attribute [rw] address - # @return [::String] - # IPv4 address to be assigned to the server. - # @!attribute [rw] existing_network_id - # @return [::String] - # Name of the existing network to use. - class NetworkAddress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The network configuration of the instance. - module NetworkConfig - # The unspecified network configuration. - NETWORKCONFIG_UNSPECIFIED = 0 - - # Instance part of single client network and single private network. - SINGLE_VLAN = 1 - - # Instance part of multiple (or single) client networks and private - # networks. - MULTI_VLAN = 2 - end - end - - # Configuration parameters for a new volume. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the volume config. - # @!attribute [rw] id - # @return [::String] - # A transient unique identifier to identify a volume within an - # ProvisioningConfig request. - # @!attribute [rw] snapshots_enabled - # @return [::Boolean] - # Whether snapshots should be enabled. - # @!attribute [rw] type - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::Type] - # The type of this Volume. - # @!attribute [rw] protocol - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::Protocol] - # Volume protocol. - # @!attribute [rw] size_gb - # @return [::Integer] - # The requested size of this volume, in GB. - # @!attribute [rw] lun_ranges - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig::LunRange>] - # LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. - # @!attribute [rw] machine_ids - # @return [::Array<::String>] - # Machine ids connected to this volume. Set only when protocol is - # PROTOCOL_FC. - # @!attribute [rw] nfs_exports - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeConfig::NfsExport>] - # NFS exports. Set only when protocol is PROTOCOL_NFS. - # @!attribute [rw] user_note - # @return [::String] - # User note field, it can be used by customers to add additional information - # for the BMS Ops team . - # @!attribute [rw] gcp_service - # @return [::String] - # The GCP service of the storage volume. Available gcp_service are in - # https://cloud.google.com/bare-metal/docs/bms-planning. - # @!attribute [rw] performance_tier - # @return [::Google::Cloud::BareMetalSolution::V2::VolumePerformanceTier] - # Performance tier of the Volume. - # Default is SHARED. - class VolumeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A LUN(Logical Unit Number) range. - # @!attribute [rw] quantity - # @return [::Integer] - # Number of LUNs to create. - # @!attribute [rw] size_gb - # @return [::Integer] - # The requested size of each LUN, in GB. - class LunRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A NFS export entry. - # @!attribute [rw] network_id - # @return [::String] - # Network to use to publish the export. - # @!attribute [rw] machine_id - # @return [::String] - # Either a single machine, identified by an ID, or a comma-separated - # list of machine IDs. - # - # Note: The following fields are mutually exclusive: `machine_id`, `cidr`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cidr - # @return [::String] - # A CIDR range. - # - # Note: The following fields are mutually exclusive: `cidr`, `machine_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] permissions - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeConfig::NfsExport::Permissions] - # Export permissions. - # @!attribute [rw] no_root_squash - # @return [::Boolean] - # Disable root squashing, which is a feature of NFS. - # Root squash is a special mapping of the remote superuser (root) identity - # when using identity authentication. - # @!attribute [rw] allow_suid - # @return [::Boolean] - # Allow the setuid flag. - # @!attribute [rw] allow_dev - # @return [::Boolean] - # Allow dev flag in NfsShare AllowedClientsRequest. - class NfsExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Permissions that can granted for an export. - module Permissions - # Unspecified value. - PERMISSIONS_UNSPECIFIED = 0 - - # Read-only permission. - READ_ONLY = 1 - - # Read-write permission. - READ_WRITE = 2 - end - end - - # The types of Volumes. - module Type - # The unspecified type. - TYPE_UNSPECIFIED = 0 - - # This Volume is on flash. - FLASH = 1 - - # This Volume is on disk. - DISK = 2 - end - - # The protocol used to access the volume. - module Protocol - # Unspecified value. - PROTOCOL_UNSPECIFIED = 0 - - # Fibre channel. - PROTOCOL_FC = 1 - - # Network file system. - PROTOCOL_NFS = 2 - end - end - - # Configuration parameters for a new network. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the network config. - # @!attribute [rw] id - # @return [::String] - # A transient unique identifier to identify a volume within an - # ProvisioningConfig request. - # @!attribute [rw] type - # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::Type] - # The type of this network, either Client or Private. - # @!attribute [rw] bandwidth - # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::Bandwidth] - # Interconnect bandwidth. Set only when type is CLIENT. - # @!attribute [rw] vlan_attachments - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::NetworkConfig::IntakeVlanAttachment>] - # List of VLAN attachments. As of now there are always 2 attachments, but it - # is going to change in the future (multi vlan). - # @!attribute [rw] cidr - # @return [::String] - # CIDR range of the network. - # @!attribute [rw] service_cidr - # @return [::Google::Cloud::BareMetalSolution::V2::NetworkConfig::ServiceCidr] - # Service CIDR, if any. - # @!attribute [rw] user_note - # @return [::String] - # User note field, it can be used by customers to add additional information - # for the BMS Ops team . - # @!attribute [rw] gcp_service - # @return [::String] - # The GCP service of the network. Available gcp_service are in - # https://cloud.google.com/bare-metal/docs/bms-planning. - # @!attribute [rw] vlan_same_project - # @return [::Boolean] - # Whether the VLAN attachment pair is located in the same project. - # @!attribute [rw] jumbo_frames_enabled - # @return [::Boolean] - # The JumboFramesEnabled option for customer to set. - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A GCP vlan attachment. - # @!attribute [rw] id - # @return [::String] - # Identifier of the VLAN attachment. - # @!attribute [rw] pairing_key - # @return [::String] - # Attachment pairing key. - class IntakeVlanAttachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Network type. - module Type - # Unspecified value. - TYPE_UNSPECIFIED = 0 - - # Client network, that is a network peered to a GCP VPC. - CLIENT = 1 - - # Private network, that is a network local to the BMS POD. - PRIVATE = 2 - end - - # Interconnect bandwidth. - module Bandwidth - # Unspecified value. - BANDWIDTH_UNSPECIFIED = 0 - - # 1 Gbps. - BW_1_GBPS = 1 - - # 2 Gbps. - BW_2_GBPS = 2 - - # 5 Gbps. - BW_5_GBPS = 3 - - # 10 Gbps. - BW_10_GBPS = 4 - end - - # Service network block. - module ServiceCidr - # Unspecified value. - SERVICE_CIDR_UNSPECIFIED = 0 - - # Services are disabled for the given network. - DISABLED = 1 - - # Use the highest /26 block of the network to host services. - HIGH_26 = 2 - - # Use the highest /27 block of the network to host services. - HIGH_27 = 3 - - # Use the highest /28 block of the network to host services. - HIGH_28 = 4 - end - end - - # A resource budget. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the instance quota. - # @!attribute [rw] instance_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Instance type. - # Deprecated: use gcp_service. - # @!attribute [rw] gcp_service - # @return [::String] - # The gcp service of the provisioning quota. - # @!attribute [rw] location - # @return [::String] - # Location where the quota applies. - # @!attribute [rw] available_machine_count - # @return [::Integer] - # Number of machines than can be created for the given location and - # instance_type. - class InstanceQuota - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetProvisioningConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the ProvisioningConfig. - class GetProvisioningConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for CreateProvisioningConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent project and location containing the - # ProvisioningConfig. - # @!attribute [rw] provisioning_config - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # Required. The ProvisioningConfig to create. - # @!attribute [rw] email - # @return [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - class CreateProvisioningConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a ProvisioningConfig. - # @!attribute [rw] provisioning_config - # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig] - # Required. The ProvisioningConfig to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # @!attribute [rw] email - # @return [::String] - # Optional. Email provided to send a confirmation with provisioning config - # to. - class UpdateProvisioningConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb deleted file mode 100644 index b01344ba719c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # An SSH key, used for authorizing with the interactive serial console feature. - # @!attribute [r] name - # @return [::String] - # Output only. The name of this SSH key. - # Currently, the only valid value for the location is "global". - # @!attribute [rw] public_key - # @return [::String] - # The public SSH key. This must be in OpenSSH .authorized_keys format. - class SSHKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for listing the public SSH keys in a project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent containing the SSH keys. - # Currently, the only valid value for the location is "global". - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListSSHKeysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response of ListSSHKeys. - # @!attribute [rw] ssh_keys - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::SSHKey>] - # The SSH keys registered in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListSSHKeysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for registering a public SSH key in a project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent containing the SSH keys. - # @!attribute [rw] ssh_key - # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey] - # Required. The SSH key to register. - # @!attribute [rw] ssh_key_id - # @return [::String] - # Required. The ID to use for the key, which will become the final component - # of the key's resource name. - # - # This value must match the regex: - # [a-zA-Z0-9@.\-_]\\{1,64} - class CreateSSHKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting an SSH key from a project. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the SSH key to delete. - # Currently, the only valid value for the location is "global". - class DeleteSSHKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb deleted file mode 100644 index d1e0bc7a2db8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume.rb +++ /dev/null @@ -1,325 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A storage volume. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of this `Volume`. - # Resource names are schemeless URIs that follow the conventions in - # https://cloud.google.com/apis/design/resource_names. - # Format: - # `projects/{project}/locations/{location}/volumes/{volume}` - # @!attribute [rw] id - # @return [::String] - # An identifier for the `Volume`, generated by the backend. - # @!attribute [rw] storage_type - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::StorageType] - # The storage type for this volume. - # @!attribute [rw] state - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::State] - # The state of this storage volume. - # @!attribute [rw] requested_size_gib - # @return [::Integer] - # The requested size of this storage volume, in GiB. - # @!attribute [rw] originally_requested_size_gib - # @return [::Integer] - # Originally requested size, in GiB. - # @!attribute [rw] current_size_gib - # @return [::Integer] - # The current size of this storage volume, in GiB, including space reserved - # for snapshots. This size might be different than the requested size if the - # storage volume has been configured with auto grow or auto shrink. - # @!attribute [rw] emergency_size_gib - # @return [::Integer] - # Additional emergency size that was requested for this Volume, in GiB. - # current_size_gib includes this value. - # @!attribute [rw] max_size_gib - # @return [::Integer] - # Maximum size volume can be expanded to in case of evergency, in GiB. - # @!attribute [rw] auto_grown_size_gib - # @return [::Integer] - # The size, in GiB, that this storage volume has expanded as a result of an - # auto grow policy. In the absence of auto-grow, the value is 0. - # @!attribute [rw] remaining_space_gib - # @return [::Integer] - # The space remaining in the storage volume for new LUNs, in GiB, excluding - # space reserved for snapshots. - # @!attribute [rw] snapshot_reservation_detail - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::SnapshotReservationDetail] - # Details about snapshot space reservation and usage on the storage volume. - # @!attribute [rw] snapshot_auto_delete_behavior - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::SnapshotAutoDeleteBehavior] - # The behavior to use when snapshot reserved space is full. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [rw] snapshot_enabled - # @return [::Boolean] - # Whether snapshots are enabled. - # @!attribute [rw] pod - # @return [::String] - # Immutable. Pod name. - # @!attribute [r] protocol - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::Protocol] - # Output only. Storage protocol for the Volume. - # @!attribute [r] boot_volume - # @return [::Boolean] - # Output only. Whether this volume is a boot volume. A boot volume is one - # which contains a boot LUN. - # @!attribute [rw] performance_tier - # @return [::Google::Cloud::BareMetalSolution::V2::VolumePerformanceTier] - # Immutable. Performance tier of the Volume. - # Default is SHARED. - # @!attribute [rw] notes - # @return [::String] - # Input only. User-specified notes for new Volume. - # Used to provision Volumes that require manual intervention. - # @!attribute [rw] workload_profile - # @return [::Google::Cloud::BareMetalSolution::V2::Volume::WorkloadProfile] - # The workload profile for the volume. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time after which volume will be fully deleted. - # It is filled only for volumes in COOLOFF state. - # @!attribute [r] instances - # @return [::Array<::String>] - # Output only. Instances this Volume is attached to. - # This field is set only in Get requests. - # @!attribute [r] attached - # @return [::Boolean] - # Output only. Is the Volume attached at at least one instance. - # This field is a lightweight counterpart of `instances` field. - # It is filled in List responses as well. - class Volume - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details about snapshot space reservation and usage on the storage volume. - # @!attribute [rw] reserved_space_gib - # @return [::Integer] - # The space on this storage volume reserved for snapshots, shown in GiB. - # @!attribute [rw] reserved_space_used_percent - # @return [::Integer] - # The percent of snapshot space on this storage volume actually being used - # by the snapshot copies. This value might be higher than 100% if the - # snapshot copies have overflowed into the data portion of the storage - # volume. - # @!attribute [rw] reserved_space_remaining_gib - # @return [::Integer] - # The amount, in GiB, of available space in this storage volume's reserved - # snapshot space. - # @!attribute [rw] reserved_space_percent - # @return [::Integer] - # Percent of the total Volume size reserved for snapshot copies. - # Enabling snapshots requires reserving 20% or more of - # the storage volume space for snapshots. Maximum reserved space for - # snapshots is 40%. - # Setting this field will effectively set snapshot_enabled to true. - class SnapshotReservationDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The storage type for a volume. - module StorageType - # The storage type for this volume is unknown. - STORAGE_TYPE_UNSPECIFIED = 0 - - # The storage type for this volume is SSD. - SSD = 1 - - # This storage type for this volume is HDD. - HDD = 2 - end - - # The possible states for a storage volume. - module State - # The storage volume is in an unknown state. - STATE_UNSPECIFIED = 0 - - # The storage volume is being created. - CREATING = 1 - - # The storage volume is ready for use. - READY = 2 - - # The storage volume has been requested to be deleted. - DELETING = 3 - - # The storage volume is being updated. - UPDATING = 4 - - # The storage volume is in cool off state. It will be deleted after - # `expire_time`. - COOL_OFF = 5 - end - - # The kinds of auto delete behavior to use when snapshot reserved space is - # full. - module SnapshotAutoDeleteBehavior - # The unspecified behavior. - SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0 - - # Don't delete any snapshots. This disables new snapshot creation, as - # long as the snapshot reserved space is full. - DISABLED = 1 - - # Delete the oldest snapshots first. - OLDEST_FIRST = 2 - - # Delete the newest snapshots first. - NEWEST_FIRST = 3 - end - - # Storage protocol. - module Protocol - # Value is not specified. - PROTOCOL_UNSPECIFIED = 0 - - # Fibre Channel protocol. - FIBRE_CHANNEL = 1 - - # NFS protocol means Volume is a NFS Share volume. - # Such volumes cannot be manipulated via Volumes API. - NFS = 2 - end - - # The possible values for a workload profile. - module WorkloadProfile - # The workload profile is in an unknown state. - WORKLOAD_PROFILE_UNSPECIFIED = 0 - - # The workload profile is generic. - GENERIC = 1 - - # The workload profile is hana. - HANA = 2 - end - end - - # Message for requesting storage volume information. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of storage volumes. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListVolumesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListVolumesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of storage volumes. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::Volume>] - # The list of storage volumes. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListVolumesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a volume. - # @!attribute [rw] volume - # @return [::Google::Cloud::BareMetalSolution::V2::Volume] - # Required. The volume to update. - # - # The `name` field is used to identify the volume to update. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # The only currently supported fields are: - # 'labels' - class UpdateVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message requesting rename of a server. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the volume. - # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume} - # @!attribute [rw] new_volume_id - # @return [::String] - # Required. The new `id` of the volume. - class RenameVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for skip volume cooloff and delete it. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Volume. - class EvictVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for emergency resize Volume. - # @!attribute [rw] volume - # @return [::String] - # Required. Volume to resize. - # @!attribute [rw] size_gib - # @return [::Integer] - # New Volume size, in GiB. - class ResizeVolumeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb deleted file mode 100644 index 0525748dfd87..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb +++ /dev/null @@ -1,134 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BareMetalSolution - module V2 - # A snapshot of a volume. Only boot volumes can have snapshots. - # @!attribute [rw] name - # @return [::String] - # The name of the snapshot. - # @!attribute [r] id - # @return [::String] - # Output only. An identifier for the snapshot, generated by the backend. - # @!attribute [rw] description - # @return [::String] - # The description of the snapshot. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time of the snapshot. - # @!attribute [r] storage_volume - # @return [::String] - # Output only. The name of the volume which this snapshot belongs to. - # @!attribute [r] type - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot::SnapshotType] - # Output only. The type of the snapshot which indicates whether it was - # scheduled or manual/ad-hoc. - class VolumeSnapshot - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the type of a snapshot. - module SnapshotType - # Type is not specified. - SNAPSHOT_TYPE_UNSPECIFIED = 0 - - # Snapshot was taken manually by user. - AD_HOC = 1 - - # Snapshot was taken automatically as a part of a snapshot schedule. - SCHEDULED = 2 - end - end - - # Message for requesting volume snapshot information. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the snapshot. - class GetVolumeSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of volume snapshots. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListVolumesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server might return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results from the server. - class ListVolumeSnapshotsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the list of volume snapshots. - # @!attribute [rw] volume_snapshots - # @return [::Array<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>] - # The list of snapshots. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results from the server. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListVolumeSnapshotsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting named Volume snapshot. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the snapshot to delete. - class DeleteVolumeSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a volume snapshot. - # @!attribute [rw] parent - # @return [::String] - # Required. The volume to snapshot. - # @!attribute [rw] volume_snapshot - # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot] - # Required. The snapshot to create. - class CreateVolumeSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for restoring a volume snapshot. - # @!attribute [rw] volume_snapshot - # @return [::String] - # Required. Name of the snapshot which will be used to restore its parent - # volume. - class RestoreVolumeSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile deleted file mode 100644 index 5d699c275013..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bare_metal_solution-v2", path: "../" -else - gem "google-cloud-bare_metal_solution-v2" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb deleted file mode 100644 index 358c745fc756..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_nfs_share.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the create_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share. -# -def create_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new - - # Call the create_nfs_share method. - result = client.create_nfs_share request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb deleted file mode 100644 index a06fe4fb4bde..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_provisioning_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the create_provisioning_config call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config. -# -def create_provisioning_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new - - # Call the create_provisioning_config method. - result = client.create_provisioning_config request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb deleted file mode 100644 index d8bb10ff6bad..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_ssh_key.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the create_ssh_key call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key. -# -def create_ssh_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new - - # Call the create_ssh_key method. - result = client.create_ssh_key request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb deleted file mode 100644 index d476c4950cff..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/create_volume_snapshot.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the create_volume_snapshot call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot. -# -def create_volume_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new - - # Call the create_volume_snapshot method. - result = client.create_volume_snapshot request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb deleted file mode 100644 index d93b24926574..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_nfs_share.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the delete_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share. -# -def delete_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new - - # Call the delete_nfs_share method. - result = client.delete_nfs_share request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb deleted file mode 100644 index 3439a897492e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_ssh_key.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the delete_ssh_key call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key. -# -def delete_ssh_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new - - # Call the delete_ssh_key method. - result = client.delete_ssh_key request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb deleted file mode 100644 index 2adfa46b129e..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/delete_volume_snapshot.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the delete_volume_snapshot call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot. -# -def delete_volume_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new - - # Call the delete_volume_snapshot method. - result = client.delete_volume_snapshot request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb deleted file mode 100644 index 3883f7f5756b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/detach_lun.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the detach_lun call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun. -# -def detach_lun - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new - - # Call the detach_lun method. - result = client.detach_lun request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb deleted file mode 100644 index 18430c661223..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/disable_interactive_serial_console.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the disable_interactive_serial_console call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console. -# -def disable_interactive_serial_console - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new - - # Call the disable_interactive_serial_console method. - result = client.disable_interactive_serial_console request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb deleted file mode 100644 index 169e030b544f..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/enable_interactive_serial_console.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the enable_interactive_serial_console call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console. -# -def enable_interactive_serial_console - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new - - # Call the enable_interactive_serial_console method. - result = client.enable_interactive_serial_console request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb deleted file mode 100644 index 916a0b294499..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_lun.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the evict_lun call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun. -# -def evict_lun - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new - - # Call the evict_lun method. - result = client.evict_lun request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb deleted file mode 100644 index d7d6e882e4a6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/evict_volume.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the evict_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume. -# -def evict_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new - - # Call the evict_volume method. - result = client.evict_volume request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb deleted file mode 100644 index 716e61b4abcd..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb deleted file mode 100644 index 58f24d70f77f..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_lun.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_lun call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun. -# -def get_lun - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new - - # Call the get_lun method. - result = client.get_lun request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb deleted file mode 100644 index 5df941d15772..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_network.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_network call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network. -# -def get_network - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new - - # Call the get_network method. - result = client.get_network request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb deleted file mode 100644 index d2c6e1709af7..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_nfs_share.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share. -# -def get_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new - - # Call the get_nfs_share method. - result = client.get_nfs_share request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb deleted file mode 100644 index 986b6c62e235..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_provisioning_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_provisioning_config call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config. -# -def get_provisioning_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new - - # Call the get_provisioning_config method. - result = client.get_provisioning_config request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb deleted file mode 100644 index 939f442e87ae..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume. -# -def get_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new - - # Call the get_volume method. - result = client.get_volume request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb deleted file mode 100644 index 001c45e34f3b..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/get_volume_snapshot.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the get_volume_snapshot call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot. -# -def get_volume_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new - - # Call the get_volume_snapshot method. - result = client.get_volume_snapshot request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb deleted file mode 100644 index 3e017bcb7a63..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_instances.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_instances call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances. -# -def list_instances - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new - - # Call the list_instances method. - result = client.list_instances request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Instance. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb deleted file mode 100644 index 6a79522dc049..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_luns.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_luns call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns. -# -def list_luns - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new - - # Call the list_luns method. - result = client.list_luns request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb deleted file mode 100644 index 3c008bae622a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_network_usage.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_network_usage call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage. -# -def list_network_usage - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new - - # Call the list_network_usage method. - result = client.list_network_usage request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb deleted file mode 100644 index b98c7b7f9d00..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_networks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_networks call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks. -# -def list_networks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new - - # Call the list_networks method. - result = client.list_networks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb deleted file mode 100644 index a865e2f86d3f..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_nfs_shares.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_nfs_shares call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares. -# -def list_nfs_shares - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new - - # Call the list_nfs_shares method. - result = client.list_nfs_shares request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb deleted file mode 100644 index 12e6f9f047d6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_os_images.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_os_images call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images. -# -def list_os_images - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new - - # Call the list_os_images method. - result = client.list_os_images request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb deleted file mode 100644 index 0dca5eff2d85..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_provisioning_quotas.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_provisioning_quotas call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas. -# -def list_provisioning_quotas - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new - - # Call the list_provisioning_quotas method. - result = client.list_provisioning_quotas request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb deleted file mode 100644 index 158656b868d3..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_ssh_keys.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_ssh_keys call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys. -# -def list_ssh_keys - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new - - # Call the list_ssh_keys method. - result = client.list_ssh_keys request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb deleted file mode 100644 index 58b170292d00..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volume_snapshots.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_volume_snapshots call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots. -# -def list_volume_snapshots - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new - - # Call the list_volume_snapshots method. - result = client.list_volume_snapshots request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb deleted file mode 100644 index a423d77af7e6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/list_volumes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the list_volumes call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes. -# -def list_volumes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new - - # Call the list_volumes method. - result = client.list_volumes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. - p item - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb deleted file mode 100644 index 94dbdb0a41ad..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the rename_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance. -# -def rename_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new - - # Call the rename_instance method. - result = client.rename_instance request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb deleted file mode 100644 index da01cd4cae26..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_network.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the rename_network call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network. -# -def rename_network - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new - - # Call the rename_network method. - result = client.rename_network request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb deleted file mode 100644 index 32ec197121d8..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_nfs_share.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the rename_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share. -# -def rename_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new - - # Call the rename_nfs_share method. - result = client.rename_nfs_share request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb deleted file mode 100644 index 150aa2cb0fbb..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/rename_volume.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the rename_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume. -# -def rename_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new - - # Call the rename_volume method. - result = client.rename_volume request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb deleted file mode 100644 index c1010158d5fc..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/reset_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the reset_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance. -# -def reset_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new - - # Call the reset_instance method. - result = client.reset_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb deleted file mode 100644 index c79249eb863d..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/resize_volume.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the resize_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume. -# -def resize_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new - - # Call the resize_volume method. - result = client.resize_volume request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb deleted file mode 100644 index d37a07635475..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/restore_volume_snapshot.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the restore_volume_snapshot call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot. -# -def restore_volume_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new - - # Call the restore_volume_snapshot method. - result = client.restore_volume_snapshot request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb deleted file mode 100644 index 7beed0235a9a..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/start_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the start_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance. -# -def start_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new - - # Call the start_instance method. - result = client.start_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb deleted file mode 100644 index 6728055e6fe6..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/stop_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the stop_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance. -# -def stop_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new - - # Call the stop_instance method. - result = client.stop_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb deleted file mode 100644 index f35b9ef72741..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/submit_provisioning_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the submit_provisioning_config call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config. -# -def submit_provisioning_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new - - # Call the submit_provisioning_config method. - result = client.submit_provisioning_config request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb deleted file mode 100644 index f95a8f3457e7..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_instance call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance. -# -def update_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new - - # Call the update_instance method. - result = client.update_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb deleted file mode 100644 index b4c3d334f859..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_network.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_network call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network. -# -def update_network - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new - - # Call the update_network method. - result = client.update_network request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb deleted file mode 100644 index 6caf796b8964..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_nfs_share.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_nfs_share call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share. -# -def update_nfs_share - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new - - # Call the update_nfs_share method. - result = client.update_nfs_share request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb deleted file mode 100644 index 3c5676e4d0fe..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_provisioning_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_provisioning_config call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config. -# -def update_provisioning_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new - - # Call the update_provisioning_config method. - result = client.update_provisioning_config request - - # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig. - p result -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb deleted file mode 100644 index a6f74e17e36c..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/bare_metal_solution/update_volume.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] -require "google/cloud/bare_metal_solution/v2" - -## -# Snippet for the update_volume call in the BareMetalSolution service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume. -# -def update_volume - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new - - # Call the update_volume method. - result = client.update_volume request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync] diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json b/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json deleted file mode 100644 index a6e0209d6718..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/snippets/snippet_metadata_google.cloud.baremetalsolution.v2.json +++ /dev/null @@ -1,1775 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bare_metal_solution-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.baremetalsolution.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListInstances_sync", - "title": "Snippet for the list_instances call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances.", - "file": "bare_metal_solution/list_instances.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instances", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_instances", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListInstances", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListInstances", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetInstance_sync", - "title": "Snippet for the get_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance.", - "file": "bare_metal_solution/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Instance", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateInstance_sync", - "title": "Snippet for the update_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance.", - "file": "bare_metal_solution/update_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameInstance_sync", - "title": "Snippet for the rename_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance.", - "file": "bare_metal_solution/rename_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Instance", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RenameInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ResetInstance_sync", - "title": "Snippet for the reset_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance.", - "file": "bare_metal_solution/reset_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "reset_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#reset_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ResetInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResetInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_StartInstance_sync", - "title": "Snippet for the start_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance.", - "file": "bare_metal_solution/start_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#start_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "StartInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.StartInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_StopInstance_sync", - "title": "Snippet for the stop_instance call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance.", - "file": "bare_metal_solution/stop_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_instance", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#stop_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "StopInstance", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.StopInstance", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EnableInteractiveSerialConsole_sync", - "title": "Snippet for the enable_interactive_serial_console call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console.", - "file": "bare_metal_solution/enable_interactive_serial_console.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_interactive_serial_console", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#enable_interactive_serial_console", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "EnableInteractiveSerialConsole", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EnableInteractiveSerialConsole", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DisableInteractiveSerialConsole_sync", - "title": "Snippet for the disable_interactive_serial_console call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console.", - "file": "bare_metal_solution/disable_interactive_serial_console.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_interactive_serial_console", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#disable_interactive_serial_console", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DisableInteractiveSerialConsole", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DisableInteractiveSerialConsole", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DetachLun_sync", - "title": "Snippet for the detach_lun call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun.", - "file": "bare_metal_solution/detach_lun.rb", - "language": "RUBY", - "client_method": { - "short_name": "detach_lun", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#detach_lun", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DetachLunRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DetachLun", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DetachLun", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListSSHKeys_sync", - "title": "Snippet for the list_ssh_keys call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys.", - "file": "bare_metal_solution/list_ssh_keys.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_ssh_keys", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_ssh_keys", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListSSHKeys", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListSSHKeys", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateSSHKey_sync", - "title": "Snippet for the create_ssh_key call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key.", - "file": "bare_metal_solution/create_ssh_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_ssh_key", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_ssh_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::SSHKey", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "CreateSSHKey", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateSSHKey", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteSSHKey_sync", - "title": "Snippet for the delete_ssh_key call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key.", - "file": "bare_metal_solution/delete_ssh_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_ssh_key", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_ssh_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DeleteSSHKey", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteSSHKey", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumes_sync", - "title": "Snippet for the list_volumes call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes.", - "file": "bare_metal_solution/list_volumes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_volumes", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volumes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListVolumes", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumes", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolume_sync", - "title": "Snippet for the get_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume.", - "file": "bare_metal_solution/get_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Volume", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateVolume_sync", - "title": "Snippet for the update_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume.", - "file": "bare_metal_solution/update_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameVolume_sync", - "title": "Snippet for the rename_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume.", - "file": "bare_metal_solution/rename_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Volume", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RenameVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EvictVolume_sync", - "title": "Snippet for the evict_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume.", - "file": "bare_metal_solution/evict_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "evict_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "EvictVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EvictVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ResizeVolume_sync", - "title": "Snippet for the resize_volume call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume.", - "file": "bare_metal_solution/resize_volume.rb", - "language": "RUBY", - "client_method": { - "short_name": "resize_volume", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#resize_volume", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ResizeVolume", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ResizeVolume", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworks_sync", - "title": "Snippet for the list_networks call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks.", - "file": "bare_metal_solution/list_networks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_networks", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_networks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListNetworks", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworks", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNetworkUsage_sync", - "title": "Snippet for the list_network_usage call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage.", - "file": "bare_metal_solution/list_network_usage.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_network_usage", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_network_usage", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListNetworkUsage", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNetworkUsage", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetNetwork_sync", - "title": "Snippet for the get_network call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network.", - "file": "bare_metal_solution/get_network.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_network", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_network", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Network", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetNetwork", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNetwork", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNetwork_sync", - "title": "Snippet for the update_network call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network.", - "file": "bare_metal_solution/update_network.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_network", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_network", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateNetwork", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNetwork", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateVolumeSnapshot_sync", - "title": "Snippet for the create_volume_snapshot call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot.", - "file": "bare_metal_solution/create_volume_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_volume_snapshot", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_volume_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "CreateVolumeSnapshot", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateVolumeSnapshot", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RestoreVolumeSnapshot_sync", - "title": "Snippet for the restore_volume_snapshot call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot.", - "file": "bare_metal_solution/restore_volume_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_volume_snapshot", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#restore_volume_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RestoreVolumeSnapshot", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RestoreVolumeSnapshot", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteVolumeSnapshot_sync", - "title": "Snippet for the delete_volume_snapshot call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot.", - "file": "bare_metal_solution/delete_volume_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_volume_snapshot", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_volume_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DeleteVolumeSnapshot", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteVolumeSnapshot", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetVolumeSnapshot_sync", - "title": "Snippet for the get_volume_snapshot call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot.", - "file": "bare_metal_solution/get_volume_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_volume_snapshot", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_volume_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetVolumeSnapshot", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetVolumeSnapshot", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListVolumeSnapshots_sync", - "title": "Snippet for the list_volume_snapshots call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots.", - "file": "bare_metal_solution/list_volume_snapshots.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_volume_snapshots", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_volume_snapshots", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListVolumeSnapshots", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListVolumeSnapshots", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetLun_sync", - "title": "Snippet for the get_lun call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun.", - "file": "bare_metal_solution/get_lun.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lun", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_lun", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetLunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Lun", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetLun", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetLun", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListLuns_sync", - "title": "Snippet for the list_luns call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns.", - "file": "bare_metal_solution/list_luns.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_luns", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_luns", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListLunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListLunsResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListLuns", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListLuns", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_EvictLun_sync", - "title": "Snippet for the evict_lun call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun.", - "file": "bare_metal_solution/evict_lun.rb", - "language": "RUBY", - "client_method": { - "short_name": "evict_lun", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#evict_lun", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::EvictLunRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "EvictLun", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.EvictLun", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetNfsShare_sync", - "title": "Snippet for the get_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share.", - "file": "bare_metal_solution/get_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::NfsShare", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListNfsShares_sync", - "title": "Snippet for the list_nfs_shares call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares.", - "file": "bare_metal_solution/list_nfs_shares.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_nfs_shares", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_nfs_shares", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListNfsShares", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListNfsShares", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateNfsShare_sync", - "title": "Snippet for the update_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share.", - "file": "bare_metal_solution/update_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateNfsShare_sync", - "title": "Snippet for the create_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share.", - "file": "bare_metal_solution/create_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "CreateNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameNfsShare_sync", - "title": "Snippet for the rename_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share.", - "file": "bare_metal_solution/rename_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::NfsShare", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RenameNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_DeleteNfsShare_sync", - "title": "Snippet for the delete_nfs_share call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share.", - "file": "bare_metal_solution/delete_nfs_share.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_nfs_share", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#delete_nfs_share", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "DeleteNfsShare", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.DeleteNfsShare", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListProvisioningQuotas_sync", - "title": "Snippet for the list_provisioning_quotas call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas.", - "file": "bare_metal_solution/list_provisioning_quotas.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_provisioning_quotas", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_provisioning_quotas", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListProvisioningQuotas", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListProvisioningQuotas", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_SubmitProvisioningConfig_sync", - "title": "Snippet for the submit_provisioning_config call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config.", - "file": "bare_metal_solution/submit_provisioning_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "submit_provisioning_config", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#submit_provisioning_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "SubmitProvisioningConfig", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.SubmitProvisioningConfig", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_GetProvisioningConfig_sync", - "title": "Snippet for the get_provisioning_config call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config.", - "file": "bare_metal_solution/get_provisioning_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_provisioning_config", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#get_provisioning_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "GetProvisioningConfig", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.GetProvisioningConfig", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_CreateProvisioningConfig_sync", - "title": "Snippet for the create_provisioning_config call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config.", - "file": "bare_metal_solution/create_provisioning_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_provisioning_config", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#create_provisioning_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "CreateProvisioningConfig", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.CreateProvisioningConfig", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_UpdateProvisioningConfig_sync", - "title": "Snippet for the update_provisioning_config call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config.", - "file": "bare_metal_solution/update_provisioning_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_provisioning_config", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#update_provisioning_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "UpdateProvisioningConfig", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.UpdateProvisioningConfig", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_RenameNetwork_sync", - "title": "Snippet for the rename_network call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network.", - "file": "bare_metal_solution/rename_network.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_network", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#rename_network", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::Network", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "RenameNetwork", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.RenameNetwork", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "baremetalsolution_v2_generated_BareMetalSolution_ListOSImages_sync", - "title": "Snippet for the list_os_images call in the BareMetalSolution service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images.", - "file": "bare_metal_solution/list_os_images.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_os_images", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client#list_os_images", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse", - "client": { - "short_name": "BareMetalSolution::Client", - "full_name": "::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client" - }, - "method": { - "short_name": "ListOSImages", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution.ListOSImages", - "service": { - "short_name": "BareMetalSolution", - "full_name": "google.cloud.baremetalsolution.v2.BareMetalSolution" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb deleted file mode 100644 index 56418b25c866..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/baremetalsolution/v2/baremetalsolution_services_pb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution" - -class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb deleted file mode 100644 index 0969c53605e0..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_paths_test.rb +++ /dev/null @@ -1,211 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bare_metal_solution/v2/bare_metal_solution" - -class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_instance_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_config_path project: "value0", location: "value1", instance_config: "value2" - assert_equal "projects/value0/locations/value1/instanceConfigs/value2", path - end - end - - def test_interconnect_attachment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.interconnect_attachment_path project: "value0", region: "value1", interconnect_attachment: "value2" - assert_equal "projects/value0/regions/value1/interconnectAttachments/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_lun_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lun_path project: "value0", location: "value1", volume: "value2", lun: "value3" - assert_equal "projects/value0/locations/value1/volumes/value2/luns/value3", path - end - end - - def test_nfs_share_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.nfs_share_path project: "value0", location: "value1", nfs_share: "value2" - assert_equal "projects/value0/locations/value1/nfsShares/value2", path - end - end - - def test_network_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_path project: "value0", location: "value1", network: "value2" - assert_equal "projects/value0/locations/value1/networks/value2", path - end - end - - def test_network_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_config_path project: "value0", location: "value1", network_config: "value2" - assert_equal "projects/value0/locations/value1/networkConfigs/value2", path - end - end - - def test_provisioning_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.provisioning_config_path project: "value0", location: "value1", provisioning_config: "value2" - assert_equal "projects/value0/locations/value1/provisioningConfigs/value2", path - end - end - - def test_server_network_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.server_network_template_path project: "value0", location: "value1", server_network_template: "value2" - assert_equal "projects/value0/locations/value1/serverNetworkTemplate/value2", path - end - end - - def test_ssh_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.ssh_key_path project: "value0", location: "value1", ssh_key: "value2" - assert_equal "projects/value0/locations/value1/sshKeys/value2", path - end - end - - def test_volume_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.volume_path project: "value0", location: "value1", volume: "value2" - assert_equal "projects/value0/locations/value1/volumes/value2", path - end - end - - def test_volume_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.volume_config_path project: "value0", location: "value1", volume_config: "value2" - assert_equal "projects/value0/locations/value1/volumeConfigs/value2", path - end - end - - def test_volume_snapshot_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.volume_snapshot_path project: "value0", location: "value1", volume: "value2", snapshot: "value3" - assert_equal "projects/value0/locations/value1/volumes/value2/snapshots/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb deleted file mode 100644 index 9d9bf4332624..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_rest_test.rb +++ /dev/null @@ -1,2518 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest" - - -class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_instances - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_instances ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_instances(::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instances_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_count - end - end - end - - def test_update_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - instance = {} - update_mask = {} - - update_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_instance({ instance: instance, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_instance instance: instance, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_instance ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_instance({ instance: instance, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_instance(::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_instance_client_stub.call_count - end - end - end - - def test_rename_instance - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_instance_id = "hello world" - - rename_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rename_instance({ name: name, new_instance_id: new_instance_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rename_instance name: name, new_instance_id: new_instance_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rename_instance ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rename_instance({ name: name, new_instance_id: new_instance_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rename_instance(::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_instance_client_stub.call_count - end - end - end - - def test_reset_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - reset_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_reset_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, reset_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.reset_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.reset_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.reset_instance ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.reset_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.reset_instance(::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, reset_instance_client_stub.call_count - end - end - end - - def test_start_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_start_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_instance ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_instance(::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_instance_client_stub.call_count - end - end - end - - def test_stop_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - stop_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_stop_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stop_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.stop_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.stop_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.stop_instance ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.stop_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.stop_instance(::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, stop_instance_client_stub.call_count - end - end - end - - def test_enable_interactive_serial_console - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_interactive_serial_console_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_enable_interactive_serial_console_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_interactive_serial_console_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.enable_interactive_serial_console({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.enable_interactive_serial_console name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.enable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.enable_interactive_serial_console({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.enable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_interactive_serial_console_client_stub.call_count - end - end - end - - def test_disable_interactive_serial_console - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_interactive_serial_console_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_disable_interactive_serial_console_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_interactive_serial_console_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.disable_interactive_serial_console({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.disable_interactive_serial_console name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.disable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.disable_interactive_serial_console({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.disable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_interactive_serial_console_client_stub.call_count - end - end - end - - def test_detach_lun - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - instance = "hello world" - lun = "hello world" - skip_reboot = true - - detach_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_detach_lun_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, detach_lun_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.detach_lun instance: instance, lun: lun, skip_reboot: skip_reboot do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.detach_lun ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.detach_lun(::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, detach_lun_client_stub.call_count - end - end - end - - def test_list_ssh_keys - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_ssh_keys_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_ssh_keys_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_ssh_keys_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_ssh_keys({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_ssh_keys parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_ssh_keys ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_ssh_keys({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_ssh_keys(::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_ssh_keys_client_stub.call_count - end - end - end - - def test_create_ssh_key - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::SSHKey.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - ssh_key = {} - ssh_key_id = "hello world" - - create_ssh_key_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_ssh_key_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_ssh_key_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_ssh_key parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_ssh_key ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_ssh_key(::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_ssh_key_client_stub.call_count - end - end - end - - def test_delete_ssh_key - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_ssh_key_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_ssh_key_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_ssh_key_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_ssh_key({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_ssh_key name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_ssh_key ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_ssh_key({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_ssh_key(::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_ssh_key_client_stub.call_count - end - end - end - - def test_list_volumes - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_volumes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_volumes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_volumes_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_volumes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_volumes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_volumes ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_volumes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_volumes(::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_volumes_client_stub.call_count - end - end - end - - def test_get_volume - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Volume.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_volume({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_volume name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_volume ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_volume({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_volume(::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_volume_client_stub.call_count - end - end - end - - def test_update_volume - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - volume = {} - update_mask = {} - - update_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_volume({ volume: volume, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_volume volume: volume, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_volume ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_volume({ volume: volume, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_volume(::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_volume_client_stub.call_count - end - end - end - - def test_rename_volume - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Volume.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_volume_id = "hello world" - - rename_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rename_volume({ name: name, new_volume_id: new_volume_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rename_volume name: name, new_volume_id: new_volume_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rename_volume ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rename_volume({ name: name, new_volume_id: new_volume_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rename_volume(::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_volume_client_stub.call_count - end - end - end - - def test_evict_volume - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - evict_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_evict_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, evict_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.evict_volume({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.evict_volume name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.evict_volume ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.evict_volume({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.evict_volume(::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, evict_volume_client_stub.call_count - end - end - end - - def test_resize_volume - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - volume = "hello world" - size_gib = 42 - - resize_volume_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_resize_volume_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, resize_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.resize_volume({ volume: volume, size_gib: size_gib }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.resize_volume volume: volume, size_gib: size_gib do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.resize_volume ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.resize_volume({ volume: volume, size_gib: size_gib }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.resize_volume(::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, resize_volume_client_stub.call_count - end - end - end - - def test_list_networks - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_networks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_networks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_networks_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_networks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_networks parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_networks ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_networks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_networks(::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_networks_client_stub.call_count - end - end - end - - def test_list_network_usage - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - location = "hello world" - - list_network_usage_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_network_usage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_network_usage_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_network_usage({ location: location }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_network_usage location: location do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_network_usage ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_network_usage({ location: location }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_network_usage(::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_network_usage_client_stub.call_count - end - end - end - - def test_get_network - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Network.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_network_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_network_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_network({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_network name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_network ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_network({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_network(::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_network_client_stub.call_count - end - end - end - - def test_update_network - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - network = {} - update_mask = {} - - update_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_network_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_network_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_network({ network: network, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_network network: network, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_network ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_network({ network: network, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_network(::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_network_client_stub.call_count - end - end - end - - def test_create_volume_snapshot - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - volume_snapshot = {} - - create_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_volume_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_volume_snapshot_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_volume_snapshot parent: parent, volume_snapshot: volume_snapshot do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_volume_snapshot_client_stub.call_count - end - end - end - - def test_restore_volume_snapshot - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - volume_snapshot = "hello world" - - restore_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_restore_volume_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_volume_snapshot_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.restore_volume_snapshot({ volume_snapshot: volume_snapshot }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.restore_volume_snapshot volume_snapshot: volume_snapshot do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.restore_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.restore_volume_snapshot({ volume_snapshot: volume_snapshot }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.restore_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_volume_snapshot_client_stub.call_count - end - end - end - - def test_delete_volume_snapshot - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_volume_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_volume_snapshot_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_volume_snapshot({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_volume_snapshot name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_volume_snapshot({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_volume_snapshot_client_stub.call_count - end - end - end - - def test_get_volume_snapshot - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_volume_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_volume_snapshot_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_volume_snapshot({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_volume_snapshot name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_volume_snapshot({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_volume_snapshot_client_stub.call_count - end - end - end - - def test_list_volume_snapshots - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_volume_snapshots_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_volume_snapshots_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_volume_snapshots_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_volume_snapshots parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_volume_snapshots ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_volume_snapshots(::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_volume_snapshots_client_stub.call_count - end - end - end - - def test_get_lun - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Lun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_lun_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lun_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lun({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lun name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lun ::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lun({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lun(::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lun_client_stub.call_count - end - end - end - - def test_list_luns - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_luns_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_luns_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_luns_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_luns({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_luns parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_luns ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_luns({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_luns(::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_luns_client_stub.call_count - end - end - end - - def test_evict_lun - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - evict_lun_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_evict_lun_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, evict_lun_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.evict_lun({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.evict_lun name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.evict_lun ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.evict_lun({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.evict_lun(::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, evict_lun_client_stub.call_count - end - end - end - - def test_get_nfs_share - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_nfs_share({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_nfs_share name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_nfs_share ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_nfs_share({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_nfs_share(::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_nfs_share_client_stub.call_count - end - end - end - - def test_list_nfs_shares - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_nfs_shares_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_nfs_shares_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_nfs_shares_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_nfs_shares({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_nfs_shares parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_nfs_shares ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_nfs_shares({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_nfs_shares(::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_nfs_shares_client_stub.call_count - end - end - end - - def test_update_nfs_share - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - nfs_share = {} - update_mask = {} - - update_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_nfs_share nfs_share: nfs_share, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_nfs_share ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_nfs_share(::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_nfs_share_client_stub.call_count - end - end - end - - def test_create_nfs_share - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - nfs_share = {} - - create_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_nfs_share({ parent: parent, nfs_share: nfs_share }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_nfs_share parent: parent, nfs_share: nfs_share do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_nfs_share ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_nfs_share({ parent: parent, nfs_share: nfs_share }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_nfs_share(::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_nfs_share_client_stub.call_count - end - end - end - - def test_rename_nfs_share - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_nfsshare_id = "hello world" - - rename_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rename_nfs_share name: name, new_nfsshare_id: new_nfsshare_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rename_nfs_share ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rename_nfs_share(::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_nfs_share_client_stub.call_count - end - end - end - - def test_delete_nfs_share - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_nfs_share_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_delete_nfs_share_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_nfs_share({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_nfs_share name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_nfs_share ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_nfs_share({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_nfs_share(::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_nfs_share_client_stub.call_count - end - end - end - - def test_list_provisioning_quotas - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_provisioning_quotas_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_provisioning_quotas_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_provisioning_quotas_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_provisioning_quotas parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_provisioning_quotas ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_provisioning_quotas(::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_provisioning_quotas_client_stub.call_count - end - end - end - - def test_submit_provisioning_config - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provisioning_config = {} - email = "hello world" - - submit_provisioning_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_submit_provisioning_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, submit_provisioning_config_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.submit_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.submit_provisioning_config ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.submit_provisioning_config(::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, submit_provisioning_config_client_stub.call_count - end - end - end - - def test_get_provisioning_config - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_provisioning_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_get_provisioning_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_provisioning_config_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_provisioning_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_provisioning_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_provisioning_config ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_provisioning_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_provisioning_config(::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_provisioning_config_client_stub.call_count - end - end - end - - def test_create_provisioning_config - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provisioning_config = {} - email = "hello world" - - create_provisioning_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_create_provisioning_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_provisioning_config_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_provisioning_config ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_provisioning_config(::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_provisioning_config_client_stub.call_count - end - end - end - - def test_update_provisioning_config - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - provisioning_config = {} - update_mask = {} - email = "hello world" - - update_provisioning_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_update_provisioning_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_provisioning_config_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_provisioning_config provisioning_config: provisioning_config, update_mask: update_mask, email: email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_provisioning_config ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_provisioning_config(::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_provisioning_config_client_stub.call_count - end - end - end - - def test_rename_network - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::Network.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_network_id = "hello world" - - rename_network_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_rename_network_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_network_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rename_network({ name: name, new_network_id: new_network_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rename_network name: name, new_network_id: new_network_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rename_network ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rename_network({ name: name, new_network_id: new_network_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rename_network(::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_network_client_stub.call_count - end - end - end - - def test_list_os_images - # Create test objects. - client_result = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_os_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.stub :transcode_list_os_images_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_os_images_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_os_images({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_os_images parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_os_images ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_os_images({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_os_images(::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_os_images_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb deleted file mode 100644 index 0b00041fc098..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/google/cloud/bare_metal_solution/v2/bare_metal_solution_test.rb +++ /dev/null @@ -1,2881 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/baremetalsolution/v2/baremetalsolution_pb" -require "google/cloud/bare_metal_solution/v2/bare_metal_solution" - -class ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_instances - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instances, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instances_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_instances ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_instances(::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_instances_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_instance ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_instance({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_rpc_count - end - end - - def test_update_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - instance = {} - update_mask = {} - - update_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Instance), request["instance"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_instance({ instance: instance, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_instance instance: instance, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_instance ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_instance({ instance: instance, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_instance(::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new(instance: instance, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_instance_client_stub.call_rpc_count - end - end - - def test_rename_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_instance_id = "hello world" - - rename_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_instance_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rename_instance({ name: name, new_instance_id: new_instance_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rename_instance name: name, new_instance_id: new_instance_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rename_instance ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rename_instance({ name: name, new_instance_id: new_instance_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rename_instance(::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new(name: name, new_instance_id: new_instance_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_instance_client_stub.call_rpc_count - end - end - - def test_reset_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - reset_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :reset_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, reset_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.reset_instance({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.reset_instance name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.reset_instance ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.reset_instance({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.reset_instance(::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, reset_instance_client_stub.call_rpc_count - end - end - - def test_start_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_instance({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_instance name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_instance ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_instance({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_instance(::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_instance_client_stub.call_rpc_count - end - end - - def test_stop_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - stop_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_instance, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_instance_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stop_instance({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.stop_instance name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.stop_instance ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.stop_instance({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.stop_instance(::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, stop_instance_client_stub.call_rpc_count - end - end - - def test_enable_interactive_serial_console - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_interactive_serial_console_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_interactive_serial_console, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_interactive_serial_console_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.enable_interactive_serial_console({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.enable_interactive_serial_console name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.enable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.enable_interactive_serial_console({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.enable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_interactive_serial_console_client_stub.call_rpc_count - end - end - - def test_disable_interactive_serial_console - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_interactive_serial_console_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_interactive_serial_console, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_interactive_serial_console_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.disable_interactive_serial_console({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.disable_interactive_serial_console name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.disable_interactive_serial_console ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.disable_interactive_serial_console({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.disable_interactive_serial_console(::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_interactive_serial_console_client_stub.call_rpc_count - end - end - - def test_detach_lun - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - instance = "hello world" - lun = "hello world" - skip_reboot = true - - detach_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :detach_lun, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, request - assert_equal "hello world", request["instance"] - assert_equal "hello world", request["lun"] - assert_equal true, request["skip_reboot"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, detach_lun_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.detach_lun instance: instance, lun: lun, skip_reboot: skip_reboot do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.detach_lun ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.detach_lun({ instance: instance, lun: lun, skip_reboot: skip_reboot }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.detach_lun(::Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new(instance: instance, lun: lun, skip_reboot: skip_reboot), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, detach_lun_client_stub.call_rpc_count - end - end - - def test_list_ssh_keys - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_ssh_keys_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_ssh_keys, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_ssh_keys_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_ssh_keys({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_ssh_keys parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_ssh_keys ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_ssh_keys({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_ssh_keys(::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_ssh_keys_client_stub.call_rpc_count - end - end - - def test_create_ssh_key - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::SSHKey.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - ssh_key = {} - ssh_key_id = "hello world" - - create_ssh_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_ssh_key, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::SSHKey), request["ssh_key"] - assert_equal "hello world", request["ssh_key_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_ssh_key_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_ssh_key parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_ssh_key ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_ssh_key({ parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_ssh_key(::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new(parent: parent, ssh_key: ssh_key, ssh_key_id: ssh_key_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_ssh_key_client_stub.call_rpc_count - end - end - - def test_delete_ssh_key - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_ssh_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_ssh_key, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_ssh_key_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_ssh_key({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_ssh_key name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_ssh_key ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_ssh_key({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_ssh_key(::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_ssh_key_client_stub.call_rpc_count - end - end - - def test_list_volumes - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_volumes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_volumes, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_volumes_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_volumes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_volumes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_volumes ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_volumes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_volumes(::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_volumes_client_stub.call_rpc_count - end - end - - def test_get_volume - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Volume.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_volume({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_volume name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_volume ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_volume({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_volume(::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_volume_client_stub.call_rpc_count - end - end - - def test_update_volume - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - volume = {} - update_mask = {} - - update_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Volume), request["volume"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_volume({ volume: volume, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_volume volume: volume, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_volume ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_volume({ volume: volume, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_volume(::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new(volume: volume, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_volume_client_stub.call_rpc_count - end - end - - def test_rename_volume - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Volume.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_volume_id = "hello world" - - rename_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_volume_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rename_volume({ name: name, new_volume_id: new_volume_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rename_volume name: name, new_volume_id: new_volume_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rename_volume ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rename_volume({ name: name, new_volume_id: new_volume_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rename_volume(::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new(name: name, new_volume_id: new_volume_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_volume_client_stub.call_rpc_count - end - end - - def test_evict_volume - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - evict_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :evict_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, evict_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.evict_volume({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.evict_volume name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.evict_volume ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.evict_volume({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.evict_volume(::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, evict_volume_client_stub.call_rpc_count - end - end - - def test_resize_volume - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - volume = "hello world" - size_gib = 42 - - resize_volume_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resize_volume, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, request - assert_equal "hello world", request["volume"] - assert_equal 42, request["size_gib"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resize_volume_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.resize_volume({ volume: volume, size_gib: size_gib }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.resize_volume volume: volume, size_gib: size_gib do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.resize_volume ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.resize_volume({ volume: volume, size_gib: size_gib }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.resize_volume(::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new(volume: volume, size_gib: size_gib), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resize_volume_client_stub.call_rpc_count - end - end - - def test_list_networks - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_networks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_networks, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_networks_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_networks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_networks parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_networks ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_networks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_networks(::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_networks_client_stub.call_rpc_count - end - end - - def test_list_network_usage - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - location = "hello world" - - list_network_usage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_network_usage, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, request - assert_equal "hello world", request["location"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_network_usage_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_network_usage({ location: location }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_network_usage location: location do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_network_usage ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_network_usage({ location: location }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_network_usage(::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new(location: location), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_network_usage_client_stub.call_rpc_count - end - end - - def test_get_network - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Network.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_network, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_network_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_network({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_network name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_network ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_network({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_network(::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_network_client_stub.call_rpc_count - end - end - - def test_update_network - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - network = {} - update_mask = {} - - update_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_network, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::Network), request["network"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_network_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_network({ network: network, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_network network: network, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_network ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_network({ network: network, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_network(::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new(network: network, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_network_client_stub.call_rpc_count - end - end - - def test_create_volume_snapshot - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - volume_snapshot = {} - - create_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_volume_snapshot, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot), request["volume_snapshot"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_volume_snapshot_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_volume_snapshot parent: parent, volume_snapshot: volume_snapshot do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_volume_snapshot({ parent: parent, volume_snapshot: volume_snapshot }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new(parent: parent, volume_snapshot: volume_snapshot), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_volume_snapshot_client_stub.call_rpc_count - end - end - - def test_restore_volume_snapshot - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - volume_snapshot = "hello world" - - restore_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_volume_snapshot, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, request - assert_equal "hello world", request["volume_snapshot"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_volume_snapshot_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.restore_volume_snapshot({ volume_snapshot: volume_snapshot }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.restore_volume_snapshot volume_snapshot: volume_snapshot do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.restore_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.restore_volume_snapshot({ volume_snapshot: volume_snapshot }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.restore_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new(volume_snapshot: volume_snapshot), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restore_volume_snapshot_client_stub.call_rpc_count - end - end - - def test_delete_volume_snapshot - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_volume_snapshot, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_volume_snapshot_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_volume_snapshot({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_volume_snapshot name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_volume_snapshot({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_volume_snapshot_client_stub.call_rpc_count - end - end - - def test_get_volume_snapshot - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_volume_snapshot, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_volume_snapshot_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_volume_snapshot({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_volume_snapshot name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_volume_snapshot ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_volume_snapshot({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_volume_snapshot(::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_volume_snapshot_client_stub.call_rpc_count - end - end - - def test_list_volume_snapshots - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_volume_snapshots_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_volume_snapshots, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_volume_snapshots_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_volume_snapshots parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_volume_snapshots ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_volume_snapshots({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_volume_snapshots(::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_volume_snapshots_client_stub.call_rpc_count - end - end - - def test_get_lun - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Lun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lun, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetLunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lun_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lun({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lun name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lun ::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lun({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lun(::Google::Cloud::BareMetalSolution::V2::GetLunRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lun_client_stub.call_rpc_count - end - end - - def test_list_luns - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_luns_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_luns, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_luns_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_luns({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_luns parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_luns ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_luns({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_luns(::Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_luns_client_stub.call_rpc_count - end - end - - def test_evict_lun - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - evict_lun_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :evict_lun, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, evict_lun_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.evict_lun({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.evict_lun name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.evict_lun ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.evict_lun({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.evict_lun(::Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, evict_lun_client_stub.call_rpc_count - end - end - - def test_get_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_nfs_share({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_nfs_share name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_nfs_share ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_nfs_share({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_nfs_share(::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_nfs_share_client_stub.call_rpc_count - end - end - - def test_list_nfs_shares - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_nfs_shares_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_nfs_shares, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_nfs_shares_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_nfs_shares({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_nfs_shares parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_nfs_shares ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_nfs_shares({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_nfs_shares(::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_nfs_shares_client_stub.call_rpc_count - end - end - - def test_update_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - nfs_share = {} - update_mask = {} - - update_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::NfsShare), request["nfs_share"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_nfs_share nfs_share: nfs_share, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_nfs_share ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_nfs_share({ nfs_share: nfs_share, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_nfs_share(::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new(nfs_share: nfs_share, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_nfs_share_client_stub.call_rpc_count - end - end - - def test_create_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - nfs_share = {} - - create_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::NfsShare), request["nfs_share"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_nfs_share({ parent: parent, nfs_share: nfs_share }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_nfs_share parent: parent, nfs_share: nfs_share do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_nfs_share ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_nfs_share({ parent: parent, nfs_share: nfs_share }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_nfs_share(::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new(parent: parent, nfs_share: nfs_share), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_nfs_share_client_stub.call_rpc_count - end - end - - def test_rename_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::NfsShare.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_nfsshare_id = "hello world" - - rename_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_nfsshare_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rename_nfs_share name: name, new_nfsshare_id: new_nfsshare_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rename_nfs_share ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rename_nfs_share({ name: name, new_nfsshare_id: new_nfsshare_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rename_nfs_share(::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new(name: name, new_nfsshare_id: new_nfsshare_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_nfs_share_client_stub.call_rpc_count - end - end - - def test_delete_nfs_share - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_nfs_share_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_nfs_share, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_nfs_share_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_nfs_share({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_nfs_share name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_nfs_share ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_nfs_share({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_nfs_share(::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_nfs_share_client_stub.call_rpc_count - end - end - - def test_list_provisioning_quotas - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_provisioning_quotas_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_provisioning_quotas, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_provisioning_quotas_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_provisioning_quotas parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_provisioning_quotas ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_provisioning_quotas({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_provisioning_quotas(::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_provisioning_quotas_client_stub.call_rpc_count - end - end - - def test_submit_provisioning_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provisioning_config = {} - email = "hello world" - - submit_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :submit_provisioning_config, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] - assert_equal "hello world", request["email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, submit_provisioning_config_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.submit_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.submit_provisioning_config ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.submit_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.submit_provisioning_config(::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, submit_provisioning_config_client_stub.call_rpc_count - end - end - - def test_get_provisioning_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_provisioning_config, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_provisioning_config_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_provisioning_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_provisioning_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_provisioning_config ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_provisioning_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_provisioning_config(::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_provisioning_config_client_stub.call_rpc_count - end - end - - def test_create_provisioning_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - provisioning_config = {} - email = "hello world" - - create_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_provisioning_config, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] - assert_equal "hello world", request["email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_provisioning_config_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_provisioning_config parent: parent, provisioning_config: provisioning_config, email: email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_provisioning_config ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_provisioning_config({ parent: parent, provisioning_config: provisioning_config, email: email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_provisioning_config(::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new(parent: parent, provisioning_config: provisioning_config, email: email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_provisioning_config_client_stub.call_rpc_count - end - end - - def test_update_provisioning_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - provisioning_config = {} - update_mask = {} - email = "hello world" - - update_provisioning_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_provisioning_config, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig), request["provisioning_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_provisioning_config_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_provisioning_config provisioning_config: provisioning_config, update_mask: update_mask, email: email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_provisioning_config ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_provisioning_config({ provisioning_config: provisioning_config, update_mask: update_mask, email: email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_provisioning_config(::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new(provisioning_config: provisioning_config, update_mask: update_mask, email: email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_provisioning_config_client_stub.call_rpc_count - end - end - - def test_rename_network - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::Network.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_network_id = "hello world" - - rename_network_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_network, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_network_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_network_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rename_network({ name: name, new_network_id: new_network_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rename_network name: name, new_network_id: new_network_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rename_network ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rename_network({ name: name, new_network_id: new_network_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rename_network(::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new(name: name, new_network_id: new_network_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_network_client_stub.call_rpc_count - end - end - - def test_list_os_images - # Create GRPC objects. - grpc_response = ::Google::Cloud::BareMetalSolution::V2::ListOSImagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_os_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_os_images, name - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_os_images_client_stub do - # Create client - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_os_images({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_os_images parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_os_images ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_os_images({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_os_images(::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_os_images_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb b/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bare_metal_solution-v2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-batch-v1/.gitignore b/owl-bot-staging/google-cloud-batch-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json deleted file mode 100644 index e36027edffb2..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/.repo-metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "api_id": "batch.googleapis.com", - "api_shortname": "batch", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest", - "distribution_name": "google-cloud-batch-v1", - "is_cloud": true, - "language": "ruby", - "name": "batch", - "name_pretty": "Batch V1 API", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. Note that google-cloud-batch-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-batch instead. See the readme for more details.", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml b/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml deleted file mode 100644 index dfe88aff925c..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-batch-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-batch-v1.rb" diff --git a/owl-bot-staging/google-cloud-batch-v1/.toys.rb b/owl-bot-staging/google-cloud-batch-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-batch-v1/.yardopts b/owl-bot-staging/google-cloud-batch-v1/.yardopts deleted file mode 100644 index 5628edd53225..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Batch V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md deleted file mode 100644 index 08e3de31e49e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-batch-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-batch-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/batch/v1" - -client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/batch/v1" - -::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Batch::V1::BatchService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-batch-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/batch/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Batch::V1::BatchService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-batch-v1/Gemfile b/owl-bot-staging/google-cloud-batch-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-batch-v1/LICENSE.md b/owl-bot-staging/google-cloud-batch-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-batch-v1/README.md b/owl-bot-staging/google-cloud-batch-v1/README.md deleted file mode 100644 index 0e1262c992f8..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/README.md +++ /dev/null @@ -1,151 +0,0 @@ -# Ruby Client for the Batch V1 API - -An API to manage the running of Batch resources on Google Cloud Platform. - -Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Batch V1 API. Most users should consider using -the main client gem, -[google-cloud-batch](https://rubygems.org/gems/google-cloud-batch). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-batch-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/batch.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/batch/v1" - -client = ::Google::Cloud::Batch::V1::BatchService::Client.new -request = ::Google::Cloud::Batch::V1::CreateJobRequest.new # (request fields as keyword arguments...) -response = client.create_job request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest) -for class and method documentation. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/batch/v1" -require "logger" - -client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-batch`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-batch-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-batch`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-batch-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-batch-v1/Rakefile b/owl-bot-staging/google-cloud-batch-v1/Rakefile deleted file mode 100644 index 639b120c30c6..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-batch-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/batch/v1/batch_service/credentials" - ::Google::Cloud::Batch::V1::BatchService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-batch-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-batch-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-batch-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-batch-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-batch-v1" - header "google-cloud-batch-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-batch-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-batch-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-batch-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-batch-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json deleted file mode 100644 index 58078d42bdf0..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.batch.v1", - "libraryPackage": "::Google::Cloud::Batch::V1", - "services": { - "BatchService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Batch::V1::BatchService::Client", - "rpcs": { - "CreateJob": { - "methods": [ - "create_job" - ] - }, - "GetJob": { - "methods": [ - "get_job" - ] - }, - "DeleteJob": { - "methods": [ - "delete_job" - ] - }, - "CancelJob": { - "methods": [ - "cancel_job" - ] - }, - "ListJobs": { - "methods": [ - "list_jobs" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec b/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec deleted file mode 100644 index c97f0fbcf64c..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/google-cloud-batch-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/batch/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-batch-v1" - gem.version = Google::Cloud::Batch::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Google Cloud Batch is a fully managed service used by scientists, VFX artists, developers to easily and efficiently run batch workloads on Google Cloud. This service manages provisioning of resources to satisfy the requirements of the batch jobs for a variety of workloads including ML, HPC, VFX rendering, transcoding, genomics and others. Note that google-cloud-batch-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-batch instead. See the readme for more details." - gem.summary = "An API to manage the running of Batch resources on Google Cloud Platform." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb deleted file mode 100644 index d1d4a294e405..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google-cloud-batch-v1.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/batch/v1" -# require "google/iam/v1" diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb deleted file mode 100644 index fe260a4306e2..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/batch/v1/batch_service" -require "google/cloud/batch/v1/version" - -module Google - module Cloud - module Batch - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/batch/v1" - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/batch/v1" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/batch/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb deleted file mode 100644 index 32d4ce08cba2..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/batch/v1/batch.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/batch/v1/job_pb' -require 'google/cloud/batch/v1/task_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n!google/cloud/batch/v1/batch.proto\x12\x15google.cloud.batch.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/cloud/batch/v1/job.proto\x1a google/cloud/batch/v1/task.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\x01\n\x10\x43reateJobRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x62\x61tch.googleapis.com/Job\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12,\n\x03job\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.JobB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"?\n\rGetJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\"N\n\x10\x44\x65leteJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"c\n\x10\x43\x61ncelJobRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x62\x61tch.googleapis.com/Job\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x13\n\x11\x43\x61ncelJobResponse\"o\n\x0fListJobsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"j\n\x10ListJobsResponse\x12(\n\x04jobs\x18\x01 \x03(\x0b\x32\x1a.google.cloud.batch.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61tch.googleapis.com/TaskGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"m\n\x11ListTasksResponse\x12*\n\x05tasks\x18\x01 \x03(\x0b\x32\x1b.google.cloud.batch.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"A\n\x0eGetTaskRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x62\x61tch.googleapis.com/Task\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xa5\n\n\x0c\x42\x61tchService\x12\x9b\x01\n\tCreateJob\x12\'.google.cloud.batch.v1.CreateJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"I\xda\x41\x11parent,job,job_id\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\x12\x83\x01\n\x06GetJob\x12$.google.cloud.batch.v1.GetJobRequest\x1a\x1a.google.cloud.batch.v1.Job\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\x12\xcf\x01\n\tDeleteJob\x12\'.google.cloud.batch.v1.DeleteJobRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41@\n\x15google.protobuf.Empty\x12\'google.cloud.batch.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\x12\xec\x01\n\tCancelJob\x12\'.google.cloud.batch.v1.CancelJobRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41R\n\'google.cloud.batch.v1.CancelJobResponse\x12\'google.cloud.batch.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/jobs/*}:cancel:\x01*\x12\x96\x01\n\x08ListJobs\x12&.google.cloud.batch.v1.ListJobsRequest\x1a\'.google.cloud.batch.v1.ListJobsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\x12\x9b\x01\n\x07GetTask\x12%.google.cloud.batch.v1.GetTaskRequest\x1a\x1b.google.cloud.batch.v1.Task\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}\x12\xae\x01\n\tListTasks\x12\'.google.cloud.batch.v1.ListTasksRequest\x1a(.google.cloud.batch.v1.ListTasksResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks\x1aH\xca\x41\x14\x62\x61tch.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xab\x01\n\x19\x63om.google.cloud.batch.v1B\nBatchProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Batch - module V1 - CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CreateJobRequest").msgclass - GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GetJobRequest").msgclass - DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.DeleteJobRequest").msgclass - CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CancelJobRequest").msgclass - CancelJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.CancelJobResponse").msgclass - ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListJobsRequest").msgclass - ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListJobsResponse").msgclass - ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListTasksRequest").msgclass - ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ListTasksResponse").msgclass - GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GetTaskRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb deleted file mode 100644 index d6104f270747..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/batch/v1/version" - -require "google/cloud/batch/v1/batch_service/credentials" -require "google/cloud/batch/v1/batch_service/paths" -require "google/cloud/batch/v1/batch_service/operations" -require "google/cloud/batch/v1/batch_service/client" -require "google/cloud/batch/v1/batch_service/rest" - -module Google - module Cloud - module Batch - module V1 - ## - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/batch/v1/batch_service" - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/batch/v1/batch_service/rest" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module BatchService - end - end - end - end -end - -helper_path = ::File.join __dir__, "batch_service", "helpers.rb" -require "google/cloud/batch/v1/batch_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb deleted file mode 100644 index 2fbab5381bdc..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/client.rb +++ /dev/null @@ -1,1190 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/batch/v1/batch_pb" -require "google/cloud/location" - -module Google - module Cloud - module Batch - module V1 - module BatchService - ## - # Client for the BatchService service. - # - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :batch_service_stub - - ## - # Configure the BatchService Client class. - # - # See {::Google::Cloud::Batch::V1::BatchService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BatchService clients - # ::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Batch", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_job.timeout = 60.0 - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_job.timeout = 60.0 - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BatchService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Batch::V1::BatchService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @batch_service_stub.universe_domain - end - - ## - # Create a new BatchService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BatchService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/batch/v1/batch_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @batch_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Batch::V1::BatchService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @batch_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @batch_service_stub.endpoint - config.universe_domain = @batch_service_stub.universe_domain - config.logger = @batch_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Batch::V1::BatchService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @batch_service_stub.logger - end - - # Service calls - - ## - # Create a Job. - # - # @overload create_job(request, options = nil) - # Pass arguments to `create_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::CreateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::CreateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_job(parent: nil, job_id: nil, job: nil, request_id: nil) - # Pass arguments to `create_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name where the Job will be created. - # Pattern: "projects/\\{project}/locations/\\{location}" - # @param job_id [::String] - # ID used to uniquely identify the Job within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and '-' are accepted. - # The '-' character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The job.name field in the request will be ignored and the created resource - # name of the Job will be "\\{parent}/jobs/\\{job_id}". - # @param job [::Google::Cloud::Batch::V1::Job, ::Hash] - # Required. The Job to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::CreateJobRequest.new - # - # # Call the create_job method. - # result = client.create_job request - # - # # The returned object is of type Google::Cloud::Batch::V1::Job. - # p result - # - def create_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CreateJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :create_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a Job specified by its resource name. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Job name. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Batch::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :get_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a Job. - # - # @overload delete_job(request, options = nil) - # Pass arguments to `delete_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::DeleteJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::DeleteJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_job(name: nil, reason: nil, request_id: nil) - # Pass arguments to `delete_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Job name. - # @param reason [::String] - # Optional. Reason for this deletion. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::DeleteJobRequest.new - # - # # Call the delete_job method. - # result = client.delete_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::DeleteJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :delete_job, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel a Job. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_job(name: nil, request_id: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Job name. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CancelJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all Jobs for a project within a region. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Batch::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_jobs(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent path. - # @param filter [::String] - # List filter. - # @param order_by [::String] - # Optional. Sort results. Supported are "name", "name desc", "create_time", - # and "create_time desc". - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Batch::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @batch_service_stub, :list_jobs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Return a single Task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Batch::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Task name. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Batch::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Batch::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Batch::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List Tasks associated with a job. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Batch::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of a TaskGroup from which Tasks are being requested. - # Pattern: - # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" - # @param filter [::String] - # Task filter, null filter matches all Tasks. - # Filter string should be of the format State=TaskStatus.State e.g. - # State=RUNNING - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Batch::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @batch_service_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BatchService API. - # - # This class represents the configuration for BatchService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Batch::V1::BatchService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Batch::V1::BatchService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "batch.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BatchService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `delete_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - - # @private - def initialize parent_rpcs = nil - create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job - @create_job = ::Gapic::Config::Method.new create_job_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job - @delete_job = ::Gapic::Config::Method.new delete_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb deleted file mode 100644 index 6a4be9120312..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Batch - module V1 - module BatchService - # Credentials for the BatchService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb deleted file mode 100644 index fca10b6c1bcb..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Batch - module V1 - module BatchService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BatchService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the BatchService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "batch.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb deleted file mode 100644 index b30e342ea480..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/paths.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - module BatchService - # Path helper methods for the BatchService API. - module Paths - ## - # Create a fully-qualified Job resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param job [String] - # - # @return [::String] - def job_path project:, location:, job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/jobs/#{job}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}` - # - # @param project [String] - # @param location [String] - # @param job [String] - # @param task_group [String] - # @param task [String] - # - # @return [::String] - def task_path project:, location:, job:, task_group:, task: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" - raise ::ArgumentError, "task_group cannot contain /" if task_group.to_s.include? "/" - - "projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}/tasks/#{task}" - end - - ## - # Create a fully-qualified TaskGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}` - # - # @param project [String] - # @param location [String] - # @param job [String] - # @param task_group [String] - # - # @return [::String] - def task_group_path project:, location:, job:, task_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" - - "projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb deleted file mode 100644 index 8c251def07d4..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/batch/v1/version" -require "google/cloud/batch/v1/bindings_override" - -require "google/cloud/batch/v1/batch_service/credentials" -require "google/cloud/batch/v1/batch_service/paths" -require "google/cloud/batch/v1/batch_service/rest/operations" -require "google/cloud/batch/v1/batch_service/rest/client" - -module Google - module Cloud - module Batch - module V1 - ## - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/batch/v1/batch_service/rest" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module BatchService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/batch/v1/batch_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb deleted file mode 100644 index b06daf90aa9e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/client.rb +++ /dev/null @@ -1,1106 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Batch - module V1 - module BatchService - module Rest - ## - # REST client for the BatchService service. - # - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :batch_service_stub - - ## - # Configure the BatchService Client class. - # - # See {::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BatchService clients - # ::Google::Cloud::Batch::V1::BatchService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Batch", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_job.timeout = 60.0 - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_job.timeout = 60.0 - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BatchService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @batch_service_stub.universe_domain - end - - ## - # Create a new BatchService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BatchService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Batch::V1::BatchService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @batch_service_stub = ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @batch_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @batch_service_stub.endpoint - config.universe_domain = @batch_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @batch_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Batch::V1::BatchService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @batch_service_stub.logger - end - - # Service calls - - ## - # Create a Job. - # - # @overload create_job(request, options = nil) - # Pass arguments to `create_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::CreateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::CreateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_job(parent: nil, job_id: nil, job: nil, request_id: nil) - # Pass arguments to `create_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name where the Job will be created. - # Pattern: "projects/\\{project}/locations/\\{location}" - # @param job_id [::String] - # ID used to uniquely identify the Job within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and '-' are accepted. - # The '-' character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The job.name field in the request will be ignored and the created resource - # name of the Job will be "\\{parent}/jobs/\\{job_id}". - # @param job [::Google::Cloud::Batch::V1::Job, ::Hash] - # Required. The Job to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::CreateJobRequest.new - # - # # Call the create_job method. - # result = client.create_job request - # - # # The returned object is of type Google::Cloud::Batch::V1::Job. - # p result - # - def create_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CreateJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.create_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a Job specified by its resource name. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Job name. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Batch::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.get_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a Job. - # - # @overload delete_job(request, options = nil) - # Pass arguments to `delete_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::DeleteJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::DeleteJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_job(name: nil, reason: nil, request_id: nil) - # Pass arguments to `delete_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Job name. - # @param reason [::String] - # Optional. Reason for this deletion. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::DeleteJobRequest.new - # - # # Call the delete_job method. - # result = client.delete_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::DeleteJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.delete_job request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel a Job. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Batch::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_job(name: nil, request_id: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Job name. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::CancelJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.cancel_job request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all Jobs for a project within a region. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Batch::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_jobs(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent path. - # @param filter [::String] - # List filter. - # @param order_by [::String] - # Optional. Sort results. Supported are "name", "name desc", "create_time", - # and "create_time desc". - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Batch::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.list_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @batch_service_stub, :list_jobs, "jobs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Return a single Task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Batch::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Task name. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Batch::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List Tasks associated with a job. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Batch::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Batch::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of a TaskGroup from which Tasks are being requested. - # Pattern: - # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" - # @param filter [::String] - # Task filter, null filter matches all Tasks. - # Filter string should be of the format State=TaskStatus.State e.g. - # State=RUNNING - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Batch::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/batch/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Batch::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Batch::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Batch::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @batch_service_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @batch_service_stub, :list_tasks, "tasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BatchService REST API. - # - # This class represents the configuration for BatchService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Batch::V1::BatchService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "batch.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the BatchService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `delete_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - - # @private - def initialize parent_rpcs = nil - create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job - @create_job = ::Gapic::Config::Method.new create_job_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job - @delete_job = ::Gapic::Config::Method.new delete_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb deleted file mode 100644 index 137d56ae329a..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Batch - module V1 - module BatchService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "batch.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BatchService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the BatchService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "batch.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb deleted file mode 100644 index c5de3cdedd51..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb +++ /dev/null @@ -1,510 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/batch/v1/batch_pb" - -module Google - module Cloud - module Batch - module V1 - module BatchService - module Rest - ## - # REST service stub for the BatchService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # A result object deserialized from the server's reply - def create_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::Job.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Job] - # A result object deserialized from the server's reply - def get_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::Job.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def cancel_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::ListJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::ListJobsResponse] - # A result object deserialized from the server's reply - def list_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Batch::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Batch::V1::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Batch::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/jobs", - body: "job", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_job REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb deleted file mode 100644 index b5567c2a7b12..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/batch_services_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/batch/v1/batch.proto for package 'Google.Cloud.Batch.V1' -# Original file comments: -# Copyright 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/batch/v1/batch_pb' - -module Google - module Cloud - module Batch - module V1 - module BatchService - # Google Batch Service. - # The service manages user submitted batch jobs and allocates Google Compute - # Engine VM instances to run the jobs. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.batch.v1.BatchService' - - # Create a Job. - rpc :CreateJob, ::Google::Cloud::Batch::V1::CreateJobRequest, ::Google::Cloud::Batch::V1::Job - # Get a Job specified by its resource name. - rpc :GetJob, ::Google::Cloud::Batch::V1::GetJobRequest, ::Google::Cloud::Batch::V1::Job - # Delete a Job. - rpc :DeleteJob, ::Google::Cloud::Batch::V1::DeleteJobRequest, ::Google::Longrunning::Operation - # Cancel a Job. - rpc :CancelJob, ::Google::Cloud::Batch::V1::CancelJobRequest, ::Google::Longrunning::Operation - # List all Jobs for a project within a region. - rpc :ListJobs, ::Google::Cloud::Batch::V1::ListJobsRequest, ::Google::Cloud::Batch::V1::ListJobsResponse - # Return a single Task. - rpc :GetTask, ::Google::Cloud::Batch::V1::GetTaskRequest, ::Google::Cloud::Batch::V1::Task - # List Tasks associated with a job. - rpc :ListTasks, ::Google::Cloud::Batch::V1::ListTasksRequest, ::Google::Cloud::Batch::V1::ListTasksResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb deleted file mode 100644 index 16f6486ef2cf..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module Batch - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/batch/v1/rest" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Batch"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb deleted file mode 100644 index 8127bff9136b..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/job_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/batch/v1/job.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/batch/v1/task_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\x1fgoogle/cloud/batch/v1/job.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/cloud/batch/v1/task.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x05\n\x03Job\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08priority\x18\x03 \x01(\x03\x12:\n\x0btask_groups\x18\x04 \x03(\x0b\x32 .google.cloud.batch.v1.TaskGroupB\x03\xe0\x41\x02\x12\x42\n\x11\x61llocation_policy\x18\x07 \x01(\x0b\x32\'.google.cloud.batch.v1.AllocationPolicy\x12\x36\n\x06labels\x18\x08 \x03(\x0b\x32&.google.cloud.batch.v1.Job.LabelsEntry\x12\x35\n\x06status\x18\t \x01(\x0b\x32 .google.cloud.batch.v1.JobStatusB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\x0blogs_policy\x18\r \x01(\x0b\x32!.google.cloud.batch.v1.LogsPolicy\x12=\n\rnotifications\x18\x0e \x03(\x0b\x32&.google.cloud.batch.v1.JobNotification\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:Q\xea\x41N\n\x18\x62\x61tch.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}\"\xcd\x02\n\nLogsPolicy\x12\x42\n\x0b\x64\x65stination\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LogsPolicy.Destination\x12\x11\n\tlogs_path\x18\x02 \x01(\t\x12W\n\x14\x63loud_logging_option\x18\x03 \x01(\x0b\x32\x34.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionB\x03\xe0\x41\x01\x1a\x46\n\x12\x43loudLoggingOption\x12\x30\n#use_generic_task_monitored_resource\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x0b\x44\x65stination\x12\x1b\n\x17\x44\x45STINATION_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_LOGGING\x10\x01\x12\x08\n\x04PATH\x10\x02\"\xae\x07\n\tJobStatus\x12\x35\n\x05state\x18\x01 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\x12\x45\n\x0btask_groups\x18\x04 \x03(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupsEntry\x12/\n\x0crun_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xd1\x01\n\x0eInstanceStatus\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12U\n\x12provisioning_model\x18\x02 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12\x11\n\ttask_pack\x18\x03 \x01(\x03\x12?\n\tboot_disk\x18\x04 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x1a\xd2\x01\n\x0fTaskGroupStatus\x12L\n\x06\x63ounts\x18\x01 \x03(\x0b\x32<.google.cloud.batch.v1.JobStatus.TaskGroupStatus.CountsEntry\x12\x42\n\tinstances\x18\x02 \x03(\x0b\x32/.google.cloud.batch.v1.JobStatus.InstanceStatus\x1a-\n\x0b\x43ountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x63\n\x0fTaskGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.google.cloud.batch.v1.JobStatus.TaskGroupStatus:\x02\x38\x01\"\xa8\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\r\n\tSCHEDULED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x18\n\x14\x44\x45LETION_IN_PROGRESS\x10\x06\x12\x1c\n\x18\x43\x41NCELLATION_IN_PROGRESS\x10\x07\x12\r\n\tCANCELLED\x10\x08\"\xfc\x02\n\x0fJobNotification\x12\x14\n\x0cpubsub_topic\x18\x01 \x01(\t\x12?\n\x07message\x18\x02 \x01(\x0b\x32..google.cloud.batch.v1.JobNotification.Message\x1a\xc4\x01\n\x07Message\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.batch.v1.JobNotification.Type\x12=\n\rnew_job_state\x18\x02 \x01(\x0e\x32&.google.cloud.batch.v1.JobStatus.State\x12?\n\x0enew_task_state\x18\x03 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"K\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11JOB_STATE_CHANGED\x10\x01\x12\x16\n\x12TASK_STATE_CHANGED\x10\x02\"\xad\x0f\n\x10\x41llocationPolicy\x12H\n\x08location\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.LocationPolicy\x12S\n\tinstances\x18\x08 \x03(\x0b\x32@.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate\x12>\n\x0fservice_account\x18\t \x01(\x0b\x32%.google.cloud.batch.v1.ServiceAccount\x12\x43\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.LabelsEntry\x12\x46\n\x07network\x18\x07 \x01(\x0b\x32\x35.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy\x12J\n\tplacement\x18\n \x01(\x0b\x32\x37.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy\x12\x11\n\x04tags\x18\x0b \x03(\tB\x03\xe0\x41\x01\x1a+\n\x0eLocationPolicy\x12\x19\n\x11\x61llowed_locations\x18\x01 \x03(\t\x1aq\n\x04\x44isk\x12\x0f\n\x05image\x18\x04 \x01(\tH\x00\x12\x12\n\x08snapshot\x18\x05 \x01(\tH\x00\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07size_gb\x18\x02 \x01(\x03\x12\x16\n\x0e\x64isk_interface\x18\x06 \x01(\tB\r\n\x0b\x64\x61ta_source\x1a\x8a\x01\n\x0c\x41ttachedDisk\x12@\n\x08new_disk\x18\x01 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.DiskH\x00\x12\x17\n\rexisting_disk\x18\x02 \x01(\tH\x00\x12\x13\n\x0b\x64\x65vice_name\x18\x03 \x01(\tB\n\n\x08\x61ttached\x1ah\n\x0b\x41\x63\x63\x65lerator\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x1f\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x0e\x64river_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x82\x03\n\x0eInstancePolicy\x12\x14\n\x0cmachine_type\x18\x02 \x01(\t\x12\x18\n\x10min_cpu_platform\x18\x03 \x01(\t\x12U\n\x12provisioning_model\x18\x04 \x01(\x0e\x32\x39.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel\x12I\n\x0c\x61\x63\x63\x65lerators\x18\x05 \x03(\x0b\x32\x33.google.cloud.batch.v1.AllocationPolicy.Accelerator\x12?\n\tboot_disk\x18\x08 \x01(\x0b\x32,.google.cloud.batch.v1.AllocationPolicy.Disk\x12\x43\n\x05\x64isks\x18\x06 \x03(\x0b\x32\x34.google.cloud.batch.v1.AllocationPolicy.AttachedDisk\x12\x18\n\x0breservation\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xf6\x01\n\x18InstancePolicyOrTemplate\x12H\n\x06policy\x18\x01 \x01(\x0b\x32\x36.google.cloud.batch.v1.AllocationPolicy.InstancePolicyH\x00\x12\x1b\n\x11instance_template\x18\x02 \x01(\tH\x00\x12\x1b\n\x13install_gpu_drivers\x18\x03 \x01(\x08\x12\x1e\n\x11install_ops_agent\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x62lock_project_ssh_keys\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x42\x11\n\x0fpolicy_template\x1aW\n\x10NetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\x12\x1e\n\x16no_external_ip_address\x18\x03 \x01(\x08\x1a\x65\n\rNetworkPolicy\x12T\n\x12network_interfaces\x18\x01 \x03(\x0b\x32\x38.google.cloud.batch.v1.AllocationPolicy.NetworkInterface\x1a<\n\x0fPlacementPolicy\x12\x13\n\x0b\x63ollocation\x18\x01 \x01(\t\x12\x14\n\x0cmax_distance\x18\x02 \x01(\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x01\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\x12\x13\n\x0bPREEMPTIBLE\x10\x03\x1a\x02\x08\x01\x12\x15\n\x11RESERVATION_BOUND\x10\x04\x12\x0e\n\nFLEX_START\x10\x05\"\xcb\x04\n\tTaskGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\ttask_spec\x18\x03 \x01(\x0b\x32\x1f.google.cloud.batch.v1.TaskSpecB\x03\xe0\x41\x02\x12\x12\n\ntask_count\x18\x04 \x01(\x03\x12\x13\n\x0bparallelism\x18\x05 \x01(\x03\x12L\n\x11scheduling_policy\x18\x06 \x01(\x0e\x32\x31.google.cloud.batch.v1.TaskGroup.SchedulingPolicy\x12=\n\x11task_environments\x18\t \x03(\x0b\x32\".google.cloud.batch.v1.Environment\x12\x1b\n\x13task_count_per_node\x18\n \x01(\x03\x12\x1a\n\x12require_hosts_file\x18\x0b \x01(\x08\x12\x16\n\x0epermissive_ssh\x18\x0c \x01(\x08\x12\x1c\n\x0frun_as_non_root\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\"\\\n\x10SchedulingPolicy\x12!\n\x1dSCHEDULING_POLICY_UNSPECIFIED\x10\x00\x12\x17\n\x13\x41S_SOON_AS_POSSIBLE\x10\x01\x12\x0c\n\x08IN_ORDER\x10\x02:o\xea\x41l\n\x1e\x62\x61tch.googleapis.com/TaskGroup\x12Jprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"/\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x0e\n\x06scopes\x18\x02 \x03(\tB\xa9\x01\n\x19\x63om.google.cloud.batch.v1B\x08JobProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Batch - module V1 - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Job").msgclass - LogsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy").msgclass - LogsPolicy::CloudLoggingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.CloudLoggingOption").msgclass - LogsPolicy::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.Destination").enummodule - JobStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus").msgclass - JobStatus::InstanceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.InstanceStatus").msgclass - JobStatus::TaskGroupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.TaskGroupStatus").msgclass - JobStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.State").enummodule - JobNotification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification").msgclass - JobNotification::Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Message").msgclass - JobNotification::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Type").enummodule - AllocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy").msgclass - AllocationPolicy::LocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.LocationPolicy").msgclass - AllocationPolicy::Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Disk").msgclass - AllocationPolicy::AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.AttachedDisk").msgclass - AllocationPolicy::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Accelerator").msgclass - AllocationPolicy::InstancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicy").msgclass - AllocationPolicy::InstancePolicyOrTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate").msgclass - AllocationPolicy::NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkInterface").msgclass - AllocationPolicy::NetworkPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkPolicy").msgclass - AllocationPolicy::PlacementPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.PlacementPolicy").msgclass - AllocationPolicy::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.ProvisioningModel").enummodule - TaskGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup").msgclass - TaskGroup::SchedulingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup.SchedulingPolicy").enummodule - ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ServiceAccount").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb deleted file mode 100644 index 4c1a51eb92d3..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/batch/v1/batch_service/rest" -require "google/cloud/batch/v1/bindings_override" -require "google/cloud/batch/v1/version" - -module Google - module Cloud - module Batch - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/batch/v1/rest" - # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb deleted file mode 100644 index a3e7ce4ede39..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/task_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/batch/v1/task.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/batch/v1/volume_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n google/cloud/batch/v1/task.proto\x12\x15google.cloud.batch.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/cloud/batch/v1/volume.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"O\n\x0f\x43omputeResource\x12\x11\n\tcpu_milli\x18\x01 \x01(\x03\x12\x12\n\nmemory_mib\x18\x02 \x01(\x03\x12\x15\n\rboot_disk_mib\x18\x04 \x01(\x03\"\xdb\x01\n\x0bStatusEvent\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12.\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x0etask_execution\x18\x04 \x01(\x0b\x32$.google.cloud.batch.v1.TaskExecution\x12;\n\ntask_state\x18\x05 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\"\"\n\rTaskExecution\x12\x11\n\texit_code\x18\x01 \x01(\x05\"\xf2\x01\n\nTaskStatus\x12\x36\n\x05state\x18\x01 \x01(\x0e\x32\'.google.cloud.batch.v1.TaskStatus.State\x12\x39\n\rstatus_events\x18\x02 \x03(\x0b\x32\".google.cloud.batch.v1.StatusEvent\"q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41SSIGNED\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\x0e\n\nUNEXECUTED\x10\x06\"\x9e\x06\n\x08Runnable\x12>\n\tcontainer\x18\x01 \x01(\x0b\x32).google.cloud.batch.v1.Runnable.ContainerH\x00\x12\x38\n\x06script\x18\x02 \x01(\x0b\x32&.google.cloud.batch.v1.Runnable.ScriptH\x00\x12:\n\x07\x62\x61rrier\x18\x06 \x01(\x0b\x32\'.google.cloud.batch.v1.Runnable.BarrierH\x00\x12\x19\n\x0c\x64isplay_name\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\x12ignore_exit_status\x18\x03 \x01(\x08\x12\x12\n\nbackground\x18\x04 \x01(\x08\x12\x12\n\nalways_run\x18\x05 \x01(\x08\x12\x37\n\x0b\x65nvironment\x18\x07 \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x06labels\x18\t \x03(\x0b\x32+.google.cloud.batch.v1.Runnable.LabelsEntry\x1a\xcf\x01\n\tContainer\x12\x11\n\timage_uri\x18\x01 \x01(\t\x12\x10\n\x08\x63ommands\x18\x02 \x03(\t\x12\x12\n\nentrypoint\x18\x03 \x01(\t\x12\x0f\n\x07volumes\x18\x07 \x03(\t\x12\x0f\n\x07options\x18\x08 \x01(\t\x12\x1e\n\x16\x62lock_external_network\x18\t \x01(\x08\x12\x10\n\x08username\x18\n \x01(\t\x12\x10\n\x08password\x18\x0b \x01(\t\x12#\n\x16\x65nable_image_streaming\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a\x33\n\x06Script\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x42\t\n\x07\x63ommand\x1a\x17\n\x07\x42\x61rrier\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\nexecutable\"\xfd\x03\n\x08TaskSpec\x12\x32\n\trunnables\x18\x08 \x03(\x0b\x32\x1f.google.cloud.batch.v1.Runnable\x12@\n\x10\x63ompute_resource\x18\x03 \x01(\x0b\x32&.google.cloud.batch.v1.ComputeResource\x12\x33\n\x10max_run_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fmax_retry_count\x18\x05 \x01(\x05\x12\x42\n\x12lifecycle_policies\x18\t \x03(\x0b\x32&.google.cloud.batch.v1.LifecyclePolicy\x12K\n\x0c\x65nvironments\x18\x06 \x03(\x0b\x32\x31.google.cloud.batch.v1.TaskSpec.EnvironmentsEntryB\x02\x18\x01\x12.\n\x07volumes\x18\x07 \x03(\x0b\x32\x1d.google.cloud.batch.v1.Volume\x12\x37\n\x0b\x65nvironment\x18\n \x01(\x0b\x32\".google.cloud.batch.v1.Environment\x1a\x33\n\x11\x45nvironmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x02\n\x0fLifecyclePolicy\x12=\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32-.google.cloud.batch.v1.LifecyclePolicy.Action\x12P\n\x10\x61\x63tion_condition\x18\x02 \x01(\x0b\x32\x36.google.cloud.batch.v1.LifecyclePolicy.ActionCondition\x1a%\n\x0f\x41\x63tionCondition\x12\x12\n\nexit_codes\x18\x01 \x03(\x05\"?\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x0e\n\nRETRY_TASK\x10\x01\x12\r\n\tFAIL_TASK\x10\x02\"\xc0\x01\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x06status\x18\x02 \x01(\x0b\x32!.google.cloud.batch.v1.TaskStatus:w\xea\x41t\n\x19\x62\x61tch.googleapis.com/Task\x12Wprojects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}\"\x8f\x03\n\x0b\x45nvironment\x12\x44\n\tvariables\x18\x01 \x03(\x0b\x32\x31.google.cloud.batch.v1.Environment.VariablesEntry\x12Q\n\x10secret_variables\x18\x02 \x03(\x0b\x32\x37.google.cloud.batch.v1.Environment.SecretVariablesEntry\x12I\n\x13\x65ncrypted_variables\x18\x03 \x01(\x0b\x32,.google.cloud.batch.v1.Environment.KMSEnvMap\x1a\x32\n\tKMSEnvMap\x12\x10\n\x08key_name\x18\x01 \x01(\t\x12\x13\n\x0b\x63ipher_text\x18\x02 \x01(\t\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x36\n\x14SecretVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\xaa\x01\n\x19\x63om.google.cloud.batch.v1B\tTaskProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Batch - module V1 - ComputeResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ComputeResource").msgclass - StatusEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.StatusEvent").msgclass - TaskExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskExecution").msgclass - TaskStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus").msgclass - TaskStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus.State").enummodule - Runnable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable").msgclass - Runnable::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Container").msgclass - Runnable::Script = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Script").msgclass - Runnable::Barrier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Barrier").msgclass - TaskSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskSpec").msgclass - LifecyclePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy").msgclass - LifecyclePolicy::ActionCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.ActionCondition").msgclass - LifecyclePolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.Action").enummodule - Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Task").msgclass - Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment").msgclass - Environment::KMSEnvMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment.KMSEnvMap").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb deleted file mode 100644 index 01b65f088389..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb deleted file mode 100644 index c4253a7ced01..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/cloud/batch/v1/volume_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/batch/v1/volume.proto - -require 'google/protobuf' - - -descriptor_data = "\n\"google/cloud/batch/v1/volume.proto\x12\x15google.cloud.batch.v1\"\xaa\x01\n\x06Volume\x12)\n\x03nfs\x18\x01 \x01(\x0b\x32\x1a.google.cloud.batch.v1.NFSH\x00\x12)\n\x03gcs\x18\x03 \x01(\x0b\x32\x1a.google.cloud.batch.v1.GCSH\x00\x12\x15\n\x0b\x64\x65vice_name\x18\x06 \x01(\tH\x00\x12\x12\n\nmount_path\x18\x04 \x01(\t\x12\x15\n\rmount_options\x18\x05 \x03(\tB\x08\n\x06source\"*\n\x03NFS\x12\x0e\n\x06server\x18\x01 \x01(\t\x12\x13\n\x0bremote_path\x18\x02 \x01(\t\"\x1a\n\x03GCS\x12\x13\n\x0bremote_path\x18\x01 \x01(\tB\xac\x01\n\x19\x63om.google.cloud.batch.v1B\x0bVolumeProtoP\x01Z/cloud.google.com/go/batch/apiv1/batchpb;batchpb\xa2\x02\x03GCB\xaa\x02\x15Google.Cloud.Batch.V1\xca\x02\x15Google\\Cloud\\Batch\\V1\xea\x02\x18Google::Cloud::Batch::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Batch - module V1 - Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Volume").msgclass - NFS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.NFS").msgclass - GCS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GCS").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb deleted file mode 100644 index 0cf0d5bd1303..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v1/iam_policy" -require "google/cloud/batch/v1/version" - -module Google - module Iam - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/v1" - # client = ::Google::Iam::V1::IAMPolicy::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/v1" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module V1 - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/iam/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb deleted file mode 100644 index 9797016a6751..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/bindings_override.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Iam - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/iam/v1/rest" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Iam"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb deleted file mode 100644 index e4bdf8b4e266..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/batch/v1/version" - -require "google/iam/v1/iam_policy/credentials" -require "google/iam/v1/iam_policy/client" -require "google/iam/v1/iam_policy/rest" - -module Google - module Iam - module V1 - ## - # API Overview - # - # Manages Identity and Access Management (IAM) policies. - # - # Any implementation of an API that offers access control features - # implements the google.iam.v1.IAMPolicy interface. - # - # ## Data model - # - # Access control is applied when a principal (user or service account), takes - # some action on a resource exposed by a service. Resources, identified by - # URI-like names, are the unit of access control specification. Service - # implementations can choose the granularity of access control and the - # supported permissions for their resources. - # For example one database service may allow access control to be - # specified only at the Table level, whereas another might allow access control - # to also be specified at the Column level. - # - # ## Policy Structure - # - # See google.iam.v1.Policy - # - # This is intentionally not a CRUD style API because access control policies - # are created and deleted implicitly with the resources to which they are - # attached. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/v1/iam_policy" - # client = ::Google::Iam::V1::IAMPolicy::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/v1/iam_policy/rest" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module IAMPolicy - end - end - end -end - -helper_path = ::File.join __dir__, "iam_policy", "helpers.rb" -require "google/iam/v1/iam_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb deleted file mode 100644 index 90f72f78a9c3..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/client.rb +++ /dev/null @@ -1,727 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/iam/v1/iam_policy_pb" -require "google/cloud/location" - -module Google - module Iam - module V1 - module IAMPolicy - ## - # Client for the IAMPolicy service. - # - # API Overview - # - # Manages Identity and Access Management (IAM) policies. - # - # Any implementation of an API that offers access control features - # implements the google.iam.v1.IAMPolicy interface. - # - # ## Data model - # - # Access control is applied when a principal (user or service account), takes - # some action on a resource exposed by a service. Resources, identified by - # URI-like names, are the unit of access control specification. Service - # implementations can choose the granularity of access control and the - # supported permissions for their resources. - # For example one database service may allow access control to be - # specified only at the Table level, whereas another might allow access control - # to also be specified at the Column level. - # - # ## Policy Structure - # - # See google.iam.v1.Policy - # - # This is intentionally not a CRUD style API because access control policies - # are created and deleted implicitly with the resources to which they are - # attached. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :iam_policy_stub - - ## - # Configure the IAMPolicy Client class. - # - # See {::Google::Iam::V1::IAMPolicy::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IAMPolicy clients - # ::Google::Iam::V1::IAMPolicy::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Iam", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the IAMPolicy Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Iam::V1::IAMPolicy::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @iam_policy_stub.universe_domain - end - - ## - # Create a new IAMPolicy client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V1::IAMPolicy::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IAMPolicy client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/iam/v1/iam_policy_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @iam_policy_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::V1::IAMPolicy::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @iam_policy_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @iam_policy_stub.endpoint - config.universe_domain = @iam_policy_stub.universe_domain - config.logger = @iam_policy_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @iam_policy_stub.logger - end - - # Service calls - - ## - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # - # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_policy_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_policy_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a `NOT_FOUND` error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_policy_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the IAMPolicy API. - # - # This class represents the configuration for IAMPolicy, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Iam::V1::IAMPolicy::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # set_iam_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V1::IAMPolicy::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.set_iam_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.set_iam_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the IAMPolicy API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb deleted file mode 100644 index ae4df78450b3..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/credentials.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Iam - module V1 - module IAMPolicy - # Credentials for the IAMPolicy API. - class Credentials < ::Google::Auth::Credentials - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb deleted file mode 100644 index cd6d6cbdd883..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/batch/v1/version" -require "google/iam/v1/bindings_override" - -require "google/iam/v1/iam_policy/credentials" -require "google/iam/v1/iam_policy/rest/client" - -module Google - module Iam - module V1 - ## - # API Overview - # - # Manages Identity and Access Management (IAM) policies. - # - # Any implementation of an API that offers access control features - # implements the google.iam.v1.IAMPolicy interface. - # - # ## Data model - # - # Access control is applied when a principal (user or service account), takes - # some action on a resource exposed by a service. Resources, identified by - # URI-like names, are the unit of access control specification. Service - # implementations can choose the granularity of access control and the - # supported permissions for their resources. - # For example one database service may allow access control to be - # specified only at the Table level, whereas another might allow access control - # to also be specified at the Column level. - # - # ## Policy Structure - # - # See google.iam.v1.Policy - # - # This is intentionally not a CRUD style API because access control policies - # are created and deleted implicitly with the resources to which they are - # attached. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/v1/iam_policy/rest" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module IAMPolicy - # Client for the REST transport - module Rest - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/v1/iam_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb deleted file mode 100644 index 0537cf607ef9..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/client.rb +++ /dev/null @@ -1,671 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/iam/v1/iam_policy_pb" -require "google/iam/v1/iam_policy/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Iam - module V1 - module IAMPolicy - module Rest - ## - # REST client for the IAMPolicy service. - # - # API Overview - # - # Manages Identity and Access Management (IAM) policies. - # - # Any implementation of an API that offers access control features - # implements the google.iam.v1.IAMPolicy interface. - # - # ## Data model - # - # Access control is applied when a principal (user or service account), takes - # some action on a resource exposed by a service. Resources, identified by - # URI-like names, are the unit of access control specification. Service - # implementations can choose the granularity of access control and the - # supported permissions for their resources. - # For example one database service may allow access control to be - # specified only at the Table level, whereas another might allow access control - # to also be specified at the Column level. - # - # ## Policy Structure - # - # See google.iam.v1.Policy - # - # This is intentionally not a CRUD style API because access control policies - # are created and deleted implicitly with the resources to which they are - # attached. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :iam_policy_stub - - ## - # Configure the IAMPolicy Client class. - # - # See {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IAMPolicy clients - # ::Google::Iam::V1::IAMPolicy::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Iam", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the IAMPolicy Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @iam_policy_stub.universe_domain - end - - ## - # Create a new IAMPolicy REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IAMPolicy client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @iam_policy_stub = ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @iam_policy_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @iam_policy_stub.endpoint - config.universe_domain = @iam_policy_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @iam_policy_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @iam_policy_stub.logger - end - - # Service calls - - ## - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # - # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_policy_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_policy_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a `NOT_FOUND` error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::V1::IAMPolicy::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Batch::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_policy_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the IAMPolicy REST API. - # - # This class represents the configuration for IAMPolicy REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # set_iam_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::V1::IAMPolicy::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.set_iam_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.set_iam_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iam-meta-api.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the IAMPolicy API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb deleted file mode 100644 index 0a767ec9f84a..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/iam_policy/rest/service_stub.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v1/iam_policy_pb" - -module Google - module Iam - module V1 - module IAMPolicy - module Rest - ## - # REST service stub for the IAMPolicy service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^.*$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^.*$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^.*$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb b/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb deleted file mode 100644 index 548e0e659b74..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/lib/google/iam/v1/rest.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/v1/iam_policy/rest" -require "google/iam/v1/bindings_override" -require "google/cloud/batch/v1/version" - -module Google - module Iam - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/v1/rest" - # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new - # - module V1 - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md deleted file mode 100644 index 40b55bf3d716..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Batch V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb deleted file mode 100644 index 2c6e39a147a3..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/batch.rb +++ /dev/null @@ -1,246 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - # CreateJob Request. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name where the Job will be created. - # Pattern: "projects/\\{project}/locations/\\{location}" - # @!attribute [rw] job_id - # @return [::String] - # ID used to uniquely identify the Job within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and '-' are accepted. - # The '-' character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The job.name field in the request will be ignored and the created resource - # name of the Job will be "\\{parent}/jobs/\\{job_id}". - # @!attribute [rw] job - # @return [::Google::Cloud::Batch::V1::Job] - # Required. The Job to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetJob Request. - # @!attribute [rw] name - # @return [::String] - # Required. Job name. - class GetJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteJob Request. - # @!attribute [rw] name - # @return [::String] - # Job name. - # @!attribute [rw] reason - # @return [::String] - # Optional. Reason for this deletion. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CancelJob Request. - # @!attribute [rw] name - # @return [::String] - # Required. Job name. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CancelJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to the CancelJob request. - class CancelJobResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListJob Request. - # @!attribute [rw] parent - # @return [::String] - # Parent path. - # @!attribute [rw] filter - # @return [::String] - # List filter. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Sort results. Supported are "name", "name desc", "create_time", - # and "create_time desc". - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token. - class ListJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListJob Response. - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Batch::V1::Job>] - # Jobs. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListTasks Request. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of a TaskGroup from which Tasks are being requested. - # Pattern: - # "projects/\\{project}/locations/\\{location}/jobs/\\{job}/taskGroups/\\{task_group}" - # @!attribute [rw] filter - # @return [::String] - # Task filter, null filter matches all Tasks. - # Filter string should be of the format State=TaskStatus.State e.g. - # State=RUNNING - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token. - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListTasks Response. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Batch::V1::Task>] - # Tasks. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for a single Task by name. - # @!attribute [rw] name - # @return [::String] - # Required. Task name. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb deleted file mode 100644 index eec32377762d..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/job.rb +++ /dev/null @@ -1,789 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - # The Cloud Batch Job description. - # @!attribute [r] name - # @return [::String] - # Output only. Job name. - # For example: "projects/123456/locations/us-central1/jobs/job01". - # @!attribute [r] uid - # @return [::String] - # Output only. A system generated unique ID for the Job. - # @!attribute [rw] priority - # @return [::Integer] - # Priority of the Job. - # The valid value range is [0, 100). Default value is 0. - # Higher value indicates higher priority. - # A job with higher priority value is more likely to run earlier if all other - # requirements are satisfied. - # @!attribute [rw] task_groups - # @return [::Array<::Google::Cloud::Batch::V1::TaskGroup>] - # Required. TaskGroups in the Job. Only one TaskGroup is supported now. - # @!attribute [rw] allocation_policy - # @return [::Google::Cloud::Batch::V1::AllocationPolicy] - # Compute resource allocation for all TaskGroups in the Job. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Custom labels to apply to the job and any Cloud Logging - # [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) - # that it generates. - # - # Use labels to group and describe the resources they are applied to. Batch - # automatically applies predefined labels and supports multiple `labels` - # fields for each job, which each let you apply custom labels to various - # resources. Label names that start with "goog-" or "google-" are - # reserved for predefined labels. For more information about labels with - # Batch, see - # [Organize resources using - # labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). - # @!attribute [r] status - # @return [::Google::Cloud::Batch::V1::JobStatus] - # Output only. Job status. It is read only for users. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the Job was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time the Job was updated. - # @!attribute [rw] logs_policy - # @return [::Google::Cloud::Batch::V1::LogsPolicy] - # Log preservation policy for the Job. - # @!attribute [rw] notifications - # @return [::Array<::Google::Cloud::Batch::V1::JobNotification>] - # Notification configurations. - class Job - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # LogsPolicy describes if and how a job's logs are preserved. Logs include - # information that is automatically written by the Batch service agent and any - # information that you configured the job's runnables to write to the `stdout` - # or `stderr` streams. - # @!attribute [rw] destination - # @return [::Google::Cloud::Batch::V1::LogsPolicy::Destination] - # If and where logs should be saved. - # @!attribute [rw] logs_path - # @return [::String] - # When `destination` is set to `PATH`, you must set this field to the path - # where you want logs to be saved. This path can point to a local directory - # on the VM or (if congifured) a directory under the mount path of any - # Cloud Storage bucket, network file system (NFS), or writable persistent - # disk that is mounted to the job. For example, if the job has a bucket with - # `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the - # root directory of the `remotePath` of that bucket by setting this field to - # `/mnt/disks/my-bucket/`. - # @!attribute [rw] cloud_logging_option - # @return [::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption] - # Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally - # set this field to configure additional settings for Cloud Logging. - class LogsPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `CloudLoggingOption` contains additional settings for Cloud Logging logs - # generated by Batch job. - # @!attribute [rw] use_generic_task_monitored_resource - # @return [::Boolean] - # Optional. Set this field to `true` to change the [monitored resource - # type](https://cloud.google.com/monitoring/api/resources) for - # Cloud Logging logs generated by this Batch job from - # the - # [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - # type to the formerly used - # [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - # type. - class CloudLoggingOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The destination (if any) for logs. - module Destination - # (Default) Logs are not preserved. - DESTINATION_UNSPECIFIED = 0 - - # Logs are streamed to Cloud Logging. Optionally, you can configure - # additional settings in the `cloudLoggingOption` field. - CLOUD_LOGGING = 1 - - # Logs are saved to the file path specified in the `logsPath` field. - PATH = 2 - end - end - - # Job status. - # @!attribute [rw] state - # @return [::Google::Cloud::Batch::V1::JobStatus::State] - # Job state - # @!attribute [rw] status_events - # @return [::Array<::Google::Cloud::Batch::V1::StatusEvent>] - # Job status events - # @!attribute [rw] task_groups - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Batch::V1::JobStatus::TaskGroupStatus}] - # Aggregated task status for each TaskGroup in the Job. - # The map key is TaskGroup ID. - # @!attribute [rw] run_duration - # @return [::Google::Protobuf::Duration] - # The duration of time that the Job spent in status RUNNING. - class JobStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VM instance status. - # @!attribute [rw] machine_type - # @return [::String] - # The Compute Engine machine type. - # @!attribute [rw] provisioning_model - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel] - # The VM instance provisioning model. - # @!attribute [rw] task_pack - # @return [::Integer] - # The max number of tasks can be assigned to this instance type. - # @!attribute [rw] boot_disk - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] - # The VM boot disk. - class InstanceStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Aggregated task status for a TaskGroup. - # @!attribute [rw] counts - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # Count of task in each state in the TaskGroup. - # The map key is task state name. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::Batch::V1::JobStatus::InstanceStatus>] - # Status of instances allocated for the TaskGroup. - class TaskGroupStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class CountsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Batch::V1::JobStatus::TaskGroupStatus] - class TaskGroupsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Valid Job states. - module State - # Job state unspecified. - STATE_UNSPECIFIED = 0 - - # Job is admitted (validated and persisted) and waiting for resources. - QUEUED = 1 - - # Job is scheduled to run as soon as resource allocation is ready. - # The resource allocation may happen at a later time but with a high - # chance to succeed. - SCHEDULED = 2 - - # Resource allocation has been successful. At least one Task in the Job is - # RUNNING. - RUNNING = 3 - - # All Tasks in the Job have finished successfully. - SUCCEEDED = 4 - - # At least one Task in the Job has failed. - FAILED = 5 - - # The Job will be deleted, but has not been deleted yet. Typically this is - # because resources used by the Job are still being cleaned up. - DELETION_IN_PROGRESS = 6 - - # The Job cancellation is in progress, this is because the resources used - # by the Job are still being cleaned up. - CANCELLATION_IN_PROGRESS = 7 - - # The Job has been cancelled, the task executions were stopped and the - # resources were cleaned up. - CANCELLED = 8 - end - end - - # Notification configurations. - # @!attribute [rw] pubsub_topic - # @return [::String] - # The Pub/Sub topic where notifications for the job, like state - # changes, will be published. If undefined, no Pub/Sub notifications - # are sent for this job. - # - # Specify the topic using the following format: - # `projects/{project}/topics/{topic}`. - # Notably, if you want to specify a Pub/Sub topic that is in a - # different project than the job, your administrator must grant your - # project's Batch service agent permission to publish to that topic. - # - # For more information about configuring Pub/Sub notifications for - # a job, see - # https://cloud.google.com/batch/docs/enable-notifications. - # @!attribute [rw] message - # @return [::Google::Cloud::Batch::V1::JobNotification::Message] - # The attribute requirements of messages to be sent to this Pub/Sub topic. - # Without this field, no message will be sent. - class JobNotification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message details. - # Describe the conditions under which messages will be sent. - # If no attribute is defined, no message will be sent by default. - # One message should specify either the job or the task level attributes, - # but not both. For example, - # job level: JOB_STATE_CHANGED and/or a specified new_job_state; - # task level: TASK_STATE_CHANGED and/or a specified new_task_state. - # @!attribute [rw] type - # @return [::Google::Cloud::Batch::V1::JobNotification::Type] - # The message type. - # @!attribute [rw] new_job_state - # @return [::Google::Cloud::Batch::V1::JobStatus::State] - # The new job state. - # @!attribute [rw] new_task_state - # @return [::Google::Cloud::Batch::V1::TaskStatus::State] - # The new task state. - class Message - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message type. - module Type - # Unspecified. - TYPE_UNSPECIFIED = 0 - - # Notify users that the job state has changed. - JOB_STATE_CHANGED = 1 - - # Notify users that the task state has changed. - TASK_STATE_CHANGED = 2 - end - end - - # A Job's resource allocation policy describes when, where, and how compute - # resources should be allocated for the Job. - # @!attribute [rw] location - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::LocationPolicy] - # Location where compute resources should be allocated for the Job. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicyOrTemplate>] - # Describe instances that can be created by this AllocationPolicy. - # Only instances[0] is supported now. - # @!attribute [rw] service_account - # @return [::Google::Cloud::Batch::V1::ServiceAccount] - # Defines the service account for Batch-created VMs. If omitted, the [default - # Compute Engine service - # account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - # is used. Must match the service account specified in any used instance - # template configured in the Batch job. - # - # Includes the following fields: - # * email: The service account's email address. If not set, the default - # Compute Engine service account is used. - # * scopes: Additional OAuth scopes to grant the service account, beyond the - # default cloud-platform scope. (list of strings) - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Custom labels to apply to the job and all the Compute Engine resources - # that both are created by this allocation policy and support labels. - # - # Use labels to group and describe the resources they are applied to. Batch - # automatically applies predefined labels and supports multiple `labels` - # fields for each job, which each let you apply custom labels to various - # resources. Label names that start with "goog-" or "google-" are - # reserved for predefined labels. For more information about labels with - # Batch, see - # [Organize resources using - # labels](https://cloud.google.com/batch/docs/organize-resources-using-labels). - # @!attribute [rw] network - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::NetworkPolicy] - # The network policy. - # - # If you define an instance template in the `InstancePolicyOrTemplate` field, - # Batch will use the network settings in the instance template instead of - # this field. - # @!attribute [rw] placement - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::PlacementPolicy] - # The placement policy. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Optional. Tags applied to the VM instances. - # - # The tags identify valid sources or targets for network firewalls. - # Each tag must be 1-63 characters long, and comply with - # [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - class AllocationPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] allowed_locations - # @return [::Array<::String>] - # A list of allowed location names represented by internal URLs. - # - # Each location can be a region or a zone. - # Only one region or multiple zones in one region is supported now. - # For example, - # ["regions/us-central1"] allow VMs in any zones in region us-central1. - # ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - # in zones us-central1-a and us-central1-c. - # - # Mixing locations from different regions would cause errors. - # For example, - # ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - # "zones/us-west1-a"] contains locations from two distinct regions: - # us-central1 and us-west1. This combination will trigger an error. - class LocationPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A new persistent disk or a local ssd. - # A VM can only have one local SSD setting but multiple local SSD partitions. - # See https://cloud.google.com/compute/docs/disks#pdspecs and - # https://cloud.google.com/compute/docs/disks#localssds. - # @!attribute [rw] image - # @return [::String] - # URL for a VM image to use as the data source for this disk. - # For example, the following are all valid URLs: - # - # * Specify the image by its family name: - # projects/\\{project}/global/images/family/\\{image_family} - # * Specify the image version: - # projects/\\{project}/global/images/\\{image_version} - # - # You can also use Batch customized image in short names. - # The following image values are supported for a boot disk: - # - # * `batch-debian`: use Batch Debian images. - # * `batch-cos`: use Batch Container-Optimized images. - # * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. - # - # Note: The following fields are mutually exclusive: `image`, `snapshot`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] snapshot - # @return [::String] - # Name of a snapshot used as the data source. - # Snapshot is not supported as boot disk now. - # - # Note: The following fields are mutually exclusive: `snapshot`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type - # @return [::String] - # Disk type as shown in `gcloud compute disk-types list`. - # For example, local SSD uses type "local-ssd". - # Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - # or "pd-standard". If not specified, "pd-standard" will be used as the - # default type for non-boot disks, "pd-balanced" will be used as the - # default type for boot disks. - # @!attribute [rw] size_gb - # @return [::Integer] - # Disk size in GB. - # - # **Non-Boot Disk**: - # If the `type` specifies a persistent disk, this field - # is ignored if `data_source` is set as `image` or `snapshot`. - # If the `type` specifies a local SSD, this field should be a multiple of - # 375 GB, otherwise, the final size will be the next greater multiple of - # 375 GB. - # - # **Boot Disk**: - # Batch will calculate the boot disk size based on source - # image and task requirements if you do not speicify the size. - # If both this field and the `boot_disk_mib` field in task spec's - # `compute_resource` are defined, Batch will only honor this field. - # Also, this field should be no smaller than the source disk's - # size when the `data_source` is set as `snapshot` or `image`. - # For example, if you set an image as the `data_source` field and the - # image's default disk size 30 GB, you can only use this field to make the - # disk larger or equal to 30 GB. - # @!attribute [rw] disk_interface - # @return [::String] - # Local SSDs are available through both "SCSI" and "NVMe" interfaces. - # If not indicated, "NVMe" will be the default one for local ssds. - # This field is ignored for persistent disks as the interface is chosen - # automatically. See - # https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - class Disk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A new or an existing persistent disk (PD) or a local ssd attached to a VM - # instance. - # @!attribute [rw] new_disk - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] - # Note: The following fields are mutually exclusive: `new_disk`, `existing_disk`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] existing_disk - # @return [::String] - # Name of an existing PD. - # - # Note: The following fields are mutually exclusive: `existing_disk`, `new_disk`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] device_name - # @return [::String] - # Device name that the guest operating system will see. - # It is used by Runnable.volumes field to mount disks. So please specify - # the device_name if you want Batch to help mount the disk, and it should - # match the device_name field in volumes. - class AttachedDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Accelerator describes Compute Engine accelerators to be attached to the VM. - # @!attribute [rw] type - # @return [::String] - # The accelerator type. For example, "nvidia-tesla-t4". - # See `gcloud compute accelerator-types list`. - # @!attribute [rw] count - # @return [::Integer] - # The number of accelerators of this type. - # @!attribute [rw] install_gpu_drivers - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated: please use instances[0].install_gpu_drivers instead. - # @!attribute [rw] driver_version - # @return [::String] - # Optional. The NVIDIA GPU driver version that should be installed for this - # type. - # - # You can define the specific driver version such as "470.103.01", - # following the driver version requirements in - # https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - # Batch will install the specific accelerator driver if qualified. - class Accelerator - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InstancePolicy describes an instance type and resources attached to each VM - # created by this InstancePolicy. - # @!attribute [rw] machine_type - # @return [::String] - # The Compute Engine machine type. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # The minimum CPU platform. - # See - # https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - # @!attribute [rw] provisioning_model - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::ProvisioningModel] - # The provisioning model. - # @!attribute [rw] accelerators - # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::Accelerator>] - # The accelerators attached to each VM instance. - # @!attribute [rw] boot_disk - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::Disk] - # Boot disk to be created and attached to each VM by this InstancePolicy. - # Boot disk will be deleted when the VM is deleted. - # Batch API now only supports booting from image. - # @!attribute [rw] disks - # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::AttachedDisk>] - # Non-boot disks to be attached for each VM created by this InstancePolicy. - # New disks will be deleted when the VM is deleted. - # A non-boot disk is a disk that can be of a device with a - # file system or a raw storage drive that is not ready for data - # storage and accessing. - # @!attribute [rw] reservation - # @return [::String] - # Optional. If not specified (default), VMs will consume any applicable - # reservation. If "NO_RESERVATION" is specified, VMs will not consume any - # reservation. Otherwise, if specified, VMs will consume only the specified - # reservation. - class InstancePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InstancePolicyOrTemplate lets you define the type of resources to use for - # this job either with an InstancePolicy or an instance template. - # If undefined, Batch picks the type of VM to use and doesn't include - # optional VM resources such as GPUs and extra disks. - # @!attribute [rw] policy - # @return [::Google::Cloud::Batch::V1::AllocationPolicy::InstancePolicy] - # InstancePolicy. - # - # Note: The following fields are mutually exclusive: `policy`, `instance_template`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] instance_template - # @return [::String] - # Name of an instance template used to create VMs. - # Named the field as 'instance_template' instead of 'template' to avoid - # C++ keyword conflict. - # - # Batch only supports global instance templates from the same project as - # the job. - # You can specify the global instance template as a full or partial URL. - # - # Note: The following fields are mutually exclusive: `instance_template`, `policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] install_gpu_drivers - # @return [::Boolean] - # Set this field true if you want Batch to help fetch drivers from a third - # party location and install them for GPUs specified in - # `policy.accelerators` or `instance_template` on your behalf. Default is - # false. - # - # For Container-Optimized Image cases, Batch will install the - # accelerator driver following milestones of - # https://cloud.google.com/container-optimized-os/docs/release-notes. For - # non Container-Optimized Image cases, following - # https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - # @!attribute [rw] install_ops_agent - # @return [::Boolean] - # Optional. Set this field true if you want Batch to install Ops Agent on - # your behalf. Default is false. - # @!attribute [rw] block_project_ssh_keys - # @return [::Boolean] - # Optional. Set this field to `true` if you want Batch to block - # project-level SSH keys from accessing this job's VMs. Alternatively, you - # can configure the job to specify a VM instance template that blocks - # project-level SSH keys. In either case, Batch blocks project-level SSH - # keys while creating the VMs for this job. - # - # Batch allows project-level SSH keys for a job's VMs only if all - # the following are true: - # - # + This field is undefined or set to `false`. - # + The job's VM instance template (if any) doesn't block project-level - # SSH keys. - # - # Notably, you can override this behavior by manually updating a VM to - # block or allow project-level SSH keys. For more information about - # blocking project-level SSH keys, see the Compute Engine documentation: - # https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys - class InstancePolicyOrTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A network interface. - # @!attribute [rw] network - # @return [::String] - # The URL of an existing network resource. - # You can specify the network as a full or partial URL. - # - # For example, the following are all valid URLs: - # - # * https://www.googleapis.com/compute/v1/projects/\\{project}/global/networks/\\{network} - # * projects/\\{project}/global/networks/\\{network} - # * global/networks/\\{network} - # @!attribute [rw] subnetwork - # @return [::String] - # The URL of an existing subnetwork resource in the network. - # You can specify the subnetwork as a full or partial URL. - # - # For example, the following are all valid URLs: - # - # * https://www.googleapis.com/compute/v1/projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} - # * projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetwork} - # * regions/\\{region}/subnetworks/\\{subnetwork} - # @!attribute [rw] no_external_ip_address - # @return [::Boolean] - # Default is false (with an external IP address). Required if - # no external public IP address is attached to the VM. If no external - # public IP address, additional configuration is required to allow the VM - # to access Google Services. See - # https://cloud.google.com/vpc/docs/configure-private-google-access and - # https://cloud.google.com/nat/docs/gce-example#create-nat for more - # information. - class NetworkInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NetworkPolicy describes VM instance network configurations. - # @!attribute [rw] network_interfaces - # @return [::Array<::Google::Cloud::Batch::V1::AllocationPolicy::NetworkInterface>] - # Network configurations. - class NetworkPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PlacementPolicy describes a group placement policy for the VMs controlled - # by this AllocationPolicy. - # @!attribute [rw] collocation - # @return [::String] - # UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - # want VMs to be located close to each other for low network latency - # between the VMs. No placement policy will be generated when collocation - # is UNSPECIFIED. - # @!attribute [rw] max_distance - # @return [::Integer] - # When specified, causes the job to fail if more than max_distance logical - # switches are required between VMs. Batch uses the most compact possible - # placement of VMs even when max_distance is not specified. An explicit - # max_distance makes that level of compactness a strict requirement. - # Not yet implemented - class PlacementPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Compute Engine VM instance provisioning model. - module ProvisioningModel - # Unspecified. - PROVISIONING_MODEL_UNSPECIFIED = 0 - - # Standard VM. - STANDARD = 1 - - # SPOT VM. - SPOT = 2 - - # Preemptible VM (PVM). - # - # Above SPOT VM is the preferable model for preemptible VM instances: the - # old preemptible VM model (indicated by this field) is the older model, - # and has been migrated to use the SPOT model as the underlying technology. - # This old model will still be supported. - PREEMPTIBLE = 3 - - # Bound to the lifecycle of the reservation in which it is provisioned. - RESERVATION_BOUND = 4 - - # Instance is provisioned with DWS Flex Start and has limited max run - # duration. - FLEX_START = 5 - end - end - - # A TaskGroup defines one or more Tasks that all share the same TaskSpec. - # @!attribute [r] name - # @return [::String] - # Output only. TaskGroup name. - # The system generates this field based on parent Job name. - # For example: - # "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - # @!attribute [rw] task_spec - # @return [::Google::Cloud::Batch::V1::TaskSpec] - # Required. Tasks in the group share the same task spec. - # @!attribute [rw] task_count - # @return [::Integer] - # Number of Tasks in the TaskGroup. - # Default is 1. - # @!attribute [rw] parallelism - # @return [::Integer] - # Max number of tasks that can run in parallel. - # Default to min(task_count, parallel tasks per job limit). - # See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - # Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - # @!attribute [rw] scheduling_policy - # @return [::Google::Cloud::Batch::V1::TaskGroup::SchedulingPolicy] - # Scheduling policy for Tasks in the TaskGroup. - # The default value is AS_SOON_AS_POSSIBLE. - # @!attribute [rw] task_environments - # @return [::Array<::Google::Cloud::Batch::V1::Environment>] - # An array of environment variable mappings, which are passed to Tasks with - # matching indices. If task_environments is used then task_count should - # not be specified in the request (and will be ignored). Task count will be - # the length of task_environments. - # - # Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - # addition to any environment variables set in task_environments, specifying - # the number of Tasks in the Task's parent TaskGroup, and the specific Task's - # index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - # @!attribute [rw] task_count_per_node - # @return [::Integer] - # Max number of tasks that can be run on a VM at the same time. - # If not specified, the system will decide a value based on available - # compute resources on a VM and task requirements. - # @!attribute [rw] require_hosts_file - # @return [::Boolean] - # When true, Batch will populate a file with a list of all VMs assigned to - # the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - # of that file. Defaults to false. The host file supports up to 1000 VMs. - # @!attribute [rw] permissive_ssh - # @return [::Boolean] - # When true, Batch will configure SSH to allow passwordless login between - # VMs running the Batch tasks in the same TaskGroup. - # @!attribute [rw] run_as_non_root - # @return [::Boolean] - # Optional. If not set or set to false, Batch uses the root user to execute - # runnables. If set to true, Batch runs the runnables using a non-root user. - # Currently, the non-root user Batch used is generated by OS Login. For more - # information, see [About OS - # Login](https://cloud.google.com/compute/docs/oslogin). - class TaskGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How Tasks in the TaskGroup should be scheduled relative to each other. - module SchedulingPolicy - # Unspecified. - SCHEDULING_POLICY_UNSPECIFIED = 0 - - # Run Tasks as soon as resources are available. - # - # Tasks might be executed in parallel depending on parallelism and - # task_count values. - AS_SOON_AS_POSSIBLE = 1 - - # Run Tasks sequentially with increased task index. - IN_ORDER = 2 - end - end - - # Carries information about a Google Cloud service account. - # @!attribute [rw] email - # @return [::String] - # Email address of the service account. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # List of scopes to be enabled for this service account. - class ServiceAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb deleted file mode 100644 index 4f4c80930d3c..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/task.rb +++ /dev/null @@ -1,547 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - # Compute resource requirements. - # - # ComputeResource defines the amount of resources required for each task. - # Make sure your tasks have enough resources to successfully run. - # If you also define the types of resources for a job to use with the - # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - # field, make sure both fields are compatible with each other. - # @!attribute [rw] cpu_milli - # @return [::Integer] - # The milliCPU count. - # - # `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - # For example, `1000` corresponds to 1 vCPU per task. If undefined, the - # default value is `2000`. - # - # If you also define the VM's machine type using the `machineType` in - # [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - # field or inside the `instanceTemplate` in the - # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - # field, make sure the CPU resources for both fields are compatible with each - # other and with how many tasks you want to allow to run on the same VM at - # the same time. - # - # For example, if you specify the `n2-standard-2` machine type, which has 2 - # vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - # you are recommended to run two tasks on the same VM if you set `cpuMilli` - # to `1000` or less. - # @!attribute [rw] memory_mib - # @return [::Integer] - # Memory in MiB. - # - # `memoryMib` defines the amount of memory per task in MiB units. - # If undefined, the default value is `2000`. - # If you also define the VM's machine type using the `machineType` in - # [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - # field or inside the `instanceTemplate` in the - # [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - # field, make sure the memory resources for both fields are compatible with - # each other and with how many tasks you want to allow to run on the same VM - # at the same time. - # - # For example, if you specify the `n2-standard-2` machine type, which has 8 - # GiB each, you are recommended to set `memoryMib` to no more than `8192`, - # or you are recommended to run two tasks on the same VM if you set - # `memoryMib` to `4096` or less. - # @!attribute [rw] boot_disk_mib - # @return [::Integer] - # Extra boot disk size in MiB for each task. - class ComputeResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status event. - # @!attribute [rw] type - # @return [::String] - # Type of the event. - # @!attribute [rw] description - # @return [::String] - # Description of the event. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # The time this event occurred. - # @!attribute [rw] task_execution - # @return [::Google::Cloud::Batch::V1::TaskExecution] - # Task Execution. - # This field is only defined for task-level status events where the task - # fails. - # @!attribute [rw] task_state - # @return [::Google::Cloud::Batch::V1::TaskStatus::State] - # Task State. - # This field is only defined for task-level status events. - class StatusEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This Task Execution field includes detail information for - # task execution procedures, based on StatusEvent types. - # @!attribute [rw] exit_code - # @return [::Integer] - # The exit code of a finished task. - # - # If the task succeeded, the exit code will be 0. If the task failed but not - # due to the following reasons, the exit code will be 50000. - # - # Otherwise, it can be from different sources: - # * Batch known failures: - # https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - # * Batch runnable execution failures; you can rely on Batch logs to further - # diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - # there are multiple runnables failures, Batch only exposes the first error. - class TaskExecution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of a task. - # @!attribute [rw] state - # @return [::Google::Cloud::Batch::V1::TaskStatus::State] - # Task state. - # @!attribute [rw] status_events - # @return [::Array<::Google::Cloud::Batch::V1::StatusEvent>] - # Detailed info about why the state is reached. - class TaskStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Task states. - module State - # Unknown state. - STATE_UNSPECIFIED = 0 - - # The Task is created and waiting for resources. - PENDING = 1 - - # The Task is assigned to at least one VM. - ASSIGNED = 2 - - # The Task is running. - RUNNING = 3 - - # The Task has failed. - FAILED = 4 - - # The Task has succeeded. - SUCCEEDED = 5 - - # The Task has not been executed when the Job finishes. - UNEXECUTED = 6 - end - end - - # Runnable describes instructions for executing a specific script or container - # as part of a Task. - # @!attribute [rw] container - # @return [::Google::Cloud::Batch::V1::Runnable::Container] - # Container runnable. - # - # Note: The following fields are mutually exclusive: `container`, `script`, `barrier`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] script - # @return [::Google::Cloud::Batch::V1::Runnable::Script] - # Script runnable. - # - # Note: The following fields are mutually exclusive: `script`, `container`, `barrier`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] barrier - # @return [::Google::Cloud::Batch::V1::Runnable::Barrier] - # Barrier runnable. - # - # Note: The following fields are mutually exclusive: `barrier`, `container`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] display_name - # @return [::String] - # Optional. DisplayName is an optional field that can be provided by the - # caller. If provided, it will be used in logs and other outputs to identify - # the script, making it easier for users to understand the logs. If not - # provided the index of the runnable will be used for outputs. - # @!attribute [rw] ignore_exit_status - # @return [::Boolean] - # Normally, a runnable that returns a non-zero exit status fails and causes - # the task to fail. However, you can set this field to `true` to allow the - # task to continue executing its other runnables even if this runnable - # fails. - # @!attribute [rw] background - # @return [::Boolean] - # Normally, a runnable that doesn't exit causes its task to fail. However, - # you can set this field to `true` to configure a background runnable. - # Background runnables are allowed continue running in the background while - # the task executes subsequent runnables. For example, background runnables - # are useful for providing services to other runnables or providing - # debugging-support tools like SSH servers. - # - # Specifically, background runnables are killed automatically (if they have - # not already exited) a short time after all foreground runnables have - # completed. Even though this is likely to result in a non-zero exit status - # for the background runnable, these automatic kills are not treated as task - # failures. - # @!attribute [rw] always_run - # @return [::Boolean] - # By default, after a Runnable fails, no further Runnable are executed. This - # flag indicates that this Runnable must be run even if the Task has already - # failed. This is useful for Runnables that copy output files off of the VM - # or for debugging. - # - # The always_run flag does not override the Task's overall max_run_duration. - # If the max_run_duration has expired then no further Runnables will execute, - # not even always_run Runnables. - # @!attribute [rw] environment - # @return [::Google::Cloud::Batch::V1::Environment] - # Environment variables for this Runnable (overrides variables set for the - # whole Task or TaskGroup). - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Timeout for this Runnable. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels for this Runnable. - class Runnable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Container runnable. - # @!attribute [rw] image_uri - # @return [::String] - # Required. The URI to pull the container image from. - # @!attribute [rw] commands - # @return [::Array<::String>] - # Required for some container images. Overrides the `CMD` specified in the - # container. If there is an `ENTRYPOINT` (either in the container image or - # with the `entrypoint` field below) then these commands are appended as - # arguments to the `ENTRYPOINT`. - # @!attribute [rw] entrypoint - # @return [::String] - # Required for some container images. Overrides the `ENTRYPOINT` specified - # in the container. - # @!attribute [rw] volumes - # @return [::Array<::String>] - # Volumes to mount (bind mount) from the host machine files or directories - # into the container, formatted to match `--volume` option for the - # `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. - # - # If the `TaskSpec.Volumes` field is specified but this field is not, Batch - # will mount each volume from the host machine to the container with the - # same mount path by default. In this case, the default mount option for - # containers will be read-only (`ro`) for existing persistent disks and - # read-write (`rw`) for other volume types, regardless of the original - # mount options specified in `TaskSpec.Volumes`. If you need different - # mount settings, you can explicitly configure them in this field. - # @!attribute [rw] options - # @return [::String] - # Required for some container images. Arbitrary additional options to - # include in the `docker run` command when running this container—for - # example, `--network host`. For the `--volume` option, use the `volumes` - # field for the container. - # @!attribute [rw] block_external_network - # @return [::Boolean] - # If set to true, external network access to and from container will be - # blocked, containers that are with block_external_network as true can - # still communicate with each other, network cannot be specified in the - # `container.options` field. - # @!attribute [rw] username - # @return [::String] - # Required if the container image is from a private Docker registry. The - # username to login to the Docker registry that contains the image. - # - # You can either specify the username directly by using plain text or - # specify an encrypted username by using a Secret Manager secret: - # `projects/*/secrets/*/versions/*`. However, using a secret is - # recommended for enhanced security. - # - # Caution: If you specify the username using plain text, you risk the - # username being exposed to any users who can view the job or its logs. - # To avoid this risk, specify a secret that contains the username instead. - # - # Learn more about [Secret - # Manager](https://cloud.google.com/secret-manager/docs/) and [using - # Secret Manager with - # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - # @!attribute [rw] password - # @return [::String] - # Required if the container image is from a private Docker registry. The - # password to login to the Docker registry that contains the image. - # - # For security, it is strongly recommended to specify an - # encrypted password by using a Secret Manager secret: - # `projects/*/secrets/*/versions/*`. - # - # Warning: If you specify the password using plain text, you risk the - # password being exposed to any users who can view the job or its logs. - # To avoid this risk, specify a secret that contains the password instead. - # - # Learn more about [Secret - # Manager](https://cloud.google.com/secret-manager/docs/) and [using - # Secret Manager with - # Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - # @!attribute [rw] enable_image_streaming - # @return [::Boolean] - # Optional. If set to true, this container runnable uses Image streaming. - # - # Use Image streaming to allow the runnable to initialize without - # waiting for the entire container image to download, which can - # significantly reduce startup time for large container images. - # - # When `enableImageStreaming` is set to true, the container - # runtime is [containerd](https://containerd.io/) instead of Docker. - # Additionally, this container runnable only supports the following - # `container` subfields: `imageUri`, - # `commands[]`, `entrypoint`, and - # `volumes[]`; any other `container` subfields are ignored. - # - # For more information about the requirements and limitations for using - # Image streaming with Batch, see the [`image-streaming` - # sample on - # GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - class Container - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Script runnable. - # @!attribute [rw] path - # @return [::String] - # The path to a script file that is accessible from the host VM(s). - # - # Unless the script file supports the default `#!/bin/sh` shell - # interpreter, you must specify an interpreter by including a - # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the - # first line of the file. For example, to execute the script using bash, - # include `#!/bin/bash` as the first line of the file. Alternatively, - # to execute the script using Python3, include `#!/usr/bin/env python3` - # as the first line of the file. - # - # Note: The following fields are mutually exclusive: `path`, `text`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text - # @return [::String] - # The text for a script. - # - # Unless the script text supports the default `#!/bin/sh` shell - # interpreter, you must specify an interpreter by including a - # [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the - # beginning of the text. For example, to execute the script using bash, - # include `#!/bin/bash\n` at the beginning of the text. Alternatively, - # to execute the script using Python3, include `#!/usr/bin/env python3\n` - # at the beginning of the text. - # - # Note: The following fields are mutually exclusive: `text`, `path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Script - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A barrier runnable automatically blocks the execution of subsequent - # runnables until all the tasks in the task group reach the barrier. - # @!attribute [rw] name - # @return [::String] - # Barriers are identified by their index in runnable list. - # Names are not required, but if present should be an identifier. - class Barrier - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Spec of a task - # @!attribute [rw] runnables - # @return [::Array<::Google::Cloud::Batch::V1::Runnable>] - # Required. The sequence of one or more runnables (executable scripts, - # executable containers, and/or barriers) for each task in this task group to - # run. Each task runs this list of runnables in order. For a task to succeed, - # all of its script and container runnables each must meet at least one of - # the following conditions: - # - # + The runnable exited with a zero status. - # + The runnable didn't finish, but you enabled its `background` subfield. - # + The runnable exited with a non-zero status, but you enabled its - # `ignore_exit_status` subfield. - # @!attribute [rw] compute_resource - # @return [::Google::Cloud::Batch::V1::ComputeResource] - # ComputeResource requirements. - # @!attribute [rw] max_run_duration - # @return [::Google::Protobuf::Duration] - # Maximum duration the task should run before being automatically retried - # (if enabled) or automatically failed. Format the value of this field - # as a time limit in seconds followed by `s`—for example, `3600s` - # for 1 hour. The field accepts any value between 0 and the maximum listed - # for the `Duration` field type at - # https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - # the actual maximum run time for a job will be limited to the maximum run - # time for a job listed at - # https://cloud.google.com/batch/quotas#max-job-duration. - # @!attribute [rw] max_retry_count - # @return [::Integer] - # Maximum number of retries on failures. - # The default, 0, which means never retry. - # The valid value range is [0, 10]. - # @!attribute [rw] lifecycle_policies - # @return [::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>] - # Lifecycle management schema when any task in a task group is failed. - # Currently we only support one lifecycle policy. - # When the lifecycle policy condition is met, - # the action in the policy will execute. - # If task execution result does not meet with the defined lifecycle - # policy, we consider it as the default policy. - # Default policy means if the exit code is 0, exit task. - # If task ends with non-zero exit code, retry the task with max_retry_count. - # @!attribute [rw] environments - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Map{::String => ::String}] - # Deprecated: please use environment(non-plural) instead. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::Batch::V1::Volume>] - # Volumes to mount before running Tasks using this TaskSpec. - # @!attribute [rw] environment - # @return [::Google::Cloud::Batch::V1::Environment] - # Environment variables to set before running the Task. - class TaskSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class EnvironmentsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # LifecyclePolicy describes how to deal with task failures - # based on different conditions. - # @!attribute [rw] action - # @return [::Google::Cloud::Batch::V1::LifecyclePolicy::Action] - # Action to execute when ActionCondition is true. - # When RETRY_TASK is specified, we will retry failed tasks - # if we notice any exit code match and fail tasks if no match is found. - # Likewise, when FAIL_TASK is specified, we will fail tasks - # if we notice any exit code match and retry tasks if no match is found. - # @!attribute [rw] action_condition - # @return [::Google::Cloud::Batch::V1::LifecyclePolicy::ActionCondition] - # Conditions that decide why a task failure is dealt with a specific action. - class LifecyclePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Conditions for actions to deal with task failures. - # @!attribute [rw] exit_codes - # @return [::Array<::Integer>] - # Exit codes of a task execution. - # If there are more than 1 exit codes, - # when task executes with any of the exit code in the list, - # the condition is met and the action will be executed. - class ActionCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action on task failures based on different conditions. - module Action - # Action unspecified. - ACTION_UNSPECIFIED = 0 - - # Action that tasks in the group will be scheduled to re-execute. - RETRY_TASK = 1 - - # Action that tasks in the group will be stopped immediately. - FAIL_TASK = 2 - end - end - - # A Cloud Batch task. - # @!attribute [rw] name - # @return [::String] - # Task name. - # The name is generated from the parent TaskGroup name and 'id' field. - # For example: - # "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - # @!attribute [rw] status - # @return [::Google::Cloud::Batch::V1::TaskStatus] - # Task Status. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Environment describes a collection of environment variables to set when - # executing Tasks. - # @!attribute [rw] variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # A map of environment variable names to values. - # @!attribute [rw] secret_variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # A map of environment variable names to Secret Manager secret names. - # The VM will access the named secrets to set the value of each environment - # variable. - # @!attribute [rw] encrypted_variables - # @return [::Google::Cloud::Batch::V1::Environment::KMSEnvMap] - # An encrypted JSON dictionary where the key/value pairs correspond to - # environment variable names and their values. - class Environment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key_name - # @return [::String] - # The name of the KMS key that will be used to decrypt the cipher text. - # @!attribute [rw] cipher_text - # @return [::String] - # The value of the cipherText response from the `encrypt` method. - class KMSEnvMap - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class VariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SecretVariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb deleted file mode 100644 index 5c9f7a233fea..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/cloud/batch/v1/volume.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Batch - module V1 - # Volume describes a volume and parameters for it to be mounted to a VM. - # @!attribute [rw] nfs - # @return [::Google::Cloud::Batch::V1::NFS] - # A Network File System (NFS) volume. For example, a - # Filestore file share. - # - # Note: The following fields are mutually exclusive: `nfs`, `gcs`, `device_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs - # @return [::Google::Cloud::Batch::V1::GCS] - # A Google Cloud Storage (GCS) volume. - # - # Note: The following fields are mutually exclusive: `gcs`, `nfs`, `device_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] device_name - # @return [::String] - # Device name of an attached disk volume, which should align with a - # device_name specified by - # job.allocation_policy.instances[0].policy.disks[i].device_name or - # defined by the given instance template in - # job.allocation_policy.instances[0].instance_template. - # - # Note: The following fields are mutually exclusive: `device_name`, `nfs`, `gcs`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mount_path - # @return [::String] - # The mount path for the volume, e.g. /mnt/disks/share. - # @!attribute [rw] mount_options - # @return [::Array<::String>] - # Mount options vary based on the type of storage volume: - # - # * For a Cloud Storage bucket, all the mount options provided - # by - # the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - # are supported. - # * For an existing persistent disk, all mount options provided by the - # [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - # except writing are supported. This is due to restrictions of - # [multi-writer - # mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - # * For any other disk or a Network File System (NFS), all the - # mount options provided by the `mount` command are supported. - class Volume - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an NFS volume. - # @!attribute [rw] server - # @return [::String] - # The IP address of the NFS. - # @!attribute [rw] remote_path - # @return [::String] - # Remote source path exported from the NFS, e.g., "/share". - class NFS - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Google Cloud Storage volume. - # @!attribute [rw] remote_path - # @return [::String] - # Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - # bucket_name, bucket_name/subdirectory/ - class GCS - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile deleted file mode 100644 index da55e968f9ea..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-batch-v1", path: "../" -else - gem "google-cloud-batch-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb deleted file mode 100644 index 4025c81c42d8..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/cancel_job.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_CancelJob_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the cancel_job call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#cancel_job. -# -def cancel_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::CancelJobRequest.new - - # Call the cancel_job method. - result = client.cancel_job request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END batch_v1_generated_BatchService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb deleted file mode 100644 index 2c18c23c163e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/create_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_CreateJob_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the create_job call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#create_job. -# -def create_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::CreateJobRequest.new - - # Call the create_job method. - result = client.create_job request - - # The returned object is of type Google::Cloud::Batch::V1::Job. - p result -end -# [END batch_v1_generated_BatchService_CreateJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb deleted file mode 100644 index a4dac580732e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/delete_job.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_DeleteJob_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the delete_job call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#delete_job. -# -def delete_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::DeleteJobRequest.new - - # Call the delete_job method. - result = client.delete_job request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END batch_v1_generated_BatchService_DeleteJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb deleted file mode 100644 index 51b591988ead..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_GetJob_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the get_job call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#get_job. -# -def get_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::GetJobRequest.new - - # Call the get_job method. - result = client.get_job request - - # The returned object is of type Google::Cloud::Batch::V1::Job. - p result -end -# [END batch_v1_generated_BatchService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb deleted file mode 100644 index fb681197281e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_GetTask_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the get_task call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Cloud::Batch::V1::Task. - p result -end -# [END batch_v1_generated_BatchService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb deleted file mode 100644 index 27e5f50995a4..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_ListJobs_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the list_jobs call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#list_jobs. -# -def list_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::ListJobsRequest.new - - # Call the list_jobs method. - result = client.list_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Batch::V1::Job. - p item - end -end -# [END batch_v1_generated_BatchService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb deleted file mode 100644 index a94c440293e7..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/batch_service/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_BatchService_ListTasks_sync] -require "google/cloud/batch/v1" - -## -# Snippet for the list_tasks call in the BatchService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Batch::V1::BatchService::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Batch::V1::BatchService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Batch::V1::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Batch::V1::Task. - p item - end -end -# [END batch_v1_generated_BatchService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb deleted file mode 100644 index 1ad5b84a516b..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_IAMPolicy_GetIamPolicy_sync] -require "google/iam/v1" - -## -# Snippet for the get_iam_policy call in the IAMPolicy service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V1::IAMPolicy::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V1::IAMPolicy::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END batch_v1_generated_IAMPolicy_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb deleted file mode 100644 index 7fb1c919b8da..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_IAMPolicy_SetIamPolicy_sync] -require "google/iam/v1" - -## -# Snippet for the set_iam_policy call in the IAMPolicy service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V1::IAMPolicy::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V1::IAMPolicy::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END batch_v1_generated_IAMPolicy_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb b/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb deleted file mode 100644 index 722df828728f..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/iam_policy/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START batch_v1_generated_IAMPolicy_TestIamPermissions_sync] -require "google/iam/v1" - -## -# Snippet for the test_iam_permissions call in the IAMPolicy service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Iam::V1::IAMPolicy::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::V1::IAMPolicy::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END batch_v1_generated_IAMPolicy_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json deleted file mode 100644 index 53f2a1c4992e..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.cloud.batch.v1.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-batch-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.batch.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "batch_v1_generated_BatchService_CreateJob_sync", - "title": "Snippet for the create_job call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#create_job.", - "file": "batch_service/create_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_job", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#create_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::CreateJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::Job", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "CreateJob", - "full_name": "google.cloud.batch.v1.BatchService.CreateJob", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_GetJob_sync", - "title": "Snippet for the get_job call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#get_job.", - "file": "batch_service/get_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#get_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::GetJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::Job", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "GetJob", - "full_name": "google.cloud.batch.v1.BatchService.GetJob", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_DeleteJob_sync", - "title": "Snippet for the delete_job call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#delete_job.", - "file": "batch_service/delete_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_job", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#delete_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::DeleteJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "DeleteJob", - "full_name": "google.cloud.batch.v1.BatchService.DeleteJob", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_CancelJob_sync", - "title": "Snippet for the cancel_job call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#cancel_job.", - "file": "batch_service/cancel_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_job", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#cancel_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::CancelJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "CancelJob", - "full_name": "google.cloud.batch.v1.BatchService.CancelJob", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_ListJobs_sync", - "title": "Snippet for the list_jobs call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#list_jobs.", - "file": "batch_service/list_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_jobs", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#list_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::ListJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::ListJobsResponse", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "ListJobs", - "full_name": "google.cloud.batch.v1.BatchService.ListJobs", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_GetTask_sync", - "title": "Snippet for the get_task call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#get_task.", - "file": "batch_service/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::Task", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "google.cloud.batch.v1.BatchService.GetTask", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_BatchService_ListTasks_sync", - "title": "Snippet for the list_tasks call in the BatchService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Batch::V1::BatchService::Client#list_tasks.", - "file": "batch_service/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Batch::V1::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Batch::V1::ListTasksResponse", - "client": { - "short_name": "BatchService::Client", - "full_name": "::Google::Cloud::Batch::V1::BatchService::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "google.cloud.batch.v1.BatchService.ListTasks", - "service": { - "short_name": "BatchService", - "full_name": "google.cloud.batch.v1.BatchService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json b/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json deleted file mode 100644 index 8e7486b5b5d6..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/snippets/snippet_metadata_google.iam.v1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-batch-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "batch_v1_generated_IAMPolicy_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the IAMPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#set_iam_policy.", - "file": "iam_policy/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Iam::V1::IAMPolicy::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "IAMPolicy::Client", - "full_name": "::Google::Iam::V1::IAMPolicy::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.iam.v1.IAMPolicy.SetIamPolicy", - "service": { - "short_name": "IAMPolicy", - "full_name": "google.iam.v1.IAMPolicy" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_IAMPolicy_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the IAMPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#get_iam_policy.", - "file": "iam_policy/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Iam::V1::IAMPolicy::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "IAMPolicy::Client", - "full_name": "::Google::Iam::V1::IAMPolicy::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.iam.v1.IAMPolicy.GetIamPolicy", - "service": { - "short_name": "IAMPolicy", - "full_name": "google.iam.v1.IAMPolicy" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "batch_v1_generated_IAMPolicy_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the IAMPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::V1::IAMPolicy::Client#test_iam_permissions.", - "file": "iam_policy/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Iam::V1::IAMPolicy::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "IAMPolicy::Client", - "full_name": "::Google::Iam::V1::IAMPolicy::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.iam.v1.IAMPolicy.TestIamPermissions", - "service": { - "short_name": "IAMPolicy", - "full_name": "google.iam.v1.IAMPolicy" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb deleted file mode 100644 index 6f39394ae0cc..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_services_pb" -require "google/cloud/batch/v1/batch_service" - -class ::Google::Cloud::Batch::V1::BatchService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Batch::V1::BatchService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb deleted file mode 100644 index 094400644c40..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/batch/v1/batch_service" - -class ::Google::Cloud::Batch::V1::BatchService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_path project: "value0", location: "value1", job: "value2" - assert_equal "projects/value0/locations/value1/jobs/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path project: "value0", location: "value1", job: "value2", task_group: "value3", task: "value4" - assert_equal "projects/value0/locations/value1/jobs/value2/taskGroups/value3/tasks/value4", path - end - end - - def test_task_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_group_path project: "value0", location: "value1", job: "value2", task_group: "value3" - assert_equal "projects/value0/locations/value1/jobs/value2/taskGroups/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb deleted file mode 100644 index db9f33f72d7a..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_rest_test.rb +++ /dev/null @@ -1,490 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_service/rest" - - -class ::Google::Cloud::Batch::V1::BatchService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_job - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job_id = "hello world" - job = {} - request_id = "hello world" - - create_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_create_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_job_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_job parent: parent, job_id: job_id, job: job, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_job ::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_job(::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_job_client_stub.call_count - end - end - end - - def test_get_job - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_job ::Google::Cloud::Batch::V1::GetJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Batch::V1::GetJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_count - end - end - end - - def test_delete_job - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - reason = "hello world" - request_id = "hello world" - - delete_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_delete_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_job_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_job({ name: name, reason: reason, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_job name: name, reason: reason, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_job ::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_job({ name: name, reason: reason, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_job(::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_job_client_stub.call_count - end - end - end - - def test_cancel_job - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_cancel_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_job({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_job name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_job ::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_job({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_job(::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_job_client_stub.call_count - end - end - end - - def test_list_jobs - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::ListJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_jobs parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task ::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Cloud::Batch::V1::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Batch::V1::BatchService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tasks({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tasks parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Batch::V1::ListTasksRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_tasks({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_tasks(::Google::Cloud::Batch::V1::ListTasksRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb deleted file mode 100644 index 1b01d49a2bff..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/cloud/batch/v1/batch_service_test.rb +++ /dev/null @@ -1,570 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/batch/v1/batch_pb" -require "google/cloud/batch/v1/batch_service" - -class ::Google::Cloud::Batch::V1::BatchService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job_id = "hello world" - job = {} - request_id = "hello world" - - create_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_job, name - assert_kind_of ::Google::Cloud::Batch::V1::CreateJobRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["job_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Batch::V1::Job), request["job"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_job_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_job parent: parent, job_id: job_id, job: job, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_job ::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_job({ parent: parent, job_id: job_id, job: job, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_job(::Google::Cloud::Batch::V1::CreateJobRequest.new(parent: parent, job_id: job_id, job: job, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_job_client_stub.call_rpc_count - end - end - - def test_get_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job, name - assert_kind_of ::Google::Cloud::Batch::V1::GetJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_job ::Google::Cloud::Batch::V1::GetJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Batch::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_rpc_count - end - end - - def test_delete_job - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - reason = "hello world" - request_id = "hello world" - - delete_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_job, name - assert_kind_of ::Google::Cloud::Batch::V1::DeleteJobRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["reason"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_job_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_job({ name: name, reason: reason, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_job name: name, reason: reason, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_job ::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_job({ name: name, reason: reason, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_job(::Google::Cloud::Batch::V1::DeleteJobRequest.new(name: name, reason: reason, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_job_client_stub.call_rpc_count - end - end - - def test_cancel_job - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_job, name - assert_kind_of ::Google::Cloud::Batch::V1::CancelJobRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_job_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_job({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_job name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_job ::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_job({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_job(::Google::Cloud::Batch::V1::CancelJobRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_job_client_stub.call_rpc_count - end - end - - def test_list_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::ListJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_jobs, name - assert_kind_of ::Google::Cloud::Batch::V1::ListJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_jobs parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_jobs({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Batch::V1::ListJobsRequest.new(parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Cloud::Batch::V1::GetTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task ::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Batch::V1::GetTaskRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Batch::V1::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Cloud::Batch::V1::ListTasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tasks({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_tasks parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Batch::V1::ListTasksRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_tasks({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_tasks(::Google::Cloud::Batch::V1::ListTasksRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Batch::V1::BatchService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Batch::V1::BatchService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb deleted file mode 100644 index 5872de89cd6b..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_rest_test.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/iam/v1/iam_policy_pb" -require "google/iam/v1/iam_policy/rest" - - -class ::Google::Iam::V1::IAMPolicy::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb b/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb deleted file mode 100644 index fbfb3e8939bd..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/google/iam/v1/iam_policy_test.rb +++ /dev/null @@ -1,286 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/iam/v1/iam_policy_pb" -require "google/iam/v1/iam_policy" - -class ::Google::Iam::V1::IAMPolicy::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Iam::V1::IAMPolicy::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::V1::IAMPolicy::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-batch-v1/test/helper.rb b/owl-bot-staging/google-cloud-batch-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-batch-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json deleted file mode 100644 index b59fbd964684..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "beyondcorp.googleapis.com", - "api_shortname": "beyondcorp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connections-v1/latest", - "distribution_name": "google-cloud-beyond_corp-app_connections-v1", - "is_cloud": true, - "language": "ruby", - "name": "beyondcorp", - "name_pretty": "BeyondCorp AppConnections V1 API", - "product_documentation": "https://cloud.google.com/beyondcorp/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connections-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml deleted file mode 100644 index 9a0f1608e53e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-beyond_corp-app_connections-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-beyond_corp-app_connections-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts deleted file mode 100644 index d57ef993f75d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BeyondCorp AppConnections V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md deleted file mode 100644 index 5fb552e9ca72..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-beyond_corp-app_connections-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-beyond_corp-app_connections-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/beyond_corp/app_connections/v1" - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/beyond_corp/app_connections/v1" - -::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-beyond_corp-app_connections-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/beyond_corp/app_connections/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md deleted file mode 100644 index b1b7a83cc8cf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the BeyondCorp AppConnections V1 API - -Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BeyondCorp AppConnections V1 API. Most users should consider using -the main client gem, -[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-beyond_corp-app_connections-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/beyondcorp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/beyond_corp/app_connections/v1" - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new -request = ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new # (request fields as keyword arguments...) -response = client.list_app_connections request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connections-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/beyondcorp/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/beyond_corp/app_connections/v1" -require "logger" - -client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-beyond_corp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-beyond_corp-app_connections-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-beyond_corp`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-beyond_corp-app_connections-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile deleted file mode 100644 index 31baa9b2971f..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-beyond_corp-app_connections-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials" - ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-beyond_corp-app_connections-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-beyond_corp-app_connections-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-beyond_corp-app_connections-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-beyond_corp-app_connections-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-beyond_corp-app_connections-v1" - header "google-cloud-beyond_corp-app_connections-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-beyond_corp-app_connections-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-beyond_corp-app_connections-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-beyond_corp-app_connections-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-beyond_corp-app_connections-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json deleted file mode 100644 index 525a196a960a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.beyondcorp.appconnections.v1", - "libraryPackage": "::Google::Cloud::BeyondCorp::AppConnections::V1", - "services": { - "AppConnectionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client", - "rpcs": { - "ListAppConnections": { - "methods": [ - "list_app_connections" - ] - }, - "GetAppConnection": { - "methods": [ - "get_app_connection" - ] - }, - "CreateAppConnection": { - "methods": [ - "create_app_connection" - ] - }, - "UpdateAppConnection": { - "methods": [ - "update_app_connection" - ] - }, - "DeleteAppConnection": { - "methods": [ - "delete_app_connection" - ] - }, - "ResolveAppConnections": { - "methods": [ - "resolve_app_connections" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec deleted file mode 100644 index 6549a96984bb..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/google-cloud-beyond_corp-app_connections-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/beyond_corp/app_connections/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-beyond_corp-app_connections-v1" - gem.version = Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connections-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." - gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb deleted file mode 100644 index 1ac7623cc398..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google-cloud-beyond_corp-app_connections-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/beyond_corp/app_connections/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb deleted file mode 100644 index bcc50c2b3a0a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" -require "google/cloud/beyond_corp/app_connections/v1/version" - -module Google - module Cloud - module BeyondCorp - module AppConnections - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_connections/v1" - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/beyond_corp/app_connections/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb deleted file mode 100644 index 41f69b3c5f7e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/beyond_corp/app_connections/v1/version" - -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/client" - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - ## - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectionsService exposes the following resources: - # - # * AppConnections, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. - # - # The AppConnectionsService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnections. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - module AppConnectionsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_connections_service", "helpers.rb" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb deleted file mode 100644 index 1a531100e0a0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/client.rb +++ /dev/null @@ -1,1141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - ## - # Client for the AppConnectionsService service. - # - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectionsService exposes the following resources: - # - # * AppConnections, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. - # - # The AppConnectionsService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnections. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_connections_service_stub - - ## - # Configure the AppConnectionsService Client class. - # - # See {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppConnectionsService clients - # ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BeyondCorp", "AppConnections", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AppConnectionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @app_connections_service_stub.universe_domain - end - - ## - # Create a new AppConnectionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppConnectionsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @app_connections_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @app_connections_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_connections_service_stub.endpoint - config.universe_domain = @app_connections_service_stub.universe_domain - config.logger = @app_connections_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_connections_service_stub.endpoint - config.universe_domain = @app_connections_service_stub.universe_domain - config.logger = @app_connections_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @app_connections_service_stub.logger - end - - # Service calls - - ## - # Lists AppConnections in a given project and location. - # - # @overload list_app_connections(request, options = nil) - # Pass arguments to `list_app_connections` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_app_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_app_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AppConnection location using the form: - # `projects/{project_id}/locations/{location_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ListAppConnectionsRequest, if any. - # @param filter [::String] - # Optional. A filter specifying constraints of a list operation. - # @param order_by [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new - # - # # Call the list_app_connections method. - # result = client.list_app_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. - # p item - # end - # - def list_app_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_app_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_app_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_app_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :list_app_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :list_app_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AppConnection. - # - # @overload get_app_connection(request, options = nil) - # Pass arguments to `get_app_connection` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_app_connection(name: nil) - # Pass arguments to `get_app_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppConnection name using the form: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new - # - # # Call the get_app_connection method. - # result = client.get_app_connection request - # - # # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. - # p result - # - def get_app_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_app_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_app_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_app_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :get_app_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new AppConnection in a given project and location. - # - # @overload create_app_connection(request, options = nil) - # Pass arguments to `create_app_connection` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_app_connection(parent: nil, app_connection_id: nil, app_connection: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_app_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource project name of the AppConnection location using the - # form: `projects/{project_id}/locations/{location_id}` - # @param app_connection_id [::String] - # Optional. User-settable AppConnection resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash] - # Required. A BeyondCorp AppConnection resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new - # - # # Call the create_app_connection method. - # result = client.create_app_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_app_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_app_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_app_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_app_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :create_app_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AppConnection. - # - # @overload update_app_connection(request, options = nil) - # Pass arguments to `update_app_connection` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_app_connection(update_mask: nil, app_connection: nil, request_id: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_app_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. The elements of the repeated paths field may only include these - # fields from [BeyondCorp.AppConnection]: - # * `labels` - # * `display_name` - # * `application_endpoint` - # * `connectors` - # @param app_connection [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash] - # Required. AppConnection message with updated fields. Only supported fields - # specified in update_mask are updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # @param allow_missing [::Boolean] - # Optional. If set as true, will create the resource if it is not found. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new - # - # # Call the update_app_connection method. - # result = client.update_app_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_app_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_app_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.app_connection&.name - header_params["app_connection.name"] = request.app_connection.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_app_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_app_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :update_app_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AppConnection. - # - # @overload delete_app_connection(request, options = nil) - # Pass arguments to `delete_app_connection` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_app_connection(name: nil, request_id: nil, validate_only: nil) - # Pass arguments to `delete_app_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp Connector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new - # - # # Call the delete_app_connection method. - # result = client.delete_app_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_app_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_app_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_app_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_app_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :delete_app_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resolves AppConnections details for a given AppConnector. - # An internal method called by a connector to find AppConnections to connect - # to. - # - # @overload resolve_app_connections(request, options = nil) - # Pass arguments to `resolve_app_connections` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resolve_app_connections(parent: nil, app_connector_id: nil, page_size: nil, page_token: nil) - # Pass arguments to `resolve_app_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AppConnection location using the form: - # `projects/{project_id}/locations/{location_id}` - # @param app_connector_id [::String] - # Required. BeyondCorp Connector name of the connector associated with those - # AppConnections using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ResolveAppConnectionsResponse, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connections/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new - # - # # Call the resolve_app_connections method. - # result = client.resolve_app_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. - # p item - # end - # - def resolve_app_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resolve_app_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.resolve_app_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resolve_app_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connections_service_stub.call_rpc :resolve_app_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_connections_service_stub, :resolve_app_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AppConnectionsService API. - # - # This class represents the configuration for AppConnectionsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_app_connections to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_connections.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_connections.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AppConnectionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_app_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_app_connections - ## - # RPC-specific configuration for `get_app_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app_connection - ## - # RPC-specific configuration for `create_app_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app_connection - ## - # RPC-specific configuration for `update_app_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_app_connection - ## - # RPC-specific configuration for `delete_app_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app_connection - ## - # RPC-specific configuration for `resolve_app_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :resolve_app_connections - - # @private - def initialize parent_rpcs = nil - list_app_connections_config = parent_rpcs.list_app_connections if parent_rpcs.respond_to? :list_app_connections - @list_app_connections = ::Gapic::Config::Method.new list_app_connections_config - get_app_connection_config = parent_rpcs.get_app_connection if parent_rpcs.respond_to? :get_app_connection - @get_app_connection = ::Gapic::Config::Method.new get_app_connection_config - create_app_connection_config = parent_rpcs.create_app_connection if parent_rpcs.respond_to? :create_app_connection - @create_app_connection = ::Gapic::Config::Method.new create_app_connection_config - update_app_connection_config = parent_rpcs.update_app_connection if parent_rpcs.respond_to? :update_app_connection - @update_app_connection = ::Gapic::Config::Method.new update_app_connection_config - delete_app_connection_config = parent_rpcs.delete_app_connection if parent_rpcs.respond_to? :delete_app_connection - @delete_app_connection = ::Gapic::Config::Method.new delete_app_connection_config - resolve_app_connections_config = parent_rpcs.resolve_app_connections if parent_rpcs.respond_to? :resolve_app_connections - @resolve_app_connections = ::Gapic::Config::Method.new resolve_app_connections_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb deleted file mode 100644 index d8c727b63578..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - # Credentials for the AppConnectionsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb deleted file mode 100644 index a02179deb9f7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/operations.rb +++ /dev/null @@ -1,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 BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppConnectionsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AppConnectionsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnections::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb deleted file mode 100644 index 52ef4c16714c..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/app_connections_service/paths.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - # Path helper methods for the AppConnectionsService API. - module Paths - ## - # Create a fully-qualified AppConnection resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appConnections/{app_connection}` - # - # @param project [String] - # @param location [String] - # @param app_connection [String] - # - # @return [::String] - def app_connection_path project:, location:, app_connection: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appConnections/#{app_connection}" - end - - ## - # Create a fully-qualified AppConnector resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appConnectors/{app_connector}` - # - # @param project [String] - # @param location [String] - # @param app_connector [String] - # - # @return [::String] - def app_connector_path project:, location:, app_connector: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appConnectors/#{app_connector}" - end - - ## - # Create a fully-qualified AppGateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appGateways/{app_gateway}` - # - # @param project [String] - # @param location [String] - # @param app_gateway [String] - # - # @return [::String] - def app_gateway_path project:, location:, app_gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appGateways/#{app_gateway}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb deleted file mode 100644 index 182a98d114a3..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyond_corp/app_connections/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb deleted file mode 100644 index 1446e9c3fde5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nGgoogle/cloud/beyondcorp/appconnections/v1/app_connections_service.proto\x12)google.cloud.beyondcorp.appconnections.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x01\n\x19ListAppConnectionsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1aListAppConnectionsResponse\x12Q\n\x0f\x61pp_connections\x18\x01 \x03(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x17GetAppConnectionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/AppConnection\"\x89\x02\n\x1a\x43reateAppConnectionRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12\x1e\n\x11\x61pp_connection_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x61pp_connection\x18\x03 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnectionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xfa\x01\n\x1aUpdateAppConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12U\n\x0e\x61pp_connection\x18\x02 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnectionB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x90\x01\n\x1a\x44\x65leteAppConnectionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/AppConnection\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xda\x01\n\x1cResolveAppConnectionsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/AppConnection\x12H\n\x10\x61pp_connector_id\x18\x02 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xcf\x02\n\x1dResolveAppConnectionsResponse\x12}\n\x16\x61pp_connection_details\x18\x01 \x03(\x0b\x32].google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\x1a\x80\x01\n\x14\x41ppConnectionDetails\x12P\n\x0e\x61pp_connection\x18\x01 \x01(\x0b\x32\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\x12\x16\n\x0erecent_mig_vms\x18\x02 \x03(\t\"\x99\n\n\rAppConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x04 \x03(\x0b\x32\x44.google.cloud.beyondcorp.appconnections.v1.AppConnection.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12P\n\x04type\x18\x07 \x01(\x0e\x32=.google.cloud.beyondcorp.appconnections.v1.AppConnection.TypeB\x03\xe0\x41\x02\x12o\n\x14\x61pplication_endpoint\x18\x08 \x01(\x0b\x32L.google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpointB\x03\xe0\x41\x02\x12\x17\n\nconnectors\x18\t \x03(\tB\x03\xe0\x41\x01\x12R\n\x05state\x18\n \x01(\x0e\x32>.google.cloud.beyondcorp.appconnections.v1.AppConnection.StateB\x03\xe0\x41\x03\x12V\n\x07gateway\x18\x0b \x01(\x0b\x32@.google.cloud.beyondcorp.appconnections.v1.AppConnection.GatewayB\x03\xe0\x41\x01\x1a;\n\x13\x41pplicationEndpoint\x12\x11\n\x04host\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\x87\x02\n\x07Gateway\x12X\n\x04type\x18\x02 \x01(\x0e\x32\x45.google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.TypeB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cingress_port\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x41\n\x0b\x61pp_gateway\x18\x05 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_REGIONAL_MIG\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTCP_PROXY\x10\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05:u\xea\x41r\n\'beyondcorp.googleapis.com/AppConnection\x12Gprojects/{project}/locations/{location}/appConnections/{app_connection}\"\x8d\x02\n\x1e\x41ppConnectionOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xea\x0c\n\x15\x41ppConnectionsService\x12\xe6\x01\n\x12ListAppConnections\x12\x44.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest\x1a\x45.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/appConnections\x12\xd3\x01\n\x10GetAppConnection\x12\x42.google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest\x1a\x38.google.cloud.beyondcorp.appconnections.v1.AppConnection\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/appConnections/*}\x12\xa4\x02\n\x13\x43reateAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41/\n\rAppConnection\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\'parent,app_connection,app_connection_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/appConnections:\x0e\x61pp_connection\x12\xa6\x02\n\x13UpdateAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41/\n\rAppConnection\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\x1a\x61pp_connection,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{app_connection.name=projects/*/locations/*/appConnections/*}:\x0e\x61pp_connection\x12\xf8\x01\n\x13\x44\x65leteAppConnection\x12\x45.google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x37\n\x15google.protobuf.Empty\x12\x1e\x41ppConnectionOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/appConnections/*}\x12\xf7\x01\n\x15ResolveAppConnections\x12G.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest\x1aH.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/appConnections:resolve\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8a\x04\n-com.google.cloud.beyondcorp.appconnections.v1B\x1a\x41ppConnectionsServiceProtoP\x01ZUcloud.google.com/go/beyondcorp/appconnections/apiv1/appconnectionspb;appconnectionspb\xaa\x02)Google.Cloud.BeyondCorp.AppConnections.V1\xca\x02)Google\\Cloud\\BeyondCorp\\AppConnections\\V1\xea\x02-Google::Cloud::BeyondCorp::AppConnections::V1\xea\x41o\n&beyondcorp.googleapis.com/AppConnector\x12\x45projects/{project}/locations/{location}/appConnectors/{app_connector}\xea\x41i\n$beyondcorp.googleapis.com/AppGateway\x12\x41projects/{project}/locations/{location}/appGateways/{app_gateway}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - ListAppConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest").msgclass - ListAppConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsResponse").msgclass - GetAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest").msgclass - CreateAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest").msgclass - UpdateAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest").msgclass - DeleteAppConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest").msgclass - ResolveAppConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest").msgclass - ResolveAppConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse").msgclass - ResolveAppConnectionsResponse::AppConnectionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsResponse.AppConnectionDetails").msgclass - AppConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection").msgclass - AppConnection::ApplicationEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint").msgclass - AppConnection::Gateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway").msgclass - AppConnection::Gateway::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type").enummodule - AppConnection::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.Type").enummodule - AppConnection::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnection.State").enummodule - AppConnectionOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnections.v1.AppConnectionOperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb deleted file mode 100644 index e5383bb39ab7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/lib/google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto for package 'Google.Cloud.BeyondCorp.AppConnections.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb' - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - module AppConnectionsService - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectionsService exposes the following resources: - # - # * AppConnections, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`. - # - # The AppConnectionsService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnections. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.beyondcorp.appconnections.v1.AppConnectionsService' - - # Lists AppConnections in a given project and location. - rpc :ListAppConnections, ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse - # Gets details of a single AppConnection. - rpc :GetAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection - # Creates a new AppConnection in a given project and location. - rpc :CreateAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single AppConnection. - rpc :UpdateAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::Google::Longrunning::Operation - # Deletes a single AppConnection. - rpc :DeleteAppConnection, ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::Google::Longrunning::Operation - # Resolves AppConnections details for a given AppConnector. - # An internal method called by a connector to find AppConnections to connect - # to. - rpc :ResolveAppConnections, ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md deleted file mode 100644 index 0a721b5b0912..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BeyondCorp AppConnections V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb deleted file mode 100644 index 9d00efe6f19d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/cloud/beyondcorp/appconnections/v1/app_connections_service.rb +++ /dev/null @@ -1,411 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnections - module V1 - # Request message for BeyondCorp.ListAppConnections. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AppConnection location using the form: - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppConnectionsResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ListAppConnectionsRequest, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter specifying constraints of a list operation. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - class ListAppConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BeyondCorp.ListAppConnections. - # @!attribute [rw] app_connections - # @return [::Array<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>] - # A list of BeyondCorp AppConnections in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ListAppConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.GetAppConnection. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppConnection name using the form: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - class GetAppConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.CreateAppConnection. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource project name of the AppConnection location using the - # form: `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] app_connection_id - # @return [::String] - # Optional. User-settable AppConnection resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @!attribute [rw] app_connection - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # Required. A BeyondCorp AppConnection resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class CreateAppConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.UpdateAppConnection. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. The elements of the repeated paths field may only include these - # fields from [BeyondCorp.AppConnection]: - # * `labels` - # * `display_name` - # * `application_endpoint` - # * `connectors` - # @!attribute [rw] app_connection - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # Required. AppConnection message with updated fields. Only supported fields - # specified in update_mask are updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set as true, will create the resource if it is not found. - class UpdateAppConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.DeleteAppConnection. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp Connector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class DeleteAppConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.ResolveAppConnections. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AppConnection location using the form: - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] app_connector_id - # @return [::String] - # Required. BeyondCorp Connector name of the connector associated with those - # AppConnections using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ResolveAppConnectionsResponse.next_page_token] - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ResolveAppConnectionsResponse, if any. - class ResolveAppConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BeyondCorp.ResolveAppConnections. - # @!attribute [rw] app_connection_details - # @return [::Array<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>] - # A list of BeyondCorp AppConnections with details in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ResolveAppConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details of the AppConnection. - # @!attribute [rw] app_connection - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection] - # A BeyondCorp AppConnection in the project. - # @!attribute [rw] recent_mig_vms - # @return [::Array<::String>] - # If type=GCP_REGIONAL_MIG, contains most recent VM instances, like - # `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`. - class AppConnectionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A BeyondCorp AppConnection resource represents a BeyondCorp protected - # AppConnection to a remote application. It creates all the necessary GCP - # components needed for creating a BeyondCorp protected AppConnection. Multiple - # connectors can be authorised for a single AppConnection. - # @!attribute [rw] name - # @return [::String] - # Required. Unique resource name of the AppConnection. - # The name is ignored when creating a AppConnection. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was last modified. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # @!attribute [rw] display_name - # @return [::String] - # Optional. An arbitrary user-provided name for the AppConnection. Cannot - # exceed 64 characters. - # @!attribute [r] uid - # @return [::String] - # Output only. A unique identifier for the instance generated by the - # system. - # @!attribute [rw] type - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Type] - # Required. The type of network connectivity used by the AppConnection. - # @!attribute [rw] application_endpoint - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::ApplicationEndpoint] - # Required. Address of the remote application endpoint for the BeyondCorp - # AppConnection. - # @!attribute [rw] connectors - # @return [::Array<::String>] - # Optional. List of [google.cloud.beyondcorp.v1main.Connector.name] that are - # authorised to be associated with this AppConnection. - # @!attribute [r] state - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::State] - # Output only. The current state of the AppConnection. - # @!attribute [rw] gateway - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Gateway] - # Optional. Gateway used by the AppConnection. - class AppConnection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # ApplicationEndpoint represents a remote application endpoint. - # @!attribute [rw] host - # @return [::String] - # Required. Hostname or IP address of the remote application endpoint. - # @!attribute [rw] port - # @return [::Integer] - # Required. Port of the remote application endpoint. - class ApplicationEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Gateway represents a user facing component that serves as an entrance to - # enable connectivity. - # @!attribute [rw] type - # @return [::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection::Gateway::Type] - # Required. The type of hosting used by the gateway. - # @!attribute [r] uri - # @return [::String] - # Output only. Server-defined URI for this resource. - # @!attribute [r] ingress_port - # @return [::Integer] - # Output only. Ingress port reserved on the gateways for this - # AppConnection, if not specified or zero, the default port is 19443. - # @!attribute [rw] app_gateway - # @return [::String] - # Required. AppGateway name in following format: - # `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}` - class Gateway - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum listing possible gateway hosting options. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # Gateway hosted in a GCP regional managed instance group. - GCP_REGIONAL_MIG = 1 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum containing list of all possible network connectivity options - # supported by BeyondCorp AppConnection. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # TCP Proxy based BeyondCorp AppConnection. API will default to this if - # unset. - TCP_PROXY = 1 - end - - # Represents the different states of a AppConnection. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # AppConnection is being created. - CREATING = 1 - - # AppConnection has been created. - CREATED = 2 - - # AppConnection's configuration is being updated. - UPDATING = 3 - - # AppConnection is being deleted. - DELETING = 4 - - # AppConnection is down and may be restored in the future. - # This happens when CCFE sends ProjectState = OFF. - DOWN = 5 - end - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class AppConnectionOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile deleted file mode 100644 index 50af8c28bf87..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-beyond_corp-app_connections-v1", path: "../" -else - gem "google-cloud-beyond_corp-app_connections-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb deleted file mode 100644 index b4dde20ea729..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/create_app_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the create_app_connection call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection. -# -def create_app_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new - - # Call the create_app_connection method. - result = client.create_app_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb deleted file mode 100644 index 00ee3ec93ef7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/delete_app_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the delete_app_connection call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection. -# -def delete_app_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new - - # Call the delete_app_connection method. - result = client.delete_app_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb deleted file mode 100644 index c7a6da25f24b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/get_app_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the get_app_connection call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection. -# -def get_app_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new - - # Call the get_app_connection method. - result = client.get_app_connection request - - # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. - p result -end -# [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb deleted file mode 100644 index 89cc6f1a0e02..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/list_app_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the list_app_connections call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections. -# -def list_app_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new - - # Call the list_app_connections method. - result = client.list_app_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. - p item - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb deleted file mode 100644 index a68f644a3648..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/resolve_app_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the resolve_app_connections call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections. -# -def resolve_app_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new - - # Call the resolve_app_connections method. - result = client.resolve_app_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. - p item - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb deleted file mode 100644 index 66b87a042ff8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/app_connections_service/update_app_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] -require "google/cloud/beyond_corp/app_connections/v1" - -## -# Snippet for the update_app_connection call in the AppConnectionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection. -# -def update_app_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new - - # Call the update_app_connection method. - result = client.update_app_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json deleted file mode 100644 index 37d1445fa1d6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-beyond_corp-app_connections-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.beyondcorp.appconnections.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync", - "title": "Snippet for the list_app_connections call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections.", - "file": "app_connections_service/list_app_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_app_connections", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#list_app_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "ListAppConnections", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListAppConnections", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync", - "title": "Snippet for the get_app_connection call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection.", - "file": "app_connections_service/get_app_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_app_connection", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#get_app_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "GetAppConnection", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetAppConnection", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync", - "title": "Snippet for the create_app_connection call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection.", - "file": "app_connections_service/create_app_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_app_connection", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#create_app_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "CreateAppConnection", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.CreateAppConnection", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync", - "title": "Snippet for the update_app_connection call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection.", - "file": "app_connections_service/update_app_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_app_connection", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#update_app_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "UpdateAppConnection", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.UpdateAppConnection", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync", - "title": "Snippet for the delete_app_connection call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection.", - "file": "app_connections_service/delete_app_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_app_connection", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#delete_app_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "DeleteAppConnection", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.DeleteAppConnection", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync", - "title": "Snippet for the resolve_app_connections call in the AppConnectionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections.", - "file": "app_connections_service/resolve_app_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "resolve_app_connections", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client#resolve_app_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse", - "client": { - "short_name": "AppConnectionsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client" - }, - "method": { - "short_name": "ResolveAppConnections", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ResolveAppConnections", - "service": { - "short_name": "AppConnectionsService", - "full_name": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb deleted file mode 100644 index 191caba0be59..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb" -require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_services_pb" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" - -class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb deleted file mode 100644 index 8dbd4e5cb9e4..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" - -class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_app_connection_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_connection_path project: "value0", location: "value1", app_connection: "value2" - assert_equal "projects/value0/locations/value1/appConnections/value2", path - end - end - - def test_app_connector_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_connector_path project: "value0", location: "value1", app_connector: "value2" - assert_equal "projects/value0/locations/value1/appConnectors/value2", path - end - end - - def test_app_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_gateway_path project: "value0", location: "value1", app_gateway: "value2" - assert_equal "projects/value0/locations/value1/appGateways/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb deleted file mode 100644 index 607a97f4608c..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/google/cloud/beyond_corp/app_connections/v1/app_connections_service_test.rb +++ /dev/null @@ -1,525 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/appconnections/v1/app_connections_service_pb" -require "google/cloud/beyond_corp/app_connections/v1/app_connections_service" - -class ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_app_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_app_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_app_connections, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_app_connections_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_app_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_app_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_app_connections ::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_app_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_app_connections(::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_app_connections_client_stub.call_rpc_count - end - end - - def test_get_app_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_app_connection, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_app_connection_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_app_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_app_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_app_connection({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_app_connection_client_stub.call_rpc_count - end - end - - def test_create_app_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_connection_id = "hello world" - app_connection = {} - request_id = "hello world" - validate_only = true - - create_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_app_connection, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_connection_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection), request["app_connection"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_app_connection_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_app_connection({ parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_app_connection parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new(parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_app_connection({ parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new(parent: parent, app_connection_id: app_connection_id, app_connection: app_connection, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_app_connection_client_stub.call_rpc_count - end - end - - def test_update_app_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - app_connection = {} - request_id = "hello world" - validate_only = true - allow_missing = true - - update_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_app_connection, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection), request["app_connection"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_app_connection_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_app_connection({ update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_app_connection update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new(update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_app_connection({ update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new(update_mask: update_mask, app_connection: app_connection, request_id: request_id, validate_only: validate_only, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_app_connection_client_stub.call_rpc_count - end - end - - def test_delete_app_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - - delete_app_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_app_connection, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_app_connection_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_app_connection({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_app_connection name: name, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_app_connection ::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_app_connection({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_app_connection(::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_app_connection_client_stub.call_rpc_count - end - end - - def test_resolve_app_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_connector_id = "hello world" - page_size = 42 - page_token = "hello world" - - resolve_app_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resolve_app_connections, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_connector_id"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resolve_app_connections_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.resolve_app_connections({ parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.resolve_app_connections parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.resolve_app_connections ::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new(parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.resolve_app_connections({ parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.resolve_app_connections(::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new(parent: parent, app_connector_id: app_connector_id, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resolve_app_connections_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connections-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json deleted file mode 100644 index 8737a08b2ed0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "beyondcorp.googleapis.com", - "api_shortname": "beyondcorp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connectors-v1/latest", - "distribution_name": "google-cloud-beyond_corp-app_connectors-v1", - "is_cloud": true, - "language": "ruby", - "name": "beyondcorp", - "name_pretty": "BeyondCorp AppConnectors V1 API", - "product_documentation": "https://cloud.google.com/beyondcorp/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connectors-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml deleted file mode 100644 index 7c746abab61f..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-beyond_corp-app_connectors-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-beyond_corp-app_connectors-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts deleted file mode 100644 index 1b1ee4a36299..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BeyondCorp AppConnectors V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md deleted file mode 100644 index 4252892c67b5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-beyond_corp-app_connectors-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-beyond_corp-app_connectors-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/beyond_corp/app_connectors/v1" - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/beyond_corp/app_connectors/v1" - -::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-beyond_corp-app_connectors-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/beyond_corp/app_connectors/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md deleted file mode 100644 index 7deecfc9b6f1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the BeyondCorp AppConnectors V1 API - -Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BeyondCorp AppConnectors V1 API. Most users should consider using -the main client gem, -[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-beyond_corp-app_connectors-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/beyondcorp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/beyond_corp/app_connectors/v1" - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new -request = ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new # (request fields as keyword arguments...) -response = client.list_app_connectors request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_connectors-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/beyondcorp/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/beyond_corp/app_connectors/v1" -require "logger" - -client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-beyond_corp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-beyond_corp-app_connectors-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-beyond_corp`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-beyond_corp-app_connectors-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile deleted file mode 100644 index 73cfd1f9a5c4..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-beyond_corp-app_connectors-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials" - ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-beyond_corp-app_connectors-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-beyond_corp-app_connectors-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-beyond_corp-app_connectors-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-beyond_corp-app_connectors-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-beyond_corp-app_connectors-v1" - header "google-cloud-beyond_corp-app_connectors-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-beyond_corp-app_connectors-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-beyond_corp-app_connectors-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-beyond_corp-app_connectors-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-beyond_corp-app_connectors-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json deleted file mode 100644 index d617a8d7418e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.beyondcorp.appconnectors.v1", - "libraryPackage": "::Google::Cloud::BeyondCorp::AppConnectors::V1", - "services": { - "AppConnectorsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client", - "rpcs": { - "ListAppConnectors": { - "methods": [ - "list_app_connectors" - ] - }, - "GetAppConnector": { - "methods": [ - "get_app_connector" - ] - }, - "CreateAppConnector": { - "methods": [ - "create_app_connector" - ] - }, - "UpdateAppConnector": { - "methods": [ - "update_app_connector" - ] - }, - "DeleteAppConnector": { - "methods": [ - "delete_app_connector" - ] - }, - "ReportStatus": { - "methods": [ - "report_status" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec deleted file mode 100644 index a77565acc7a4..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/google-cloud-beyond_corp-app_connectors-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/beyond_corp/app_connectors/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-beyond_corp-app_connectors-v1" - gem.version = Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_connectors-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." - gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb deleted file mode 100644 index d557f7c0d50f..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google-cloud-beyond_corp-app_connectors-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/beyond_corp/app_connectors/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb deleted file mode 100644 index 96a31864e164..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" -require "google/cloud/beyond_corp/app_connectors/v1/version" - -module Google - module Cloud - module BeyondCorp - module AppConnectors - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_connectors/v1" - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/beyond_corp/app_connectors/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb deleted file mode 100644 index e9d2c90330e5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/beyond_corp/app_connectors/v1/version" - -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client" - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - ## - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectorsService exposes the following resource: - # - # * AppConnectors, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. - # - # The AppConnectorsService provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnectors. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - module AppConnectorsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_connectors_service", "helpers.rb" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb deleted file mode 100644 index 42124b431f6f..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb +++ /dev/null @@ -1,1144 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - ## - # Client for the AppConnectorsService service. - # - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectorsService exposes the following resource: - # - # * AppConnectors, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. - # - # The AppConnectorsService provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnectors. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_connectors_service_stub - - ## - # Configure the AppConnectorsService Client class. - # - # See {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppConnectorsService clients - # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BeyondCorp", "AppConnectors", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AppConnectorsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @app_connectors_service_stub.universe_domain - end - - ## - # Create a new AppConnectorsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppConnectorsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @app_connectors_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @app_connectors_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_connectors_service_stub.endpoint - config.universe_domain = @app_connectors_service_stub.universe_domain - config.logger = @app_connectors_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_connectors_service_stub.endpoint - config.universe_domain = @app_connectors_service_stub.universe_domain - config.logger = @app_connectors_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @app_connectors_service_stub.logger - end - - # Service calls - - ## - # Lists AppConnectors in a given project and location. - # - # @overload list_app_connectors(request, options = nil) - # Pass arguments to `list_app_connectors` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_app_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_app_connectors` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AppConnector location using the form: - # `projects/{project_id}/locations/{location_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ListAppConnectorsRequest, if any. - # @param filter [::String] - # Optional. A filter specifying constraints of a list operation. - # @param order_by [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new - # - # # Call the list_app_connectors method. - # result = client.list_app_connectors request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. - # p item - # end - # - def list_app_connectors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_app_connectors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_app_connectors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_app_connectors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :list_app_connectors, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_connectors_service_stub, :list_app_connectors, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AppConnector. - # - # @overload get_app_connector(request, options = nil) - # Pass arguments to `get_app_connector` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_app_connector(name: nil) - # Pass arguments to `get_app_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppConnector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new - # - # # Call the get_app_connector method. - # result = client.get_app_connector request - # - # # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. - # p result - # - def get_app_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_app_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_app_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_app_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :get_app_connector, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new AppConnector in a given project and location. - # - # @overload create_app_connector(request, options = nil) - # Pass arguments to `create_app_connector` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_app_connector(parent: nil, app_connector_id: nil, app_connector: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_app_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource project name of the AppConnector location using the - # form: `projects/{project_id}/locations/{location_id}` - # @param app_connector_id [::String] - # Optional. User-settable AppConnector resource ID. - # - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash] - # Required. A BeyondCorp AppConnector resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new - # - # # Call the create_app_connector method. - # result = client.create_app_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_app_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_app_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_app_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_app_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :create_app_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AppConnector. - # - # @overload update_app_connector(request, options = nil) - # Pass arguments to `update_app_connector` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_app_connector(update_mask: nil, app_connector: nil, request_id: nil, validate_only: nil) - # Pass arguments to `update_app_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. The elements of the repeated paths field may only include these - # fields from [BeyondCorp.AppConnector]: - # * `labels` - # * `display_name` - # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash] - # Required. AppConnector message with updated fields. Only supported fields - # specified in update_mask are updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new - # - # # Call the update_app_connector method. - # result = client.update_app_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_app_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_app_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.app_connector&.name - header_params["app_connector.name"] = request.app_connector.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_app_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_app_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :update_app_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AppConnector. - # - # @overload delete_app_connector(request, options = nil) - # Pass arguments to `delete_app_connector` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_app_connector(name: nil, request_id: nil, validate_only: nil) - # Pass arguments to `delete_app_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppConnector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new - # - # # Call the delete_app_connector method. - # result = client.delete_app_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_app_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_app_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_app_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_app_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :delete_app_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Report status for a given connector. - # - # @overload report_status(request, options = nil) - # Pass arguments to `report_status` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload report_status(app_connector: nil, resource_info: nil, request_id: nil, validate_only: nil) - # Pass arguments to `report_status` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app_connector [::String] - # Required. BeyondCorp Connector name using the form: - # `projects/{project_id}/locations/{location_id}/connectors/{connector}` - # @param resource_info [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo, ::Hash] - # Required. Resource info of the connector. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_connectors/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new - # - # # Call the report_status method. - # result = client.report_status request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def report_status request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.report_status.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.app_connector - header_params["app_connector"] = request.app_connector - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.report_status.timeout, - metadata: metadata, - retry_policy: @config.rpcs.report_status.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_connectors_service_stub.call_rpc :report_status, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AppConnectorsService API. - # - # This class represents the configuration for AppConnectorsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_app_connectors to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_connectors.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_connectors.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AppConnectorsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_app_connectors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_app_connectors - ## - # RPC-specific configuration for `get_app_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app_connector - ## - # RPC-specific configuration for `create_app_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app_connector - ## - # RPC-specific configuration for `update_app_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :update_app_connector - ## - # RPC-specific configuration for `delete_app_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app_connector - ## - # RPC-specific configuration for `report_status` - # @return [::Gapic::Config::Method] - # - attr_reader :report_status - - # @private - def initialize parent_rpcs = nil - list_app_connectors_config = parent_rpcs.list_app_connectors if parent_rpcs.respond_to? :list_app_connectors - @list_app_connectors = ::Gapic::Config::Method.new list_app_connectors_config - get_app_connector_config = parent_rpcs.get_app_connector if parent_rpcs.respond_to? :get_app_connector - @get_app_connector = ::Gapic::Config::Method.new get_app_connector_config - create_app_connector_config = parent_rpcs.create_app_connector if parent_rpcs.respond_to? :create_app_connector - @create_app_connector = ::Gapic::Config::Method.new create_app_connector_config - update_app_connector_config = parent_rpcs.update_app_connector if parent_rpcs.respond_to? :update_app_connector - @update_app_connector = ::Gapic::Config::Method.new update_app_connector_config - delete_app_connector_config = parent_rpcs.delete_app_connector if parent_rpcs.respond_to? :delete_app_connector - @delete_app_connector = ::Gapic::Config::Method.new delete_app_connector_config - report_status_config = parent_rpcs.report_status if parent_rpcs.respond_to? :report_status - @report_status = ::Gapic::Config::Method.new report_status_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb deleted file mode 100644 index 8e856ab92cab..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - # Credentials for the AppConnectorsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb deleted file mode 100644 index 7f9ae60570e8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb +++ /dev/null @@ -1,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 BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppConnectorsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AppConnectorsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb deleted file mode 100644 index dd5a91475be8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - # Path helper methods for the AppConnectorsService API. - module Paths - ## - # Create a fully-qualified AppConnector resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appConnectors/{app_connector}` - # - # @param project [String] - # @param location [String] - # @param app_connector [String] - # - # @return [::String] - def app_connector_path project:, location:, app_connector: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appConnectors/#{app_connector}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb deleted file mode 100644 index 4a35a95f37ea..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb deleted file mode 100644 index 3d9532fa3b37..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/any_pb' - - -descriptor_data = "\nLgoogle/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto\x12(google.cloud.beyondcorp.appconnectors.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\"\x91\x02\n\x1a\x41ppConnectorInstanceConfig\x12\x1c\n\x0fsequence_number\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12-\n\x0finstance_config\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12Y\n\x13notification_config\x18\x03 \x01(\x0b\x32<.google.cloud.beyondcorp.appconnectors.v1.NotificationConfig\x12K\n\x0cimage_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.beyondcorp.appconnectors.v1.ImageConfig\"\xd7\x01\n\x12NotificationConfig\x12y\n\x13pubsub_notification\x18\x01 \x01(\x0b\x32Z.google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfigH\x00\x1a<\n\x1d\x43loudPubSubNotificationConfig\x12\x1b\n\x13pubsub_subscription\x18\x01 \x01(\tB\x08\n\x06\x63onfig\"9\n\x0bImageConfig\x12\x14\n\x0ctarget_image\x18\x01 \x01(\t\x12\x14\n\x0cstable_image\x18\x02 \x01(\tB\xaa\x02\n,com.google.cloud.beyondcorp.appconnectors.v1B\x1f\x41ppConnectorInstanceConfigProtoP\x01ZRcloud.google.com/go/beyondcorp/appconnectors/apiv1/appconnectorspb;appconnectorspb\xaa\x02(Google.Cloud.BeyondCorp.AppConnectors.V1\xca\x02(Google\\Cloud\\BeyondCorp\\AppConnectors\\V1\xea\x02,Google::Cloud::BeyondCorp::AppConnectors::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - AppConnectorInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnectorInstanceConfig").msgclass - NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.NotificationConfig").msgclass - NotificationConfig::CloudPubSubNotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.NotificationConfig.CloudPubSubNotificationConfig").msgclass - ImageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ImageConfig").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb deleted file mode 100644 index a1ba56613e21..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb' -require 'google/cloud/beyondcorp/appconnectors/v1/resource_info_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nEgoogle/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto\x12(google.cloud.beyondcorp.appconnectors.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aLgoogle/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto\x1a\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&beyondcorp.googleapis.com/AppConnector\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n\x19ListAppConnectorsResponse\x12N\n\x0e\x61pp_connectors\x18\x01 \x03(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"V\n\x16GetAppConnectorRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\"\x83\x02\n\x19\x43reateAppConnectorRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&beyondcorp.googleapis.com/AppConnector\x12\x1d\n\x10\x61pp_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12R\n\rapp_connector\x18\x03 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnectorB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xda\x01\n\x19UpdateAppConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12R\n\rapp_connector\x18\x02 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnectorB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8e\x01\n\x19\x44\x65leteAppConnectorRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x01\n\x13ReportStatusRequest\x12\x45\n\rapp_connector\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&beyondcorp.googleapis.com/AppConnector\x12R\n\rresource_info\x18\x02 \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.ResourceInfoB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x07\n\x0c\x41ppConnector\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12W\n\x06labels\x18\x04 \x03(\x0b\x32\x42.google.cloud.beyondcorp.appconnectors.v1.AppConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12P\n\x05state\x18\x07 \x01(\x0e\x32<.google.cloud.beyondcorp.appconnectors.v1.AppConnector.StateB\x03\xe0\x41\x03\x12\x61\n\x0eprincipal_info\x18\x08 \x01(\x0b\x32\x44.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfoB\x03\xe0\x41\x02\x12R\n\rresource_info\x18\x0b \x01(\x0b\x32\x36.google.cloud.beyondcorp.appconnectors.v1.ResourceInfoB\x03\xe0\x41\x01\x1a\xa8\x01\n\rPrincipalInfo\x12n\n\x0fservice_account\x18\x01 \x01(\x0b\x32S.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccountH\x00\x1a\x1f\n\x0eServiceAccount\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\x06\n\x04type\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05:r\xea\x41o\n&beyondcorp.googleapis.com/AppConnector\x12\x45projects/{project}/locations/{location}/appConnectors/{app_connector}\"\x8c\x02\n\x1d\x41ppConnectorOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xde\x0c\n\x14\x41ppConnectorsService\x12\xe0\x01\n\x11ListAppConnectors\x12\x42.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest\x1a\x43.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/appConnectors\x12\xcd\x01\n\x0fGetAppConnector\x12@.google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest\x1a\x36.google.cloud.beyondcorp.appconnectors.v1.AppConnector\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/appConnectors/*}\x12\x9b\x02\n\x12\x43reateAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41%parent,app_connector,app_connector_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/appConnectors:\rapp_connector\x12\x9d\x02\n\x12UpdateAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x19\x61pp_connector,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{app_connector.name=projects/*/locations/*/appConnectors/*}:\rapp_connector\x12\xf3\x01\n\x12\x44\x65leteAppConnector\x12\x43.google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x36\n\x15google.protobuf.Empty\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/appConnectors/*}\x12\x8f\x02\n\x0cReportStatus\x12=.google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41-\n\x0c\x41ppConnector\x12\x1d\x41ppConnectorOperationMetadata\xda\x41\x1b\x61pp_connector,resource_info\x82\xd3\xe4\x93\x02L\"G/v1/{app_connector=projects/*/locations/*/appConnectors/*}:reportStatus:\x01*\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa4\x02\n,com.google.cloud.beyondcorp.appconnectors.v1B\x19\x41ppConnectorsServiceProtoP\x01ZRcloud.google.com/go/beyondcorp/appconnectors/apiv1/appconnectorspb;appconnectorspb\xaa\x02(Google.Cloud.BeyondCorp.AppConnectors.V1\xca\x02(Google\\Cloud\\BeyondCorp\\AppConnectors\\V1\xea\x02,Google::Cloud::BeyondCorp::AppConnectors::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - ListAppConnectorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest").msgclass - ListAppConnectorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsResponse").msgclass - GetAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest").msgclass - CreateAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest").msgclass - UpdateAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest").msgclass - DeleteAppConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest").msgclass - ReportStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest").msgclass - AppConnector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector").msgclass - AppConnector::PrincipalInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo").msgclass - AppConnector::PrincipalInfo::ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo.ServiceAccount").msgclass - AppConnector::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnector.State").enummodule - AppConnectorOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appconnectors.v1.AppConnectorOperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb deleted file mode 100644 index dfa57a816cd2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto for package 'Google.Cloud.BeyondCorp.AppConnectors.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb' - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - module AppConnectorsService - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppConnectorsService exposes the following resource: - # - # * AppConnectors, named as follows: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`. - # - # The AppConnectorsService provides methods to manage - # (create/read/update/delete) BeyondCorp AppConnectors. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService' - - # Lists AppConnectors in a given project and location. - rpc :ListAppConnectors, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse - # Gets details of a single AppConnector. - rpc :GetAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector - # Creates a new AppConnector in a given project and location. - rpc :CreateAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single AppConnector. - rpc :UpdateAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Google::Longrunning::Operation - # Deletes a single AppConnector. - rpc :DeleteAppConnector, ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Google::Longrunning::Operation - # Report status for a given connector. - rpc :ReportStatus, ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb deleted file mode 100644 index d3fe1da19670..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appconnectors/v1/resource_info.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb deleted file mode 100644 index 01f0871d5362..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - # AppConnectorInstanceConfig defines the instance config of a AppConnector. - # @!attribute [rw] sequence_number - # @return [::Integer] - # Required. A monotonically increasing number generated and maintained - # by the API provider. Every time a config changes in the backend, the - # sequenceNumber should be bumped up to reflect the change. - # @!attribute [rw] instance_config - # @return [::Google::Protobuf::Any] - # The SLM instance agent configuration. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::NotificationConfig] - # NotificationConfig defines the notification mechanism that the remote - # instance should subscribe to in order to receive notification. - # @!attribute [rw] image_config - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ImageConfig] - # ImageConfig defines the GCR images to run for the remote agent's control - # plane. - class AppConnectorInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NotificationConfig defines the mechanisms to notify instance agent. - # @!attribute [rw] pubsub_notification - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::NotificationConfig::CloudPubSubNotificationConfig] - # Cloud Pub/Sub Configuration to receive notifications. - class NotificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration for Pub/Sub messaging for the AppConnector. - # @!attribute [rw] pubsub_subscription - # @return [::String] - # The Pub/Sub subscription the AppConnector uses to receive notifications. - class CloudPubSubNotificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # ImageConfig defines the control plane images to run. - # @!attribute [rw] target_image - # @return [::String] - # The initial image the remote agent will attempt to run for the control - # plane. - # @!attribute [rw] stable_image - # @return [::String] - # The stable image that the remote agent will fallback to if the target image - # fails. - class ImageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb deleted file mode 100644 index ec8d597ea2e1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb +++ /dev/null @@ -1,341 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - # Request message for BeyondCorp.ListAppConnectors. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AppConnector location using the form: - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ListAppConnectorsRequest, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter specifying constraints of a list operation. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - class ListAppConnectorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BeyondCorp.ListAppConnectors. - # @!attribute [rw] app_connectors - # @return [::Array<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>] - # A list of BeyondCorp AppConnectors in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ListAppConnectorsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.GetAppConnector. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppConnector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - class GetAppConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.CreateAppConnector. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource project name of the AppConnector location using the - # form: `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] app_connector_id - # @return [::String] - # Optional. User-settable AppConnector resource ID. - # - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @!attribute [rw] app_connector - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] - # Required. A BeyondCorp AppConnector resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class CreateAppConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.UpdateAppConnector. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. The elements of the repeated paths field may only include these - # fields from [BeyondCorp.AppConnector]: - # * `labels` - # * `display_name` - # @!attribute [rw] app_connector - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector] - # Required. AppConnector message with updated fields. Only supported fields - # specified in update_mask are updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class UpdateAppConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.DeleteAppConnector. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppConnector name using the form: - # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class DeleteAppConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request report the connector status. - # @!attribute [rw] app_connector - # @return [::String] - # Required. BeyondCorp Connector name using the form: - # `projects/{project_id}/locations/{location_id}/connectors/{connector}` - # @!attribute [rw] resource_info - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo] - # Required. Resource info of the connector. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class ReportStatusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A BeyondCorp connector resource that represents an application facing - # component deployed proximal to and with direct access to the application - # instances. It is used to establish connectivity between the remote enterprise - # environment and GCP. It initiates connections to the applications and can - # proxy the data from users over the connection. - # @!attribute [rw] name - # @return [::String] - # Required. Unique resource name of the AppConnector. - # The name is ignored when creating a AppConnector. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was last modified. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # @!attribute [rw] display_name - # @return [::String] - # Optional. An arbitrary user-provided name for the AppConnector. Cannot - # exceed 64 characters. - # @!attribute [r] uid - # @return [::String] - # Output only. A unique identifier for the instance generated by the - # system. - # @!attribute [r] state - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::State] - # Output only. The current state of the AppConnector. - # @!attribute [rw] principal_info - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::PrincipalInfo] - # Required. Principal information about the Identity of the AppConnector. - # @!attribute [rw] resource_info - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo] - # Optional. Resource info of the connector. - class AppConnector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # PrincipalInfo represents an Identity oneof. - # @!attribute [rw] service_account - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector::PrincipalInfo::ServiceAccount] - # A GCP service account. - class PrincipalInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # ServiceAccount represents a GCP service account. - # @!attribute [rw] email - # @return [::String] - # Email address of the service account. - class ServiceAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the different states of a AppConnector. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # AppConnector is being created. - CREATING = 1 - - # AppConnector has been created. - CREATED = 2 - - # AppConnector's configuration is being updated. - UPDATING = 3 - - # AppConnector is being deleted. - DELETING = 4 - - # AppConnector is down and may be restored in the future. - # This happens when CCFE sends ProjectState = OFF. - DOWN = 5 - end - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class AppConnectorOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb deleted file mode 100644 index 044fddd4161e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppConnectors - module V1 - # ResourceInfo represents the information/status of an app connector resource. - # Such as: - # - remote_agent - # - container - # - runtime - # - appgateway - # - appconnector - # - appconnection - # - tunnel - # - logagent - # @!attribute [rw] id - # @return [::String] - # Required. Unique Id for the resource. - # @!attribute [rw] status - # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::HealthStatus] - # Overall health status. Overall status is derived based on the status of - # each sub level resources. - # @!attribute [rw] resource - # @return [::Google::Protobuf::Any] - # Specific details for the resource. This is for internal use only. - # @!attribute [rw] time - # @return [::Google::Protobuf::Timestamp] - # The timestamp to collect the info. It is suggested to be set by - # the topmost level resource only. - # @!attribute [rw] sub - # @return [::Array<::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo>] - # List of Info for the sub level resources. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # HealthStatus represents the health status. - module HealthStatus - # Health status is unknown: not initialized or failed to retrieve. - HEALTH_STATUS_UNSPECIFIED = 0 - - # The resource is healthy. - HEALTHY = 1 - - # The resource is unhealthy. - UNHEALTHY = 2 - - # The resource is unresponsive. - UNRESPONSIVE = 3 - - # Some sub-resources are UNHEALTHY. - DEGRADED = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile deleted file mode 100644 index 43e9ab898138..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-beyond_corp-app_connectors-v1", path: "../" -else - gem "google-cloud-beyond_corp-app_connectors-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb deleted file mode 100644 index 70f0d140058b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/create_app_connector.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the create_app_connector call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector. -# -def create_app_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new - - # Call the create_app_connector method. - result = client.create_app_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb deleted file mode 100644 index b3a1d87b3402..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/delete_app_connector.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the delete_app_connector call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector. -# -def delete_app_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new - - # Call the delete_app_connector method. - result = client.delete_app_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb deleted file mode 100644 index 1edebaac1f69..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/get_app_connector.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the get_app_connector call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector. -# -def get_app_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new - - # Call the get_app_connector method. - result = client.get_app_connector request - - # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. - p result -end -# [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb deleted file mode 100644 index 259b2f32126e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/list_app_connectors.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the list_app_connectors call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors. -# -def list_app_connectors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new - - # Call the list_app_connectors method. - result = client.list_app_connectors request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector. - p item - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb deleted file mode 100644 index fb94bff32e92..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/report_status.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the report_status call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status. -# -def report_status - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new - - # Call the report_status method. - result = client.report_status request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb deleted file mode 100644 index cccaafa23d82..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/app_connectors_service/update_app_connector.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] -require "google/cloud/beyond_corp/app_connectors/v1" - -## -# Snippet for the update_app_connector call in the AppConnectorsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector. -# -def update_app_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new - - # Call the update_app_connector method. - result = client.update_app_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json deleted file mode 100644 index 0eee27e39078..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-beyond_corp-app_connectors-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.beyondcorp.appconnectors.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync", - "title": "Snippet for the list_app_connectors call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors.", - "file": "app_connectors_service/list_app_connectors.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_app_connectors", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#list_app_connectors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "ListAppConnectors", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListAppConnectors", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync", - "title": "Snippet for the get_app_connector call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector.", - "file": "app_connectors_service/get_app_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_app_connector", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#get_app_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "GetAppConnector", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetAppConnector", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync", - "title": "Snippet for the create_app_connector call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector.", - "file": "app_connectors_service/create_app_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_app_connector", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#create_app_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "CreateAppConnector", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.CreateAppConnector", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync", - "title": "Snippet for the update_app_connector call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector.", - "file": "app_connectors_service/update_app_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_app_connector", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#update_app_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "UpdateAppConnector", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.UpdateAppConnector", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync", - "title": "Snippet for the delete_app_connector call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector.", - "file": "app_connectors_service/delete_app_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_app_connector", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#delete_app_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "DeleteAppConnector", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.DeleteAppConnector", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync", - "title": "Snippet for the report_status call in the AppConnectorsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status.", - "file": "app_connectors_service/report_status.rb", - "language": "RUBY", - "client_method": { - "short_name": "report_status", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client#report_status", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppConnectorsService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client" - }, - "method": { - "short_name": "ReportStatus", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ReportStatus", - "service": { - "short_name": "AppConnectorsService", - "full_name": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb deleted file mode 100644 index bfefd99a4089..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" -require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" - -class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb deleted file mode 100644 index ccd8bc1d885a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" - -class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_app_connector_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_connector_path project: "value0", location: "value1", app_connector: "value2" - assert_equal "projects/value0/locations/value1/appConnectors/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb deleted file mode 100644 index e825886c2b2b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service_test.rb +++ /dev/null @@ -1,523 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb" -require "google/cloud/beyond_corp/app_connectors/v1/app_connectors_service" - -class ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_app_connectors - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_app_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_app_connectors, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_app_connectors_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_app_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_app_connectors parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_app_connectors ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_app_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_app_connectors(::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_app_connectors_client_stub.call_rpc_count - end - end - - def test_get_app_connector - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_app_connector, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_app_connector_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_app_connector({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_app_connector name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_app_connector({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_app_connector_client_stub.call_rpc_count - end - end - - def test_create_app_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_connector_id = "hello world" - app_connector = {} - request_id = "hello world" - validate_only = true - - create_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_app_connector, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_connector_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector), request["app_connector"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_app_connector_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_app_connector({ parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_app_connector parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new(parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_app_connector({ parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new(parent: parent, app_connector_id: app_connector_id, app_connector: app_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_app_connector_client_stub.call_rpc_count - end - end - - def test_update_app_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - app_connector = {} - request_id = "hello world" - validate_only = true - - update_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_app_connector, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector), request["app_connector"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_app_connector_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_app_connector({ update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_app_connector update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new(update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_app_connector({ update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new(update_mask: update_mask, app_connector: app_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_app_connector_client_stub.call_rpc_count - end - end - - def test_delete_app_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - - delete_app_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_app_connector, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_app_connector_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_app_connector({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_app_connector name: name, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_app_connector ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_app_connector({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_app_connector(::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_app_connector_client_stub.call_rpc_count - end - end - - def test_report_status - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - app_connector = "hello world" - resource_info = {} - request_id = "hello world" - validate_only = true - - report_status_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :report_status, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, request - assert_equal "hello world", request["app_connector"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo), request["resource_info"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, report_status_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.report_status({ app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.report_status app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.report_status ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new(app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.report_status({ app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.report_status(::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new(app_connector: app_connector, resource_info: resource_info, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, report_status_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_connectors-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json deleted file mode 100644 index a3c9b3754a0a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "beyondcorp.googleapis.com", - "api_shortname": "beyondcorp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_gateways-v1/latest", - "distribution_name": "google-cloud-beyond_corp-app_gateways-v1", - "is_cloud": true, - "language": "ruby", - "name": "beyondcorp", - "name_pretty": "BeyondCorp AppGateways V1 API", - "product_documentation": "https://cloud.google.com/beyondcorp/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml deleted file mode 100644 index 3c939b74dcc9..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-beyond_corp-app_gateways-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-beyond_corp-app_gateways-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts deleted file mode 100644 index 63cdf671ee4a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BeyondCorp AppGateways V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md deleted file mode 100644 index 7b47d23a035b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-beyond_corp-app_gateways-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-beyond_corp-app_gateways-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/beyond_corp/app_gateways/v1" - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/beyond_corp/app_gateways/v1" - -::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-beyond_corp-app_gateways-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/beyond_corp/app_gateways/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md deleted file mode 100644 index a70455f453d0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the BeyondCorp AppGateways V1 API - -Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BeyondCorp AppGateways V1 API. Most users should consider using -the main client gem, -[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-beyond_corp-app_gateways-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/beyondcorp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/beyond_corp/app_gateways/v1" - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new -request = ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new # (request fields as keyword arguments...) -response = client.list_app_gateways request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-app_gateways-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/beyondcorp/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/beyond_corp/app_gateways/v1" -require "logger" - -client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-beyond_corp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-beyond_corp-app_gateways-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-beyond_corp`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-beyond_corp-app_gateways-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile deleted file mode 100644 index d8cc75327511..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-beyond_corp-app_gateways-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials" - ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-beyond_corp-app_gateways-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-beyond_corp-app_gateways-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-beyond_corp-app_gateways-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-beyond_corp-app_gateways-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-beyond_corp-app_gateways-v1" - header "google-cloud-beyond_corp-app_gateways-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-beyond_corp-app_gateways-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-beyond_corp-app_gateways-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-beyond_corp-app_gateways-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-beyond_corp-app_gateways-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json deleted file mode 100644 index 4d35336a7930..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/gapic_metadata.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.beyondcorp.appgateways.v1", - "libraryPackage": "::Google::Cloud::BeyondCorp::AppGateways::V1", - "services": { - "AppGatewaysService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client", - "rpcs": { - "ListAppGateways": { - "methods": [ - "list_app_gateways" - ] - }, - "GetAppGateway": { - "methods": [ - "get_app_gateway" - ] - }, - "CreateAppGateway": { - "methods": [ - "create_app_gateway" - ] - }, - "DeleteAppGateway": { - "methods": [ - "delete_app_gateway" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec deleted file mode 100644 index 8eaf433f65cb..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/google-cloud-beyond_corp-app_gateways-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/beyond_corp/app_gateways/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-beyond_corp-app_gateways-v1" - gem.version = Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-app_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." - gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb deleted file mode 100644 index ea08e44ab15a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google-cloud-beyond_corp-app_gateways-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/beyond_corp/app_gateways/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb deleted file mode 100644 index 735979b372cd..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" -require "google/cloud/beyond_corp/app_gateways/v1/version" - -module Google - module Cloud - module BeyondCorp - module AppGateways - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_gateways/v1" - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/beyond_corp/app_gateways/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb deleted file mode 100644 index 2c44fc4c710b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/beyond_corp/app_gateways/v1/version" - -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client" - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - ## - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppGatewaysService exposes the following resources: - # - # * AppGateways, named as follows: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. - # - # The AppGatewaysService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppGateways. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - module AppGatewaysService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "app_gateways_service", "helpers.rb" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb deleted file mode 100644 index 8de5fb9e3c4e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/client.rb +++ /dev/null @@ -1,897 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - ## - # Client for the AppGatewaysService service. - # - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppGatewaysService exposes the following resources: - # - # * AppGateways, named as follows: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. - # - # The AppGatewaysService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppGateways. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :app_gateways_service_stub - - ## - # Configure the AppGatewaysService Client class. - # - # See {::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AppGatewaysService clients - # ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BeyondCorp", "AppGateways", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AppGatewaysService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @app_gateways_service_stub.universe_domain - end - - ## - # Create a new AppGatewaysService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AppGatewaysService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @app_gateways_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @app_gateways_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_gateways_service_stub.endpoint - config.universe_domain = @app_gateways_service_stub.universe_domain - config.logger = @app_gateways_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @app_gateways_service_stub.endpoint - config.universe_domain = @app_gateways_service_stub.universe_domain - config.logger = @app_gateways_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @app_gateways_service_stub.logger - end - - # Service calls - - ## - # Lists AppGateways in a given project and location. - # - # @overload list_app_gateways(request, options = nil) - # Pass arguments to `list_app_gateways` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_app_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_app_gateways` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AppGateway location using the form: - # `projects/{project_id}/locations/{location_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ListAppGatewaysRequest, if any. - # @param filter [::String] - # Optional. A filter specifying constraints of a list operation. - # @param order_by [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new - # - # # Call the list_app_gateways method. - # result = client.list_app_gateways request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. - # p item - # end - # - def list_app_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_app_gateways.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_app_gateways.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_app_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_gateways_service_stub.call_rpc :list_app_gateways, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @app_gateways_service_stub, :list_app_gateways, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AppGateway. - # - # @overload get_app_gateway(request, options = nil) - # Pass arguments to `get_app_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_app_gateway(name: nil) - # Pass arguments to `get_app_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppGateway name using the form: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new - # - # # Call the get_app_gateway method. - # result = client.get_app_gateway request - # - # # The returned object is of type Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. - # p result - # - def get_app_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_app_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_app_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_app_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_gateways_service_stub.call_rpc :get_app_gateway, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new AppGateway in a given project and location. - # - # @overload create_app_gateway(request, options = nil) - # Pass arguments to `create_app_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_app_gateway(parent: nil, app_gateway_id: nil, app_gateway: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_app_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource project name of the AppGateway location using the - # form: `projects/{project_id}/locations/{location_id}` - # @param app_gateway_id [::String] - # Optional. User-settable AppGateway resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @param app_gateway [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway, ::Hash] - # Required. A BeyondCorp AppGateway resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new - # - # # Call the create_app_gateway method. - # result = client.create_app_gateway request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_app_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_app_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_app_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_app_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_gateways_service_stub.call_rpc :create_app_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AppGateway. - # - # @overload delete_app_gateway(request, options = nil) - # Pass arguments to `delete_app_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_app_gateway(name: nil, request_id: nil, validate_only: nil) - # Pass arguments to `delete_app_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. BeyondCorp AppGateway name using the form: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/app_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new - # - # # Call the delete_app_gateway method. - # result = client.delete_app_gateway request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_app_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_app_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_app_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_app_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @app_gateways_service_stub.call_rpc :delete_app_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AppGatewaysService API. - # - # This class represents the configuration for AppGatewaysService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_app_gateways to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_gateways.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_app_gateways.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AppGatewaysService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_app_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_app_gateways - ## - # RPC-specific configuration for `get_app_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app_gateway - ## - # RPC-specific configuration for `create_app_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app_gateway - ## - # RPC-specific configuration for `delete_app_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app_gateway - - # @private - def initialize parent_rpcs = nil - list_app_gateways_config = parent_rpcs.list_app_gateways if parent_rpcs.respond_to? :list_app_gateways - @list_app_gateways = ::Gapic::Config::Method.new list_app_gateways_config - get_app_gateway_config = parent_rpcs.get_app_gateway if parent_rpcs.respond_to? :get_app_gateway - @get_app_gateway = ::Gapic::Config::Method.new get_app_gateway_config - create_app_gateway_config = parent_rpcs.create_app_gateway if parent_rpcs.respond_to? :create_app_gateway - @create_app_gateway = ::Gapic::Config::Method.new create_app_gateway_config - delete_app_gateway_config = parent_rpcs.delete_app_gateway if parent_rpcs.respond_to? :delete_app_gateway - @delete_app_gateway = ::Gapic::Config::Method.new delete_app_gateway_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb deleted file mode 100644 index 26871bd26e4d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - # Credentials for the AppGatewaysService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb deleted file mode 100644 index 02f38f1a31dd..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/operations.rb +++ /dev/null @@ -1,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 BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AppGatewaysService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AppGatewaysService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::AppGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb deleted file mode 100644 index 820a03051f4e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - # Path helper methods for the AppGatewaysService API. - module Paths - ## - # Create a fully-qualified AppGateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/appGateways/{app_gateway}` - # - # @param project [String] - # @param location [String] - # @param app_gateway [String] - # - # @return [::String] - def app_gateway_path project:, location:, app_gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/appGateways/#{app_gateway}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb deleted file mode 100644 index 58c711433662..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyond_corp/app_gateways/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb deleted file mode 100644 index 8ffa165f3267..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nAgoogle/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto\x12&google.cloud.beyondcorp.appgateways.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x16ListAppGatewaysRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$beyondcorp.googleapis.com/AppGateway\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x91\x01\n\x17ListAppGatewaysResponse\x12H\n\x0c\x61pp_gateways\x18\x01 \x03(\x0b\x32\x32.google.cloud.beyondcorp.appgateways.v1.AppGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"R\n\x14GetAppGatewayRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\"\xf7\x01\n\x17\x43reateAppGatewayRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$beyondcorp.googleapis.com/AppGateway\x12\x1b\n\x0e\x61pp_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12L\n\x0b\x61pp_gateway\x18\x03 \x01(\x0b\x32\x32.google.cloud.beyondcorp.appgateways.v1.AppGatewayB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x01\n\x17\x44\x65leteAppGatewayRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$beyondcorp.googleapis.com/AppGateway\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x08\n\nAppGateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x06labels\x18\x04 \x03(\x0b\x32>.google.cloud.beyondcorp.appgateways.v1.AppGateway.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12J\n\x04type\x18\x07 \x01(\x0e\x32\x37.google.cloud.beyondcorp.appgateways.v1.AppGateway.TypeB\x03\xe0\x41\x02\x12L\n\x05state\x18\x08 \x01(\x0e\x32\x38.google.cloud.beyondcorp.appgateways.v1.AppGateway.StateB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12j\n\x15\x61llocated_connections\x18\n \x03(\x0b\x32\x46.google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnectionB\x03\xe0\x41\x03\x12S\n\thost_type\x18\x0b \x01(\x0e\x32;.google.cloud.beyondcorp.appgateways.v1.AppGateway.HostTypeB\x03\xe0\x41\x02\x1a\x46\n\x13\x41llocatedConnection\x12\x14\n\x07psc_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cingress_port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tTCP_PROXY\x10\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07\x43REATED\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05\";\n\x08HostType\x12\x19\n\x15HOST_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_REGIONAL_MIG\x10\x01:l\xea\x41i\n$beyondcorp.googleapis.com/AppGateway\x12\x41projects/{project}/locations/{location}/appGateways/{app_gateway}\"\x8a\x02\n\x1b\x41ppGatewayOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xf6\x07\n\x12\x41ppGatewaysService\x12\xd4\x01\n\x0fListAppGateways\x12>.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest\x1a?.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/appGateways\x12\xc1\x01\n\rGetAppGateway\x12<.google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest\x1a\x32.google.cloud.beyondcorp.appgateways.v1.AppGateway\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/appGateways/*}\x12\x89\x02\n\x10\x43reateAppGateway\x12?.google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41)\n\nAppGateway\x12\x1b\x41ppGatewayOperationMetadata\xda\x41!parent,app_gateway,app_gateway_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/appGateways:\x0b\x61pp_gateway\x12\xe9\x01\n\x10\x44\x65leteAppGateway\x12?.google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x34\n\x15google.protobuf.Empty\x12\x1b\x41ppGatewayOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/appGateways/*}\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x94\x02\n*com.google.cloud.beyondcorp.appgateways.v1B\x17\x41ppGatewaysServiceProtoP\x01ZLcloud.google.com/go/beyondcorp/appgateways/apiv1/appgatewayspb;appgatewayspb\xaa\x02&Google.Cloud.BeyondCorp.AppGateways.V1\xca\x02&Google\\Cloud\\BeyondCorp\\AppGateways\\V1\xea\x02*Google::Cloud::BeyondCorp::AppGateways::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - ListAppGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest").msgclass - ListAppGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysResponse").msgclass - GetAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest").msgclass - CreateAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest").msgclass - DeleteAppGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest").msgclass - AppGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway").msgclass - AppGateway::AllocatedConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection").msgclass - AppGateway::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.Type").enummodule - AppGateway::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.State").enummodule - AppGateway::HostType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType").enummodule - AppGatewayOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.appgateways.v1.AppGatewayOperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb deleted file mode 100644 index d3df1c0984d4..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/lib/google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto for package 'Google.Cloud.BeyondCorp.AppGateways.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb' - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - module AppGatewaysService - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The AppGatewaysService exposes the following resources: - # - # * AppGateways, named as follows: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`. - # - # The AppGatewaysService service provides methods to manage - # (create/read/update/delete) BeyondCorp AppGateways. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.beyondcorp.appgateways.v1.AppGatewaysService' - - # Lists AppGateways in a given project and location. - rpc :ListAppGateways, ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse - # Gets details of a single AppGateway. - rpc :GetAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway - # Creates a new AppGateway in a given project and location. - rpc :CreateAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, ::Google::Longrunning::Operation - # Deletes a single AppGateway. - rpc :DeleteAppGateway, ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md deleted file mode 100644 index ff3f6683cb37..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BeyondCorp AppGateways V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb deleted file mode 100644 index 94e62975802d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/cloud/beyondcorp/appgateways/v1/app_gateways_service.rb +++ /dev/null @@ -1,291 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module AppGateways - module V1 - # Request message for BeyondCorp.ListAppGateways. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AppGateway location using the form: - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # If not specified, a default value of 50 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # [next_page_token][BeyondCorp.ListAppGatewaysResponse.next_page_token] to - # determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ListAppGatewaysRequest, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter specifying constraints of a list operation. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results. See - # [Sorting - # order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - # for more information. - class ListAppGatewaysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BeyondCorp.ListAppGateways. - # @!attribute [rw] app_gateways - # @return [::Array<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway>] - # A list of BeyondCorp AppGateways in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ListAppGatewaysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.GetAppGateway. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppGateway name using the form: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - class GetAppGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.CreateAppGateway. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource project name of the AppGateway location using the - # form: `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] app_gateway_id - # @return [::String] - # Optional. User-settable AppGateway resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @!attribute [rw] app_gateway - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway] - # Required. A BeyondCorp AppGateway resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class CreateAppGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BeyondCorp.DeleteAppGateway. - # @!attribute [rw] name - # @return [::String] - # Required. BeyondCorp AppGateway name using the form: - # `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class DeleteAppGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway - # to a remote application. It creates all the necessary GCP components needed - # for creating a BeyondCorp protected AppGateway. Multiple connectors can be - # authorised for a single AppGateway. - # @!attribute [rw] name - # @return [::String] - # Required. Unique resource name of the AppGateway. - # The name is ignored when creating an AppGateway. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the resource was last modified. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # @!attribute [rw] display_name - # @return [::String] - # Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed - # 64 characters. - # @!attribute [r] uid - # @return [::String] - # Output only. A unique identifier for the instance generated by the - # system. - # @!attribute [rw] type - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::Type] - # Required. The type of network connectivity used by the AppGateway. - # @!attribute [r] state - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::State] - # Output only. The current state of the AppGateway. - # @!attribute [r] uri - # @return [::String] - # Output only. Server-defined URI for this resource. - # @!attribute [r] allocated_connections - # @return [::Array<::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::AllocatedConnection>] - # Output only. A list of connections allocated for the Gateway - # @!attribute [rw] host_type - # @return [::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway::HostType] - # Required. The type of hosting used by the AppGateway. - class AppGateway - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Allocated connection of the AppGateway. - # @!attribute [rw] psc_uri - # @return [::String] - # Required. The PSC uri of an allocated connection - # @!attribute [rw] ingress_port - # @return [::Integer] - # Required. The ingress port of an allocated connection - class AllocatedConnection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum containing list of all possible network connectivity options - # supported by BeyondCorp AppGateway. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # TCP Proxy based BeyondCorp Connection. API will default to this if unset. - TCP_PROXY = 1 - end - - # Represents the different states of an AppGateway. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # AppGateway is being created. - CREATING = 1 - - # AppGateway has been created. - CREATED = 2 - - # AppGateway's configuration is being updated. - UPDATING = 3 - - # AppGateway is being deleted. - DELETING = 4 - - # AppGateway is down and may be restored in the future. - # This happens when CCFE sends ProjectState = OFF. - DOWN = 5 - end - - # Enum containing list of all possible host types supported by BeyondCorp - # Connection. - module HostType - # Default value. This value is unused. - HOST_TYPE_UNSPECIFIED = 0 - - # AppGateway hosted in a GCP regional managed instance group. - GCP_REGIONAL_MIG = 1 - end - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class AppGatewayOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile deleted file mode 100644 index 885230800eb1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-beyond_corp-app_gateways-v1", path: "../" -else - gem "google-cloud-beyond_corp-app_gateways-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb deleted file mode 100644 index d219a1bc69bf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/create_app_gateway.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] -require "google/cloud/beyond_corp/app_gateways/v1" - -## -# Snippet for the create_app_gateway call in the AppGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway. -# -def create_app_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new - - # Call the create_app_gateway method. - result = client.create_app_gateway request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb deleted file mode 100644 index f68a23b0f94b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/delete_app_gateway.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] -require "google/cloud/beyond_corp/app_gateways/v1" - -## -# Snippet for the delete_app_gateway call in the AppGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway. -# -def delete_app_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new - - # Call the delete_app_gateway method. - result = client.delete_app_gateway request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb deleted file mode 100644 index a733a0e2c1ab..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/get_app_gateway.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] -require "google/cloud/beyond_corp/app_gateways/v1" - -## -# Snippet for the get_app_gateway call in the AppGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway. -# -def get_app_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new - - # Call the get_app_gateway method. - result = client.get_app_gateway request - - # The returned object is of type Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. - p result -end -# [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb deleted file mode 100644 index 5f5e6577f4a7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/app_gateways_service/list_app_gateways.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] -require "google/cloud/beyond_corp/app_gateways/v1" - -## -# Snippet for the list_app_gateways call in the AppGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways. -# -def list_app_gateways - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new - - # Call the list_app_gateways method. - result = client.list_app_gateways request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway. - p item - end -end -# [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json deleted file mode 100644 index 8a34973ba430..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-beyond_corp-app_gateways-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.beyondcorp.appgateways.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync", - "title": "Snippet for the list_app_gateways call in the AppGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways.", - "file": "app_gateways_service/list_app_gateways.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_app_gateways", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#list_app_gateways", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse", - "client": { - "short_name": "AppGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" - }, - "method": { - "short_name": "ListAppGateways", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListAppGateways", - "service": { - "short_name": "AppGatewaysService", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync", - "title": "Snippet for the get_app_gateway call in the AppGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway.", - "file": "app_gateways_service/get_app_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_app_gateway", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#get_app_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway", - "client": { - "short_name": "AppGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" - }, - "method": { - "short_name": "GetAppGateway", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetAppGateway", - "service": { - "short_name": "AppGatewaysService", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync", - "title": "Snippet for the create_app_gateway call in the AppGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway.", - "file": "app_gateways_service/create_app_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_app_gateway", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#create_app_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" - }, - "method": { - "short_name": "CreateAppGateway", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.CreateAppGateway", - "service": { - "short_name": "AppGatewaysService", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync", - "title": "Snippet for the delete_app_gateway call in the AppGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway.", - "file": "app_gateways_service/delete_app_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_app_gateway", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client#delete_app_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AppGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client" - }, - "method": { - "short_name": "DeleteAppGateway", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.DeleteAppGateway", - "service": { - "short_name": "AppGatewaysService", - "full_name": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb deleted file mode 100644 index 26cc18b8ebde..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb" -require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_services_pb" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" - -class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb deleted file mode 100644 index e122fab5a1b2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" - -class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_app_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_gateway_path project: "value0", location: "value1", app_gateway: "value2" - assert_equal "projects/value0/locations/value1/appGateways/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb deleted file mode 100644 index 42b4b66be455..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/google/cloud/beyond_corp/app_gateways/v1/app_gateways_service_test.rb +++ /dev/null @@ -1,385 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/appgateways/v1/app_gateways_service_pb" -require "google/cloud/beyond_corp/app_gateways/v1/app_gateways_service" - -class ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_app_gateways - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_app_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_app_gateways, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_app_gateways_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_app_gateways({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_app_gateways parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_app_gateways ::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_app_gateways({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_app_gateways(::Google::Cloud::BeyondCorp::AppGateways::V1::ListAppGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_app_gateways_client_stub.call_rpc_count - end - end - - def test_get_app_gateway - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_app_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_app_gateway_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_app_gateway({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_app_gateway name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_app_gateway({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::GetAppGatewayRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_app_gateway_client_stub.call_rpc_count - end - end - - def test_create_app_gateway - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_gateway_id = "hello world" - app_gateway = {} - request_id = "hello world" - validate_only = true - - create_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_app_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_gateway_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGateway), request["app_gateway"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_app_gateway_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_app_gateway({ parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_app_gateway parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new(parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_app_gateway({ parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::CreateAppGatewayRequest.new(parent: parent, app_gateway_id: app_gateway_id, app_gateway: app_gateway, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_app_gateway_client_stub.call_rpc_count - end - end - - def test_delete_app_gateway - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - - delete_app_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_app_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_app_gateway_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_app_gateway({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_app_gateway name: name, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_app_gateway ::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_app_gateway({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_app_gateway(::Google::Cloud::BeyondCorp::AppGateways::V1::DeleteAppGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_app_gateway_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BeyondCorp::AppGateways::V1::AppGatewaysService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-app_gateways-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json deleted file mode 100644 index c457c36b7285..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "beyondcorp.googleapis.com", - "api_shortname": "beyondcorp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest", - "distribution_name": "google-cloud-beyond_corp-client_gateways-v1", - "is_cloud": true, - "language": "ruby", - "name": "beyondcorp", - "name_pretty": "BeyondCorp ClientGateways V1 API", - "product_documentation": "https://cloud.google.com/beyondcorp/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-client_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/beyondcorp/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml deleted file mode 100644 index 2d6e3497728d..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-beyond_corp-client_gateways-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-beyond_corp-client_gateways-v1.rb" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts deleted file mode 100644 index 631aaf95922e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BeyondCorp ClientGateways V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md deleted file mode 100644 index 531d6dc3f6d5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-beyond_corp-client_gateways-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-beyond_corp-client_gateways-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/beyond_corp/client_gateways/v1" - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/beyond_corp/client_gateways/v1" - -::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-beyond_corp-client_gateways-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/beyond_corp/client_gateways/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md deleted file mode 100644 index 0e6ab93a2873..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the BeyondCorp ClientGateways V1 API - -Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BeyondCorp ClientGateways V1 API. Most users should consider using -the main client gem, -[google-cloud-beyond_corp](https://rubygems.org/gems/google-cloud-beyond_corp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-beyond_corp-client_gateways-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/beyondcorp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/beyond_corp/client_gateways/v1" - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new -request = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new # (request fields as keyword arguments...) -response = client.list_client_gateways request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/beyondcorp/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/beyond_corp/client_gateways/v1" -require "logger" - -client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-beyond_corp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-beyond_corp-client_gateways-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-beyond_corp`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-beyond_corp-client_gateways-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile deleted file mode 100644 index 7797016444d0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-beyond_corp-client_gateways-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials" - ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-beyond_corp-client_gateways-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-beyond_corp-client_gateways-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-beyond_corp-client_gateways-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-beyond_corp-client_gateways-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-beyond_corp-client_gateways-v1" - header "google-cloud-beyond_corp-client_gateways-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-beyond_corp-client_gateways-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-beyond_corp-client_gateways-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-beyond_corp-client_gateways-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-beyond_corp-client_gateways-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json deleted file mode 100644 index adefe2e55503..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/gapic_metadata.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.beyondcorp.clientgateways.v1", - "libraryPackage": "::Google::Cloud::BeyondCorp::ClientGateways::V1", - "services": { - "ClientGatewaysService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client", - "rpcs": { - "ListClientGateways": { - "methods": [ - "list_client_gateways" - ] - }, - "GetClientGateway": { - "methods": [ - "get_client_gateway" - ] - }, - "CreateClientGateway": { - "methods": [ - "create_client_gateway" - ] - }, - "DeleteClientGateway": { - "methods": [ - "delete_client_gateway" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec deleted file mode 100644 index 4ec8d0459b9a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/google-cloud-beyond_corp-client_gateways-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/beyond_corp/client_gateways/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-beyond_corp-client_gateways-v1" - gem.version = Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution. Note that google-cloud-beyond_corp-client_gateways-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-beyond_corp instead. See the readme for more details." - gem.summary = "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb deleted file mode 100644 index 8df80233c89e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google-cloud-beyond_corp-client_gateways-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/beyond_corp/client_gateways/v1" diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb deleted file mode 100644 index c271d92c8367..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" -require "google/cloud/beyond_corp/client_gateways/v1/version" - -module Google - module Cloud - module BeyondCorp - module ClientGateways - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/client_gateways/v1" - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/beyond_corp/client_gateways/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb deleted file mode 100644 index 56ca51678808..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/beyond_corp/client_gateways/v1/version" - -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client" - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - ## - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The ClientGatewaysService exposes the following resources: - # - # * Client Gateways, named as follows: - # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - module ClientGatewaysService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "client_gateways_service", "helpers.rb" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb deleted file mode 100644 index 2c1774544cc2..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/client.rb +++ /dev/null @@ -1,882 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - ## - # Client for the ClientGatewaysService service. - # - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The ClientGatewaysService exposes the following resources: - # - # * Client Gateways, named as follows: - # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :client_gateways_service_stub - - ## - # Configure the ClientGatewaysService Client class. - # - # See {::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ClientGatewaysService clients - # ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BeyondCorp", "ClientGateways", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ClientGatewaysService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_gateways_service_stub.universe_domain - end - - ## - # Create a new ClientGatewaysService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ClientGatewaysService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @client_gateways_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @client_gateways_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @client_gateways_service_stub.endpoint - config.universe_domain = @client_gateways_service_stub.universe_domain - config.logger = @client_gateways_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @client_gateways_service_stub.endpoint - config.universe_domain = @client_gateways_service_stub.universe_domain - config.logger = @client_gateways_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @client_gateways_service_stub.logger - end - - # Service calls - - ## - # Lists ClientGateways in a given project and location. - # - # @overload list_client_gateways(request, options = nil) - # Pass arguments to `list_client_gateways` via a request object, either of type - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_client_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_client_gateways` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListClientGatewaysRequest. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/client_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new - # - # # Call the list_client_gateways method. - # result = client.list_client_gateways request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. - # p item - # end - # - def list_client_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_client_gateways.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_client_gateways.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_client_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @client_gateways_service_stub.call_rpc :list_client_gateways, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @client_gateways_service_stub, :list_client_gateways, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ClientGateway. - # - # @overload get_client_gateway(request, options = nil) - # Pass arguments to `get_client_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_client_gateway(name: nil) - # Pass arguments to `get_client_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/client_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new - # - # # Call the get_client_gateway method. - # result = client.get_client_gateway request - # - # # The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. - # p result - # - def get_client_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_client_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_client_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_client_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @client_gateways_service_stub.call_rpc :get_client_gateway, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new ClientGateway in a given project and location. - # - # @overload create_client_gateway(request, options = nil) - # Pass arguments to `create_client_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_client_gateway(parent: nil, client_gateway_id: nil, client_gateway: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_client_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param client_gateway_id [::String] - # Optional. User-settable client gateway resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @param client_gateway [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/client_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new - # - # # Call the create_client_gateway method. - # result = client.create_client_gateway request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_client_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_client_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_client_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_client_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @client_gateways_service_stub.call_rpc :create_client_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ClientGateway. - # - # @overload delete_client_gateway(request, options = nil) - # Pass arguments to `delete_client_gateway` via a request object, either of type - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_client_gateway(name: nil, request_id: nil, validate_only: nil) - # Pass arguments to `delete_client_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/beyond_corp/client_gateways/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new - # - # # Call the delete_client_gateway method. - # result = client.delete_client_gateway request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_client_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_client_gateway.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_client_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_client_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @client_gateways_service_stub.call_rpc :delete_client_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ClientGatewaysService API. - # - # This class represents the configuration for ClientGatewaysService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_client_gateways to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_client_gateways.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_client_gateways.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ClientGatewaysService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_client_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_client_gateways - ## - # RPC-specific configuration for `get_client_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_client_gateway - ## - # RPC-specific configuration for `create_client_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_client_gateway - ## - # RPC-specific configuration for `delete_client_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_client_gateway - - # @private - def initialize parent_rpcs = nil - list_client_gateways_config = parent_rpcs.list_client_gateways if parent_rpcs.respond_to? :list_client_gateways - @list_client_gateways = ::Gapic::Config::Method.new list_client_gateways_config - get_client_gateway_config = parent_rpcs.get_client_gateway if parent_rpcs.respond_to? :get_client_gateway - @get_client_gateway = ::Gapic::Config::Method.new get_client_gateway_config - create_client_gateway_config = parent_rpcs.create_client_gateway if parent_rpcs.respond_to? :create_client_gateway - @create_client_gateway = ::Gapic::Config::Method.new create_client_gateway_config - delete_client_gateway_config = parent_rpcs.delete_client_gateway if parent_rpcs.respond_to? :delete_client_gateway - @delete_client_gateway = ::Gapic::Config::Method.new delete_client_gateway_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb deleted file mode 100644 index 3fce6bd8e91e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - # Credentials for the ClientGatewaysService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb deleted file mode 100644 index b5114ab2b67a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/operations.rb +++ /dev/null @@ -1,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 BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "beyondcorp.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ClientGatewaysService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ClientGatewaysService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BeyondCorp::ClientGateways::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "beyondcorp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb deleted file mode 100644 index e1051c10e318..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - # Path helper methods for the ClientGatewaysService API. - module Paths - ## - # Create a fully-qualified ClientGateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/clientGateways/{client_gateway}` - # - # @param project [String] - # @param location [String] - # @param client_gateway [String] - # - # @return [::String] - def client_gateway_path project:, location:, client_gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/clientGateways/#{client_gateway}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb deleted file mode 100644 index 8e4f4f6207b9..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyond_corp/client_gateways/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb deleted file mode 100644 index 48725cc2cbcd..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nGgoogle/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto\x12)google.cloud.beyondcorp.clientgateways.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfd\x03\n\rClientGateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.beyondcorp.clientgateways.v1.ClientGateway.StateB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18\x63lient_connector_service\x18\x06 \x01(\tB\x03\xe0\x41\x03\"j\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\x12\x08\n\x04\x44OWN\x10\x05\x12\t\n\x05\x45RROR\x10\x06:u\xea\x41r\n\'beyondcorp.googleapis.com/ClientGateway\x12Gprojects/{project}/locations/{location}/clientGateways/{client_gateway}\"\xb9\x01\n\x19ListClientGatewaysRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/ClientGateway\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1aListClientGatewaysResponse\x12Q\n\x0f\x63lient_gateways\x18\x01 \x03(\x0b\x32\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x17GetClientGatewayRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/ClientGateway\"\x89\x02\n\x1a\x43reateClientGatewayRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'beyondcorp.googleapis.com/ClientGateway\x12\x1e\n\x11\x63lient_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x63lient_gateway\x18\x03 \x01(\x0b\x32\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGatewayB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x90\x01\n\x1a\x44\x65leteClientGatewayRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'beyondcorp.googleapis.com/ClientGateway\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x8d\x02\n\x1e\x43lientGatewayOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xc7\x08\n\x15\x43lientGatewaysService\x12\xe6\x01\n\x12ListClientGateways\x12\x44.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest\x1a\x45.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/clientGateways\x12\xd3\x01\n\x10GetClientGateway\x12\x42.google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest\x1a\x38.google.cloud.beyondcorp.clientgateways.v1.ClientGateway\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/clientGateways/*}\x12\xa4\x02\n\x13\x43reateClientGateway\x12\x45.google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41/\n\rClientGateway\x12\x1e\x43lientGatewayOperationMetadata\xda\x41\'parent,client_gateway,client_gateway_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/clientGateways:\x0e\x63lient_gateway\x12\xf8\x01\n\x13\x44\x65leteClientGateway\x12\x45.google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x37\n\x15google.protobuf.Empty\x12\x1e\x43lientGatewayOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/clientGateways/*}\x1aM\xca\x41\x19\x62\x65yondcorp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xac\x02\n-com.google.cloud.beyondcorp.clientgateways.v1B\x1a\x43lientGatewaysServiceProtoP\x01ZUcloud.google.com/go/beyondcorp/clientgateways/apiv1/clientgatewayspb;clientgatewayspb\xaa\x02)Google.Cloud.BeyondCorp.ClientGateways.V1\xca\x02)Google\\Cloud\\BeyondCorp\\ClientGateways\\V1\xea\x02-Google::Cloud::BeyondCorp::ClientGateways::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - ClientGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGateway").msgclass - ClientGateway::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State").enummodule - ListClientGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest").msgclass - ListClientGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse").msgclass - GetClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest").msgclass - CreateClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest").msgclass - DeleteClientGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest").msgclass - ClientGatewayOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.beyondcorp.clientgateways.v1.ClientGatewayOperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb deleted file mode 100644 index 95cc1f1b36c5..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/lib/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto for package 'Google.Cloud.BeyondCorp.ClientGateways.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb' - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - module ClientGatewaysService - # API Overview: - # - # The `beyondcorp.googleapis.com` service implements the Google Cloud - # BeyondCorp API. - # - # Data Model: - # - # The ClientGatewaysService exposes the following resources: - # - # * Client Gateways, named as follows: - # `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService' - - # Lists ClientGateways in a given project and location. - rpc :ListClientGateways, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse - # Gets details of a single ClientGateway. - rpc :GetClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway - # Creates a new ClientGateway in a given project and location. - rpc :CreateClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, ::Google::Longrunning::Operation - # Deletes a single ClientGateway. - rpc :DeleteClientGateway, ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md deleted file mode 100644 index 2aa673a2c9ee..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BeyondCorp ClientGateways V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb deleted file mode 100644 index a78c841fea07..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.rb +++ /dev/null @@ -1,221 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BeyondCorp - module ClientGateways - module V1 - # Message describing ClientGateway object. - # @!attribute [rw] name - # @return [::String] - # Required. name of resource. The name is ignored during creation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create time stamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update time stamp. - # @!attribute [r] state - # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway::State] - # Output only. The operational state of the gateway. - # @!attribute [r] id - # @return [::String] - # Output only. A unique identifier for the instance generated by the system. - # @!attribute [r] client_connector_service - # @return [::String] - # Output only. The client connector service name that the client gateway is - # associated to. Client Connector Services, named as follows: - # `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. - class ClientGateway - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the different states of a gateway. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # Gateway is being created. - CREATING = 1 - - # Gateway is being updated. - UPDATING = 2 - - # Gateway is being deleted. - DELETING = 3 - - # Gateway is running. - RUNNING = 4 - - # Gateway is down and may be restored in the future. - # This happens when CCFE sends ProjectState = OFF. - DOWN = 5 - - # ClientGateway encountered an error and is in indeterministic state. - ERROR = 6 - end - end - - # Message for requesting list of ClientGateways. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListClientGatewaysRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListClientGatewaysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing ClientGateways. - # @!attribute [rw] client_gateways - # @return [::Array<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>] - # The list of ClientGateway. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListClientGatewaysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a ClientGateway. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetClientGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a ClientGateway. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] client_gateway_id - # @return [::String] - # Optional. User-settable client gateway resource ID. - # * Must start with a letter. - # * Must contain between 4-63 characters from `/[a-z][0-9]-/`. - # * Must end with a number or a letter. - # @!attribute [rw] client_gateway - # @return [::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class CreateClientGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a ClientGateway - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validates request by executing a dry-run which would not - # alter the resource in any way. - class DeleteClientGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class ClientGatewayOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile deleted file mode 100644 index d1f6da5a786b..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-beyond_corp-client_gateways-v1", path: "../" -else - gem "google-cloud-beyond_corp-client_gateways-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb deleted file mode 100644 index 2ab90c3ca3f0..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/create_client_gateway.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] -require "google/cloud/beyond_corp/client_gateways/v1" - -## -# Snippet for the create_client_gateway call in the ClientGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway. -# -def create_client_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new - - # Call the create_client_gateway method. - result = client.create_client_gateway request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb deleted file mode 100644 index b7bb4a3cbfbe..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/delete_client_gateway.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] -require "google/cloud/beyond_corp/client_gateways/v1" - -## -# Snippet for the delete_client_gateway call in the ClientGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway. -# -def delete_client_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new - - # Call the delete_client_gateway method. - result = client.delete_client_gateway request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb deleted file mode 100644 index c4c652903450..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/get_client_gateway.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] -require "google/cloud/beyond_corp/client_gateways/v1" - -## -# Snippet for the get_client_gateway call in the ClientGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway. -# -def get_client_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new - - # Call the get_client_gateway method. - result = client.get_client_gateway request - - # The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. - p result -end -# [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb deleted file mode 100644 index 129dd2041739..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/client_gateways_service/list_client_gateways.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] -require "google/cloud/beyond_corp/client_gateways/v1" - -## -# Snippet for the list_client_gateways call in the ClientGatewaysService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways. -# -def list_client_gateways - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new - - # Call the list_client_gateways method. - result = client.list_client_gateways request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway. - p item - end -end -# [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json deleted file mode 100644 index e3f0d79256e7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/snippets/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-beyond_corp-client_gateways-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.beyondcorp.clientgateways.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync", - "title": "Snippet for the list_client_gateways call in the ClientGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways.", - "file": "client_gateways_service/list_client_gateways.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_client_gateways", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#list_client_gateways", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse", - "client": { - "short_name": "ClientGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" - }, - "method": { - "short_name": "ListClientGateways", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListClientGateways", - "service": { - "short_name": "ClientGatewaysService", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync", - "title": "Snippet for the get_client_gateway call in the ClientGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway.", - "file": "client_gateways_service/get_client_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_client_gateway", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#get_client_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway", - "client": { - "short_name": "ClientGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" - }, - "method": { - "short_name": "GetClientGateway", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetClientGateway", - "service": { - "short_name": "ClientGatewaysService", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync", - "title": "Snippet for the create_client_gateway call in the ClientGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway.", - "file": "client_gateways_service/create_client_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_client_gateway", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#create_client_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ClientGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" - }, - "method": { - "short_name": "CreateClientGateway", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.CreateClientGateway", - "service": { - "short_name": "ClientGatewaysService", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync", - "title": "Snippet for the delete_client_gateway call in the ClientGatewaysService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway.", - "file": "client_gateways_service/delete_client_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_client_gateway", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client#delete_client_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ClientGatewaysService::Client", - "full_name": "::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client" - }, - "method": { - "short_name": "DeleteClientGateway", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.DeleteClientGateway", - "service": { - "short_name": "ClientGatewaysService", - "full_name": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb deleted file mode 100644 index 4f40d70c67da..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb" -require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_services_pb" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" - -class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb deleted file mode 100644 index 07d42d2a5895..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" - -class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_client_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.client_gateway_path project: "value0", location: "value1", client_gateway: "value2" - assert_equal "projects/value0/locations/value1/clientGateways/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb deleted file mode 100644 index 2e8a40b3f973..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/google/cloud/beyond_corp/client_gateways/v1/client_gateways_service_test.rb +++ /dev/null @@ -1,385 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/beyondcorp/clientgateways/v1/client_gateways_service_pb" -require "google/cloud/beyond_corp/client_gateways/v1/client_gateways_service" - -class ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_client_gateways - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_client_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_client_gateways, name - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_client_gateways_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_client_gateways({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_client_gateways parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_client_gateways ::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_client_gateways({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_client_gateways(::Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_client_gateways_client_stub.call_rpc_count - end - end - - def test_get_client_gateway - # Create GRPC objects. - grpc_response = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_client_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_client_gateway_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_client_gateway({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_client_gateway name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_client_gateway({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_client_gateway_client_stub.call_rpc_count - end - end - - def test_create_client_gateway - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - client_gateway_id = "hello world" - client_gateway = {} - request_id = "hello world" - validate_only = true - - create_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_client_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["client_gateway_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway), request["client_gateway"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_client_gateway_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_client_gateway({ parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_client_gateway parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new(parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_client_gateway({ parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new(parent: parent, client_gateway_id: client_gateway_id, client_gateway: client_gateway, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_client_gateway_client_stub.call_rpc_count - end - end - - def test_delete_client_gateway - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - - delete_client_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_client_gateway, name - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_client_gateway_client_stub do - # Create client - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_client_gateway({ name: name, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_client_gateway name: name, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_client_gateway ::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_client_gateway({ name: name, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_client_gateway(::Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new(name: name, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_client_gateway_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb b/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-beyond_corp-client_gateways-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json deleted file mode 100644 index 3411b1f1a8d4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "analyticshub.googleapis.com", - "api_shortname": "analyticshub", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest", - "distribution_name": "google-cloud-bigquery-analytics_hub-v1", - "is_cloud": true, - "language": "ruby", - "name": "analyticshub", - "name_pretty": "Analytics Hub V1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. Note that google-cloud-bigquery-analytics_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-analytics_hub instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml deleted file mode 100644 index 2f4c3e44583c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-analytics_hub-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-analytics_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts deleted file mode 100644 index ebe913609764..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Analytics Hub V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md deleted file mode 100644 index 1f50655d512b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-analytics_hub-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-analytics_hub-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" - -::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-bigquery-analytics_hub-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md deleted file mode 100644 index e32c262fcdcb..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Analytics Hub V1 API - -Exchange data and analytics assets securely and efficiently. - -Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Analytics Hub V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-analytics_hub](https://rubygems.org/gems/google-cloud-bigquery-analytics_hub). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-analytics_hub-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/analyticshub.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new -request = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new # (request fields as keyword arguments...) -response = client.list_data_exchanges request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/bigquery/analytics_hub/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-bigquery-analytics_hub`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-analytics_hub-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-analytics_hub`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-bigquery-analytics_hub-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile deleted file mode 100644 index 8e449aebabe6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-analytics_hub-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-analytics_hub-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-analytics_hub-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-analytics_hub-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-analytics_hub-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-analytics_hub-v1" - header "google-cloud-bigquery-analytics_hub-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-analytics_hub-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-analytics_hub-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-analytics_hub-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-analytics_hub-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json deleted file mode 100644 index e7a68c8e3121..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/gapic_metadata.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.analyticshub.v1", - "libraryPackage": "::Google::Cloud::Bigquery::AnalyticsHub::V1", - "services": { - "AnalyticsHubService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client", - "rpcs": { - "ListDataExchanges": { - "methods": [ - "list_data_exchanges" - ] - }, - "ListOrgDataExchanges": { - "methods": [ - "list_org_data_exchanges" - ] - }, - "GetDataExchange": { - "methods": [ - "get_data_exchange" - ] - }, - "CreateDataExchange": { - "methods": [ - "create_data_exchange" - ] - }, - "UpdateDataExchange": { - "methods": [ - "update_data_exchange" - ] - }, - "DeleteDataExchange": { - "methods": [ - "delete_data_exchange" - ] - }, - "ListListings": { - "methods": [ - "list_listings" - ] - }, - "GetListing": { - "methods": [ - "get_listing" - ] - }, - "CreateListing": { - "methods": [ - "create_listing" - ] - }, - "UpdateListing": { - "methods": [ - "update_listing" - ] - }, - "DeleteListing": { - "methods": [ - "delete_listing" - ] - }, - "SubscribeListing": { - "methods": [ - "subscribe_listing" - ] - }, - "SubscribeDataExchange": { - "methods": [ - "subscribe_data_exchange" - ] - }, - "RefreshSubscription": { - "methods": [ - "refresh_subscription" - ] - }, - "GetSubscription": { - "methods": [ - "get_subscription" - ] - }, - "ListSubscriptions": { - "methods": [ - "list_subscriptions" - ] - }, - "ListSharedResourceSubscriptions": { - "methods": [ - "list_shared_resource_subscriptions" - ] - }, - "RevokeSubscription": { - "methods": [ - "revoke_subscription" - ] - }, - "DeleteSubscription": { - "methods": [ - "delete_subscription" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "CreateQueryTemplate": { - "methods": [ - "create_query_template" - ] - }, - "GetQueryTemplate": { - "methods": [ - "get_query_template" - ] - }, - "ListQueryTemplates": { - "methods": [ - "list_query_templates" - ] - }, - "UpdateQueryTemplate": { - "methods": [ - "update_query_template" - ] - }, - "DeleteQueryTemplate": { - "methods": [ - "delete_query_template" - ] - }, - "SubmitQueryTemplate": { - "methods": [ - "submit_query_template" - ] - }, - "ApproveQueryTemplate": { - "methods": [ - "approve_query_template" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec deleted file mode 100644 index 9ce1ebb13972..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/google-cloud-bigquery-analytics_hub-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/analytics_hub/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-analytics_hub-v1" - gem.version = Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Analytics Hub is a data exchange platform that enables you to share data and insights at scale across organizational boundaries with a robust security and privacy framework. With Analytics Hub, you can discover and access a data library curated by various data providers. Note that google-cloud-bigquery-analytics_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-analytics_hub instead. See the readme for more details." - gem.summary = "Exchange data and analytics assets securely and efficiently." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb deleted file mode 100644 index deca319c25cf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google-cloud-bigquery-analytics_hub-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/analytics_hub/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb deleted file mode 100644 index b6966426b9a3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" -require "google/cloud/bigquery/analytics_hub/v1/version" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/analytics_hub/v1" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/analytics_hub/v1" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/analytics_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb deleted file mode 100644 index 7454ae504b54..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/analytics_hub/v1/version" - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - ## - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - module AnalyticsHubService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "analytics_hub_service", "helpers.rb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb deleted file mode 100644 index 9b979421434b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb +++ /dev/null @@ -1,3310 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - ## - # Client for the AnalyticsHubService service. - # - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :analytics_hub_service_stub - - ## - # Configure the AnalyticsHubService Client class. - # - # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AnalyticsHubService clients - # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AnalyticsHubService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @analytics_hub_service_stub.universe_domain - end - - ## - # Create a new AnalyticsHubService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AnalyticsHubService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @analytics_hub_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @analytics_hub_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @analytics_hub_service_stub.logger - end - - # Service calls - - ## - # Lists all data exchanges in a given project and location. - # - # @overload list_data_exchanges(request, options = nil) - # Pass arguments to `list_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the data exchanges. - # e.g. `projects/myproject/locations/us`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new - # - # # Call the list_data_exchanges method. - # result = client.list_data_exchanges request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p item - # end - # - def list_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_exchanges.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_data_exchanges, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all data exchanges from projects in a given organization and - # location. - # - # @overload list_org_data_exchanges(request, options = nil) - # Pass arguments to `list_org_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization [::String] - # Required. The organization resource path of the projects containing - # DataExchanges. e.g. `organizations/myorg/locations/us`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new - # - # # Call the list_org_data_exchanges method. - # result = client.list_org_data_exchanges request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p item - # end - # - def list_org_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.organization - header_params["organization"] = request.organization - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_org_data_exchanges, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a data exchange. - # - # @overload get_data_exchange(request, options = nil) - # Pass arguments to `get_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_exchange(name: nil) - # Pass arguments to `get_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the data exchange. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new - # - # # Call the get_data_exchange method. - # result = client.get_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def get_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new data exchange. - # - # @overload create_data_exchange(request, options = nil) - # Pass arguments to `create_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) - # Pass arguments to `create_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the data exchange. - # e.g. `projects/myproject/locations/us`. - # @param data_exchange_id [::String] - # Required. The ID of the data exchange. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] - # Required. The data exchange to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new - # - # # Call the create_data_exchange method. - # result = client.create_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def create_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :create_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing data exchange. - # - # @overload update_data_exchange(request, options = nil) - # Pass arguments to `update_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_exchange(update_mask: nil, data_exchange: nil) - # Pass arguments to `update_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the data exchange - # resource. The fields specified in the - # `updateMask` are relative to the resource and are not a full request. - # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] - # Required. The data exchange to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new - # - # # Call the update_data_exchange method. - # result = client.update_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def update_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_exchange&.name - header_params["data_exchange.name"] = request.data_exchange.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :update_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing data exchange. - # - # @overload delete_data_exchange(request, options = nil) - # Pass arguments to `delete_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_exchange(name: nil) - # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full name of the data exchange resource that you want to - # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new - # - # # Call the delete_data_exchange method. - # result = client.delete_data_exchange request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all listings in a given project and location. - # - # @overload list_listings(request, options = nil) - # Pass arguments to `list_listings` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_listings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_listings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new - # - # # Call the list_listings method. - # result = client.list_listings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p item - # end - # - def list_listings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_listings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_listings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_listings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_listings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a listing. - # - # @overload get_listing(request, options = nil) - # Pass arguments to `get_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_listing(name: nil) - # Pass arguments to `get_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new - # - # # Call the get_listing method. - # result = client.get_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def get_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new listing. - # - # @overload create_listing(request, options = nil) - # Pass arguments to `create_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_listing(parent: nil, listing_id: nil, listing: nil) - # Pass arguments to `create_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param listing_id [::String] - # Required. The ID of the listing to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] - # Required. The listing to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new - # - # # Call the create_listing method. - # result = client.create_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def create_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :create_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing listing. - # - # @overload update_listing(request, options = nil) - # Pass arguments to `update_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_listing(update_mask: nil, listing: nil) - # Pass arguments to `update_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the listing - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] - # Required. The listing to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new - # - # # Call the update_listing method. - # result = client.update_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def update_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.listing&.name - header_params["listing.name"] = request.listing.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :update_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a listing. - # - # @overload delete_listing(request, options = nil) - # Pass arguments to `delete_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_listing(name: nil, delete_commercial: nil) - # Pass arguments to `delete_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the listing to delete. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @param delete_commercial [::Boolean] - # Optional. If the listing is commercial then this field must be set to true, - # otherwise a failure is thrown. This acts as a safety guard to avoid - # deleting commercial listings accidentally. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new - # - # # Call the delete_listing method. - # result = client.delete_listing request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Subscribes to a listing. - # - # Currently, with Analytics Hub, you can create listings that - # reference only BigQuery datasets. - # Upon subscription to a listing for a BigQuery dataset, Analytics Hub - # creates a linked dataset in the subscriber's project. - # - # @overload subscribe_listing(request, options = nil) - # Pass arguments to `subscribe_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload subscribe_listing(destination_dataset: nil, destination_pubsub_subscription: nil, name: nil) - # Pass arguments to `subscribe_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] - # Input only. BigQuery destination dataset to create for the subscriber. - # - # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] - # Input only. Destination Pub/Sub subscription to create for the - # subscriber. - # - # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param name [::String] - # Required. Resource name of the listing that you want to subscribe to. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new - # - # # Call the subscribe_listing method. - # result = client.subscribe_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. - # p result - # - def subscribe_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.subscribe_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.subscribe_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :subscribe_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Subscription to a Data Clean Room. This is a - # long-running operation as it will create one or more linked datasets. - # Throws a Bad Request error if the Data Exchange does not contain any - # listings. - # - # @overload subscribe_data_exchange(request, options = nil) - # Pass arguments to `subscribe_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload subscribe_data_exchange(name: nil, destination: nil, destination_dataset: nil, subscription: nil, subscriber_contact: nil) - # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Data Exchange. - # e.g. `projects/publisherproject/locations/us/dataExchanges/123` - # @param destination [::String] - # Required. The parent resource path of the Subscription. - # e.g. `projects/subscriberproject/locations/us` - # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] - # Optional. BigQuery destination dataset to create for the subscriber. - # @param subscription [::String] - # Required. Name of the subscription to create. - # e.g. `subscription1` - # @param subscriber_contact [::String] - # Email of the subscriber. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new - # - # # Call the subscribe_data_exchange method. - # result = client.subscribe_data_exchange request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def subscribe_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :subscribe_data_exchange, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Refreshes a Subscription to a Data Exchange. A Data Exchange can become - # stale when a publisher adds or removes data. This is a long-running - # operation as it may create many linked datasets. - # - # @overload refresh_subscription(request, options = nil) - # Pass arguments to `refresh_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload refresh_subscription(name: nil) - # Pass arguments to `refresh_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Subscription to refresh. - # e.g. `projects/subscriberproject/locations/us/subscriptions/123` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new - # - # # Call the refresh_subscription method. - # result = client.refresh_subscription request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def refresh_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.refresh_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.refresh_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :refresh_subscription, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a Subscription. - # - # @overload get_subscription(request, options = nil) - # Pass arguments to `get_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_subscription(name: nil) - # Pass arguments to `get_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription. - # e.g. projects/123/locations/us/subscriptions/456 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new - # - # # Call the get_subscription method. - # result = client.get_subscription request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p result - # - def get_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_subscription, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all subscriptions in a given project and location. - # - # @overload list_subscriptions(request, options = nil) - # Pass arguments to `list_subscriptions` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the subscription. - # e.g. projects/myproject/locations/us - # @param filter [::String] - # An expression for filtering the results of the request. Eligible - # fields for filtering are: - # - # + `listing` - # + `data_exchange` - # - # Alternatively, a literal wrapped in double quotes may be provided. - # This will be checked for an exact match against both fields above. - # - # In all cases, the full Data Exchange or Listing resource name must - # be provided. Some example of using filters: - # - # + data_exchange="projects/myproject/locations/us/dataExchanges/123" - # + listing="projects/123/locations/us/dataExchanges/456/listings/789" - # + "projects/myproject/locations/us/dataExchanges/123" - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. - # @param page_token [::String] - # Page token, returned by a previous call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new - # - # # Call the list_subscriptions method. - # result = client.list_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p item - # end - # - def list_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_subscriptions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all subscriptions on a given Data Exchange or Listing. - # - # @overload list_shared_resource_subscriptions(request, options = nil) - # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # Required. Resource name of the requested target. This resource may be - # either a Listing or a DataExchange. e.g. - # projects/123/locations/us/dataExchanges/456 OR e.g. - # projects/123/locations/us/dataExchanges/456/listings/789 - # @param include_deleted_subscriptions [::Boolean] - # If selected, includes deleted subscriptions in the response - # (up to 63 days after deletion). - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. - # @param page_token [::String] - # Page token, returned by a previous call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new - # - # # Call the list_shared_resource_subscriptions method. - # result = client.list_shared_resource_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p item - # end - # - def list_shared_resource_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_shared_resource_subscriptions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_shared_resource_subscriptions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revokes a given subscription. - # - # @overload revoke_subscription(request, options = nil) - # Pass arguments to `revoke_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload revoke_subscription(name: nil, revoke_commercial: nil) - # Pass arguments to `revoke_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription to revoke. - # e.g. projects/123/locations/us/subscriptions/456 - # @param revoke_commercial [::Boolean] - # Optional. If the subscription is commercial then this field must be set to - # true, otherwise a failure is thrown. This acts as a safety guard to avoid - # revoking commercial subscriptions accidentally. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new - # - # # Call the revoke_subscription method. - # result = client.revoke_subscription request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. - # p result - # - def revoke_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.revoke_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.revoke_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.revoke_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :revoke_subscription, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a subscription. - # - # @overload delete_subscription(request, options = nil) - # Pass arguments to `delete_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_subscription(name: nil) - # Pass arguments to `delete_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription to delete. - # e.g. projects/123/locations/us/subscriptions/456 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new - # - # # Call the delete_subscription method. - # result = client.delete_subscription request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_subscription, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new QueryTemplate - # - # @overload create_query_template(request, options = nil) - # Pass arguments to `create_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_query_template(parent: nil, query_template_id: nil, query_template: nil) - # Pass arguments to `create_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. - # @param query_template_id [::String] - # Required. The ID of the QueryTemplate to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] - # Required. The QueryTemplate to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new - # - # # Call the create_query_template method. - # result = client.create_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def create_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :create_query_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a QueryTemplate - # - # @overload get_query_template(request, options = nil) - # Pass arguments to `get_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_query_template(name: nil) - # Pass arguments to `get_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new - # - # # Call the get_query_template method. - # result = client.get_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def get_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_query_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all QueryTemplates in a given project and location. - # - # @overload list_query_templates(request, options = nil) - # Pass arguments to `list_query_templates` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_query_templates(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_query_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the QueryTemplates. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response - # page. Leverage the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Optional. Page token, returned by a previous call, to request the next page - # of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new - # - # # Call the list_query_templates method. - # result = client.list_query_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p item - # end - # - def list_query_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_query_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_query_templates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_query_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_query_templates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_query_templates, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing QueryTemplate - # - # @overload update_query_template(request, options = nil) - # Pass arguments to `update_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_query_template(update_mask: nil, query_template: nil) - # Pass arguments to `update_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask specifies the fields to update in the query template - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] - # Required. The QueryTemplate to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new - # - # # Call the update_query_template method. - # result = client.update_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def update_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.query_template&.name - header_params["query_template.name"] = request.query_template.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :update_query_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a query template. - # - # @overload delete_query_template(request, options = nil) - # Pass arguments to `delete_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_query_template(name: nil) - # Pass arguments to `delete_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new - # - # # Call the delete_query_template method. - # result = client.delete_query_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_query_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Submits a query template for approval. - # - # @overload submit_query_template(request, options = nil) - # Pass arguments to `submit_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload submit_query_template(name: nil) - # Pass arguments to `submit_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new - # - # # Call the submit_query_template method. - # result = client.submit_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def submit_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.submit_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.submit_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.submit_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :submit_query_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Approves a query template. - # - # @overload approve_query_template(request, options = nil) - # Pass arguments to `approve_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload approve_query_template(name: nil) - # Pass arguments to `approve_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new - # - # # Call the approve_query_template method. - # result = client.approve_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def approve_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.approve_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.approve_query_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.approve_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :approve_query_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AnalyticsHubService API. - # - # This class represents the configuration for AnalyticsHubService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_data_exchanges to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "analyticshub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AnalyticsHubService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_exchanges - ## - # RPC-specific configuration for `list_org_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_org_data_exchanges - ## - # RPC-specific configuration for `get_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_exchange - ## - # RPC-specific configuration for `create_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_exchange - ## - # RPC-specific configuration for `update_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_exchange - ## - # RPC-specific configuration for `delete_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_exchange - ## - # RPC-specific configuration for `list_listings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_listings - ## - # RPC-specific configuration for `get_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :get_listing - ## - # RPC-specific configuration for `create_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :create_listing - ## - # RPC-specific configuration for `update_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :update_listing - ## - # RPC-specific configuration for `delete_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_listing - ## - # RPC-specific configuration for `subscribe_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_listing - ## - # RPC-specific configuration for `subscribe_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_data_exchange - ## - # RPC-specific configuration for `refresh_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :refresh_subscription - ## - # RPC-specific configuration for `get_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_subscription - ## - # RPC-specific configuration for `list_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_subscriptions - ## - # RPC-specific configuration for `list_shared_resource_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_shared_resource_subscriptions - ## - # RPC-specific configuration for `revoke_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :revoke_subscription - ## - # RPC-specific configuration for `delete_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_subscription - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_query_template - ## - # RPC-specific configuration for `get_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_query_template - ## - # RPC-specific configuration for `list_query_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_query_templates - ## - # RPC-specific configuration for `update_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_query_template - ## - # RPC-specific configuration for `delete_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_query_template - ## - # RPC-specific configuration for `submit_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_query_template - ## - # RPC-specific configuration for `approve_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_query_template - - # @private - def initialize parent_rpcs = nil - list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges - @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config - list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges - @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config - get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange - @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config - create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange - @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config - update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange - @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config - delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange - @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config - list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings - @list_listings = ::Gapic::Config::Method.new list_listings_config - get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing - @get_listing = ::Gapic::Config::Method.new get_listing_config - create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing - @create_listing = ::Gapic::Config::Method.new create_listing_config - update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing - @update_listing = ::Gapic::Config::Method.new update_listing_config - delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing - @delete_listing = ::Gapic::Config::Method.new delete_listing_config - subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing - @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config - subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange - @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config - refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription - @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config - get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription - @get_subscription = ::Gapic::Config::Method.new get_subscription_config - list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions - @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config - list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions - @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config - revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription - @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config - delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription - @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_query_template_config = parent_rpcs.create_query_template if parent_rpcs.respond_to? :create_query_template - @create_query_template = ::Gapic::Config::Method.new create_query_template_config - get_query_template_config = parent_rpcs.get_query_template if parent_rpcs.respond_to? :get_query_template - @get_query_template = ::Gapic::Config::Method.new get_query_template_config - list_query_templates_config = parent_rpcs.list_query_templates if parent_rpcs.respond_to? :list_query_templates - @list_query_templates = ::Gapic::Config::Method.new list_query_templates_config - update_query_template_config = parent_rpcs.update_query_template if parent_rpcs.respond_to? :update_query_template - @update_query_template = ::Gapic::Config::Method.new update_query_template_config - delete_query_template_config = parent_rpcs.delete_query_template if parent_rpcs.respond_to? :delete_query_template - @delete_query_template = ::Gapic::Config::Method.new delete_query_template_config - submit_query_template_config = parent_rpcs.submit_query_template if parent_rpcs.respond_to? :submit_query_template - @submit_query_template = ::Gapic::Config::Method.new submit_query_template_config - approve_query_template_config = parent_rpcs.approve_query_template if parent_rpcs.respond_to? :approve_query_template - @approve_query_template = ::Gapic::Config::Method.new approve_query_template_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb deleted file mode 100644 index e332f7d1ae56..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - # Credentials for the AnalyticsHubService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb deleted file mode 100644 index 5e79f1c59061..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/operations.rb +++ /dev/null @@ -1,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 Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AnalyticsHubService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AnalyticsHubService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "analyticshub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb deleted file mode 100644 index b65b9b2e215e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb +++ /dev/null @@ -1,218 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - # Path helper methods for the AnalyticsHubService API. - module Paths - ## - # Create a fully-qualified DataExchange resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}` - # - # @param project [String] - # @param location [String] - # @param data_exchange [String] - # - # @return [::String] - def data_exchange_path project:, location:, data_exchange: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}` - # - # @param project [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified Listing resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}` - # - # @param project [String] - # @param location [String] - # @param data_exchange [String] - # @param listing [String] - # - # @return [::String] - def listing_path project:, location:, data_exchange:, listing: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/listings/#{listing}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified ManagedService resource string. - # - # The resource will be in the following format: - # - # `services/{service}` - # - # @param service [String] - # - # @return [::String] - def managed_service_path service: - "services/#{service}" - end - - ## - # Create a fully-qualified QueryTemplate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}` - # - # @param project [String] - # @param location [String] - # @param data_exchange [String] - # @param query_template [String] - # - # @return [::String] - def query_template_path project:, location:, data_exchange:, query_template: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/queryTemplates/#{query_template}" - end - - ## - # Create a fully-qualified Routine resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/routines/{routine}` - # - # @param project [String] - # @param dataset [String] - # @param routine [String] - # - # @return [::String] - def routine_path project:, dataset:, routine: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/routines/#{routine}" - end - - ## - # Create a fully-qualified Subscription resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/subscriptions/{subscription}` - # - # @param project [String] - # @param location [String] - # @param subscription [String] - # - # @return [::String] - def subscription_path project:, location:, subscription: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/subscriptions/#{subscription}" - end - - ## - # Create a fully-qualified Table resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/tables/{table}` - # - # @param project [String] - # @param dataset [String] - # @param table [String] - # - # @return [::String] - def table_path project:, dataset:, table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/tables/#{table}" - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb deleted file mode 100644 index e28b43473888..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/analytics_hub/v1/version" - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - ## - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - module AnalyticsHubService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb deleted file mode 100644 index 7c0f849151d5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/client.rb +++ /dev/null @@ -1,3064 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - module Rest - ## - # REST client for the AnalyticsHubService service. - # - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :analytics_hub_service_stub - - ## - # Configure the AnalyticsHubService Client class. - # - # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AnalyticsHubService clients - # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AnalyticsHubService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @analytics_hub_service_stub.universe_domain - end - - ## - # Create a new AnalyticsHubService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AnalyticsHubService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @analytics_hub_service_stub = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @analytics_hub_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @analytics_hub_service_stub.logger - end - - # Service calls - - ## - # Lists all data exchanges in a given project and location. - # - # @overload list_data_exchanges(request, options = nil) - # Pass arguments to `list_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the data exchanges. - # e.g. `projects/myproject/locations/us`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new - # - # # Call the list_data_exchanges method. - # result = client.list_data_exchanges request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p item - # end - # - def list_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_exchanges.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_data_exchanges request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, "data_exchanges", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all data exchanges from projects in a given organization and - # location. - # - # @overload list_org_data_exchanges(request, options = nil) - # Pass arguments to `list_org_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization [::String] - # Required. The organization resource path of the projects containing - # DataExchanges. e.g. `organizations/myorg/locations/us`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new - # - # # Call the list_org_data_exchanges method. - # result = client.list_org_data_exchanges request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p item - # end - # - def list_org_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_org_data_exchanges request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, "data_exchanges", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a data exchange. - # - # @overload get_data_exchange(request, options = nil) - # Pass arguments to `get_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_exchange(name: nil) - # Pass arguments to `get_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the data exchange. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new - # - # # Call the get_data_exchange method. - # result = client.get_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def get_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_data_exchange request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new data exchange. - # - # @overload create_data_exchange(request, options = nil) - # Pass arguments to `create_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) - # Pass arguments to `create_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the data exchange. - # e.g. `projects/myproject/locations/us`. - # @param data_exchange_id [::String] - # Required. The ID of the data exchange. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] - # Required. The data exchange to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new - # - # # Call the create_data_exchange method. - # result = client.create_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def create_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.create_data_exchange request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing data exchange. - # - # @overload update_data_exchange(request, options = nil) - # Pass arguments to `update_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_exchange(update_mask: nil, data_exchange: nil) - # Pass arguments to `update_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the data exchange - # resource. The fields specified in the - # `updateMask` are relative to the resource and are not a full request. - # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash] - # Required. The data exchange to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new - # - # # Call the update_data_exchange method. - # result = client.update_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - # p result - # - def update_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.update_data_exchange request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing data exchange. - # - # @overload delete_data_exchange(request, options = nil) - # Pass arguments to `delete_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_exchange(name: nil) - # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full name of the data exchange resource that you want to - # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new - # - # # Call the delete_data_exchange method. - # result = client.delete_data_exchange request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.delete_data_exchange request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all listings in a given project and location. - # - # @overload list_listings(request, options = nil) - # Pass arguments to `list_listings` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_listings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_listings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new - # - # # Call the list_listings method. - # result = client.list_listings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p item - # end - # - def list_listings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_listings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_listings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_listings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_listings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, "listings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a listing. - # - # @overload get_listing(request, options = nil) - # Pass arguments to `get_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_listing(name: nil) - # Pass arguments to `get_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new - # - # # Call the get_listing method. - # result = client.get_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def get_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_listing request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new listing. - # - # @overload create_listing(request, options = nil) - # Pass arguments to `create_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_listing(parent: nil, listing_id: nil, listing: nil) - # Pass arguments to `create_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param listing_id [::String] - # Required. The ID of the listing to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] - # Required. The listing to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new - # - # # Call the create_listing method. - # result = client.create_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def create_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.create_listing request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing listing. - # - # @overload update_listing(request, options = nil) - # Pass arguments to `update_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_listing(update_mask: nil, listing: nil) - # Pass arguments to `update_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the listing - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash] - # Required. The listing to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new - # - # # Call the update_listing method. - # result = client.update_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - # p result - # - def update_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.update_listing request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a listing. - # - # @overload delete_listing(request, options = nil) - # Pass arguments to `delete_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_listing(name: nil, delete_commercial: nil) - # Pass arguments to `delete_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the listing to delete. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @param delete_commercial [::Boolean] - # Optional. If the listing is commercial then this field must be set to true, - # otherwise a failure is thrown. This acts as a safety guard to avoid - # deleting commercial listings accidentally. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new - # - # # Call the delete_listing method. - # result = client.delete_listing request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.delete_listing request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Subscribes to a listing. - # - # Currently, with Analytics Hub, you can create listings that - # reference only BigQuery datasets. - # Upon subscription to a listing for a BigQuery dataset, Analytics Hub - # creates a linked dataset in the subscriber's project. - # - # @overload subscribe_listing(request, options = nil) - # Pass arguments to `subscribe_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload subscribe_listing(destination_dataset: nil, destination_pubsub_subscription: nil, name: nil) - # Pass arguments to `subscribe_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] - # Input only. BigQuery destination dataset to create for the subscriber. - # - # Note: The following parameters are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param destination_pubsub_subscription [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription, ::Hash] - # Input only. Destination Pub/Sub subscription to create for the - # subscriber. - # - # Note: The following parameters are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param name [::String] - # Required. Resource name of the listing that you want to subscribe to. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new - # - # # Call the subscribe_listing method. - # result = client.subscribe_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. - # p result - # - def subscribe_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.subscribe_listing.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.subscribe_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.subscribe_listing request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Subscription to a Data Clean Room. This is a - # long-running operation as it will create one or more linked datasets. - # Throws a Bad Request error if the Data Exchange does not contain any - # listings. - # - # @overload subscribe_data_exchange(request, options = nil) - # Pass arguments to `subscribe_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload subscribe_data_exchange(name: nil, destination: nil, destination_dataset: nil, subscription: nil, subscriber_contact: nil) - # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Data Exchange. - # e.g. `projects/publisherproject/locations/us/dataExchanges/123` - # @param destination [::String] - # Required. The parent resource path of the Subscription. - # e.g. `projects/subscriberproject/locations/us` - # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash] - # Optional. BigQuery destination dataset to create for the subscriber. - # @param subscription [::String] - # Required. Name of the subscription to create. - # e.g. `subscription1` - # @param subscriber_contact [::String] - # Email of the subscriber. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new - # - # # Call the subscribe_data_exchange method. - # result = client.subscribe_data_exchange request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def subscribe_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.subscribe_data_exchange request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Refreshes a Subscription to a Data Exchange. A Data Exchange can become - # stale when a publisher adds or removes data. This is a long-running - # operation as it may create many linked datasets. - # - # @overload refresh_subscription(request, options = nil) - # Pass arguments to `refresh_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload refresh_subscription(name: nil) - # Pass arguments to `refresh_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Subscription to refresh. - # e.g. `projects/subscriberproject/locations/us/subscriptions/123` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new - # - # # Call the refresh_subscription method. - # result = client.refresh_subscription request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def refresh_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.refresh_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.refresh_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.refresh_subscription request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a Subscription. - # - # @overload get_subscription(request, options = nil) - # Pass arguments to `get_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_subscription(name: nil) - # Pass arguments to `get_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription. - # e.g. projects/123/locations/us/subscriptions/456 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new - # - # # Call the get_subscription method. - # result = client.get_subscription request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p result - # - def get_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_subscription request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all subscriptions in a given project and location. - # - # @overload list_subscriptions(request, options = nil) - # Pass arguments to `list_subscriptions` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the subscription. - # e.g. projects/myproject/locations/us - # @param filter [::String] - # An expression for filtering the results of the request. Eligible - # fields for filtering are: - # - # + `listing` - # + `data_exchange` - # - # Alternatively, a literal wrapped in double quotes may be provided. - # This will be checked for an exact match against both fields above. - # - # In all cases, the full Data Exchange or Listing resource name must - # be provided. Some example of using filters: - # - # + data_exchange="projects/myproject/locations/us/dataExchanges/123" - # + listing="projects/123/locations/us/dataExchanges/456/listings/789" - # + "projects/myproject/locations/us/dataExchanges/123" - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. - # @param page_token [::String] - # Page token, returned by a previous call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new - # - # # Call the list_subscriptions method. - # result = client.list_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p item - # end - # - def list_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_subscriptions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, "subscriptions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all subscriptions on a given Data Exchange or Listing. - # - # @overload list_shared_resource_subscriptions(request, options = nil) - # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # Required. Resource name of the requested target. This resource may be - # either a Listing or a DataExchange. e.g. - # projects/123/locations/us/dataExchanges/456 OR e.g. - # projects/123/locations/us/dataExchanges/456/listings/789 - # @param include_deleted_subscriptions [::Boolean] - # If selected, includes deleted subscriptions in the response - # (up to 63 days after deletion). - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. - # @param page_token [::String] - # Page token, returned by a previous call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new - # - # # Call the list_shared_resource_subscriptions method. - # result = client.list_shared_resource_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - # p item - # end - # - def list_shared_resource_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_shared_resource_subscriptions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_shared_resource_subscriptions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, "shared_resource_subscriptions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revokes a given subscription. - # - # @overload revoke_subscription(request, options = nil) - # Pass arguments to `revoke_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload revoke_subscription(name: nil, revoke_commercial: nil) - # Pass arguments to `revoke_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription to revoke. - # e.g. projects/123/locations/us/subscriptions/456 - # @param revoke_commercial [::Boolean] - # Optional. If the subscription is commercial then this field must be set to - # true, otherwise a failure is thrown. This acts as a safety guard to avoid - # revoking commercial subscriptions accidentally. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new - # - # # Call the revoke_subscription method. - # result = client.revoke_subscription request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. - # p result - # - def revoke_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.revoke_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.revoke_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.revoke_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.revoke_subscription request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a subscription. - # - # @overload delete_subscription(request, options = nil) - # Pass arguments to `delete_subscription` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_subscription(name: nil) - # Pass arguments to `delete_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the subscription to delete. - # e.g. projects/123/locations/us/subscriptions/456 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new - # - # # Call the delete_subscription method. - # result = client.delete_subscription request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.delete_subscription request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new QueryTemplate - # - # @overload create_query_template(request, options = nil) - # Pass arguments to `create_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_query_template(parent: nil, query_template_id: nil, query_template: nil) - # Pass arguments to `create_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. - # @param query_template_id [::String] - # Required. The ID of the QueryTemplate to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] - # Required. The QueryTemplate to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new - # - # # Call the create_query_template method. - # result = client.create_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def create_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.create_query_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a QueryTemplate - # - # @overload get_query_template(request, options = nil) - # Pass arguments to `get_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_query_template(name: nil) - # Pass arguments to `get_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new - # - # # Call the get_query_template method. - # result = client.get_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def get_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.get_query_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all QueryTemplates in a given project and location. - # - # @overload list_query_templates(request, options = nil) - # Pass arguments to `list_query_templates` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_query_templates(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_query_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource path of the QueryTemplates. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response - # page. Leverage the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Optional. Page token, returned by a previous call, to request the next page - # of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new - # - # # Call the list_query_templates method. - # result = client.list_query_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p item - # end - # - def list_query_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_query_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_query_templates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_query_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.list_query_templates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_query_templates, "query_templates", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing QueryTemplate - # - # @overload update_query_template(request, options = nil) - # Pass arguments to `update_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_query_template(update_mask: nil, query_template: nil) - # Pass arguments to `update_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask specifies the fields to update in the query template - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @param query_template [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate, ::Hash] - # Required. The QueryTemplate to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new - # - # # Call the update_query_template method. - # result = client.update_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def update_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.update_query_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a query template. - # - # @overload delete_query_template(request, options = nil) - # Pass arguments to `delete_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_query_template(name: nil) - # Pass arguments to `delete_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new - # - # # Call the delete_query_template method. - # result = client.delete_query_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.delete_query_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Submits a query template for approval. - # - # @overload submit_query_template(request, options = nil) - # Pass arguments to `submit_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload submit_query_template(name: nil) - # Pass arguments to `submit_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new - # - # # Call the submit_query_template method. - # result = client.submit_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def submit_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.submit_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.submit_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.submit_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.submit_query_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Approves a query template. - # - # @overload approve_query_template(request, options = nil) - # Pass arguments to `approve_query_template` via a request object, either of type - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload approve_query_template(name: nil) - # Pass arguments to `approve_query_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/analytics_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new - # - # # Call the approve_query_template method. - # result = client.approve_query_template request - # - # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - # p result - # - def approve_query_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.approve_query_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.approve_query_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.approve_query_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.approve_query_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AnalyticsHubService REST API. - # - # This class represents the configuration for AnalyticsHubService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_data_exchanges to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "analyticshub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AnalyticsHubService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_exchanges - ## - # RPC-specific configuration for `list_org_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_org_data_exchanges - ## - # RPC-specific configuration for `get_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_exchange - ## - # RPC-specific configuration for `create_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_exchange - ## - # RPC-specific configuration for `update_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_exchange - ## - # RPC-specific configuration for `delete_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_exchange - ## - # RPC-specific configuration for `list_listings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_listings - ## - # RPC-specific configuration for `get_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :get_listing - ## - # RPC-specific configuration for `create_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :create_listing - ## - # RPC-specific configuration for `update_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :update_listing - ## - # RPC-specific configuration for `delete_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_listing - ## - # RPC-specific configuration for `subscribe_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_listing - ## - # RPC-specific configuration for `subscribe_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_data_exchange - ## - # RPC-specific configuration for `refresh_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :refresh_subscription - ## - # RPC-specific configuration for `get_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_subscription - ## - # RPC-specific configuration for `list_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_subscriptions - ## - # RPC-specific configuration for `list_shared_resource_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_shared_resource_subscriptions - ## - # RPC-specific configuration for `revoke_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :revoke_subscription - ## - # RPC-specific configuration for `delete_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_subscription - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_query_template - ## - # RPC-specific configuration for `get_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_query_template - ## - # RPC-specific configuration for `list_query_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_query_templates - ## - # RPC-specific configuration for `update_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_query_template - ## - # RPC-specific configuration for `delete_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_query_template - ## - # RPC-specific configuration for `submit_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_query_template - ## - # RPC-specific configuration for `approve_query_template` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_query_template - - # @private - def initialize parent_rpcs = nil - list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges - @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config - list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges - @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config - get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange - @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config - create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange - @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config - update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange - @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config - delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange - @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config - list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings - @list_listings = ::Gapic::Config::Method.new list_listings_config - get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing - @get_listing = ::Gapic::Config::Method.new get_listing_config - create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing - @create_listing = ::Gapic::Config::Method.new create_listing_config - update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing - @update_listing = ::Gapic::Config::Method.new update_listing_config - delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing - @delete_listing = ::Gapic::Config::Method.new delete_listing_config - subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing - @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config - subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange - @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config - refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription - @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config - get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription - @get_subscription = ::Gapic::Config::Method.new get_subscription_config - list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions - @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config - list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions - @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config - revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription - @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config - delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription - @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_query_template_config = parent_rpcs.create_query_template if parent_rpcs.respond_to? :create_query_template - @create_query_template = ::Gapic::Config::Method.new create_query_template_config - get_query_template_config = parent_rpcs.get_query_template if parent_rpcs.respond_to? :get_query_template - @get_query_template = ::Gapic::Config::Method.new get_query_template_config - list_query_templates_config = parent_rpcs.list_query_templates if parent_rpcs.respond_to? :list_query_templates - @list_query_templates = ::Gapic::Config::Method.new list_query_templates_config - update_query_template_config = parent_rpcs.update_query_template if parent_rpcs.respond_to? :update_query_template - @update_query_template = ::Gapic::Config::Method.new update_query_template_config - delete_query_template_config = parent_rpcs.delete_query_template if parent_rpcs.respond_to? :delete_query_template - @delete_query_template = ::Gapic::Config::Method.new delete_query_template_config - submit_query_template_config = parent_rpcs.submit_query_template if parent_rpcs.respond_to? :submit_query_template - @submit_query_template = ::Gapic::Config::Method.new submit_query_template_config - approve_query_template_config = parent_rpcs.approve_query_template if parent_rpcs.respond_to? :approve_query_template - @approve_query_template = ::Gapic::Config::Method.new approve_query_template_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb deleted file mode 100644 index 201737d246e8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/operations.rb +++ /dev/null @@ -1,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 Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AnalyticsHubService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AnalyticsHubService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "analyticshub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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(?:/.*)?$}, 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(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb deleted file mode 100644 index eb7052b18758..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub.rb +++ /dev/null @@ -1,1914 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - module Rest - ## - # REST service stub for the AnalyticsHubService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: false, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_data_exchanges REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse] - # A result object deserialized from the server's reply - def list_data_exchanges request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_exchanges_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_exchanges", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_org_data_exchanges REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse] - # A result object deserialized from the server's reply - def list_org_data_exchanges request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_org_data_exchanges_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_org_data_exchanges", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # A result object deserialized from the server's reply - def get_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # A result object deserialized from the server's reply - def create_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # A result object deserialized from the server's reply - def update_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_listings REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse] - # A result object deserialized from the server's reply - def list_listings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_listings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_listings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # A result object deserialized from the server's reply - def get_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # A result object deserialized from the server's reply - def create_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # A result object deserialized from the server's reply - def update_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the subscribe_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse] - # A result object deserialized from the server's reply - def subscribe_listing request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_listing_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "subscribe_listing", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the subscribe_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def subscribe_data_exchange request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_data_exchange_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "subscribe_data_exchange", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the refresh_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def refresh_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_refresh_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "refresh_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # A result object deserialized from the server's reply - def get_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_subscriptions REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse] - # A result object deserialized from the server's reply - def list_subscriptions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_subscriptions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_subscriptions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_shared_resource_subscriptions REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse] - # A result object deserialized from the server's reply - def list_shared_resource_subscriptions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_shared_resource_subscriptions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_shared_resource_subscriptions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the revoke_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse] - # A result object deserialized from the server's reply - def revoke_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_revoke_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "revoke_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_subscription", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def create_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_query_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def get_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_query_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_query_templates REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse] - # A result object deserialized from the server's reply - def list_query_templates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_query_templates_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_query_templates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def update_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_query_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_query_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the submit_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def submit_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_submit_query_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "submit_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the approve_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # A result object deserialized from the server's reply - def approve_query_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_approve_query_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "approve_query_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_exchanges REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_exchanges_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataExchanges", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_org_data_exchanges REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_org_data_exchanges_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{organization}/dataExchanges", - matches: [ - ["organization", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataExchanges", - body: "data_exchange", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_exchange.name}", - body: "data_exchange", - matches: [ - ["data_exchange.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_listings REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_listings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/listings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/listings", - body: "listing", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{listing.name}", - body: "listing", - matches: [ - ["listing.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the subscribe_listing REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_subscribe_listing_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:subscribe", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the subscribe_data_exchange REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_subscribe_data_exchange_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:subscribe", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the refresh_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_refresh_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:refresh", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_subscriptions REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_subscriptions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/subscriptions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_shared_resource_subscriptions REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_shared_resource_subscriptions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:listSubscriptions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:listSubscriptions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the revoke_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_revoke_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:revoke", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_subscription REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/queryTemplates", - body: "query_template", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_query_templates REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_query_templates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/queryTemplates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{query_template.name}", - body: "query_template", - matches: [ - ["query_template.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the submit_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_submit_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:submit", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the approve_query_template REST call - # - # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_approve_query_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:approve", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb deleted file mode 100644 index 956e85f4e541..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" -require "google/cloud/bigquery/analytics_hub/v1/version" - -module Google - module Cloud - module Bigquery - module AnalyticsHub - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/analytics_hub/v1/rest" - # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb deleted file mode 100644 index e4441834988c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analytics_hub/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb deleted file mode 100644 index 15eaaf36c9dd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/analyticshub/v1/pubsub_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n8google/cloud/bigquery/analyticshub/v1/analyticshub.proto\x12%google.cloud.bigquery.analyticshub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/bigquery/analyticshub/v1/pubsub.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xe9\x04\n\x0c\x44\x61taExchange\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlisting_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\x12h\n\x1asharing_environment_config\x18\x08 \x01(\x0b\x32?.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfigB\x03\xe0\x41\x01\x12V\n\x0e\x64iscovery_type\x18\t \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.DiscoveryTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x35\n#log_linked_dataset_query_user_email\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01:t\xea\x41q\n(analyticshub.googleapis.com/DataExchange\x12\x45projects/{project}/locations/{location}/dataExchanges/{data_exchange}B\x11\n\x0f_discovery_typeB&\n$_log_linked_dataset_query_user_email\"\xb7\x05\n\rQueryTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08proposer\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12N\n\x05state\x18\x06 \x01(\x0e\x32:.google.cloud.bigquery.analyticshub.v1.QueryTemplate.StateB\x03\xe0\x41\x03\x12\x44\n\x07routine\x18\x07 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.RoutineB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44RAFTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x0c\n\x08\x41PPROVED\x10\x04:\xb5\x01\xea\x41\xb1\x01\n)analyticshub.googleapis.com/QueryTemplate\x12\x65projects/{project}/locations/{location}/dataExchanges/{data_exchange}/queryTemplates/{query_template}*\x0equeryTemplates2\rqueryTemplate\"\xc6\x01\n\x07Routine\x12U\n\x0croutine_type\x18\x01 \x01(\x0e\x32:.google.cloud.bigquery.analyticshub.v1.Routine.RoutineTypeB\x03\xe0\x41\x02\x12\x1c\n\x0f\x64\x65\x66inition_body\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x0bRoutineType\x12\x1c\n\x18ROUTINE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15TABLE_VALUED_FUNCTION\x10\x01\"\xd1\x01\n\x1a\x43reateQueryTemplateRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x1e\n\x11query_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x0equery_template\x18\x03 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplateB\x03\xe0\x41\x02\"Z\n\x17GetQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"\x8e\x01\n\x19ListQueryTemplatesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x1aListQueryTemplatesResponse\x12M\n\x0fquery_templates\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa5\x01\n\x1aUpdateQueryTemplateRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12Q\n\x0equery_template\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplateB\x03\xe0\x41\x02\"]\n\x1a\x44\x65leteQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"]\n\x1aSubmitQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"^\n\x1b\x41pproveQueryTemplateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)analyticshub.googleapis.com/QueryTemplate\"\x94\x04\n\x18SharingEnvironmentConfig\x12x\n\x17\x64\x65\x66\x61ult_exchange_config\x18\x01 \x01(\x0b\x32U.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfigH\x00\x12p\n\x13\x64\x63r_exchange_config\x18\x02 \x01(\x0b\x32Q.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfigH\x00\x1a\x17\n\x15\x44\x65\x66\x61ultExchangeConfig\x1a\xe3\x01\n\x11\x44\x63rExchangeConfig\x12>\n,single_selected_resource_sharing_restriction\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x35\n#single_linked_dataset_per_cleanroom\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42/\n-_single_selected_resource_sharing_restrictionB&\n$_single_linked_dataset_per_cleanroomB\r\n\x0b\x65nvironment\"?\n\x0c\x44\x61taProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"<\n\tPublisher\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"O\n\x1b\x44\x65stinationDatasetReference\x12\x17\n\ndataset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xac\x03\n\x12\x44\x65stinationDataset\x12\x62\n\x11\x64\x61taset_reference\x18\x01 \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceB\x03\xe0\x41\x02\x12\x38\n\rfriendly_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12\x36\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12Z\n\x06labels\x18\x04 \x03(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.DestinationDataset.LabelsEntryB\x03\xe0\x41\x01\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11replica_locations\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x1d\x44\x65stinationPubSubSubscription\x12[\n\x13pubsub_subscription\x18\x01 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.PubSubSubscriptionB\x03\xe0\x41\x02\"\x87!\n\x07Listing\x12`\n\x10\x62igquery_dataset\x18\x06 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceH\x00\x12X\n\x0cpubsub_topic\x18\x10 \x01(\x0b\x32@.google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSourceH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12H\n\x05state\x18\x07 \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.Listing.StateB\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12O\n\rdata_provider\x18\t \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataProviderB\x03\xe0\x41\x01\x12P\n\ncategories\x18\n \x03(\x0e\x32\x37.google.cloud.bigquery.analyticshub.v1.Listing.CategoryB\x03\xe0\x41\x01\x12H\n\tpublisher\x18\x0b \x01(\x0b\x32\x30.google.cloud.bigquery.analyticshub.v1.PublisherB\x03\xe0\x41\x01\x12\x1b\n\x0erequest_access\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12l\n\x18restricted_export_config\x18\r \x01(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfigB\x03\xe0\x41\x01\x12\x62\n\x17stored_procedure_config\x18\x14 \x01(\x0b\x32<.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfigB\x03\xe0\x41\x01\x12V\n\x0e\x64iscovery_type\x18\x0e \x01(\x0e\x32\x34.google.cloud.bigquery.analyticshub.v1.DiscoveryTypeB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12U\n\rresource_type\x18\x0f \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.SharedResourceTypeB\x03\xe0\x41\x03\x12`\n\x0f\x63ommercial_info\x18\x11 \x01(\x0b\x32=.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfoB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x35\n#log_linked_dataset_query_user_email\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x61llow_only_metadata_sharing\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x1a\x84\n\n\x15\x42igQueryDatasetSource\x12\x38\n\x07\x64\x61taset\x18\x01 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\x12v\n\x12selected_resources\x18\x02 \x03(\x0b\x32U.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResourceB\x03\xe0\x41\x01\x12\x82\x01\n\x18restricted_export_policy\x18\x03 \x01(\x0b\x32[.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicyB\x03\xe0\x41\x01\x12\x1e\n\x11replica_locations\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12m\n\x12\x65\x66\x66\x65\x63tive_replicas\x18\x06 \x03(\x0b\x32L.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.ReplicaB\x03\xe0\x41\x03\x1a\x92\x01\n\x10SelectedResource\x12\x36\n\x05table\x18\x01 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/TableH\x00\x12:\n\x07routine\x18\x02 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x62igquery.googleapis.com/RoutineH\x00\x42\n\n\x08resource\x1a\xd1\x01\n\x16RestrictedExportPolicy\x12\x30\n\x07\x65nabled\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12\x45\n\x1crestrict_direct_table_access\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12>\n\x15restrict_query_result\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x1a\xbb\x03\n\x07Replica\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12u\n\rreplica_state\x18\x02 \x01(\x0e\x32Y.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.ReplicaStateB\x03\xe0\x41\x03\x12z\n\rprimary_state\x18\x03 \x01(\x0e\x32Y.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.PrimaryStateB\x03\xe0\x41\x03H\x00\x88\x01\x01\"P\n\x0cReplicaState\x12\x1d\n\x19REPLICA_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cREADY_TO_USE\x10\x01\x12\x0f\n\x0bUNAVAILABLE\x10\x02\"B\n\x0cPrimaryState\x12\x1d\n\x19PRIMARY_STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fPRIMARY_REPLICA\x10\x01\x42\x10\n\x0e_primary_state\x1ak\n\x11PubSubTopicSource\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\"\n\x15\x64\x61ta_affinity_regions\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a}\n\x16RestrictedExportConfig\x12\x14\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1crestrict_direct_table_access\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\"\n\x15restrict_query_result\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x94\x04\n\x0e\x43ommercialInfo\x12}\n\x11\x63loud_marketplace\x18\x01 \x01(\x0b\x32X.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfoB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xec\x02\n\x1aGoogleCloudMarketplaceInfo\x12M\n\x07service\x18\x01 \x01(\tB7\xe0\x41\x03\xfa\x41\x31\n/servicemanagement.googleapis.com/ManagedServiceH\x00\x88\x01\x01\x12\x8c\x01\n\x10\x63ommercial_state\x18\x03 \x01(\x0e\x32h.google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo.CommercialStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\"O\n\x0f\x43ommercialState\x12 \n\x1c\x43OMMERCIAL_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nONBOARDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x42\n\n\x08_serviceB\x13\n\x11_commercial_stateB\x14\n\x12_cloud_marketplace\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\"\xd9\x04\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43\x41TEGORY_OTHERS\x10\x01\x12&\n\"CATEGORY_ADVERTISING_AND_MARKETING\x10\x02\x12\x15\n\x11\x43\x41TEGORY_COMMERCE\x10\x03\x12$\n CATEGORY_CLIMATE_AND_ENVIRONMENT\x10\x04\x12\x19\n\x15\x43\x41TEGORY_DEMOGRAPHICS\x10\x05\x12\x16\n\x12\x43\x41TEGORY_ECONOMICS\x10\x06\x12\x16\n\x12\x43\x41TEGORY_EDUCATION\x10\x07\x12\x13\n\x0f\x43\x41TEGORY_ENERGY\x10\x08\x12\x16\n\x12\x43\x41TEGORY_FINANCIAL\x10\t\x12\x13\n\x0f\x43\x41TEGORY_GAMING\x10\n\x12\x17\n\x13\x43\x41TEGORY_GEOSPATIAL\x10\x0b\x12(\n$CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE\x10\x0c\x12\x12\n\x0e\x43\x41TEGORY_MEDIA\x10\r\x12\x1a\n\x16\x43\x41TEGORY_PUBLIC_SECTOR\x10\x0e\x12\x13\n\x0f\x43\x41TEGORY_RETAIL\x10\x0f\x12\x13\n\x0f\x43\x41TEGORY_SPORTS\x10\x10\x12!\n\x1d\x43\x41TEGORY_SCIENCE_AND_RESEARCH\x10\x11\x12)\n%CATEGORY_TRANSPORTATION_AND_LOGISTICS\x10\x12\x12\x1f\n\x1b\x43\x41TEGORY_TRAVEL_AND_TOURISM\x10\x13\x12 \n\x1c\x43\x41TEGORY_GOOGLE_EARTH_ENGINE\x10\x14:\x82\x01\xea\x41\x7f\n#analyticshub.googleapis.com/Listing\x12Xprojects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}B\x08\n\x06sourceB\x11\n\x0f_discovery_typeB\x12\n\x10_commercial_infoB&\n$_log_linked_dataset_query_user_emailB\x1e\n\x1c_allow_only_metadata_sharing\"\xfd\x01\n\x15StoredProcedureConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12}\n\x1e\x61llowed_stored_procedure_types\x18\x02 \x03(\x0e\x32P.google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureTypeB\x03\xe0\x41\x03\"O\n\x13StoredProcedureType\x12%\n!STORED_PROCEDURE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSQL_PROCEDURE\x10\x01\"\x98\r\n\x0cSubscription\x12\x16\n\x07listing\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1c\n\rdata_exchange\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcreation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_modify_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0forganization_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19organization_display_name\x18\n \x01(\tB\x03\xe0\x41\x03\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.Subscription.StateB\x03\xe0\x41\x03\x12j\n\x12linked_dataset_map\x18\x08 \x03(\x0b\x32I.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedDatasetMapEntryB\x03\xe0\x41\x03\x12\x1f\n\x12subscriber_contact\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x61\n\x10linked_resources\x18\x0b \x03(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResourceB\x03\xe0\x41\x03\x12U\n\rresource_type\x18\x0c \x01(\x0e\x32\x39.google.cloud.bigquery.analyticshub.v1.SharedResourceTypeB\x03\xe0\x41\x03\x12`\n\x0f\x63ommercial_info\x18\r \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfoB\x03\xe0\x41\x03\x12\x35\n#log_linked_dataset_query_user_email\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12[\n\x13\x64\x65stination_dataset\x18\x0f \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x01\x1a}\n\x0eLinkedResource\x12\x1d\n\x0elinked_dataset\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12)\n\x1alinked_pubsub_subscription\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x14\n\x07listing\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x0b\n\treference\x1a\xf8\x01\n\x0e\x43ommercialInfo\x12}\n\x11\x63loud_marketplace\x18\x01 \x01(\x0b\x32].google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo.GoogleCloudMarketplaceInfoB\x03\xe0\x41\x03\x1ag\n\x1aGoogleCloudMarketplaceInfo\x12I\n\x05order\x18\x01 \x01(\tB:\xfa\x41\x37\n5cloudcommerceconsumerprocurement.googleapis.com/Order\x1a{\n\x15LinkedDatasetMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource:\x02\x38\x01\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATE_ACTIVE\x10\x01\x12\x0f\n\x0bSTATE_STALE\x10\x02\x12\x12\n\x0eSTATE_INACTIVE\x10\x03:s\xea\x41p\n(analyticshub.googleapis.com/Subscription\x12\x44projects/{project}/locations/{location}/subscriptions/{subscription}B\x0f\n\rresource_nameB&\n$_log_linked_dataset_query_user_email\"\x83\x01\n\x18ListDataExchangesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x19ListDataExchangesResponse\x12K\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x1bListOrgDataExchangesRequest\x12\x19\n\x0corganization\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListOrgDataExchangesResponse\x12K\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x16GetDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"\xcd\x01\n\x19\x43reateDataExchangeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/DataExchange\x12\x1d\n\x10\x64\x61ta_exchange_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\rdata_exchange\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchangeB\x03\xe0\x41\x02\"\xa2\x01\n\x19UpdateDataExchangeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12O\n\rdata_exchange\x18\x02 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.DataExchangeB\x03\xe0\x41\x02\"[\n\x19\x44\x65leteDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"~\n\x13ListListingsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"q\n\x14ListListingsResponse\x12@\n\x08listings\x18\x01 \x03(\x0b\x32..google.cloud.bigquery.analyticshub.v1.Listing\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x11GetListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\"\xb7\x01\n\x14\x43reateListingRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x17\n\nlisting_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x07listing\x18\x03 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.ListingB\x03\xe0\x41\x02\"\x92\x01\n\x14UpdateListingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\x07listing\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.analyticshub.v1.ListingB\x03\xe0\x41\x02\"q\n\x14\x44\x65leteListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\x12\x1e\n\x11\x64\x65lete_commercial\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x02\n\x17SubscribeListingRequest\x12]\n\x13\x64\x65stination_dataset\x18\x03 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x04H\x00\x12t\n\x1f\x64\x65stination_pubsub_subscription\x18\x05 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.DestinationPubSubSubscriptionB\x03\xe0\x41\x04H\x00\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/ListingB\r\n\x0b\x64\x65stination\"e\n\x18SubscribeListingResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"\xb2\x02\n\x1cSubscribeDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12>\n\x0b\x64\x65stination\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12[\n\x13\x64\x65stination_dataset\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.DestinationDatasetB\x03\xe0\x41\x01\x12\x19\n\x0csubscription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x12subscriber_contact\x18\x03 \x01(\t\"j\n\x1dSubscribeDataExchangeResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"\\\n\x1aRefreshSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"h\n\x1bRefreshSubscriptionResponse\x12I\n\x0csubscription\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"X\n\x16GetSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"\x93\x01\n\x18ListSubscriptionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(analyticshub.googleapis.com/Subscription\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x80\x01\n\x19ListSubscriptionsResponse\x12J\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n&ListSharedResourceSubscriptionsRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12%\n\x1dinclude_deleted_subscriptions\x18\x02 \x01(\x08\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x9e\x01\n\'ListSharedResourceSubscriptionsResponse\x12Z\n\x1dshared_resource_subscriptions\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.analyticshub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x19RevokeSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\x12\x1e\n\x11revoke_commercial\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x1c\n\x1aRevokeSubscriptionResponse\"[\n\x19\x44\x65leteSubscriptionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/Subscription\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03*f\n\rDiscoveryType\x12\x1e\n\x1a\x44ISCOVERY_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x44ISCOVERY_TYPE_PRIVATE\x10\x01\x12\x19\n\x15\x44ISCOVERY_TYPE_PUBLIC\x10\x02*b\n\x12SharedResourceType\x12$\n SHARED_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x01\x12\x10\n\x0cPUBSUB_TOPIC\x10\x02\x32\x80\x38\n\x13\x41nalyticsHubService\x12\xda\x01\n\x11ListDataExchanges\x12?.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest\x1a@.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/dataExchanges\x12\xf4\x01\n\x14ListOrgDataExchanges\x12\x42.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest\x1a\x43.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse\"S\xda\x41\x0corganization\x82\xd3\xe4\x93\x02>\x12\x12\x12*.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest\x1a?.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\"F/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe:\x01*\x12\x80\x02\n\x15SubscribeDataExchange\x12\x43.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x32\n\x1dSubscribeDataExchangeResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/locations/*/dataExchanges/*}:subscribe:\x01*\x12\xf7\x01\n\x13RefreshSubscription\x12\x41.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x30\n\x1bRefreshSubscriptionResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v1/{name=projects/*/locations/*/subscriptions/*}:refresh:\x01*\x12\xc7\x01\n\x0fGetSubscription\x12=.google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest\x1a\x33.google.cloud.bigquery.analyticshub.v1.Subscription\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/subscriptions/*}\x12\xda\x01\n\x11ListSubscriptions\x12?.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest\x1a@.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/subscriptions\x12\xf4\x02\n\x1fListSharedResourceSubscriptions\x12M.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest\x1aN.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse\"\xb1\x01\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x9f\x01\x12G/v1/{resource=projects/*/locations/*/dataExchanges/*}:listSubscriptionsZT\x12R/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:listSubscriptions\x12\xe5\x01\n\x12RevokeSubscription\x12@.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest\x1a\x41.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1/{name=projects/*/locations/*/subscriptions/*}:revoke:\x01*\x12\xe4\x01\n\x12\x44\x65leteSubscription\x12@.google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/subscriptions/*}\x12\xb7\x02\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xeb\x01\x82\xd3\xe4\x93\x02\xe4\x01\"B/v1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy:\x01*ZR\"M/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy:\x01*ZG\"B/v1/{resource=projects/*/locations/*/subscriptions/*}:getIamPolicy:\x01*\x12\xb7\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xeb\x01\x82\xd3\xe4\x93\x02\xe4\x01\"B/v1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy:\x01*ZR\"M/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy:\x01*ZG\"B/v1/{resource=projects/*/locations/*/subscriptions/*}:setIamPolicy:\x01*\x12\x9a\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xae\x01\x82\xd3\xe4\x93\x02\xa7\x01\"H/v1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions:\x01*ZX\"S/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions:\x01*\x12\x95\x02\n\x13\x43reateQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.CreateQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\x84\x01\xda\x41\'parent,query_template,query_template_id\x82\xd3\xe4\x93\x02T\"B/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates:\x0equery_template\x12\xdb\x01\n\x10GetQueryTemplate\x12>.google.cloud.bigquery.analyticshub.v1.GetQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}\x12\xee\x01\n\x12ListQueryTemplates\x12@.google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesRequest\x1a\x41.google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/dataExchanges/*}/queryTemplates\x12\x97\x02\n\x13UpdateQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.UpdateQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\x86\x01\xda\x41\x1aquery_template,update_mask\x82\xd3\xe4\x93\x02\x63\x32Q/v1/{query_template.name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:\x0equery_template\x12\xc3\x01\n\x13\x44\x65leteQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.DeleteQueryTemplateRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}\x12\xeb\x01\n\x13SubmitQueryTemplate\x12\x41.google.cloud.bigquery.analyticshub.v1.SubmitQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\"I/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:submit:\x01*\x12\xee\x01\n\x14\x41pproveQueryTemplate\x12\x42.google.cloud.bigquery.analyticshub.v1.ApproveQueryTemplateRequest\x1a\x34.google.cloud.bigquery.analyticshub.v1.QueryTemplate\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/dataExchanges/*/queryTemplates/*}:approve:\x01*\x1ax\xca\x41\x1b\x61nalyticshub.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xf4\x05\n)com.google.cloud.bigquery.analyticshub.v1B\x11\x41nalyticsHubProtoP\x01ZMcloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb;analyticshubpb\xaa\x02%Google.Cloud.BigQuery.AnalyticsHub.V1\xca\x02%Google\\Cloud\\BigQuery\\AnalyticsHub\\V1\xea\x02)Google::Cloud::Bigquery::AnalyticsHub::V1\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41[\n\x1f\x62igquery.googleapis.com/Routine\x12\x38projects/{project}/datasets/{dataset}/routines/{routine}\xea\x41\x45\n/servicemanagement.googleapis.com/ManagedService\x12\x12services/{service}\xea\x41Z\n5cloudcommerceconsumerprocurement.googleapis.com/Order\x12!projects/{project}/orders/{order}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - DataExchange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DataExchange").msgclass - QueryTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.QueryTemplate").msgclass - QueryTemplate::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.QueryTemplate.State").enummodule - Routine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Routine").msgclass - Routine::RoutineType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Routine.RoutineType").enummodule - CreateQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateQueryTemplateRequest").msgclass - GetQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetQueryTemplateRequest").msgclass - ListQueryTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesRequest").msgclass - ListQueryTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListQueryTemplatesResponse").msgclass - UpdateQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateQueryTemplateRequest").msgclass - DeleteQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteQueryTemplateRequest").msgclass - SubmitQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubmitQueryTemplateRequest").msgclass - ApproveQueryTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ApproveQueryTemplateRequest").msgclass - SharingEnvironmentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig").msgclass - SharingEnvironmentConfig::DefaultExchangeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DefaultExchangeConfig").msgclass - SharingEnvironmentConfig::DcrExchangeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.DcrExchangeConfig").msgclass - DataProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DataProvider").msgclass - Publisher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Publisher").msgclass - DestinationDatasetReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference").msgclass - DestinationDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationDataset").msgclass - DestinationPubSubSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DestinationPubSubSubscription").msgclass - Listing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing").msgclass - Listing::BigQueryDatasetSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource").msgclass - Listing::BigQueryDatasetSource::SelectedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource").msgclass - Listing::BigQueryDatasetSource::RestrictedExportPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy").msgclass - Listing::BigQueryDatasetSource::Replica = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica").msgclass - Listing::BigQueryDatasetSource::Replica::ReplicaState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.ReplicaState").enummodule - Listing::BigQueryDatasetSource::Replica::PrimaryState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Replica.PrimaryState").enummodule - Listing::PubSubTopicSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSource").msgclass - Listing::RestrictedExportConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig").msgclass - Listing::CommercialInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo").msgclass - Listing::CommercialInfo::GoogleCloudMarketplaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo").msgclass - Listing::CommercialInfo::GoogleCloudMarketplaceInfo::CommercialState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.CommercialInfo.GoogleCloudMarketplaceInfo.CommercialState").enummodule - Listing::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.State").enummodule - Listing::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Listing.Category").enummodule - StoredProcedureConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig").msgclass - StoredProcedureConfig::StoredProcedureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType").enummodule - Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription").msgclass - Subscription::LinkedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource").msgclass - Subscription::CommercialInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo").msgclass - Subscription::CommercialInfo::GoogleCloudMarketplaceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.CommercialInfo.GoogleCloudMarketplaceInfo").msgclass - Subscription::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.Subscription.State").enummodule - ListDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest").msgclass - ListDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse").msgclass - ListOrgDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest").msgclass - ListOrgDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse").msgclass - GetDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest").msgclass - CreateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest").msgclass - UpdateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest").msgclass - DeleteDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest").msgclass - ListListingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListListingsRequest").msgclass - ListListingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListListingsResponse").msgclass - GetListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetListingRequest").msgclass - CreateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CreateListingRequest").msgclass - UpdateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.UpdateListingRequest").msgclass - DeleteListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteListingRequest").msgclass - SubscribeListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest").msgclass - SubscribeListingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse").msgclass - SubscribeDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest").msgclass - SubscribeDataExchangeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeResponse").msgclass - RefreshSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest").msgclass - RefreshSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionResponse").msgclass - GetSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest").msgclass - ListSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest").msgclass - ListSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSubscriptionsResponse").msgclass - ListSharedResourceSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest").msgclass - ListSharedResourceSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsResponse").msgclass - RevokeSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest").msgclass - RevokeSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionResponse").msgclass - DeleteSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.OperationMetadata").msgclass - DiscoveryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DiscoveryType").enummodule - SharedResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.SharedResourceType").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb deleted file mode 100644 index 4b03fbc5f859..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb +++ /dev/null @@ -1,119 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto for package 'Google.Cloud.Bigquery.AnalyticsHub.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/bigquery/analyticshub/v1/analyticshub_pb' - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - module AnalyticsHubService - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.analyticshub.v1.AnalyticsHubService' - - # Lists all data exchanges in a given project and location. - rpc :ListDataExchanges, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse - # Lists all data exchanges from projects in a given organization and - # location. - rpc :ListOrgDataExchanges, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse - # Gets the details of a data exchange. - rpc :GetDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange - # Creates a new data exchange. - rpc :CreateDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange - # Updates an existing data exchange. - rpc :UpdateDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange - # Deletes an existing data exchange. - rpc :DeleteDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Google::Protobuf::Empty - # Lists all listings in a given project and location. - rpc :ListListings, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse - # Gets the details of a listing. - rpc :GetListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing - # Creates a new listing. - rpc :CreateListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing - # Updates an existing listing. - rpc :UpdateListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing - # Deletes a listing. - rpc :DeleteListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Google::Protobuf::Empty - # Subscribes to a listing. - # - # Currently, with Analytics Hub, you can create listings that - # reference only BigQuery datasets. - # Upon subscription to a listing for a BigQuery dataset, Analytics Hub - # creates a linked dataset in the subscriber's project. - rpc :SubscribeListing, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse - # Creates a Subscription to a Data Clean Room. This is a - # long-running operation as it will create one or more linked datasets. - # Throws a Bad Request error if the Data Exchange does not contain any - # listings. - rpc :SubscribeDataExchange, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Google::Longrunning::Operation - # Refreshes a Subscription to a Data Exchange. A Data Exchange can become - # stale when a publisher adds or removes data. This is a long-running - # operation as it may create many linked datasets. - rpc :RefreshSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Google::Longrunning::Operation - # Gets the details of a Subscription. - rpc :GetSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription - # Lists all subscriptions in a given project and location. - rpc :ListSubscriptions, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse - # Lists all subscriptions on a given Data Exchange or Listing. - rpc :ListSharedResourceSubscriptions, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse - # Revokes a given subscription. - rpc :RevokeSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse - # Deletes a subscription. - rpc :DeleteSubscription, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Google::Longrunning::Operation - # Gets the IAM policy. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the IAM policy. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the permissions that a caller has. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Creates a new QueryTemplate - rpc :CreateQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - # Gets a QueryTemplate - rpc :GetQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - # Lists all QueryTemplates in a given project and location. - rpc :ListQueryTemplates, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse - # Updates an existing QueryTemplate - rpc :UpdateQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - # Deletes a query template. - rpc :DeleteQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, ::Google::Protobuf::Empty - # Submits a query template for approval. - rpc :SubmitQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - # Approves a query template. - rpc :ApproveQueryTemplate, ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb deleted file mode 100644 index f72ac6bfc9fc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/lib/google/cloud/bigquery/analyticshub/v1/pubsub_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/analyticshub/v1/pubsub.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n2google/cloud/bigquery/analyticshub/v1/pubsub.proto\x12%google.cloud.bigquery.analyticshub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa1\t\n\x12PubSubSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x31.google.cloud.bigquery.analyticshub.v1.PushConfigB\x03\xe0\x41\x01\x12S\n\x0f\x62igquery_config\x18\x12 \x01(\x0b\x32\x35.google.cloud.bigquery.analyticshub.v1.BigQueryConfigB\x03\xe0\x41\x01\x12\\\n\x14\x63loud_storage_config\x18\x16 \x01(\x0b\x32\x39.google.cloud.bigquery.analyticshub.v1.CloudStorageConfigB\x03\xe0\x41\x01\x12!\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x15retain_acked_messages\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x42\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12Z\n\x06labels\x18\t \x03(\x0b\x32\x45.google.cloud.bigquery.analyticshub.v1.PubSubSubscription.LabelsEntryB\x03\xe0\x41\x01\x12$\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12W\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.ExpirationPolicyB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12X\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.DeadLetterPolicyB\x03\xe0\x41\x01\x12M\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x32.google.cloud.bigquery.analyticshub.v1.RetryPolicyB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65tached\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_exactly_once_delivery\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12X\n\x12message_transforms\x18\x19 \x03(\x0b\x32\x37.google.cloud.bigquery.analyticshub.v1.MessageTransformB\x03\xe0\x41\x01\x12\\\n\x04tags\x18\x1a \x03(\x0b\x32\x43.google.cloud.bigquery.analyticshub.v1.PubSubSubscription.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x7f\n\x0bRetryPolicy\x12\x37\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"V\n\x10\x44\x65\x61\x64LetterPolicy\x12\x1e\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15max_delivery_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"?\n\x10\x45xpirationPolicy\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xee\x04\n\nPushConfig\x12V\n\noidc_token\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.analyticshub.v1.PushConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12^\n\x0epubsub_wrapper\x18\x04 \x01(\x0b\x32?.google.cloud.bigquery.analyticshub.v1.PushConfig.PubsubWrapperB\x03\xe0\x41\x01H\x01\x12V\n\nno_wrapper\x18\x05 \x01(\x0b\x32;.google.cloud.bigquery.analyticshub.v1.PushConfig.NoWrapperB\x03\xe0\x41\x01H\x01\x12\x1a\n\rpush_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12Z\n\nattributes\x18\x02 \x03(\x0b\x32\x41.google.cloud.bigquery.analyticshub.v1.PushConfig.AttributesEntryB\x03\xe0\x41\x01\x1a\x46\n\tOidcToken\x12\"\n\x15service_account_email\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x0f\n\rPubsubWrapper\x1a(\n\tNoWrapper\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_methodB\t\n\x07wrapper\"\xc5\x01\n\x0e\x42igQueryConfig\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0ewrite_metadata\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x64rop_unknown_fields\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_table_schema\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xc6\x04\n\x12\x43loudStorageConfig\x12`\n\x0btext_config\x18\x04 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.TextConfigB\x03\xe0\x41\x01H\x00\x12`\n\x0b\x61vro_config\x18\x05 \x01(\x0b\x32\x44.google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.AvroConfigB\x03\xe0\x41\x01H\x00\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x66ilename_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66ilename_suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66ilename_datetime_format\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0cmax_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tmax_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\"\n\x15service_account_email\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1a\x0c\n\nTextConfig\x1aH\n\nAvroConfig\x12\x1b\n\x0ewrite_metadata\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10use_topic_schema\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0f\n\routput_format\"\xa3\x01\n\x10MessageTransform\x12S\n\x0ejavascript_udf\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.analyticshub.v1.JavaScriptUDFB\x03\xe0\x41\x01H\x00\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0b\n\ttransform\">\n\rJavaScriptUDF\x12\x1a\n\rfunction_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x85\x02\n)com.google.cloud.bigquery.analyticshub.v1B\x0bPubsubProtoP\x01ZMcloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb;analyticshubpb\xaa\x02%Google.Cloud.BigQuery.AnalyticsHub.V1\xca\x02%Google\\Cloud\\BigQuery\\AnalyticsHub\\V1\xea\x02)Google::Cloud::Bigquery::AnalyticsHub::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - PubSubSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PubSubSubscription").msgclass - RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.RetryPolicy").msgclass - DeadLetterPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.DeadLetterPolicy").msgclass - ExpirationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.ExpirationPolicy").msgclass - PushConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig").msgclass - PushConfig::OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.OidcToken").msgclass - PushConfig::PubsubWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.PubsubWrapper").msgclass - PushConfig::NoWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.PushConfig.NoWrapper").msgclass - BigQueryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.BigQueryConfig").msgclass - CloudStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig").msgclass - CloudStorageConfig::TextConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.TextConfig").msgclass - CloudStorageConfig::AvroConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.CloudStorageConfig.AvroConfig").msgclass - MessageTransform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.MessageTransform").msgclass - JavaScriptUDF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.analyticshub.v1.JavaScriptUDF").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md deleted file mode 100644 index 99ecfbc53cb9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Analytics Hub V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb deleted file mode 100644 index 981ea58df2f8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb +++ /dev/null @@ -1,1364 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - # A data exchange is a container that lets you share data. Along with the - # descriptive information about the data exchange, it contains listings that - # reference shared datasets. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the data exchange. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of the data exchange. The display - # name must contain only Unicode letters, numbers (0-9), underscores (_), - # dashes (-), spaces ( ), ampersands (&) and must not start or end with - # spaces. Default value is an empty string. Max length: 63 bytes. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the data exchange. The description must not - # contain Unicode non-characters as well as C0 and C1 control codes except - # tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). - # Default value is an empty string. - # Max length: 2000 bytes. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the primary point of contact of the data - # exchange. Max Length: 1000 bytes. - # @!attribute [rw] documentation - # @return [::String] - # Optional. Documentation describing the data exchange. - # @!attribute [r] listing_count - # @return [::Integer] - # Output only. Number of listings contained in the data exchange. - # @!attribute [rw] icon - # @return [::String] - # Optional. Base64 encoded image representing the data exchange. Max - # Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API - # only performs validation on size of the encoded data. Note: For byte - # fields, the content of the fields are base64-encoded (which increases the - # size of the data by 33-36%) when using JSON on the wire. - # @!attribute [rw] sharing_environment_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig] - # Optional. Configurable data sharing environment option for a data exchange. - # @!attribute [rw] discovery_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DiscoveryType] - # Optional. Type of discovery on the discovery page for all the listings - # under this exchange. Updating this field also updates (overwrites) the - # discovery_type field for all the listings under this exchange. - # @!attribute [rw] log_linked_dataset_query_user_email - # @return [::Boolean] - # Optional. By default, false. - # If true, the DataExchange has an email sharing mandate enabled. - class DataExchange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A query template is a container for sharing table-valued functions defined by - # contributors in a data clean room. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the QueryTemplate. - # e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456` - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of the QueryTemplate. The display - # name must contain only Unicode letters, numbers (0-9), underscores (_), - # dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. - # Default value is an empty string. Max length: 63 bytes. - # @!attribute [rw] description - # @return [::String] - # Optional. Short description of the QueryTemplate. The description must not - # contain Unicode non-characters and C0 and C1 control codes except tabs - # (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default - # value is an empty string. Max length: 2000 bytes. - # @!attribute [rw] proposer - # @return [::String] - # Optional. Will be deprecated. - # Email or URL of the primary point of contact of the QueryTemplate. - # Max Length: 1000 bytes. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the primary point of contact of the - # QueryTemplate. Max Length: 1000 bytes. - # @!attribute [rw] documentation - # @return [::String] - # Optional. Documentation describing the QueryTemplate. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate::State] - # Output only. The QueryTemplate lifecycle state. - # @!attribute [rw] routine - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Routine] - # Optional. The routine associated with the QueryTemplate. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the QueryTemplate was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the QueryTemplate was last modified. - class QueryTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The QueryTemplate lifecycle state. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The QueryTemplate is in draft state. - DRAFTED = 1 - - # The QueryTemplate is in pending state. - PENDING = 2 - - # The QueryTemplate is in deleted state. - DELETED = 3 - - # The QueryTemplate is in approved state. - APPROVED = 4 - end - end - - # Represents a bigquery routine. - # @!attribute [rw] routine_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Routine::RoutineType] - # Required. The type of routine. - # @!attribute [rw] definition_body - # @return [::String] - # Optional. The definition body of the routine. - class Routine - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the type of a given routine. - module RoutineType - # Default value. - ROUTINE_TYPE_UNSPECIFIED = 0 - - # Non-built-in persistent TVF. - TABLE_VALUED_FUNCTION = 1 - end - end - - # Message for creating a QueryTemplate. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`. - # @!attribute [rw] query_template_id - # @return [::String] - # Required. The ID of the QueryTemplate to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @!attribute [rw] query_template - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # Required. The QueryTemplate to create. - class CreateQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a QueryTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. The parent resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - class GetQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of QueryTemplates. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the QueryTemplates. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return in a single response - # page. Leverage the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token, returned by a previous call, to request the next page - # of results. - class ListQueryTemplatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the list of QueryTemplates. - # @!attribute [rw] query_templates - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate>] - # The list of QueryTemplates. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListQueryTemplatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a QueryTemplate. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask specifies the fields to update in the query template - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @!attribute [rw] query_template - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate] - # Required. The QueryTemplate to update. - class UpdateQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a QueryTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - class DeleteQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for submitting a QueryTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - class SubmitQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for approving a QueryTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. The resource path of the QueryTemplate. - # e.g. - # `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`. - class ApproveQueryTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sharing environment is a behavior model for sharing data within a - # data exchange. This option is configurable for a data exchange. - # @!attribute [rw] default_exchange_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig::DefaultExchangeConfig] - # Default Analytics Hub data exchange, used for secured data sharing. - # - # Note: The following fields are mutually exclusive: `default_exchange_config`, `dcr_exchange_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] dcr_exchange_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharingEnvironmentConfig::DcrExchangeConfig] - # Data Clean Room (DCR), used for privacy-safe and secured data sharing. - # - # Note: The following fields are mutually exclusive: `dcr_exchange_config`, `default_exchange_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SharingEnvironmentConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Default Analytics Hub data exchange, used for secured data sharing. - class DefaultExchangeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data Clean Room (DCR), used for privacy-safe and secured data sharing. - # @!attribute [r] single_selected_resource_sharing_restriction - # @return [::Boolean] - # Output only. If True, this DCR restricts the contributors to sharing - # only a single resource in a Listing. And no two resources should have the - # same IDs. So if a contributor adds a view with a conflicting name, the - # CreateListing API will reject the request. if False, the data contributor - # can publish an entire dataset (as before). This is not configurable, and - # by default, all new DCRs will have the restriction set to True. - # @!attribute [r] single_linked_dataset_per_cleanroom - # @return [::Boolean] - # Output only. If True, when subscribing to this DCR, it will create only - # one linked dataset containing all resources shared within the - # cleanroom. If False, when subscribing to this DCR, it will - # create 1 linked dataset per listing. This is not configurable, and by - # default, all new DCRs will have the restriction set to True. - class DcrExchangeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Contains details of the data provider. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the data provider. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the data provider. - # Max Length: 1000 bytes. - class DataProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains details of the listing publisher. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the listing publisher. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the listing publisher. - # Max Length: 1000 bytes. - class Publisher - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] dataset_id - # @return [::String] - # Required. A unique ID for this dataset, without the project name. The ID - # must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - # The maximum length is 1,024 characters. - # @!attribute [rw] project_id - # @return [::String] - # Required. The ID of the project containing this dataset. - class DestinationDatasetReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the destination bigquery dataset. - # @!attribute [rw] dataset_reference - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDatasetReference] - # Required. A reference that identifies the destination dataset. - # @!attribute [rw] friendly_name - # @return [::Google::Protobuf::StringValue] - # Optional. A descriptive name for the dataset. - # @!attribute [rw] description - # @return [::Google::Protobuf::StringValue] - # Optional. A user-friendly description of the dataset. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels associated with this dataset. You can use these - # to organize and group your datasets. - # You can set this property when inserting or updating a dataset. - # See https://cloud.google.com/resource-manager/docs/creating-managing-labels - # for more information. - # @!attribute [rw] location - # @return [::String] - # Required. The geographic location where the dataset should reside. See - # https://cloud.google.com/bigquery/docs/locations for supported - # locations. - # @!attribute [rw] replica_locations - # @return [::Array<::String>] - # Optional. The geographic locations where the dataset should be replicated. - # See [BigQuery locations](https://cloud.google.com/bigquery/docs/locations) - # for supported locations. - class DestinationDataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Defines the destination Pub/Sub subscription. - # @!attribute [rw] pubsub_subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PubSubSubscription] - # Required. Destination Pub/Sub subscription resource. - class DestinationPubSubSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A listing is what gets published into a data exchange that a subscriber can - # subscribe to. It contains a reference to the data source along with - # descriptive information that will help subscribers find and subscribe the - # data. - # @!attribute [rw] bigquery_dataset - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource] - # Shared dataset i.e. BigQuery dataset source. - # - # Note: The following fields are mutually exclusive: `bigquery_dataset`, `pubsub_topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pubsub_topic - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::PubSubTopicSource] - # Pub/Sub topic source. - # - # Note: The following fields are mutually exclusive: `pubsub_topic`, `bigquery_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456` - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of the listing. The display name must - # contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - # spaces ( ), ampersands (&) and can't start or end with spaces. Default - # value is an empty string. Max length: 63 bytes. - # @!attribute [rw] description - # @return [::String] - # Optional. Short description of the listing. The description must not - # contain Unicode non-characters and C0 and C1 control codes except tabs - # (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default - # value is an empty string. Max length: 2000 bytes. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the primary point of contact of the listing. - # Max Length: 1000 bytes. - # @!attribute [rw] documentation - # @return [::String] - # Optional. Documentation describing the listing. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::State] - # Output only. Current state of the listing. - # @!attribute [rw] icon - # @return [::String] - # Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - # Expected image dimensions are 512x512 pixels, however the API only - # performs validation on size of the encoded data. - # Note: For byte fields, the contents of the field are base64-encoded (which - # increases the size of the data by 33-36%) when using JSON on the wire. - # @!attribute [rw] data_provider - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataProvider] - # Optional. Details of the data provider who owns the source data. - # @!attribute [rw] categories - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::Category>] - # Optional. Categories of the listing. Up to five categories are allowed. - # @!attribute [rw] publisher - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Publisher] - # Optional. Details of the publisher who owns the listing and who can share - # the source data. - # @!attribute [rw] request_access - # @return [::String] - # Optional. Email or URL of the request access of the listing. - # Subscribers can use this reference to request access. - # Max Length: 1000 bytes. - # @!attribute [rw] restricted_export_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::RestrictedExportConfig] - # Optional. If set, restricted export configuration will be propagated and - # enforced on the linked dataset. - # @!attribute [rw] stored_procedure_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::StoredProcedureConfig] - # Optional. If set, stored procedure configuration will be propagated and - # enforced on the linked dataset. - # @!attribute [rw] discovery_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DiscoveryType] - # Optional. Type of discovery of the listing on the discovery page. - # @!attribute [r] resource_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType] - # Output only. Listing shared asset type. - # @!attribute [r] commercial_info - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo] - # Output only. Commercial info contains the information about the commercial - # data products associated with the listing. - # @!attribute [rw] log_linked_dataset_query_user_email - # @return [::Boolean] - # Optional. By default, false. - # If true, the Listing has an email sharing mandate enabled. - # @!attribute [rw] allow_only_metadata_sharing - # @return [::Boolean] - # Optional. If true, the listing is only available to get the resource - # metadata. Listing is non subscribable. - class Listing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A reference to a shared dataset. It is an existing BigQuery dataset with a - # collection of objects such as tables and views that you want to share - # with subscribers. - # When subscriber's subscribe to a listing, Analytics Hub creates a linked - # dataset in - # the subscriber's project. A Linked dataset is an opaque, read-only BigQuery - # dataset that serves as a _symbolic link_ to a shared dataset. - # @!attribute [rw] dataset - # @return [::String] - # Optional. Resource name of the dataset source for this listing. - # e.g. `projects/myproject/datasets/123` - # @!attribute [rw] selected_resources - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::SelectedResource>] - # Optional. Resource in this dataset that is selectively shared. - # This field is required for data clean room exchanges. - # @!attribute [rw] restricted_export_policy - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::RestrictedExportPolicy] - # Optional. If set, restricted export policy will be propagated and - # enforced on the linked dataset. - # @!attribute [rw] replica_locations - # @return [::Array<::String>] - # Optional. A list of regions where the publisher has created shared - # dataset replicas. - # @!attribute [r] effective_replicas - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica>] - # Output only. Server-owned effective state of replicas. - # Contains both primary and secondary replicas. - # Each replica includes a system-computed (output-only) state and primary - # designation. - class BigQueryDatasetSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Resource in this dataset that is selectively shared. - # @!attribute [rw] table - # @return [::String] - # Optional. Format: - # For table: - # `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` - # Example:"projects/test_project/datasets/test_dataset/tables/test_table" - # - # Note: The following fields are mutually exclusive: `table`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] routine - # @return [::String] - # Optional. Format: - # For routine: - # `projects/{projectId}/datasets/{datasetId}/routines/{routineId}` - # Example:"projects/test_project/datasets/test_dataset/routines/test_routine" - # - # Note: The following fields are mutually exclusive: `routine`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SelectedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Restricted export policy used to configure restricted export on linked - # dataset. - # @!attribute [rw] enabled - # @return [::Google::Protobuf::BoolValue] - # Optional. If true, enable restricted export. - # @!attribute [rw] restrict_direct_table_access - # @return [::Google::Protobuf::BoolValue] - # Optional. If true, restrict direct table access (read - # api/tabledata.list) on linked table. - # @!attribute [rw] restrict_query_result - # @return [::Google::Protobuf::BoolValue] - # Optional. If true, restrict export of query result derived from - # restricted linked dataset table. - class RestrictedExportPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the state of a replica of a shared dataset. - # It includes the geographic location of the replica and - # system-computed, output-only fields indicating its replication state and - # whether it is the primary replica. - # @!attribute [r] location - # @return [::String] - # Output only. The geographic location where the replica resides. See - # [BigQuery locations](https://cloud.google.com/bigquery/docs/locations) - # for supported locations. Eg. "us-central1". - # @!attribute [r] replica_state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica::ReplicaState] - # Output only. Assigned by Analytics Hub based on real BigQuery - # replication state. - # @!attribute [r] primary_state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::BigQueryDatasetSource::Replica::PrimaryState] - # Output only. Indicates that this replica is the primary replica. - class Replica - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Replica state of the shared dataset. - module ReplicaState - # Default value. This value is unused. - REPLICA_STATE_UNSPECIFIED = 0 - - # The replica is backfilled and ready to use. - READY_TO_USE = 1 - - # The replica is unavailable, does not exist, or has not been - # backfilled yet. - UNAVAILABLE = 2 - end - - # Primary state of the replica. Set only for the primary replica. - module PrimaryState - # Default value. This value is unused. - PRIMARY_STATE_UNSPECIFIED = 0 - - # The replica is the primary replica. - PRIMARY_REPLICA = 1 - end - end - end - - # Pub/Sub topic source. - # @!attribute [rw] topic - # @return [::String] - # Required. Resource name of the Pub/Sub topic source for this listing. - # e.g. projects/myproject/topics/topicId - # @!attribute [rw] data_affinity_regions - # @return [::Array<::String>] - # Optional. Region hint on where the data might be published. Data affinity - # regions are modifiable. See https://cloud.google.com/about/locations for - # full listing of possible Cloud regions. - class PubSubTopicSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Restricted export config, used to configure restricted export on linked - # dataset. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. If true, enable restricted export. - # @!attribute [r] restrict_direct_table_access - # @return [::Boolean] - # Output only. If true, restrict direct table access(read - # api/tabledata.list) on linked table. - # @!attribute [rw] restrict_query_result - # @return [::Boolean] - # Optional. If true, restrict export of query result derived from - # restricted linked dataset table. - class RestrictedExportConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Commercial info contains the information about the commercial data products - # associated with the listing. - # @!attribute [r] cloud_marketplace - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo::GoogleCloudMarketplaceInfo] - # Output only. Details of the Marketplace Data Product associated with the - # Listing. - class CommercialInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the details of the Marketplace Data Product associated with the - # Listing. - # @!attribute [r] service - # @return [::String] - # Output only. Resource name of the commercial service associated with - # the Marketplace Data Product. e.g. example.com - # @!attribute [r] commercial_state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing::CommercialInfo::GoogleCloudMarketplaceInfo::CommercialState] - # Output only. Commercial state of the Marketplace Data Product. - class GoogleCloudMarketplaceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates whether this commercial access is currently active. - module CommercialState - # Commercialization is incomplete and cannot be used. - COMMERCIAL_STATE_UNSPECIFIED = 0 - - # Commercialization has been initialized. - ONBOARDING = 1 - - # Commercialization is complete and available for use. - ACTIVE = 2 - end - end - end - - # State of the listing. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # Subscribable state. Users with dataexchange.listings.subscribe permission - # can subscribe to this listing. - ACTIVE = 1 - end - - # Listing categories. - module Category - CATEGORY_UNSPECIFIED = 0 - - CATEGORY_OTHERS = 1 - - CATEGORY_ADVERTISING_AND_MARKETING = 2 - - CATEGORY_COMMERCE = 3 - - CATEGORY_CLIMATE_AND_ENVIRONMENT = 4 - - CATEGORY_DEMOGRAPHICS = 5 - - CATEGORY_ECONOMICS = 6 - - CATEGORY_EDUCATION = 7 - - CATEGORY_ENERGY = 8 - - CATEGORY_FINANCIAL = 9 - - CATEGORY_GAMING = 10 - - CATEGORY_GEOSPATIAL = 11 - - CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12 - - CATEGORY_MEDIA = 13 - - CATEGORY_PUBLIC_SECTOR = 14 - - CATEGORY_RETAIL = 15 - - CATEGORY_SPORTS = 16 - - CATEGORY_SCIENCE_AND_RESEARCH = 17 - - CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18 - - CATEGORY_TRAVEL_AND_TOURISM = 19 - - CATEGORY_GOOGLE_EARTH_ENGINE = 20 - end - end - - # Stored procedure configuration, used to configure stored procedure sharing - # on linked dataset. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. If true, enable sharing of stored procedure. - # @!attribute [r] allowed_stored_procedure_types - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::StoredProcedureConfig::StoredProcedureType>] - # Output only. Types of stored procedure supported to share. - class StoredProcedureConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum to specify the type of stored procedure to share. - module StoredProcedureType - # Default value. This value is unused. - STORED_PROCEDURE_TYPE_UNSPECIFIED = 0 - - # SQL stored procedure. - SQL_PROCEDURE = 1 - end - end - - # A subscription represents a subscribers' access to a particular set of - # published data. It contains references to associated listings, - # data exchanges, and linked datasets. - # @!attribute [r] listing - # @return [::String] - # Output only. Resource name of the source Listing. - # e.g. projects/123/locations/us/dataExchanges/456/listings/789 - # - # Note: The following fields are mutually exclusive: `listing`, `data_exchange`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_exchange - # @return [::String] - # Output only. Resource name of the source Data Exchange. - # e.g. projects/123/locations/us/dataExchanges/456 - # - # Note: The following fields are mutually exclusive: `data_exchange`, `listing`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the subscription. - # e.g. `projects/myproject/locations/us/subscriptions/123`. - # @!attribute [r] creation_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the subscription was created. - # @!attribute [r] last_modify_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the subscription was last modified. - # @!attribute [r] organization_id - # @return [::String] - # Output only. Organization of the project this subscription belongs to. - # @!attribute [r] organization_display_name - # @return [::String] - # Output only. Display name of the project of this subscription. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::State] - # Output only. Current state of the subscription. - # @!attribute [r] linked_dataset_map - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource}] - # Output only. Map of listing resource names to associated linked resource, - # e.g. projects/123/locations/us/dataExchanges/456/listings/789 - # -> - # projects/123/datasets/my_dataset - # - # For listing-level subscriptions, this is a map of size 1. - # Only contains values if state == STATE_ACTIVE. - # @!attribute [r] subscriber_contact - # @return [::String] - # Output only. Email of the subscriber. - # @!attribute [r] linked_resources - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource>] - # Output only. Linked resources created in the subscription. Only contains - # values if state = STATE_ACTIVE. - # @!attribute [r] resource_type - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType] - # Output only. Listing shared asset type. - # @!attribute [r] commercial_info - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo] - # Output only. This is set if this is a commercial subscription i.e. if this - # subscription was created from subscribing to a commercial listing. - # @!attribute [r] log_linked_dataset_query_user_email - # @return [::Boolean] - # Output only. By default, false. - # If true, the Subscriber agreed to the email sharing mandate - # that is enabled for DataExchange/Listing. - # @!attribute [rw] destination_dataset - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] - # Optional. BigQuery destination dataset to create for the subscriber. - class Subscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reference to a linked resource tracked by this Subscription. - # @!attribute [r] linked_dataset - # @return [::String] - # Output only. Name of the linked dataset, e.g. - # projects/subscriberproject/datasets/linked_dataset - # - # Note: The following fields are mutually exclusive: `linked_dataset`, `linked_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] linked_pubsub_subscription - # @return [::String] - # Output only. Name of the Pub/Sub subscription, e.g. - # projects/subscriberproject/subscriptions/subscriptions/sub_id - # - # Note: The following fields are mutually exclusive: `linked_pubsub_subscription`, `linked_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] listing - # @return [::String] - # Output only. Listing for which linked resource is created. - class LinkedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Commercial info metadata for this subscription. - # @!attribute [r] cloud_marketplace - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo::GoogleCloudMarketplaceInfo] - # Output only. This is set when the subscription is commercialised via - # Cloud Marketplace. - class CommercialInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Cloud Marketplace commercial metadata for this subscription. - # @!attribute [rw] order - # @return [::String] - # Resource name of the Marketplace Order. - class GoogleCloudMarketplaceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource] - class LinkedDatasetMapEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of the subscription. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # This subscription is active and the data is accessible. - STATE_ACTIVE = 1 - - # The data referenced by this subscription is out of date and should be - # refreshed. This can happen when a data provider adds or removes datasets. - STATE_STALE = 2 - - # This subscription has been cancelled or revoked and the data is no longer - # accessible. - STATE_INACTIVE = 3 - end - end - - # Message for requesting the list of data exchanges. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the data exchanges. - # e.g. `projects/myproject/locations/us`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListDataExchangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the list of data exchanges. - # @!attribute [rw] data_exchanges - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # The list of data exchanges. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListDataExchangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of data exchanges from projects in an - # organization and location. - # @!attribute [rw] organization - # @return [::String] - # Required. The organization resource path of the projects containing - # DataExchanges. e.g. `organizations/myorg/locations/us`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListOrgDataExchangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing data exchanges in an organization and - # location. - # @!attribute [rw] data_exchanges - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>] - # The list of data exchanges. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListOrgDataExchangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a data exchange. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data exchange. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - class GetDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a data exchange. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the data exchange. - # e.g. `projects/myproject/locations/us`. - # @!attribute [rw] data_exchange_id - # @return [::String] - # Required. The ID of the data exchange. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @!attribute [rw] data_exchange - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # Required. The data exchange to create. - class CreateDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a data exchange. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask specifies the fields to update in the data exchange - # resource. The fields specified in the - # `updateMask` are relative to the resource and are not a full request. - # @!attribute [rw] data_exchange - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange] - # Required. The data exchange to update. - class UpdateDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a data exchange. - # @!attribute [rw] name - # @return [::String] - # Required. The full name of the data exchange resource that you want to - # delete. For example, `projects/myproject/locations/us/dataExchanges/123`. - class DeleteDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of listings. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListListingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the list of Listings. - # @!attribute [rw] listings - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>] - # The list of Listing. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListListingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a listing. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - class GetListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a listing. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/us/dataExchanges/123`. - # @!attribute [rw] listing_id - # @return [::String] - # Required. The ID of the listing to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Max length: 100 bytes. - # @!attribute [rw] listing - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # Required. The listing to create. - class CreateListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a Listing. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask specifies the fields to update in the listing - # resource. The fields specified in the `updateMask` are relative to the - # resource and are not a full request. - # @!attribute [rw] listing - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing] - # Required. The listing to update. - class UpdateListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a listing. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the listing to delete. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - # @!attribute [rw] delete_commercial - # @return [::Boolean] - # Optional. If the listing is commercial then this field must be set to true, - # otherwise a failure is thrown. This acts as a safety guard to avoid - # deleting commercial listings accidentally. - class DeleteListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for subscribing to a listing. - # @!attribute [rw] destination_dataset - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] - # Input only. BigQuery destination dataset to create for the subscriber. - # - # Note: The following fields are mutually exclusive: `destination_dataset`, `destination_pubsub_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] destination_pubsub_subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationPubSubSubscription] - # Input only. Destination Pub/Sub subscription to create for the - # subscriber. - # - # Note: The following fields are mutually exclusive: `destination_pubsub_subscription`, `destination_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the listing that you want to subscribe to. - # e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`. - class SubscribeListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you subscribe to a listing. - # @!attribute [rw] subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # Subscription object created from this subscribe action. - class SubscribeListingResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for subscribing to a Data Exchange. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the Data Exchange. - # e.g. `projects/publisherproject/locations/us/dataExchanges/123` - # @!attribute [rw] destination - # @return [::String] - # Required. The parent resource path of the Subscription. - # e.g. `projects/subscriberproject/locations/us` - # @!attribute [rw] destination_dataset - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset] - # Optional. BigQuery destination dataset to create for the subscriber. - # @!attribute [rw] subscription - # @return [::String] - # Required. Name of the subscription to create. - # e.g. `subscription1` - # @!attribute [rw] subscriber_contact - # @return [::String] - # Email of the subscriber. - class SubscribeDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you subscribe to a Data Exchange. - # @!attribute [rw] subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # Subscription object created from this subscribe action. - class SubscribeDataExchangeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for refreshing a subscription. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the Subscription to refresh. - # e.g. `projects/subscriberproject/locations/us/subscriptions/123` - class RefreshSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you refresh a subscription. - # @!attribute [rw] subscription - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription] - # The refreshed subscription resource. - class RefreshSubscriptionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a subscription. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the subscription. - # e.g. projects/123/locations/us/subscriptions/456 - class GetSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for listing subscriptions. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the subscription. - # e.g. projects/myproject/locations/us - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. Eligible - # fields for filtering are: - # - # + `listing` - # + `data_exchange` - # - # Alternatively, a literal wrapped in double quotes may be provided. - # This will be checked for an exact match against both fields above. - # - # In all cases, the full Data Exchange or Listing resource name must - # be provided. Some example of using filters: - # - # + data_exchange="projects/myproject/locations/us/dataExchanges/123" - # + listing="projects/123/locations/us/dataExchanges/456/listings/789" - # + "projects/myproject/locations/us/dataExchanges/123" - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call. - class ListSubscriptionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the listing of subscriptions. - # @!attribute [rw] subscriptions - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # The list of subscriptions. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - class ListSubscriptionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for listing subscriptions of a shared resource. - # @!attribute [rw] resource - # @return [::String] - # Required. Resource name of the requested target. This resource may be - # either a Listing or a DataExchange. e.g. - # projects/123/locations/us/dataExchanges/456 OR e.g. - # projects/123/locations/us/dataExchanges/456/listings/789 - # @!attribute [rw] include_deleted_subscriptions - # @return [::Boolean] - # If selected, includes deleted subscriptions in the response - # (up to 63 days after deletion). - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call. - class ListSharedResourceSubscriptionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the listing of shared resource subscriptions. - # @!attribute [rw] shared_resource_subscriptions - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>] - # The list of subscriptions. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - class ListSharedResourceSubscriptionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for revoking a subscription. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the subscription to revoke. - # e.g. projects/123/locations/us/subscriptions/456 - # @!attribute [rw] revoke_commercial - # @return [::Boolean] - # Optional. If the subscription is commercial then this field must be set to - # true, otherwise a failure is thrown. This acts as a safety guard to avoid - # revoking commercial subscriptions accidentally. - class RevokeSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you revoke a subscription. - # Empty for now. - class RevokeSubscriptionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a subscription. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the subscription to delete. - # e.g. projects/123/locations/us/subscriptions/456 - class DeleteSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of a long-running operation in Analytics Hub. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the type of discovery on the discovery page. Note that - # this does not control the visibility of the exchange/listing which is - # defined by IAM permission. - module DiscoveryType - # Unspecified. Defaults to DISCOVERY_TYPE_PRIVATE. - DISCOVERY_TYPE_UNSPECIFIED = 0 - - # The Data exchange/listing can be discovered in the 'Private' results - # list. - DISCOVERY_TYPE_PRIVATE = 1 - - # The Data exchange/listing can be discovered in the 'Public' results - # list. - DISCOVERY_TYPE_PUBLIC = 2 - end - - # The underlying shared asset type shared in a listing by a publisher. - module SharedResourceType - # Not specified. - SHARED_RESOURCE_TYPE_UNSPECIFIED = 0 - - # BigQuery Dataset Asset. - BIGQUERY_DATASET = 1 - - # Pub/Sub Topic Asset. - PUBSUB_TOPIC = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb deleted file mode 100644 index e75b3b67c28e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/cloud/bigquery/analyticshub/v1/pubsub.rb +++ /dev/null @@ -1,559 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module AnalyticsHub - module V1 - # Defines the destination Pub/Sub subscription. - # If none of `push_config`, `bigquery_config`, `cloud_storage_config`, - # `pubsub_export_config`, or `pubsublite_export_config` - # is set, then the subscriber will pull and ack messages using API methods. At - # most one of these fields may be set. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the subscription. - # Format is `projects/{project}/subscriptions/{sub}`. - # @!attribute [rw] push_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig] - # Optional. If push delivery is used with this subscription, this field is - # used to configure it. - # @!attribute [rw] bigquery_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::BigQueryConfig] - # Optional. If delivery to BigQuery is used with this subscription, this - # field is used to configure it. - # @!attribute [rw] cloud_storage_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig] - # Optional. If delivery to Google Cloud Storage is used with this - # subscription, this field is used to configure it. - # @!attribute [rw] ack_deadline_seconds - # @return [::Integer] - # Optional. The approximate amount of time (on a best-effort basis) Pub/Sub - # waits for the subscriber to acknowledge receipt before resending the - # message. In the interval after the message is delivered and before it is - # acknowledged, it is considered to be _outstanding_. During that time - # period, the message will not be redelivered (on a best-effort basis). - # - # For pull subscriptions, this value is used as the initial value for the ack - # deadline. To override this value for a given message, call - # `ModifyAckDeadline` with the corresponding `ack_id` if using - # non-streaming pull or send the `ack_id` in a - # `StreamingModifyAckDeadlineRequest` if using streaming pull. - # The minimum custom deadline you can specify is 10 seconds. - # The maximum custom deadline you can specify is 600 seconds (10 minutes). - # If this parameter is 0, a default value of 10 seconds is used. - # - # For push delivery, this value is also used to set the request timeout for - # the call to the push endpoint. - # - # If the subscriber never acknowledges the message, the Pub/Sub - # system will eventually redeliver the message. - # @!attribute [rw] retain_acked_messages - # @return [::Boolean] - # Optional. Indicates whether to retain acknowledged messages. If true, then - # messages are not expunged from the subscription's backlog, even if they are - # acknowledged, until they fall out of the `message_retention_duration` - # window. This must be true if you would like to [`Seek` to a timestamp] - # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in - # the past to replay previously-acknowledged messages. - # @!attribute [rw] message_retention_duration - # @return [::Google::Protobuf::Duration] - # Optional. How long to retain unacknowledged messages in the subscription's - # backlog, from the moment a message is published. If `retain_acked_messages` - # is true, then this also configures the retention of acknowledged messages, - # and thus configures how far back in time a `Seek` can be done. Defaults to - # 7 days. Cannot be more than 31 days or less than 10 minutes. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. See [Creating and managing - # labels](https://cloud.google.com/pubsub/docs/labels). - # @!attribute [rw] enable_message_ordering - # @return [::Boolean] - # Optional. If true, messages published with the same `ordering_key` in - # `PubsubMessage` will be delivered to the subscribers in the order in which - # they are received by the Pub/Sub system. Otherwise, they may be delivered - # in any order. - # @!attribute [rw] expiration_policy - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ExpirationPolicy] - # Optional. A policy that specifies the conditions for this subscription's - # expiration. A subscription is considered active as long as any connected - # subscriber is successfully consuming messages from the subscription or is - # issuing operations on the subscription. If `expiration_policy` is not set, - # a *default policy* with `ttl` of 31 days will be used. The minimum allowed - # value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set, - # but `expiration_policy.ttl` is not set, the subscription never expires. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression written in the Pub/Sub [filter - # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, - # then only `PubsubMessage`s whose `attributes` field matches the filter are - # delivered on this subscription. If empty, then no messages are filtered - # out. - # @!attribute [rw] dead_letter_policy - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeadLetterPolicy] - # Optional. A policy that specifies the conditions for dead lettering - # messages in this subscription. If dead_letter_policy is not set, dead - # lettering is disabled. - # - # The Pub/Sub service account associated with this subscriptions's - # parent project (i.e., - # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have - # permission to Acknowledge() messages on this subscription. - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RetryPolicy] - # Optional. A policy that specifies how Pub/Sub retries message delivery for - # this subscription. - # - # If not set, the default retry policy is applied. This generally implies - # that messages will be retried as soon as possible for healthy subscribers. - # RetryPolicy will be triggered on NACKs or acknowledgement deadline - # exceeded events for a given message. - # @!attribute [rw] detached - # @return [::Boolean] - # Optional. Indicates whether the subscription is detached from its topic. - # Detached subscriptions don't receive messages from their topic and don't - # retain any backlog. `Pull` and `StreamingPull` requests will return - # FAILED_PRECONDITION. If the subscription is a push subscription, pushes to - # the endpoint will not be made. - # @!attribute [rw] enable_exactly_once_delivery - # @return [::Boolean] - # Optional. If true, Pub/Sub provides the following guarantees for the - # delivery of a message with a given value of `message_id` on this - # subscription: - # - # * The message sent to a subscriber is guaranteed not to be resent - # before the message's acknowledgement deadline expires. - # * An acknowledged message will not be resent to a subscriber. - # - # Note that subscribers may still receive multiple copies of a message - # when `enable_exactly_once_delivery` is true if the message was published - # multiple times by a publisher client. These copies are considered distinct - # by Pub/Sub and have distinct `message_id` values. - # @!attribute [rw] message_transforms - # @return [::Array<::Google::Cloud::Bigquery::AnalyticsHub::V1::MessageTransform>] - # Optional. Transforms to be applied to messages before they are delivered to - # subscribers. Transforms are applied in the order specified. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag keys/values directly bound to this - # resource. For example: - # "123/environment": "production", - # "123/costCenter": "marketing" - class PubSubSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A policy that specifies how Pub/Sub retries message delivery. - # - # Retry delay will be exponential based on provided minimum and maximum - # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. - # - # RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded - # events for a given message. - # - # Retry Policy is implemented on a best effort basis. At times, the delay - # between consecutive deliveries may not match the configuration. That is, - # delay can be more or less than configured backoff. - # @!attribute [rw] minimum_backoff - # @return [::Google::Protobuf::Duration] - # Optional. The minimum delay between consecutive deliveries of a given - # message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. - # @!attribute [rw] maximum_backoff - # @return [::Google::Protobuf::Duration] - # Optional. The maximum delay between consecutive deliveries of a given - # message. Value should be between 0 and 600 seconds. Defaults to 600 - # seconds. - class RetryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dead lettering is done on a best effort basis. The same message might be - # dead lettered multiple times. - # - # If validation on any of the fields fails at subscription creation/updation, - # the create/update subscription request will fail. - # @!attribute [rw] dead_letter_topic - # @return [::String] - # Optional. The name of the topic to which dead letter messages should be - # published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub - # service account associated with the enclosing subscription's parent project - # (i.e., service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must - # have permission to Publish() to this topic. - # - # The operation will fail if the topic does not exist. - # Users should ensure that there is a subscription attached to this topic - # since messages published to a topic with no subscriptions are lost. - # @!attribute [rw] max_delivery_attempts - # @return [::Integer] - # Optional. The maximum number of delivery attempts for any message. The - # value must be between 5 and 100. - # - # The number of delivery attempts is defined as 1 + (the sum of number of - # NACKs and number of times the acknowledgement deadline has been exceeded - # for the message). - # - # A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that - # client libraries may automatically extend ack_deadlines. - # - # This field will be honored on a best effort basis. - # - # If this parameter is 0, a default value of 5 is used. - class DeadLetterPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A policy that specifies the conditions for resource expiration (i.e., - # automatic resource deletion). - # @!attribute [rw] ttl - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the "time-to-live" duration for an associated resource. - # The resource expires if it is not active for a period of `ttl`. The - # definition of "activity" depends on the type of the associated resource. - # The minimum and maximum allowed values for `ttl` depend on the type of the - # associated resource, as well. If `ttl` is not set, the associated resource - # never expires. - class ExpirationPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a push delivery endpoint. - # @!attribute [rw] oidc_token - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::OidcToken] - # Optional. If specified, Pub/Sub will generate and attach an OIDC JWT - # token as an `Authorization` header in the HTTP request for every pushed - # message. - # @!attribute [rw] pubsub_wrapper - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::PubsubWrapper] - # Optional. When set, the payload to the push endpoint is in the form of - # the JSON representation of a PubsubMessage - # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). - # - # Note: The following fields are mutually exclusive: `pubsub_wrapper`, `no_wrapper`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] no_wrapper - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::PushConfig::NoWrapper] - # Optional. When set, the payload to the push endpoint is not wrapped. - # - # Note: The following fields are mutually exclusive: `no_wrapper`, `pubsub_wrapper`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] push_endpoint - # @return [::String] - # Optional. A URL locating the endpoint to which messages should be pushed. - # For example, a Webhook endpoint might use `https://example.com/push`. - # @!attribute [rw] attributes - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Endpoint configuration attributes that can be used to control - # different aspects of the message delivery. - # - # The only currently supported attribute is `x-goog-version`, which you can - # use to change the format of the pushed message. This attribute - # indicates the version of the data expected by the endpoint. This - # controls the shape of the pushed message (i.e., its fields and metadata). - # - # If not present during the `CreateSubscription` call, it will default to - # the version of the Pub/Sub API used to make such call. If not present in a - # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` - # calls will always return a valid version, even if the subscription was - # created without this attribute. - # - # The only supported values for the `x-goog-version` attribute are: - # - # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. - # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. - # - # For example: - # `attributes { "x-goog-version": "v1" }` - class PushConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains information needed for generating an - # [OpenID Connect - # token](https://developers.google.com/identity/protocols/OpenIDConnect). - # @!attribute [rw] service_account_email - # @return [::String] - # Optional. [Service account - # email](https://cloud.google.com/iam/docs/service-accounts) - # used for generating the OIDC token. For more information - # on setting up authentication, see - # [Push subscriptions](https://cloud.google.com/pubsub/docs/push). - # @!attribute [rw] audience - # @return [::String] - # Optional. Audience to be used when generating OIDC token. The audience - # claim identifies the recipients that the JWT is intended for. The - # audience value is a single case-sensitive string. Having multiple values - # (array) for the audience field is not supported. More info about the OIDC - # JWT token audience here: - # https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, - # the Push endpoint URL will be used. - class OidcToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payload to the push endpoint is in the form of the JSON representation - # of a PubsubMessage - # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). - class PubsubWrapper - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sets the `data` field as the HTTP body for delivery. - # @!attribute [rw] write_metadata - # @return [::Boolean] - # Optional. When true, writes the Pub/Sub message metadata to - # `x-goog-pubsub-:` headers of the HTTP request. Writes the - # Pub/Sub message attributes to `:` headers of the HTTP request. - class NoWrapper - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AttributesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a BigQuery subscription. - # @!attribute [rw] table - # @return [::String] - # Optional. The name of the table to which to write data, of the form - # \\{projectId}.\\{datasetId}.\\{tableId} - # @!attribute [rw] use_topic_schema - # @return [::Boolean] - # Optional. When true, use the topic's schema as the columns to write to in - # BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be - # enabled at the same time. - # @!attribute [rw] write_metadata - # @return [::Boolean] - # Optional. When true, write the subscription name, message_id, publish_time, - # attributes, and ordering_key to additional columns in the table. The - # subscription name, message_id, and publish_time fields are put in their own - # columns while all other message properties (other than data) are written to - # a JSON object in the attributes column. - # @!attribute [rw] drop_unknown_fields - # @return [::Boolean] - # Optional. When true and use_topic_schema is true, any fields that are a - # part of the topic schema that are not part of the BigQuery table schema are - # dropped when writing to BigQuery. Otherwise, the schemas must be kept in - # sync and any messages with extra fields are not written and remain in the - # subscription's backlog. - # @!attribute [rw] use_table_schema - # @return [::Boolean] - # Optional. When true, use the BigQuery table's schema as the columns to - # write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be - # enabled at the same time. - # @!attribute [rw] service_account_email - # @return [::String] - # Optional. The service account to use to write to BigQuery. The subscription - # creator or updater that specifies this field must have - # `iam.serviceAccounts.actAs` permission on the service account. If not - # specified, the Pub/Sub [service - # agent](https://cloud.google.com/iam/docs/service-agents), - # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. - class BigQueryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a Cloud Storage subscription. - # @!attribute [rw] text_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig::TextConfig] - # Optional. If set, message data will be written to Cloud Storage in text - # format. - # - # Note: The following fields are mutually exclusive: `text_config`, `avro_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] avro_config - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::CloudStorageConfig::AvroConfig] - # Optional. If set, message data will be written to Cloud Storage in Avro - # format. - # - # Note: The following fields are mutually exclusive: `avro_config`, `text_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bucket - # @return [::String] - # Required. User-provided name for the Cloud Storage bucket. - # The bucket must be created by the user. The bucket name must be without - # any prefix like "gs://". See the [bucket naming - # requirements] (https://cloud.google.com/storage/docs/buckets#naming). - # @!attribute [rw] filename_prefix - # @return [::String] - # Optional. User-provided prefix for Cloud Storage filename. See the [object - # naming requirements](https://cloud.google.com/storage/docs/objects#naming). - # @!attribute [rw] filename_suffix - # @return [::String] - # Optional. User-provided suffix for Cloud Storage filename. See the [object - # naming requirements](https://cloud.google.com/storage/docs/objects#naming). - # Must not end in "/". - # @!attribute [rw] filename_datetime_format - # @return [::String] - # Optional. User-provided format string specifying how to represent datetimes - # in Cloud Storage filenames. See the [datetime format - # guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). - # @!attribute [rw] max_duration - # @return [::Google::Protobuf::Duration] - # Optional. File batching settings. - # If no max_duration setting is specified, a max_duration of 5 minutes will - # be set by default. max_duration is required regardless of whether other - # file batching settings are specified. - # - # The maximum duration that can elapse before a new Cloud Storage file is - # created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed - # the subscription's acknowledgement deadline. - # @!attribute [rw] max_bytes - # @return [::Integer] - # Optional. The maximum bytes that can be written to a Cloud Storage file - # before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may - # be exceeded in cases where messages are larger than the limit. - # @!attribute [rw] max_messages - # @return [::Integer] - # Optional. The maximum number of messages that can be written to a Cloud - # Storage file before a new file is created. Min 1000 messages. - # @!attribute [rw] service_account_email - # @return [::String] - # Optional. The service account to use to write to Cloud Storage. The - # subscription creator or updater that specifies this field must have - # `iam.serviceAccounts.actAs` permission on the service account. If not - # specified, the Pub/Sub - # [service agent](https://cloud.google.com/iam/docs/service-agents), - # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. - class CloudStorageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for writing message data in text format. - # Message payloads will be written to files as raw text, separated by a - # newline. - class TextConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for writing message data in Avro format. - # Message payloads and metadata will be written to files as an Avro binary. - # @!attribute [rw] write_metadata - # @return [::Boolean] - # Optional. When true, write the subscription name, message_id, - # publish_time, attributes, and ordering_key as additional fields in the - # output. The subscription name, message_id, and publish_time fields are - # put in their own fields while all other message properties other than - # data (for example, an ordering_key, if present) are added as entries in - # the attributes map. - # @!attribute [rw] use_topic_schema - # @return [::Boolean] - # Optional. When true, the output Cloud Storage file will be serialized - # using the topic schema, if it exists. - class AvroConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # All supported message transforms types. - # @!attribute [rw] javascript_udf - # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::JavaScriptUDF] - # Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's - # are specified on a resource, each must have a unique `function_name`. - # @!attribute [rw] enabled - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Optional. This field is deprecated, use the `disabled` field to disable - # transforms. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. If true, the transform is disabled and will not be applied to - # messages. Defaults to `false`. - class MessageTransform - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User-defined JavaScript function that can transform or filter a Pub/Sub - # message. - # @!attribute [rw] function_name - # @return [::String] - # Required. Name of the JavasScript function that should applied to Pub/Sub - # messages. - # @!attribute [rw] code - # @return [::String] - # Required. JavaScript code that contains a function `function_name` with the - # below signature: - # - # ``` - # /** - # * Transforms a Pub/Sub message. - # - # * @return \\{(Object)>|null)} - To - # * filter a message, return `null`. To transform a message return a map - # * with the following keys: - # * - (required) 'data' : \\{string} - # * - (optional) 'attributes' : \\{Object} - # * Returning empty `attributes` will remove all attributes from the - # * message. - # * - # * @param \\{(Object)>} Pub/Sub - # * message. Keys: - # * - (required) 'data' : \\{string} - # * - (required) 'attributes' : \\{Object} - # * - # * @param \\{Object} metadata - Pub/Sub message metadata. - # * Keys: - # * - (required) 'message_id' : \\{string} - # * - (optional) 'publish_time': \\{string} YYYY-MM-DDTHH:MM:SSZ format - # * - (optional) 'ordering_key': \\{string} - # */ - # - # function (message, metadata) { - # } - # ``` - class JavaScriptUDF - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile deleted file mode 100644 index cf511377acd7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-analytics_hub-v1", path: "../" -else - gem "google-cloud-bigquery-analytics_hub-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb deleted file mode 100644 index 0a39e6316666..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/approve_query_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the approve_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template. -# -def approve_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new - - # Call the approve_query_template method. - result = client.approve_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb deleted file mode 100644 index 2a8628d7604c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_data_exchange.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the create_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange. -# -def create_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new - - # Call the create_data_exchange method. - result = client.create_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb deleted file mode 100644 index d1a606f4b1cd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the create_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing. -# -def create_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new - - # Call the create_listing method. - result = client.create_listing request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb deleted file mode 100644 index 9c25b4f508b6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/create_query_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the create_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template. -# -def create_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new - - # Call the create_query_template method. - result = client.create_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb deleted file mode 100644 index 5952012c10af..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_data_exchange.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the delete_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange. -# -def delete_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new - - # Call the delete_data_exchange method. - result = client.delete_data_exchange request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb deleted file mode 100644 index f649ca2e5739..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the delete_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing. -# -def delete_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new - - # Call the delete_listing method. - result = client.delete_listing request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb deleted file mode 100644 index ade5d81b6792..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_query_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the delete_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template. -# -def delete_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new - - # Call the delete_query_template method. - result = client.delete_query_template request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb deleted file mode 100644 index be4fcc5a0ef2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/delete_subscription.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the delete_subscription call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription. -# -def delete_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new - - # Call the delete_subscription method. - result = client.delete_subscription request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb deleted file mode 100644 index 7c5f0f889dca..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_data_exchange.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange. -# -def get_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new - - # Call the get_data_exchange method. - result = client.get_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb deleted file mode 100644 index 41e6e64e7742..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_iam_policy call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb deleted file mode 100644 index 6bf1cd0ebe75..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing. -# -def get_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new - - # Call the get_listing method. - result = client.get_listing request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb deleted file mode 100644 index 94f813894a65..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_query_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template. -# -def get_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new - - # Call the get_query_template method. - result = client.get_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb deleted file mode 100644 index 1f80e69970ce..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/get_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the get_subscription call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription. -# -def get_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new - - # Call the get_subscription method. - result = client.get_subscription request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb deleted file mode 100644 index 1fcb44b39af1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_data_exchanges.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_data_exchanges call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges. -# -def list_data_exchanges - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new - - # Call the list_data_exchanges method. - result = client.list_data_exchanges request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb deleted file mode 100644 index 0a7a606ae5f4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_listings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_listings call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings. -# -def list_listings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new - - # Call the list_listings method. - result = client.list_listings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb deleted file mode 100644 index b6f2cb9a9187..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_org_data_exchanges.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_org_data_exchanges call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges. -# -def list_org_data_exchanges - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new - - # Call the list_org_data_exchanges method. - result = client.list_org_data_exchanges request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb deleted file mode 100644 index 485a075ad969..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_query_templates.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_query_templates call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates. -# -def list_query_templates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new - - # Call the list_query_templates method. - result = client.list_query_templates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb deleted file mode 100644 index eb88901d590b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_shared_resource_subscriptions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_shared_resource_subscriptions call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions. -# -def list_shared_resource_subscriptions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new - - # Call the list_shared_resource_subscriptions method. - result = client.list_shared_resource_subscriptions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb deleted file mode 100644 index 83a559cfd40e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/list_subscriptions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the list_subscriptions call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions. -# -def list_subscriptions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new - - # Call the list_subscriptions method. - result = client.list_subscriptions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription. - p item - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb deleted file mode 100644 index 6f0d8291ad7a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/refresh_subscription.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the refresh_subscription call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription. -# -def refresh_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new - - # Call the refresh_subscription method. - result = client.refresh_subscription request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb deleted file mode 100644 index 79f5d7d7fd2e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/revoke_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the revoke_subscription call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription. -# -def revoke_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new - - # Call the revoke_subscription method. - result = client.revoke_subscription request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb deleted file mode 100644 index e90e15b23996..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the set_iam_policy call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb deleted file mode 100644 index 0853f509ac77..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/submit_query_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the submit_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template. -# -def submit_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new - - # Call the submit_query_template method. - result = client.submit_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb deleted file mode 100644 index 4b8d255e1cb0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_data_exchange.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the subscribe_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange. -# -def subscribe_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new - - # Call the subscribe_data_exchange method. - result = client.subscribe_data_exchange request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb deleted file mode 100644 index 9d570b4f1d94..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/subscribe_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the subscribe_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing. -# -def subscribe_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new - - # Call the subscribe_listing method. - result = client.subscribe_listing request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb deleted file mode 100644 index 8d57f424d123..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the test_iam_permissions call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb deleted file mode 100644 index 8736361663e5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_data_exchange.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the update_data_exchange call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange. -# -def update_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new - - # Call the update_data_exchange method. - result = client.update_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb deleted file mode 100644 index 8c5f1849b359..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_listing.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the update_listing call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing. -# -def update_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new - - # Call the update_listing method. - result = client.update_listing request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb deleted file mode 100644 index 880478732dd5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/analytics_hub_service/update_query_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync] -require "google/cloud/bigquery/analytics_hub/v1" - -## -# Snippet for the update_query_template call in the AnalyticsHubService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template. -# -def update_query_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new - - # Call the update_query_template method. - result = client.update_query_template request - - # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate. - p result -end -# [END analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json deleted file mode 100644 index d27ae7dab1ab..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/snippets/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json +++ /dev/null @@ -1,1175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-analytics_hub-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.analyticshub.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListDataExchanges_sync", - "title": "Snippet for the list_data_exchanges call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges.", - "file": "analytics_hub_service/list_data_exchanges.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_exchanges", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_data_exchanges", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListDataExchanges", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListDataExchanges", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListOrgDataExchanges_sync", - "title": "Snippet for the list_org_data_exchanges call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges.", - "file": "analytics_hub_service/list_org_data_exchanges.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_org_data_exchanges", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_org_data_exchanges", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListOrgDataExchanges", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListOrgDataExchanges", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetDataExchange_sync", - "title": "Snippet for the get_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange.", - "file": "analytics_hub_service/get_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateDataExchange_sync", - "title": "Snippet for the create_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange.", - "file": "analytics_hub_service/create_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "CreateDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateDataExchange_sync", - "title": "Snippet for the update_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange.", - "file": "analytics_hub_service/update_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "UpdateDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteDataExchange_sync", - "title": "Snippet for the delete_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange.", - "file": "analytics_hub_service/delete_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListListings_sync", - "title": "Snippet for the list_listings call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings.", - "file": "analytics_hub_service/list_listings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_listings", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_listings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListListings", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListListings", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetListing_sync", - "title": "Snippet for the get_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing.", - "file": "analytics_hub_service/get_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateListing_sync", - "title": "Snippet for the create_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing.", - "file": "analytics_hub_service/create_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "CreateListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateListing_sync", - "title": "Snippet for the update_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing.", - "file": "analytics_hub_service/update_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "UpdateListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteListing_sync", - "title": "Snippet for the delete_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing.", - "file": "analytics_hub_service/delete_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_sync", - "title": "Snippet for the subscribe_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing.", - "file": "analytics_hub_service/subscribe_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "subscribe_listing", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SubscribeListing", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubscribeListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubscribeDataExchange_sync", - "title": "Snippet for the subscribe_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange.", - "file": "analytics_hub_service/subscribe_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "subscribe_data_exchange", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#subscribe_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SubscribeDataExchange", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubscribeDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_RefreshSubscription_sync", - "title": "Snippet for the refresh_subscription call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription.", - "file": "analytics_hub_service/refresh_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "refresh_subscription", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#refresh_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "RefreshSubscription", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.RefreshSubscription", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetSubscription_sync", - "title": "Snippet for the get_subscription call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription.", - "file": "analytics_hub_service/get_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_subscription", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetSubscription", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetSubscription", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListSubscriptions_sync", - "title": "Snippet for the list_subscriptions call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions.", - "file": "analytics_hub_service/list_subscriptions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_subscriptions", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_subscriptions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListSubscriptions", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListSubscriptions", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListSharedResourceSubscriptions_sync", - "title": "Snippet for the list_shared_resource_subscriptions call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions.", - "file": "analytics_hub_service/list_shared_resource_subscriptions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_shared_resource_subscriptions", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_shared_resource_subscriptions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListSharedResourceSubscriptions", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListSharedResourceSubscriptions", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_RevokeSubscription_sync", - "title": "Snippet for the revoke_subscription call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription.", - "file": "analytics_hub_service/revoke_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "revoke_subscription", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#revoke_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "RevokeSubscription", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.RevokeSubscription", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteSubscription_sync", - "title": "Snippet for the delete_subscription call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription.", - "file": "analytics_hub_service/delete_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_subscription", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteSubscription", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteSubscription", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy.", - "file": "analytics_hub_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetIamPolicy", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy.", - "file": "analytics_hub_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SetIamPolicy", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions.", - "file": "analytics_hub_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.TestIamPermissions", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_CreateQueryTemplate_sync", - "title": "Snippet for the create_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template.", - "file": "analytics_hub_service/create_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#create_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "CreateQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.CreateQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_GetQueryTemplate_sync", - "title": "Snippet for the get_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template.", - "file": "analytics_hub_service/get_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#get_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.GetQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ListQueryTemplates_sync", - "title": "Snippet for the list_query_templates call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates.", - "file": "analytics_hub_service/list_query_templates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_query_templates", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#list_query_templates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListQueryTemplates", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ListQueryTemplates", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_UpdateQueryTemplate_sync", - "title": "Snippet for the update_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template.", - "file": "analytics_hub_service/update_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#update_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "UpdateQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.UpdateQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_DeleteQueryTemplate_sync", - "title": "Snippet for the delete_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template.", - "file": "analytics_hub_service/delete_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#delete_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.DeleteQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_SubmitQueryTemplate_sync", - "title": "Snippet for the submit_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template.", - "file": "analytics_hub_service/submit_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "submit_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#submit_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SubmitQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.SubmitQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1_generated_AnalyticsHubService_ApproveQueryTemplate_sync", - "title": "Snippet for the approve_query_template call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template.", - "file": "analytics_hub_service/approve_query_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "approve_query_template", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client#approve_query_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ApproveQueryTemplate", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService.ApproveQueryTemplate", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb deleted file mode 100644 index e4b6fc106ae7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" - -class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb deleted file mode 100644 index bda4e477568d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_paths_test.rb +++ /dev/null @@ -1,163 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" - -class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_data_exchange_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_exchange_path project: "value0", location: "value1", data_exchange: "value2" - assert_equal "projects/value0/locations/value1/dataExchanges/value2", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", dataset: "value1" - assert_equal "projects/value0/datasets/value1", path - end - end - - def test_listing_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.listing_path project: "value0", location: "value1", data_exchange: "value2", listing: "value3" - assert_equal "projects/value0/locations/value1/dataExchanges/value2/listings/value3", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_managed_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.managed_service_path service: "value0" - assert_equal "services/value0", path - end - end - - def test_query_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.query_template_path project: "value0", location: "value1", data_exchange: "value2", query_template: "value3" - assert_equal "projects/value0/locations/value1/dataExchanges/value2/queryTemplates/value3", path - end - end - - def test_routine_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.routine_path project: "value0", dataset: "value1", routine: "value2" - assert_equal "projects/value0/datasets/value1/routines/value2", path - end - end - - def test_subscription_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.subscription_path project: "value0", location: "value1", subscription: "value2" - assert_equal "projects/value0/locations/value1/subscriptions/value2", path - end - end - - def test_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_path project: "value0", dataset: "value1", table: "value2" - assert_equal "projects/value0/datasets/value1/tables/value2", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb deleted file mode 100644 index 6738df9c8383..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_rest_test.rb +++ /dev/null @@ -1,1699 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest" - - -class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_data_exchanges - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_data_exchanges_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_data_exchanges_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_exchanges_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_exchanges parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_exchanges_client_stub.call_count - end - end - end - - def test_list_org_data_exchanges - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - organization = "hello world" - page_size = 42 - page_token = "hello world" - - list_org_data_exchanges_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_org_data_exchanges_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_org_data_exchanges_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_org_data_exchanges organization: organization, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_org_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_org_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_org_data_exchanges_client_stub.call_count - end - end - end - - def test_get_data_exchange - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_exchange({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_exchange name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_exchange({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_exchange_client_stub.call_count - end - end - end - - def test_create_data_exchange - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_exchange_id = "hello world" - data_exchange = {} - - create_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_exchange_client_stub.call_count - end - end - end - - def test_update_data_exchange - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_exchange = {} - - update_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_exchange_client_stub.call_count - end - end - end - - def test_delete_data_exchange - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_exchange({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_exchange name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_exchange({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_exchange_client_stub.call_count - end - end - end - - def test_list_listings - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_listings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_listings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_listings_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_listings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_listings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_listings ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_listings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_listings(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_listings_client_stub.call_count - end - end - end - - def test_get_listing - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_listing({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_listing name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_listing({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_listing_client_stub.call_count - end - end - end - - def test_create_listing - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - listing_id = "hello world" - listing = {} - - create_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_listing parent: parent, listing_id: listing_id, listing: listing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_listing_client_stub.call_count - end - end - end - - def test_update_listing - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - listing = {} - - update_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_listing({ update_mask: update_mask, listing: listing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_listing update_mask: update_mask, listing: listing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_listing({ update_mask: update_mask, listing: listing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_listing_client_stub.call_count - end - end - end - - def test_delete_listing - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delete_commercial = true - - delete_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_listing({ name: name, delete_commercial: delete_commercial }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_listing name: name, delete_commercial: delete_commercial do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_listing({ name: name, delete_commercial: delete_commercial }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_listing_client_stub.call_count - end - end - end - - def test_subscribe_listing - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - destination_dataset = {} - name = "hello world" - - subscribe_listing_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_subscribe_listing_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, subscribe_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.subscribe_listing destination_dataset: destination_dataset, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.subscribe_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.subscribe_listing({ destination_dataset: destination_dataset, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.subscribe_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, subscribe_listing_client_stub.call_count - end - end - end - - def test_subscribe_data_exchange - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - destination = "hello world" - destination_dataset = {} - subscription = "hello world" - subscriber_contact = "hello world" - - subscribe_data_exchange_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_subscribe_data_exchange_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, subscribe_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.subscribe_data_exchange name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.subscribe_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.subscribe_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, subscribe_data_exchange_client_stub.call_count - end - end - end - - def test_refresh_subscription - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - refresh_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_refresh_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, refresh_subscription_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.refresh_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.refresh_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.refresh_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.refresh_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.refresh_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, refresh_subscription_client_stub.call_count - end - end - end - - def test_get_subscription - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_subscription_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_subscription_client_stub.call_count - end - end - end - - def test_list_subscriptions - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_subscriptions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_subscriptions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_subscriptions({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_subscriptions parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_subscriptions({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_subscriptions_client_stub.call_count - end - end - end - - def test_list_shared_resource_subscriptions - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - include_deleted_subscriptions = true - page_size = 42 - page_token = "hello world" - - list_shared_resource_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_shared_resource_subscriptions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_shared_resource_subscriptions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_shared_resource_subscriptions resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_shared_resource_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_shared_resource_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_shared_resource_subscriptions_client_stub.call_count - end - end - end - - def test_revoke_subscription - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revoke_commercial = true - - revoke_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_revoke_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, revoke_subscription_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.revoke_subscription name: name, revoke_commercial: revoke_commercial do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.revoke_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.revoke_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, revoke_subscription_client_stub.call_count - end - end - end - - def test_delete_subscription - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_subscription_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_subscription_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_create_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query_template_id = "hello world" - query_template = {} - - create_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_create_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_query_template parent: parent, query_template_id: query_template_id, query_template: query_template do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_query_template_client_stub.call_count - end - end - end - - def test_get_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_get_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_query_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_query_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_query_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_query_template_client_stub.call_count - end - end - end - - def test_list_query_templates - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_query_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_list_query_templates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_query_templates_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_query_templates({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_query_templates parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_query_templates ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_query_templates({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_query_templates(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_query_templates_client_stub.call_count - end - end - end - - def test_update_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - query_template = {} - - update_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_update_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_query_template({ update_mask: update_mask, query_template: query_template }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_query_template update_mask: update_mask, query_template: query_template do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_query_template({ update_mask: update_mask, query_template: query_template }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_query_template_client_stub.call_count - end - end - end - - def test_delete_query_template - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_delete_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_query_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_query_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_query_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_query_template_client_stub.call_count - end - end - end - - def test_submit_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - submit_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_submit_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, submit_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.submit_query_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.submit_query_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.submit_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.submit_query_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.submit_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, submit_query_template_client_stub.call_count - end - end - end - - def test_approve_query_template - # Create test objects. - client_result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - approve_query_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.stub :transcode_approve_query_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, approve_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.approve_query_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.approve_query_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.approve_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.approve_query_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.approve_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, approve_query_template_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb deleted file mode 100644 index d7a2f31e978f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service_test.rb +++ /dev/null @@ -1,1914 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb" -require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service" - -class ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_data_exchanges - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_exchanges, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_exchanges_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_exchanges parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_exchanges({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_exchanges_client_stub.call_rpc_count - end - end - - def test_list_org_data_exchanges - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - organization = "hello world" - page_size = 42 - page_token = "hello world" - - list_org_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_org_data_exchanges, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, request - assert_equal "hello world", request["organization"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_org_data_exchanges_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_org_data_exchanges organization: organization, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_org_data_exchanges ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_org_data_exchanges({ organization: organization, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_org_data_exchanges(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new(organization: organization, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_org_data_exchanges_client_stub.call_rpc_count - end - end - - def test_get_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_exchange({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_exchange name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_exchange({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_exchange_client_stub.call_rpc_count - end - end - - def test_create_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_exchange_id = "hello world" - data_exchange = {} - - create_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_exchange_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange), request["data_exchange"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_exchange_client_stub.call_rpc_count - end - end - - def test_update_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_exchange = {} - - update_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange), request["data_exchange"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_exchange_client_stub.call_rpc_count - end - end - - def test_delete_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_exchange({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_exchange name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_exchange({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_exchange_client_stub.call_rpc_count - end - end - - def test_list_listings - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_listings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_listings, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_listings_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_listings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_listings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_listings ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_listings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_listings(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_listings_client_stub.call_rpc_count - end - end - - def test_get_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_listing({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_listing name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_listing({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_listing_client_stub.call_rpc_count - end - end - - def test_create_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - listing_id = "hello world" - listing = {} - - create_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["listing_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing), request["listing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_listing parent: parent, listing_id: listing_id, listing: listing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_listing_client_stub.call_rpc_count - end - end - - def test_update_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - listing = {} - - update_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing), request["listing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_listing({ update_mask: update_mask, listing: listing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_listing update_mask: update_mask, listing: listing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_listing({ update_mask: update_mask, listing: listing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_listing_client_stub.call_rpc_count - end - end - - def test_delete_listing - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delete_commercial = true - - delete_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["delete_commercial"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_listing({ name: name, delete_commercial: delete_commercial }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_listing name: name, delete_commercial: delete_commercial do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_listing({ name: name, delete_commercial: delete_commercial }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new(name: name, delete_commercial: delete_commercial), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_listing_client_stub.call_rpc_count - end - end - - def test_subscribe_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - destination_dataset = {} - name = "hello world" - - subscribe_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :subscribe_listing, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset), request["destination_dataset"] - assert_equal :destination_dataset, request.destination - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, subscribe_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.subscribe_listing destination_dataset: destination_dataset, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.subscribe_listing ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.subscribe_listing({ destination_dataset: destination_dataset, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.subscribe_listing(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, subscribe_listing_client_stub.call_rpc_count - end - end - - def test_subscribe_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - destination = "hello world" - destination_dataset = {} - subscription = "hello world" - subscriber_contact = "hello world" - - subscribe_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :subscribe_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["destination"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset), request["destination_dataset"] - assert_equal "hello world", request["subscription"] - assert_equal "hello world", request["subscriber_contact"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, subscribe_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.subscribe_data_exchange name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.subscribe_data_exchange ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.subscribe_data_exchange({ name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.subscribe_data_exchange(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new(name: name, destination: destination, destination_dataset: destination_dataset, subscription: subscription, subscriber_contact: subscriber_contact), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, subscribe_data_exchange_client_stub.call_rpc_count - end - end - - def test_refresh_subscription - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - refresh_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :refresh_subscription, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, refresh_subscription_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.refresh_subscription({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.refresh_subscription name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.refresh_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.refresh_subscription({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.refresh_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, refresh_subscription_client_stub.call_rpc_count - end - end - - def test_get_subscription - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_subscription, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_subscription_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_subscription({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_subscription name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_subscription({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_subscription_client_stub.call_rpc_count - end - end - - def test_list_subscriptions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_subscriptions, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_subscriptions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_subscriptions({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_subscriptions parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_subscriptions({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_subscriptions_client_stub.call_rpc_count - end - end - - def test_list_shared_resource_subscriptions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - include_deleted_subscriptions = true - page_size = 42 - page_token = "hello world" - - list_shared_resource_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_shared_resource_subscriptions, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal true, request["include_deleted_subscriptions"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_shared_resource_subscriptions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_shared_resource_subscriptions resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_shared_resource_subscriptions ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_shared_resource_subscriptions({ resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_shared_resource_subscriptions(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new(resource: resource, include_deleted_subscriptions: include_deleted_subscriptions, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_shared_resource_subscriptions_client_stub.call_rpc_count - end - end - - def test_revoke_subscription - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revoke_commercial = true - - revoke_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :revoke_subscription, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["revoke_commercial"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, revoke_subscription_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.revoke_subscription name: name, revoke_commercial: revoke_commercial do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.revoke_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.revoke_subscription({ name: name, revoke_commercial: revoke_commercial }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.revoke_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new(name: name, revoke_commercial: revoke_commercial), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, revoke_subscription_client_stub.call_rpc_count - end - end - - def test_delete_subscription - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_subscription, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_subscription_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_subscription({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_subscription name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_subscription ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_subscription({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_subscription(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_subscription_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_create_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query_template_id = "hello world" - query_template = {} - - create_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query_template_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate), request["query_template"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_query_template parent: parent, query_template_id: query_template_id, query_template: query_template do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_query_template({ parent: parent, query_template_id: query_template_id, query_template: query_template }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest.new(parent: parent, query_template_id: query_template_id, query_template: query_template), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_query_template_client_stub.call_rpc_count - end - end - - def test_get_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_query_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_query_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_query_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_query_template_client_stub.call_rpc_count - end - end - - def test_list_query_templates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_query_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_query_templates, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_query_templates_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_query_templates({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_query_templates parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_query_templates ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_query_templates({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_query_templates(::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_query_templates_client_stub.call_rpc_count - end - end - - def test_update_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - query_template = {} - - update_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate), request["query_template"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_query_template({ update_mask: update_mask, query_template: query_template }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_query_template update_mask: update_mask, query_template: query_template do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_query_template({ update_mask: update_mask, query_template: query_template }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest.new(update_mask: update_mask, query_template: query_template), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_query_template_client_stub.call_rpc_count - end - end - - def test_delete_query_template - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_query_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_query_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_query_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_query_template_client_stub.call_rpc_count - end - end - - def test_submit_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - submit_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :submit_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, submit_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.submit_query_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.submit_query_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.submit_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.submit_query_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.submit_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, submit_query_template_client_stub.call_rpc_count - end - end - - def test_approve_query_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - approve_query_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :approve_query_template, name - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, approve_query_template_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.approve_query_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.approve_query_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.approve_query_template ::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.approve_query_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.approve_query_template(::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, approve_query_template_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-analytics_hub-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-connection-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-connection-v1/.repo-metadata.json deleted file mode 100644 index 137868d89899..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "bigqueryconnection.googleapis.com", - "api_shortname": "bigqueryconnection", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-connection-v1/latest", - "distribution_name": "google-cloud-bigquery-connection-v1", - "is_cloud": true, - "language": "ruby", - "name": "bigqueryconnection", - "name_pretty": "BigQuery Connection V1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs/reference/bigqueryconnection", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The BigQuery Connection API allows users to manage BigQuery connections to external data sources. Note that google-cloud-bigquery-connection-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-connection instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BIGQUERY_CONNECTION", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/bigqueryconnection", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-connection-v1/.rubocop.yml deleted file mode 100644 index 96bdb8ab4f80..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-connection-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-connection-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-connection-v1/.yardopts deleted file mode 100644 index 745155345cd4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Connection V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/AUTHENTICATION.md deleted file mode 100644 index bb4a847fed2a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-connection-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-connection-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/connection/v1" - -client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/connection/v1" - -::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-bigquery-connection-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/connection/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-connection-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/README.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/README.md deleted file mode 100644 index 812740de6cb8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Connection V1 API - -Allows users to manage BigQuery connections to external data sources. - -The BigQuery Connection API allows users to manage BigQuery connections to external data sources. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Connection V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-connection](https://rubygems.org/gems/google-cloud-bigquery-connection). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-connection-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/bigqueryconnection.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/connection/v1" - -client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new -request = ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new # (request fields as keyword arguments...) -response = client.create_connection request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-connection-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/bigqueryconnection) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/bigquery/connection/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-bigquery-connection`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-connection-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-connection`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-bigquery-connection-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-connection-v1/Rakefile deleted file mode 100644 index c30d4af45324..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-connection-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BIGQUERY_CONNECTION_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BIGQUERY_CONNECTION_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BIGQUERY_CONNECTION_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BIGQUERY_CONNECTION_TEST_PROJECT=test123 BIGQUERY_CONNECTION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/connection/v1/connection_service/credentials" - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BIGQUERY_CONNECTION_PROJECT"] = project - ENV["BIGQUERY_CONNECTION_TEST_PROJECT"] = project - ENV["BIGQUERY_CONNECTION_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-connection-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-connection-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-connection-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-connection-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-connection-v1" - header "google-cloud-bigquery-connection-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-connection-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-connection-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-connection-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-connection-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-connection-v1/gapic_metadata.json deleted file mode 100644 index 561e530ec862..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.connection.v1", - "libraryPackage": "::Google::Cloud::Bigquery::Connection::V1", - "services": { - "ConnectionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client", - "rpcs": { - "CreateConnection": { - "methods": [ - "create_connection" - ] - }, - "GetConnection": { - "methods": [ - "get_connection" - ] - }, - "ListConnections": { - "methods": [ - "list_connections" - ] - }, - "UpdateConnection": { - "methods": [ - "update_connection" - ] - }, - "DeleteConnection": { - "methods": [ - "delete_connection" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec deleted file mode 100644 index 0d6c71d0297e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/google-cloud-bigquery-connection-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/connection/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-connection-v1" - gem.version = Google::Cloud::Bigquery::Connection::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The BigQuery Connection API allows users to manage BigQuery connections to external data sources. Note that google-cloud-bigquery-connection-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-connection instead. See the readme for more details." - gem.summary = "Allows users to manage BigQuery connections to external data sources." - 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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google-cloud-bigquery-connection-v1.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google-cloud-bigquery-connection-v1.rb deleted file mode 100644 index 32fd5f734450..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google-cloud-bigquery-connection-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/connection/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1.rb deleted file mode 100644 index d79993abf9d9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/connection/v1/connection_service" -require "google/cloud/bigquery/connection/v1/version" - -module Google - module Cloud - module Bigquery - module Connection - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/connection/v1" - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/connection/v1" - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/connection/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_pb.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_pb.rb deleted file mode 100644 index 2235398a9ca7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/connection/v1/connection.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n4google/cloud/bigquery/connection/v1/connection.proto\x12#google.cloud.bigquery.connection.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xba\x01\n\x17\x43reateConnectionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rconnection_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12H\n\nconnection\x18\x03 \x01(\x0b\x32/.google.cloud.bigquery.connection.v1.ConnectionB\x03\xe0\x41\x02\"Z\n\x14GetConnectionRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\"\x7f\n\x16ListConnectionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x03 \x01(\t\"x\n\x17ListConnectionsResponse\x12\x17\n\x0fnext_page_token\x18\x01 \x01(\t\x12\x44\n\x0b\x63onnections\x18\x02 \x03(\x0b\x32/.google.cloud.bigquery.connection.v1.Connection\"\xdd\x01\n\x17UpdateConnectionRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\x12H\n\nconnection\x18\x02 \x01(\x0b\x32/.google.cloud.bigquery.connection.v1.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"]\n\x17\x44\x65leteConnectionRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\"\xda\x06\n\nConnection\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rfriendly_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12L\n\tcloud_sql\x18\x04 \x01(\x0b\x32\x37.google.cloud.bigquery.connection.v1.CloudSqlPropertiesH\x00\x12\x41\n\x03\x61ws\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.connection.v1.AwsPropertiesH\x00\x12\x45\n\x05\x61zure\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.connection.v1.AzurePropertiesH\x00\x12T\n\rcloud_spanner\x18\x15 \x01(\x0b\x32;.google.cloud.bigquery.connection.v1.CloudSpannerPropertiesH\x00\x12V\n\x0e\x63loud_resource\x18\x16 \x01(\x0b\x32<.google.cloud.bigquery.connection.v1.CloudResourcePropertiesH\x00\x12\x45\n\x05spark\x18\x17 \x01(\x0b\x32\x34.google.cloud.bigquery.connection.v1.SparkPropertiesH\x00\x12h\n\x15salesforce_data_cloud\x18\x18 \x01(\x0b\x32\x42.google.cloud.bigquery.connection.v1.SalesforceDataCloudPropertiesB\x03\xe0\x41\x01H\x00\x12\x1a\n\rcreation_time\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12last_modified_time\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0ehas_credential\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03:s\xea\x41p\n,bigqueryconnection.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"\xca\x02\n\x12\x43loudSqlProperties\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12R\n\x04type\x18\x03 \x01(\x0e\x32\x44.google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType\x12P\n\ncredential\x18\x04 \x01(\x0b\x32\x37.google.cloud.bigquery.connection.v1.CloudSqlCredentialB\x03\xe0\x41\x04\x12\x1f\n\x12service_account_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\"F\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08POSTGRES\x10\x01\x12\t\n\x05MYSQL\x10\x02\"8\n\x12\x43loudSqlCredential\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xb2\x01\n\x16\x43loudSpannerProperties\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x17\n\x0fuse_parallelism\x18\x02 \x01(\x08\x12\x17\n\x0fmax_parallelism\x18\x05 \x01(\x05\x12 \n\x18use_serverless_analytics\x18\x03 \x01(\x08\x12\x16\n\x0euse_data_boost\x18\x06 \x01(\x08\x12\x1a\n\rdatabase_role\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xcf\x01\n\rAwsProperties\x12Z\n\x12\x63ross_account_role\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.connection.v1.AwsCrossAccountRoleB\x02\x18\x01H\x00\x12I\n\x0b\x61\x63\x63\x65ss_role\x18\x03 \x01(\x0b\x32\x32.google.cloud.bigquery.connection.v1.AwsAccessRoleH\x00\x42\x17\n\x15\x61uthentication_method\"^\n\x13\x41wsCrossAccountRole\x12\x13\n\x0biam_role_id\x18\x01 \x01(\t\x12\x18\n\x0biam_user_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\"6\n\rAwsAccessRole\x12\x13\n\x0biam_role_id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\"\xcd\x01\n\x0f\x41zureProperties\x12\x18\n\x0b\x61pplication\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tclient_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tobject_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\x12\x63ustomer_tenant_id\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x05 \x01(\t\x12\'\n\x1f\x66\x65\x64\x65rated_application_client_id\x18\x06 \x01(\t\x12\x15\n\x08identity\x18\x07 \x01(\tB\x03\xe0\x41\x03\":\n\x17\x43loudResourceProperties\x12\x1f\n\x12service_account_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\"]\n\x16MetastoreServiceConfig\x12\x43\n\x11metastore_service\x18\x01 \x01(\tB(\xe0\x41\x01\xfa\x41\"\n metastore.googleapis.com/Service\"]\n\x18SparkHistoryServerConfig\x12\x41\n\x10\x64\x61taproc_cluster\x18\x01 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x64\x61taproc.googleapis.com/Cluster\"\xff\x01\n\x0fSparkProperties\x12\x1f\n\x12service_account_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x18metastore_service_config\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.connection.v1.MetastoreServiceConfigB\x03\xe0\x41\x01\x12g\n\x1bspark_history_server_config\x18\x04 \x01(\x0b\x32=.google.cloud.bigquery.connection.v1.SparkHistoryServerConfigB\x03\xe0\x41\x01\"_\n\x1dSalesforceDataCloudProperties\x12\x14\n\x0cinstance_uri\x18\x01 \x01(\t\x12\x15\n\x08identity\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\ttenant_id\x18\x03 \x01(\t2\xcc\r\n\x11\x43onnectionService\x12\xe8\x01\n\x10\x43reateConnection\x12<.google.cloud.bigquery.connection.v1.CreateConnectionRequest\x1a/.google.cloud.bigquery.connection.v1.Connection\"e\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/connections:\nconnection\x12\xbb\x01\n\rGetConnection\x12\x39.google.cloud.bigquery.connection.v1.GetConnectionRequest\x1a/.google.cloud.bigquery.connection.v1.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/connections/*}\x12\xce\x01\n\x0fListConnections\x12;.google.cloud.bigquery.connection.v1.ListConnectionsRequest\x1a<.google.cloud.bigquery.connection.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/connections\x12\xe4\x01\n\x10UpdateConnection\x12<.google.cloud.bigquery.connection.v1.UpdateConnectionRequest\x1a/.google.cloud.bigquery.connection.v1.Connection\"a\xda\x41\x1bname,connection,update_mask\x82\xd3\xe4\x93\x02=2//v1/{name=projects/*/locations/*/connections/*}:\nconnection\x12\xa8\x01\n\x10\x44\x65leteConnection\x12<.google.cloud.bigquery.connection.v1.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/connections/*}\x12\xa9\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"^\xda\x41\x10resource,options\x82\xd3\xe4\x93\x02\x45\"@/v1/{resource=projects/*/locations/*/connections/*}:getIamPolicy:\x01*\x12\xa8\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"]\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x45\"@/v1/{resource=projects/*/locations/*/connections/*}:setIamPolicy:\x01*\x12\xd3\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"h\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02K\"F/v1/{resource=projects/*/locations/*/connections/*}:testIamPermissions:\x01*\x1a~\xca\x41!bigqueryconnection.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xfd\x02\n\'com.google.cloud.bigquery.connection.v1P\x01ZGcloud.google.com/go/bigquery/connection/apiv1/connectionpb;connectionpb\xaa\x02#Google.Cloud.BigQuery.Connection.V1\xca\x02#Google\\Cloud\\BigQuery\\Connection\\V1\xea\x41Y\n\x1f\x64\x61taproc.googleapis.com/Cluster\x12\x36projects/{project}/regions/{region}/clusters/{cluster}\xea\x41^\n metastore.googleapis.com/Service\x12:projects/{project}/locations/{location}/services/{service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Connection - module V1 - CreateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CreateConnectionRequest").msgclass - GetConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.GetConnectionRequest").msgclass - ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.ListConnectionsRequest").msgclass - ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.ListConnectionsResponse").msgclass - UpdateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.UpdateConnectionRequest").msgclass - DeleteConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.DeleteConnectionRequest").msgclass - Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.Connection").msgclass - CloudSqlProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlProperties").msgclass - CloudSqlProperties::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType").enummodule - CloudSqlCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlCredential").msgclass - CloudSpannerProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSpannerProperties").msgclass - AwsProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsProperties").msgclass - AwsCrossAccountRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsCrossAccountRole").msgclass - AwsAccessRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsAccessRole").msgclass - AzureProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AzureProperties").msgclass - CloudResourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudResourceProperties").msgclass - MetastoreServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.MetastoreServiceConfig").msgclass - SparkHistoryServerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.SparkHistoryServerConfig").msgclass - SparkProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.SparkProperties").msgclass - SalesforceDataCloudProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service.rb deleted file mode 100644 index d4140bdaa896..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/connection/v1/version" - -require "google/cloud/bigquery/connection/v1/connection_service/credentials" -require "google/cloud/bigquery/connection/v1/connection_service/paths" -require "google/cloud/bigquery/connection/v1/connection_service/client" -require "google/cloud/bigquery/connection/v1/connection_service/rest" - -module Google - module Cloud - module Bigquery - module Connection - module V1 - ## - # Manages external data source connections and credentials. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/connection/v1/connection_service" - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/connection/v1/connection_service/rest" - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - module ConnectionService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "connection_service", "helpers.rb" -require "google/cloud/bigquery/connection/v1/connection_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb deleted file mode 100644 index 4eb76da7998d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb +++ /dev/null @@ -1,1202 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/connection/v1/connection_pb" - -module Google - module Cloud - module Bigquery - module Connection - module V1 - module ConnectionService - ## - # Client for the ConnectionService service. - # - # Manages external data source connections and credentials. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigqueryconnection.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :connection_service_stub - - ## - # Configure the ConnectionService Client class. - # - # See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConnectionService clients - # ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "Connection", "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_connection.timeout = 60.0 - - default_config.rpcs.get_connection.timeout = 60.0 - default_config.rpcs.get_connection.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_connections.timeout = 60.0 - default_config.rpcs.list_connections.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_connection.timeout = 60.0 - - default_config.rpcs.delete_connection.timeout = 60.0 - default_config.rpcs.delete_connection.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConnectionService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @connection_service_stub.universe_domain - end - - ## - # Create a new ConnectionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConnectionService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/bigquery/connection/v1/connection_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @connection_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @connection_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 - @connection_service_stub.logger - end - - # Service calls - - ## - # Creates a new connection. - # - # @overload create_connection(request, options = nil) - # Pass arguments to `create_connection` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_connection(parent: nil, connection_id: nil, connection: nil) - # Pass arguments to `create_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # Must be in the format `projects/{project_id}/locations/{location_id}` - # @param connection_id [::String] - # Optional. Connection id that should be assigned to the created connection. - # @param connection [::Google::Cloud::Bigquery::Connection::V1::Connection, ::Hash] - # Required. Connection to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new - # - # # Call the create_connection method. - # result = client.create_connection request - # - # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - # p result - # - def create_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.call_rpc :create_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns specified connection. - # - # @overload get_connection(request, options = nil) - # Pass arguments to `get_connection` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_connection(name: nil) - # Pass arguments to `get_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested connection, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new - # - # # Call the get_connection method. - # result = client.get_connection request - # - # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - # p result - # - def get_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.call_rpc :get_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of connections in the given project. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_connections(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # Must be in the form: `projects/{project_id}/locations/{location_id}` - # @param page_size [::Integer] - # Required. Page size. - # @param page_token [::String] - # Page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Connection::V1::Connection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Connection::V1::Connection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Connection::V1::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.call_rpc :list_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @connection_service_stub, :list_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified connection. For security reasons, also resets - # credential if connection properties are in the update field mask. - # - # @overload update_connection(request, options = nil) - # Pass arguments to `update_connection` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_connection(name: nil, connection: nil, update_mask: nil) - # Pass arguments to `update_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the connection to update, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # @param connection [::Google::Cloud::Bigquery::Connection::V1::Connection, ::Hash] - # Required. Connection containing the updated fields. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Update mask for the connection fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new - # - # # Call the update_connection method. - # result = client.update_connection request - # - # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - # p result - # - def update_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.call_rpc :update_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes connection and associated credential. - # - # @overload delete_connection(request, options = nil) - # Pass arguments to `delete_connection` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_connection(name: nil) - # Pass arguments to `delete_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the deleted connection, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new - # - # # Call the delete_connection method. - # result = client.delete_connection request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.call_rpc :delete_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION - metadata[:"x-goog-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 - - @connection_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # - # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION - metadata[:"x-goog-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 - - @connection_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a `NOT_FOUND` error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION - metadata[:"x-goog-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 - - @connection_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConnectionService API. - # - # This class represents the configuration for ConnectionService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_connection to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_connection.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_connection.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "bigqueryconnection.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ConnectionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connection - ## - # RPC-specific configuration for `get_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connection - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - ## - # RPC-specific configuration for `update_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connection - ## - # RPC-specific configuration for `delete_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connection - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection - @create_connection = ::Gapic::Config::Method.new create_connection_config - get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection - @get_connection = ::Gapic::Config::Method.new get_connection_config - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection - @update_connection = ::Gapic::Config::Method.new update_connection_config - delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection - @delete_connection = ::Gapic::Config::Method.new delete_connection_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/credentials.rb deleted file mode 100644 index 176f6fd7904c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/credentials.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module Connection - module V1 - module ConnectionService - # Credentials for the ConnectionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BIGQUERY_CONNECTION_CREDENTIALS", - "BIGQUERY_CONNECTION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BIGQUERY_CONNECTION_CREDENTIALS_JSON", - "BIGQUERY_CONNECTION_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/paths.rb deleted file mode 100644 index 4381ee78ebc8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/paths.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Connection - module V1 - module ConnectionService - # Path helper methods for the ConnectionService API. - module Paths - ## - # Create a fully-qualified Cluster resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/clusters/{cluster}` - # - # @param project [String] - # @param region [String] - # @param cluster [String] - # - # @return [::String] - def cluster_path project:, region:, cluster: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/clusters/#{cluster}" - end - - ## - # Create a fully-qualified Connection resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # - # @return [::String] - def connection_path project:, location:, connection: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}" - 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 Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/services/#{service}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest.rb deleted file mode 100644 index bad778c25357..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/connection/v1/version" - -require "google/cloud/bigquery/connection/v1/connection_service/credentials" -require "google/cloud/bigquery/connection/v1/connection_service/paths" -require "google/cloud/bigquery/connection/v1/connection_service/rest/client" - -module Google - module Cloud - module Bigquery - module Connection - module V1 - ## - # Manages external data source connections and credentials. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/connection/v1/connection_service/rest" - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - module ConnectionService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/connection/v1/connection_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/client.rb deleted file mode 100644 index d0206f090d15..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/client.rb +++ /dev/null @@ -1,1103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/connection/v1/connection_pb" -require "google/cloud/bigquery/connection/v1/connection_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module Connection - module V1 - module ConnectionService - module Rest - ## - # REST client for the ConnectionService service. - # - # Manages external data source connections and credentials. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigqueryconnection.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :connection_service_stub - - ## - # Configure the ConnectionService Client class. - # - # See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ConnectionService clients - # ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "Connection", "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_connection.timeout = 60.0 - - default_config.rpcs.get_connection.timeout = 60.0 - default_config.rpcs.get_connection.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_connections.timeout = 60.0 - default_config.rpcs.list_connections.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_connection.timeout = 60.0 - - default_config.rpcs.delete_connection.timeout = 60.0 - default_config.rpcs.delete_connection.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ConnectionService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::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 - @connection_service_stub.universe_domain - end - - ## - # Create a new ConnectionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ConnectionService 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 - - @connection_service_stub = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @connection_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 - @connection_service_stub.logger - end - - # Service calls - - ## - # Creates a new connection. - # - # @overload create_connection(request, options = nil) - # Pass arguments to `create_connection` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_connection(parent: nil, connection_id: nil, connection: nil) - # Pass arguments to `create_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # Must be in the format `projects/{project_id}/locations/{location_id}` - # @param connection_id [::String] - # Optional. Connection id that should be assigned to the created connection. - # @param connection [::Google::Cloud::Bigquery::Connection::V1::Connection, ::Hash] - # Required. Connection to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new - # - # # Call the create_connection method. - # result = client.create_connection request - # - # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - # p result - # - def create_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.create_connection request, 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 specified connection. - # - # @overload get_connection(request, options = nil) - # Pass arguments to `get_connection` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_connection(name: nil) - # Pass arguments to `get_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested connection, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new - # - # # Call the get_connection method. - # result = client.get_connection request - # - # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - # p result - # - def get_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.get_connection request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of connections in the given project. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_connections(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # Must be in the form: `projects/{project_id}/locations/{location_id}` - # @param page_size [::Integer] - # Required. Page size. - # @param page_token [::String] - # Page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Connection::V1::Connection>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Connection::V1::Connection>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Connection::V1::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_connections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.list_connections request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @connection_service_stub, :list_connections, "connections", request, result, 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 connection. For security reasons, also resets - # credential if connection properties are in the update field mask. - # - # @overload update_connection(request, options = nil) - # Pass arguments to `update_connection` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_connection(name: nil, connection: nil, update_mask: nil) - # Pass arguments to `update_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the connection to update, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # @param connection [::Google::Cloud::Bigquery::Connection::V1::Connection, ::Hash] - # Required. Connection containing the updated fields. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Update mask for the connection fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new - # - # # Call the update_connection method. - # result = client.update_connection request - # - # # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - # p result - # - def update_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.update_connection request, 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 connection and associated credential. - # - # @overload delete_connection(request, options = nil) - # Pass arguments to `delete_connection` via a request object, either of type - # {::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_connection(name: nil) - # Pass arguments to `delete_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the deleted connection, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new - # - # # Call the delete_connection method. - # result = client.delete_connection request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @connection_service_stub.delete_connection request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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 - - @connection_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # - # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @connection_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a `NOT_FOUND` error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/connection/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @connection_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ConnectionService REST API. - # - # This class represents the configuration for ConnectionService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_connection to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_connection.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_connection.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "bigqueryconnection.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ConnectionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connection - ## - # RPC-specific configuration for `get_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connection - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - ## - # RPC-specific configuration for `update_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connection - ## - # RPC-specific configuration for `delete_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connection - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection - @create_connection = ::Gapic::Config::Method.new create_connection_config - get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection - @get_connection = ::Gapic::Config::Method.new get_connection_config - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection - @update_connection = ::Gapic::Config::Method.new update_connection_config - delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection - @delete_connection = ::Gapic::Config::Method.new delete_connection_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/service_stub.rb deleted file mode 100644 index 73162bbb8e85..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_service/rest/service_stub.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/bigquery/connection/v1/connection_pb" - -module Google - module Cloud - module Bigquery - module Connection - module V1 - module ConnectionService - module Rest - ## - # REST service stub for the ConnectionService 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_connection REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # A result object deserialized from the server's reply - def create_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Connection::V1::Connection.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_connection REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # A result object deserialized from the server's reply - def get_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Connection::V1::Connection.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_connections REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse] - # A result object deserialized from the server's reply - def list_connections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_connections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_connection REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Connection::V1::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # A result object deserialized from the server's reply - def update_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Connection::V1::Connection.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_connection REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_connection REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/connections", - body: "connection", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_connection REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_connections REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_connections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/connections", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_connection REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "connection", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_connection REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb deleted file mode 100644 index 3ae4a6f5dca0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb +++ /dev/null @@ -1,73 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/connection/v1/connection.proto for package 'google.cloud.bigquery.connection.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/bigquery/connection/v1/connection_pb' - -module Google - module Cloud - module Bigquery - module Connection - module V1 - module ConnectionService - # Manages external data source connections and credentials. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.connection.v1.ConnectionService' - - # Creates a new connection. - rpc :CreateConnection, ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest, ::Google::Cloud::Bigquery::Connection::V1::Connection - # Returns specified connection. - rpc :GetConnection, ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest, ::Google::Cloud::Bigquery::Connection::V1::Connection - # Returns a list of connections in the given project. - rpc :ListConnections, ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest, ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse - # Updates the specified connection. For security reasons, also resets - # credential if connection properties are in the update field mask. - rpc :UpdateConnection, ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest, ::Google::Cloud::Bigquery::Connection::V1::Connection - # Deletes connection and associated credential. - rpc :DeleteConnection, ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest, ::Google::Protobuf::Empty - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # - # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a `NOT_FOUND` error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/rest.rb deleted file mode 100644 index 60a27346974b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/connection/v1/connection_service/rest" -require "google/cloud/bigquery/connection/v1/version" - -module Google - module Cloud - module Bigquery - module Connection - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/connection/v1/rest" - # client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/version.rb deleted file mode 100644 index 75be6e0a8d53..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/lib/google/cloud/bigquery/connection/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Connection - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/README.md deleted file mode 100644 index c8c765733a5d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Connection V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/cloud/bigquery/connection/v1/connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/cloud/bigquery/connection/v1/connection.rb deleted file mode 100644 index 6e7a038c7c2c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/cloud/bigquery/connection/v1/connection.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! - - -module Google - module Cloud - module Bigquery - module Connection - module V1 - # The request for - # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#create_connection ConnectionService.CreateConnection}. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # Must be in the format `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] connection_id - # @return [::String] - # Optional. Connection id that should be assigned to the created connection. - # @!attribute [rw] connection - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # Required. Connection to create. - class CreateConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_connection ConnectionService.GetConnection}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested connection, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - class GetConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections ConnectionService.ListConnections}. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # Must be in the form: `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Required. Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token. - class ListConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections ConnectionService.ListConnections}. - # @!attribute [rw] next_page_token - # @return [::String] - # Next page token. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::Bigquery::Connection::V1::Connection>] - # List of connections. - class ListConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#update_connection ConnectionService.UpdateConnection}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the connection to update, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # @!attribute [rw] connection - # @return [::Google::Cloud::Bigquery::Connection::V1::Connection] - # Required. Connection containing the updated fields. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Update mask for the connection fields to be updated. - class UpdateConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for [ConnectionService.DeleteConnectionRequest][]. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the deleted connection, for example: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - class DeleteConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration parameters to establish connection with an external data - # source, except the credential attributes. - # @!attribute [rw] name - # @return [::String] - # The resource name of the connection in the form of: - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # @!attribute [rw] friendly_name - # @return [::String] - # User provided display name for the connection. - # @!attribute [rw] description - # @return [::String] - # User provided description. - # @!attribute [rw] cloud_sql - # @return [::Google::Cloud::Bigquery::Connection::V1::CloudSqlProperties] - # Cloud SQL properties. - # - # Note: The following fields are mutually exclusive: `cloud_sql`, `aws`, `azure`, `cloud_spanner`, `cloud_resource`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] aws - # @return [::Google::Cloud::Bigquery::Connection::V1::AwsProperties] - # Amazon Web Services (AWS) properties. - # - # Note: The following fields are mutually exclusive: `aws`, `cloud_sql`, `azure`, `cloud_spanner`, `cloud_resource`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure - # @return [::Google::Cloud::Bigquery::Connection::V1::AzureProperties] - # Azure properties. - # - # Note: The following fields are mutually exclusive: `azure`, `cloud_sql`, `aws`, `cloud_spanner`, `cloud_resource`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_spanner - # @return [::Google::Cloud::Bigquery::Connection::V1::CloudSpannerProperties] - # Cloud Spanner properties. - # - # Note: The following fields are mutually exclusive: `cloud_spanner`, `cloud_sql`, `aws`, `azure`, `cloud_resource`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_resource - # @return [::Google::Cloud::Bigquery::Connection::V1::CloudResourceProperties] - # Cloud Resource properties. - # - # Note: The following fields are mutually exclusive: `cloud_resource`, `cloud_sql`, `aws`, `azure`, `cloud_spanner`, `spark`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] spark - # @return [::Google::Cloud::Bigquery::Connection::V1::SparkProperties] - # Spark properties. - # - # Note: The following fields are mutually exclusive: `spark`, `cloud_sql`, `aws`, `azure`, `cloud_spanner`, `cloud_resource`, `salesforce_data_cloud`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] salesforce_data_cloud - # @return [::Google::Cloud::Bigquery::Connection::V1::SalesforceDataCloudProperties] - # Optional. Salesforce DataCloud properties. This field is intended for - # use only by Salesforce partner projects. This field contains properties - # for your Salesforce DataCloud connection. - # - # Note: The following fields are mutually exclusive: `salesforce_data_cloud`, `cloud_sql`, `aws`, `azure`, `cloud_spanner`, `cloud_resource`, `spark`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] creation_time - # @return [::Integer] - # Output only. The creation timestamp of the connection. - # @!attribute [r] last_modified_time - # @return [::Integer] - # Output only. The last update timestamp of the connection. - # @!attribute [r] has_credential - # @return [::Boolean] - # Output only. True, if credential is configured for this connection. - class Connection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Connection properties specific to the Cloud SQL. - # @!attribute [rw] instance_id - # @return [::String] - # Cloud SQL instance ID in the form `project:location:instance`. - # @!attribute [rw] database - # @return [::String] - # Database name. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Connection::V1::CloudSqlProperties::DatabaseType] - # Type of the Cloud SQL database. - # @!attribute [rw] credential - # @return [::Google::Cloud::Bigquery::Connection::V1::CloudSqlCredential] - # Input only. Cloud SQL credential. - # @!attribute [r] service_account_id - # @return [::String] - # Output only. The account ID of the service used for the purpose of this - # connection. - # - # When the connection is used in the context of an operation in - # BigQuery, this service account will serve as the identity being used for - # connecting to the CloudSQL instance specified in this connection. - class CloudSqlProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported Cloud SQL database types. - module DatabaseType - # Unspecified database type. - DATABASE_TYPE_UNSPECIFIED = 0 - - # Cloud SQL for PostgreSQL. - POSTGRES = 1 - - # Cloud SQL for MySQL. - MYSQL = 2 - end - end - - # Credential info for the Cloud SQL. - # @!attribute [rw] username - # @return [::String] - # The username for the credential. - # @!attribute [rw] password - # @return [::String] - # The password for the credential. - class CloudSqlCredential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Connection properties specific to Cloud Spanner. - # @!attribute [rw] database - # @return [::String] - # Cloud Spanner database in the form `project/instance/database' - # @!attribute [rw] use_parallelism - # @return [::Boolean] - # If parallelism should be used when reading from Cloud Spanner - # @!attribute [rw] max_parallelism - # @return [::Integer] - # Allows setting max parallelism per query when executing on Spanner - # independent compute resources. If unspecified, default values of - # parallelism are chosen that are dependent on the Cloud Spanner instance - # configuration. - # - # REQUIRES: `use_parallelism` must be set. - # REQUIRES: Either `use_data_boost` or `use_serverless_analytics` must be - # set. - # @!attribute [rw] use_serverless_analytics - # @return [::Boolean] - # If the serverless analytics service should be used to read data from Cloud - # Spanner. - # Note: `use_parallelism` must be set when using serverless analytics. - # @!attribute [rw] use_data_boost - # @return [::Boolean] - # If set, the request will be executed via Spanner independent compute - # resources. - # REQUIRES: `use_parallelism` must be set. - # - # NOTE: `use_serverless_analytics` will be deprecated. Prefer - # `use_data_boost` over `use_serverless_analytics`. - # @!attribute [rw] database_role - # @return [::String] - # Optional. Cloud Spanner database role for fine-grained access control. - # The Cloud Spanner admin should have provisioned the database role with - # appropriate permissions, such as `SELECT` and `INSERT`. Other users should - # only use roles provided by their Cloud Spanner admins. - # - # For more details, see [About fine-grained access control] - # (https://cloud.google.com/spanner/docs/fgac-about). - # - # REQUIRES: The database role name must start with a letter, and can only - # contain letters, numbers, and underscores. - class CloudSpannerProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Connection properties specific to Amazon Web Services (AWS). - # @!attribute [rw] cross_account_role - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Bigquery::Connection::V1::AwsCrossAccountRole] - # Authentication using Google owned AWS IAM user's access key to assume - # into customer's AWS IAM Role. - # Deprecated, do not use. - # - # Note: The following fields are mutually exclusive: `cross_account_role`, `access_role`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] access_role - # @return [::Google::Cloud::Bigquery::Connection::V1::AwsAccessRole] - # Authentication using Google owned service account to assume into - # customer's AWS IAM Role. - # - # Note: The following fields are mutually exclusive: `access_role`, `cross_account_role`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AwsProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Authentication method for Amazon Web Services (AWS) that uses Google owned - # AWS IAM user's access key to assume into customer's AWS IAM Role. - # @!attribute [rw] iam_role_id - # @return [::String] - # The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - # Connection. - # @!attribute [r] iam_user_id - # @return [::String] - # Output only. Google-owned AWS IAM User for a Connection. - # @!attribute [r] external_id - # @return [::String] - # Output only. A Google-generated id for representing Connection’s identity - # in AWS. External Id is also used for preventing the Confused Deputy - # Problem. See - # https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html - class AwsCrossAccountRole - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Authentication method for Amazon Web Services (AWS) that uses Google owned - # Google service account to assume into customer's AWS IAM Role. - # @!attribute [rw] iam_role_id - # @return [::String] - # The user’s AWS IAM Role that trusts the Google-owned AWS IAM user - # Connection. - # @!attribute [rw] identity - # @return [::String] - # A unique Google-owned and Google-generated identity for the Connection. - # This identity will be used to access the user's AWS IAM Role. - class AwsAccessRole - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for connection properties specific to Azure. - # @!attribute [r] application - # @return [::String] - # Output only. The name of the Azure Active Directory Application. - # @!attribute [r] client_id - # @return [::String] - # Output only. The client id of the Azure Active Directory Application. - # @!attribute [r] object_id - # @return [::String] - # Output only. The object id of the Azure Active Directory Application. - # @!attribute [rw] customer_tenant_id - # @return [::String] - # The id of customer's directory that host the data. - # @!attribute [rw] redirect_uri - # @return [::String] - # The URL user will be redirected to after granting consent during connection - # setup. - # @!attribute [rw] federated_application_client_id - # @return [::String] - # The client ID of the user's Azure Active Directory Application used for a - # federated connection. - # @!attribute [r] identity - # @return [::String] - # Output only. A unique Google-owned and Google-generated identity for the - # Connection. This identity will be used to access the user's Azure Active - # Directory Application. - class AzureProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for connection properties for delegation of access to GCP - # resources. - # @!attribute [r] service_account_id - # @return [::String] - # Output only. The account ID of the service created for the purpose of this - # connection. - # - # The service account does not have any permissions associated with it - # when it is created. After creation, customers delegate permissions - # to the service account. When the connection is used in the context of an - # operation in BigQuery, the service account will be used to connect to the - # desired resources in GCP. - # - # The account ID is in the form of: - # @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com - class CloudResourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration of the Dataproc Metastore Service. - # @!attribute [rw] metastore_service - # @return [::String] - # Optional. Resource name of an existing Dataproc Metastore service. - # - # Example: - # - # * `projects/[project_id]/locations/[region]/services/[service_id]` - class MetastoreServiceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration of the Spark History Server. - # @!attribute [rw] dataproc_cluster - # @return [::String] - # Optional. Resource name of an existing Dataproc Cluster to act as a Spark - # History Server for the connection. - # - # Example: - # - # * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - class SparkHistoryServerConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for connection properties to execute stored procedures for Apache - # Spark. - # @!attribute [r] service_account_id - # @return [::String] - # Output only. The account ID of the service created for the purpose of this - # connection. - # - # The service account does not have any permissions associated with it when - # it is created. After creation, customers delegate permissions to the - # service account. When the connection is used in the context of a stored - # procedure for Apache Spark in BigQuery, the service account is used to - # connect to the desired resources in Google Cloud. - # - # The account ID is in the form of: - # bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com - # @!attribute [rw] metastore_service_config - # @return [::Google::Cloud::Bigquery::Connection::V1::MetastoreServiceConfig] - # Optional. Dataproc Metastore Service configuration for the connection. - # @!attribute [rw] spark_history_server_config - # @return [::Google::Cloud::Bigquery::Connection::V1::SparkHistoryServerConfig] - # Optional. Spark History Server configuration for the connection. - class SparkProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Connection properties specific to Salesforce DataCloud. This is intended for - # use only by Salesforce partner projects. - # @!attribute [rw] instance_uri - # @return [::String] - # The URL to the user's Salesforce DataCloud instance. - # @!attribute [r] identity - # @return [::String] - # Output only. A unique Google-owned and Google-generated service account - # identity for the connection. - # @!attribute [rw] tenant_id - # @return [::String] - # The ID of the user's Salesforce tenant. - class SalesforceDataCloudProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/Gemfile deleted file mode 100644 index f9b4542516a2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-connection-v1", path: "../" -else - gem "google-cloud-bigquery-connection-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/create_connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/create_connection.rb deleted file mode 100644 index f1946b18ab01..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/create_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync] -require "google/cloud/bigquery/connection/v1" - -## -# Snippet for the create_connection call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#create_connection. -# -def create_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new - - # Call the create_connection method. - result = client.create_connection request - - # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - p result -end -# [END bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/delete_connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/delete_connection.rb deleted file mode 100644 index a6d2dd64ad99..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/delete_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync] -require "google/cloud/bigquery/connection/v1" - -## -# Snippet for the delete_connection call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#delete_connection. -# -def delete_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new - - # Call the delete_connection method. - result = client.delete_connection request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_connection.rb deleted file mode 100644 index 63f5465b20e0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync] -require "google/cloud/bigquery/connection/v1" - -## -# Snippet for the get_connection call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_connection. -# -def get_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new - - # Call the get_connection method. - result = client.get_connection request - - # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - p result -end -# [END bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_iam_policy.rb deleted file mode 100644 index 6a1780760df0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync] -require "google/cloud/bigquery/connection/v1" - -## -# Snippet for the get_iam_policy call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::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 bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/list_connections.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/list_connections.rb deleted file mode 100644 index c79131fa819b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/list_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync] -require "google/cloud/bigquery/connection/v1" - -## -# Snippet for the list_connections call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections. -# -def list_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new - - # Call the list_connections method. - result = client.list_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Connection::V1::Connection. - p item - end -end -# [END bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/set_iam_policy.rb deleted file mode 100644 index 3e030fb7baf4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync] -require "google/cloud/bigquery/connection/v1" - -## -# Snippet for the set_iam_policy call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::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 bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/test_iam_permissions.rb deleted file mode 100644 index d3e2960233a4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync] -require "google/cloud/bigquery/connection/v1" - -## -# Snippet for the test_iam_permissions call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::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 bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/update_connection.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/update_connection.rb deleted file mode 100644 index 59692b640522..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/connection_service/update_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync] -require "google/cloud/bigquery/connection/v1" - -## -# Snippet for the update_connection call in the ConnectionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#update_connection. -# -def update_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new - - # Call the update_connection method. - result = client.update_connection request - - # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection. - p result -end -# [END bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/snippet_metadata_google.cloud.bigquery.connection.v1.json b/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/snippet_metadata_google.cloud.bigquery.connection.v1.json deleted file mode 100644 index 7fbfcd74f2a9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/snippets/snippet_metadata_google.cloud.bigquery.connection.v1.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-connection-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.connection.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync", - "title": "Snippet for the create_connection call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#create_connection.", - "file": "connection_service/create_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_connection", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#create_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Connection::V1::Connection", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" - }, - "method": { - "short_name": "CreateConnection", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.CreateConnection", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync", - "title": "Snippet for the get_connection call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_connection.", - "file": "connection_service/get_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_connection", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Connection::V1::Connection", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" - }, - "method": { - "short_name": "GetConnection", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.GetConnection", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync", - "title": "Snippet for the list_connections call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections.", - "file": "connection_service/list_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_connections", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#list_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" - }, - "method": { - "short_name": "ListConnections", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.ListConnections", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync", - "title": "Snippet for the update_connection call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#update_connection.", - "file": "connection_service/update_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_connection", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#update_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Connection::V1::Connection", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" - }, - "method": { - "short_name": "UpdateConnection", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.UpdateConnection", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync", - "title": "Snippet for the delete_connection call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#delete_connection.", - "file": "connection_service/delete_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_connection", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#delete_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" - }, - "method": { - "short_name": "DeleteConnection", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.DeleteConnection", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_iam_policy.", - "file": "connection_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.GetIamPolicy", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#set_iam_policy.", - "file": "connection_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.SetIamPolicy", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ConnectionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#test_iam_permissions.", - "file": "connection_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ConnectionService::Client", - "full_name": "::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService.TestIamPermissions", - "service": { - "short_name": "ConnectionService", - "full_name": "google.cloud.bigquery.connection.v1.ConnectionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_paths_test.rb deleted file mode 100644 index 1b20e0bb6e19..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/connection/v1/connection_service" - -class ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::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_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::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cluster_path project: "value0", region: "value1", cluster: "value2" - assert_equal "projects/value0/regions/value1/clusters/value2", path - end - end - - def test_connection_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.connection_path project: "value0", location: "value1", connection: "value2" - assert_equal "projects/value0/locations/value1/connections/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::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_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", service: "value2" - assert_equal "projects/value0/locations/value1/services/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_rest_test.rb deleted file mode 100644 index 371a3d9e115d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_rest_test.rb +++ /dev/null @@ -1,541 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/bigquery/connection/v1/connection_pb" -require "google/cloud/bigquery/connection/v1/connection_service/rest" - - -class ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::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_connection - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Connection::V1::Connection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - connection_id = "hello world" - connection = {} - - create_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_create_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_connection_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_connection({ parent: parent, connection_id: connection_id, connection: connection }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_connection parent: parent, connection_id: connection_id, connection: connection do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_connection ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_connection({ parent: parent, connection_id: connection_id, connection: connection }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_connection(::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_connection_client_stub.call_count - end - end - end - - def test_get_connection - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Connection::V1::Connection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_get_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_connection_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_connection({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_connection name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_connection ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_connection({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_connection(::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_connection_client_stub.call_count - end - end - end - - def test_list_connections - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse.new - http_response = OpenStruct.new 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_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_list_connections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_connections_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_connections parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_connections ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_connections(::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.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_connections_client_stub.call_count - end - end - end - - def test_update_connection - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Connection::V1::Connection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - connection = {} - update_mask = {} - - update_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_update_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_connection_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_connection({ name: name, connection: connection, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_connection name: name, connection: connection, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_connection ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_connection({ name: name, connection: connection, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_connection(::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_connection_client_stub.call_count - end - end - end - - def test_delete_connection - # 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_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_delete_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_connection_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_connection({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_connection name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_connection ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_connection({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_connection(::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_connection_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.rb deleted file mode 100644 index 699bd68315e3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/google/cloud/bigquery/connection/v1/connection_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/connection/v1/connection_pb" -require "google/cloud/bigquery/connection/v1/connection_service" - -class ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - 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_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Connection::V1::Connection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - connection_id = "hello world" - connection = {} - - create_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_connection, name - assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["connection_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Connection::V1::Connection), request["connection"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_connection_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_connection({ parent: parent, connection_id: connection_id, connection: connection }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_connection parent: parent, connection_id: connection_id, connection: connection do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_connection ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_connection({ parent: parent, connection_id: connection_id, connection: connection }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_connection(::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_connection_client_stub.call_rpc_count - end - end - - def test_get_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Connection::V1::Connection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_connection, name - assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_connection_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_connection ::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_connection({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_connection(::Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_connection_client_stub.call_rpc_count - end - end - - def test_list_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_connections, name - assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest, 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_connections_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_connections parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_connections ::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_connections(::Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.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_connections_client_stub.call_rpc_count - end - end - - def test_update_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Connection::V1::Connection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - connection = {} - update_mask = {} - - update_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_connection, name - assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Connection::V1::Connection), request["connection"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_connection_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_connection({ name: name, connection: connection, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_connection name: name, connection: connection, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_connection ::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_connection({ name: name, connection: connection, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_connection(::Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new(name: name, connection: connection, 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_connection_client_stub.call_rpc_count - end - end - - def test_delete_connection - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_connection, name - assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_connection_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_connection ::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_connection({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_connection(::Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new(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_connection_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 - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-connection-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-connection-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"